From 70c8a150b5306a05691197949e96f3d16d080cd4 Mon Sep 17 00:00:00 2001 From: Frostebite Date: Fri, 24 Mar 2023 16:37:15 +0000 Subject: [PATCH] fixes --- dist/index.js | 110 +++++++----------- dist/index.js.map | 2 +- src/model/cli/cli.ts | 4 +- .../cloud-runner/cloud-runner-options.ts | 4 - src/model/cloud-runner/cloud-runner.ts | 4 +- src/model/cloud-runner/remote-client/index.ts | 5 - .../services/cloud-runner-custom-steps.ts | 70 +++++------ .../services/task-parameter-serializer.ts | 24 +--- .../tests/cloud-runner-environment.test.ts | 2 +- .../cloud-runner/workflows/async-workflow.ts | 2 +- .../workflows/build-automation-workflow.ts | 4 +- src/model/github.ts | 2 +- 12 files changed, 90 insertions(+), 143 deletions(-) diff --git a/dist/index.js b/dist/index.js index b2256e6a..e9312bfd 100644 --- a/dist/index.js +++ b/dist/index.js @@ -529,7 +529,7 @@ class Cli { program.option('--select ', 'select a particular resource');\r\n program.parse(process.argv);\r\n Cli.options = program.opts();\r\n return Cli.isCliMode || process.env.CI_CLI;\r\n }\r\n static async RunCli() {\r\n github_1.default.githubInputEnabled = false;\r\n if (Cli.options['populateOverride'] === `true`) {\r\n await cloud_runner_query_override_1.default.PopulateQueryOverrideInput();\r\n }\r\n if (Cli.options['logInput']) {\r\n Cli.logInput();\r\n }\r\n const results = cli_functions_repository_1.CliFunctionsRepository.GetCliFunctions(Cli.options?.mode);\r\n cloud_runner_logger_1.default.log(`Entrypoint: ${results.key}`);\r\n Cli.options.versioning = 'None';\r\n __1.CloudRunner.buildParameters = await __1.BuildParameters.create();\r\n cloud_runner_logger_1.default.log(`Build Params:\n ${JSON.stringify(__1.CloudRunner.buildParameters, undefined, 4)}\n `);\r\n __1.CloudRunner.lockedWorkspace = process.env.CI_LOCKED_WORKSPACE || process.env.LOCKED_WORKSPACE || ``;\r\n cloud_runner_logger_1.default.log(`Locked Workspace: ${__1.CloudRunner.lockedWorkspace}`);\r\n await __1.CloudRunner.setup(__1.CloudRunner.buildParameters);\r\n return await results.target[results.propertyKey](Cli.options);\r\n }\r\n static logInput() {\r\n core.info(`\\n`);\r\n core.info(`INPUT:`);\r\n const properties = cloud_runner_options_reader_1.default.GetProperties();\r\n for (const element of properties) {\r\n if (element in __1.Input &&\r\n __1.Input[element] !== undefined &&\r\n __1.Input[element] !== '' &&\r\n typeof __1.Input[element] !== `function` &&\r\n element !== 'length' &&\r\n element !== 'cliOptions' &&\r\n element !== 'prototype') {\r\n core.info(`${element} ${__1.Input[element]}`);\r\n }\r\n }\r\n core.info(`\\n`);\r\n }\r\n static async CLIBuild() {\r\n const buildParameter = await __1.BuildParameters.create();\r\n const baseImage = new __1.ImageTag(buildParameter);\r\n return await __1.CloudRunner.run(buildParameter, baseImage.toString());\r\n }\r\n static async asyncronousWorkflow() {\r\n const buildParameter = await __1.BuildParameters.create();\r\n const baseImage = new __1.ImageTag(buildParameter);\r\n await __1.CloudRunner.setup(buildParameter);\r\n return await __1.CloudRunner.run(buildParameter, baseImage.toString());\r\n }\r\n static async checksUpdate() {\r\n const buildParameter = await __1.BuildParameters.create();\r\n await __1.CloudRunner.setup(buildParameter);\r\n const input = JSON.parse(process.env.CHECKS_UPDATE || ``);\r\n core.info(`Checks Update ${process.env.CHECKS_UPDATE}`);\r\n if (input.mode === `create`) {\r\n throw new Error(`Not supported: only use update`);\r\n }\r\n else if (input.mode === `update`) {\r\n await github_1.default.updateGitHubCheckRequest(input.data);\r\n }\r\n }\r\n static async GarbageCollect() {\r\n const buildParameter = await __1.BuildParameters.create();\r\n await __1.CloudRunner.setup(buildParameter);\r\n return await __1.CloudRunner.Provider.garbageCollect(``, false, 0, false, false);\r\n }\r\n static async ListResources() {\r\n const buildParameter = await __1.BuildParameters.create();\r\n await __1.CloudRunner.setup(buildParameter);\r\n const result = await __1.CloudRunner.Provider.listResources();\r\n cloud_runner_logger_1.default.log(JSON.stringify(result, undefined, 4));\r\n return result.map((x) => x.Name);\r\n }\r\n static async ListWorfklow() {\r\n const buildParameter = await __1.BuildParameters.create();\r\n await __1.CloudRunner.setup(buildParameter);\r\n return (await __1.CloudRunner.Provider.listWorkflow()).map((x) => x.Name);\r\n }\r\n static async Watch() {\r\n const buildParameter = await __1.BuildParameters.create();\r\n await __1.CloudRunner.setup(buildParameter);\r\n return await __1.CloudRunner.Provider.watchWorkflow();\r\n }\r\n static async PostCLIBuild() {\r\n core.info(`Running POST build tasks`);\r\n await caching_1.Caching.PushToCache(cloud_runner_folders_1.CloudRunnerFolders.ToLinuxFolder(`${cloud_runner_folders_1.CloudRunnerFolders.cacheFolderForCacheKeyFull}/Library`), cloud_runner_folders_1.CloudRunnerFolders.ToLinuxFolder(cloud_runner_folders_1.CloudRunnerFolders.libraryFolderAbsolute), `lib-${__1.CloudRunner.buildParameters.buildGuid}`);\r\n await caching_1.Caching.PushToCache(cloud_runner_folders_1.CloudRunnerFolders.ToLinuxFolder(`${cloud_runner_folders_1.CloudRunnerFolders.cacheFolderForCacheKeyFull}/build`), cloud_runner_folders_1.CloudRunnerFolders.ToLinuxFolder(cloud_runner_folders_1.CloudRunnerFolders.projectBuildFolderAbsolute), `build-${__1.CloudRunner.buildParameters.buildGuid}`);\r\n if (!__1.BuildParameters.shouldUseRetainedWorkspaceMode(__1.CloudRunner.buildParameters)) {\r\n await cloud_runner_system_1.CloudRunnerSystem.Run(`rm -r ${cloud_runner_folders_1.CloudRunnerFolders.ToLinuxFolder(cloud_runner_folders_1.CloudRunnerFolders.uniqueCloudRunnerJobFolderAbsolute)}`);\r\n }\r\n await remote_client_1.RemoteClient.runCustomHookFiles(`after-build`);\r\n return new Promise((result) => result(``));\r\n }\r\n}\r\n__decorate([\r\n cli_functions_repository_1.CliFunction(`print-input`, `prints all input`)\r\n], Cli, \"logInput\", null);\r\n__decorate([\r\n cli_functions_repository_1.CliFunction(`cli-build`, `runs a cloud runner build`)\r\n], Cli, \"CLIBuild\", null);\r\n__decorate([\r\n cli_functions_repository_1.CliFunction(`async-workflow`, `runs a cloud runner build`)\r\n], Cli, \"asyncronousWorkflow\", null);\r\n__decorate([\r\n cli_functions_repository_1.CliFunction(`checks-update`, `runs a cloud runner build`)\r\n], Cli, \"checksUpdate\", null);\r\n__decorate([\r\n cli_functions_repository_1.CliFunction(`garbage-collect`, `runs garbage collection`)\r\n], Cli, \"GarbageCollect\", null);\r\n__decorate([\r\n cli_functions_repository_1.CliFunction(`list-resources`, `lists active resources`)\r\n], Cli, \"ListResources\", null);\r\n__decorate([\r\n cli_functions_repository_1.CliFunction(`list-worfklow`, `lists running workflows`)\r\n], Cli, \"ListWorfklow\", null);\r\n__decorate([\r\n cli_functions_repository_1.CliFunction(`watch`, `follows logs of a running workflow`)\r\n], Cli, \"Watch\", null);\r\n__decorate([\r\n cli_functions_repository_1.CliFunction(`remote-cli-post-build`, `runs a cloud runner build`)\r\n], Cli, \"PostCLIBuild\", null);\r\nexports.Cli = Cli;\r\n","\"use strict\";\r\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n}));\r\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n});\r\nvar __importStar = (this && this.__importStar) || function (mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n};\r\nvar __importDefault = (this && this.__importDefault) || function (mod) {\r\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\r\n};\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nconst cli_1 = require(\"../cli/cli\");\r\nconst cloud_runner_query_override_1 = __importDefault(require(\"./services/cloud-runner-query-override\"));\r\nconst github_1 = __importDefault(require(\"../github\"));\r\nconst core = __importStar(require(\"@actions/core\"));\r\nclass CloudRunnerOptions {\r\n // ### ### ###\r\n // Input Handling\r\n // ### ### ###\r\n static getInput(query) {\r\n if (github_1.default.githubInputEnabled) {\r\n const coreInput = core.getInput(query);\r\n if (coreInput && coreInput !== '') {\r\n return coreInput;\r\n }\r\n }\r\n const alternativeQuery = CloudRunnerOptions.ToEnvVarFormat(query);\r\n // Query input sources\r\n if (cli_1.Cli.query(query, alternativeQuery)) {\r\n return cli_1.Cli.query(query, alternativeQuery);\r\n }\r\n if (cloud_runner_query_override_1.default.query(query, alternativeQuery)) {\r\n return cloud_runner_query_override_1.default.query(query, alternativeQuery);\r\n }\r\n if (process.env[query] !== undefined) {\r\n return process.env[query];\r\n }\r\n if (alternativeQuery !== query && process.env[`CI_${alternativeQuery}`] !== undefined) {\r\n return process.env[`CI_${alternativeQuery}`];\r\n }\r\n if (alternativeQuery !== query && process.env[alternativeQuery] !== undefined) {\r\n return process.env[alternativeQuery];\r\n }\r\n }\r\n static ToEnvVarFormat(input) {\r\n if (input.toUpperCase() === input) {\r\n return input;\r\n }\r\n return input\r\n .replace(/([A-Z])/g, ' $1')\r\n .trim()\r\n .toUpperCase()\r\n .replace(/ /g, '_');\r\n }\r\n // ### ### ###\r\n // Provider parameters\r\n // ### ### ###\r\n static get region() {\r\n return CloudRunnerOptions.getInput('region') || 'eu-west-2';\r\n }\r\n // ### ### ###\r\n // GitHub parameters\r\n // ### ### ###\r\n static get githubChecks() {\r\n const value = CloudRunnerOptions.getInput('githubChecks');\r\n return value === `true` || false;\r\n }\r\n static get githubCheckId() {\r\n return CloudRunnerOptions.getInput('githubCheckId') || ``;\r\n }\r\n static get githubOwner() {\r\n return CloudRunnerOptions.getInput('githubOwner') || CloudRunnerOptions.githubRepo?.split(`/`)[0] || '';\r\n }\r\n static get githubRepoName() {\r\n return CloudRunnerOptions.getInput('githubRepoName') || CloudRunnerOptions.githubRepo?.split(`/`)[1] || '';\r\n }\r\n static get finalHooks() {\r\n return CloudRunnerOptions.getInput('finalHooks')?.split(',') || [];\r\n }\r\n // ### ### ###\r\n // Git syncronization parameters\r\n // ### ### ###\r\n static get githubRepo() {\r\n return CloudRunnerOptions.getInput('GITHUB_REPOSITORY') || CloudRunnerOptions.getInput('GITHUB_REPO') || undefined;\r\n }\r\n static get branch() {\r\n if (CloudRunnerOptions.getInput(`GITHUB_REF`)) {\r\n return (CloudRunnerOptions.getInput(`GITHUB_REF`)?.replace('refs/', '').replace(`head/`, '').replace(`heads/`, '') || ``);\r\n }\r\n else if (CloudRunnerOptions.getInput('branch')) {\r\n return CloudRunnerOptions.getInput('branch') || ``;\r\n }\r\n else {\r\n return '';\r\n }\r\n }\r\n // ### ### ###\r\n // Cloud Runner parameters\r\n // ### ### ###\r\n static get buildPlatform() {\r\n const input = CloudRunnerOptions.getInput('buildPlatform');\r\n if (input) {\r\n return input;\r\n }\r\n if (CloudRunnerOptions.providerStrategy !== 'local') {\r\n return 'linux';\r\n }\r\n return ``;\r\n }\r\n static get cloudRunnerBranch() {\r\n return CloudRunnerOptions.getInput('cloudRunnerBranch') || 'main';\r\n }\r\n static get providerStrategy() {\r\n const provider = CloudRunnerOptions.getInput('cloudRunnerCluster') || CloudRunnerOptions.getInput('providerStrategy');\r\n if (cli_1.Cli.isCliMode) {\r\n return provider || 'aws';\r\n }\r\n return provider || 'local';\r\n }\r\n static get containerCpu() {\r\n return CloudRunnerOptions.getInput('containerCpu') || `1024`;\r\n }\r\n static get containerMemory() {\r\n return CloudRunnerOptions.getInput('containerMemory') || `3072`;\r\n }\r\n static get customJob() {\r\n return CloudRunnerOptions.getInput('customJob') || '';\r\n }\r\n // ### ### ###\r\n // Custom commands from files parameters\r\n // ### ### ###\r\n static get customStepFiles() {\r\n return CloudRunnerOptions.getInput('customStepFiles')?.split(`,`) || [];\r\n }\r\n static get customHookFiles() {\r\n return CloudRunnerOptions.getInput('customHookFiles')?.split(`,`) || [];\r\n }\r\n // ### ### ###\r\n // Custom commands from yaml parameters\r\n // ### ### ###\r\n static get commandHooks() {\r\n return CloudRunnerOptions.getInput('commandHooks') || '';\r\n }\r\n static get postBuildSteps() {\r\n return CloudRunnerOptions.getInput('postBuildSteps') || '';\r\n }\r\n static get preBuildSteps() {\r\n return CloudRunnerOptions.getInput('preBuildSteps') || '';\r\n }\r\n // ### ### ###\r\n // Input override handling\r\n // ### ### ###\r\n static get pullInputList() {\r\n return CloudRunnerOptions.getInput('pullInputList')?.split(`,`) || [];\r\n }\r\n static get inputPullCommand() {\r\n const value = CloudRunnerOptions.getInput('inputPullCommand');\r\n if (value === 'gcp-secret-manager') {\r\n return 'gcloud secrets versions access 1 --secret=\"{0}\"';\r\n }\r\n else if (value === 'aws-secret-manager') {\r\n return 'aws secretsmanager get-secret-value --secret-id {0}';\r\n }\r\n return value || '';\r\n }\r\n // ### ### ###\r\n // Aws\r\n // ### ### ###\r\n static get awsStackName() {\r\n return CloudRunnerOptions.getInput('awsStackName') || 'game-ci';\r\n }\r\n // ### ### ###\r\n // K8s\r\n // ### ### ###\r\n static get kubeConfig() {\r\n return CloudRunnerOptions.getInput('kubeConfig') || '';\r\n }\r\n static get kubeVolume() {\r\n return CloudRunnerOptions.getInput('kubeVolume') || '';\r\n }\r\n static get kubeVolumeSize() {\r\n return CloudRunnerOptions.getInput('kubeVolumeSize') || '10Gi';\r\n }\r\n static get kubeStorageClass() {\r\n return CloudRunnerOptions.getInput('kubeStorageClass') || '';\r\n }\r\n // ### ### ###\r\n // Caching\r\n // ### ### ###\r\n static get cacheKey() {\r\n return CloudRunnerOptions.getInput('cacheKey') || CloudRunnerOptions.branch;\r\n }\r\n // ### ### ###\r\n // Utility Parameters\r\n // ### ### ###\r\n static get cloudRunnerDebug() {\r\n return (CloudRunnerOptions.getInput(`cloudRunnerTests`) === `true` ||\r\n CloudRunnerOptions.getInput(`cloudRunnerDebug`) === `true` ||\r\n CloudRunnerOptions.getInput(`cloudRunnerDebugTree`) === `true` ||\r\n CloudRunnerOptions.getInput(`cloudRunnerDebugEnv`) === `true` ||\r\n false);\r\n }\r\n static get skipLfs() {\r\n return CloudRunnerOptions.getInput(`skipLfs`) === `true`;\r\n }\r\n static get skipCache() {\r\n return CloudRunnerOptions.getInput(`skipCache`) === `true`;\r\n }\r\n static get asyncCloudRunner() {\r\n return CloudRunnerOptions.getInput('asyncCloudRunner') === 'true';\r\n }\r\n static get useLargePackages() {\r\n return CloudRunnerOptions.getInput(`useLargePackages`) === `true`;\r\n }\r\n static get useSharedBuilder() {\r\n return CloudRunnerOptions.getInput(`useSharedBuilder`) === `true`;\r\n }\r\n static get useCompressionStrategy() {\r\n return CloudRunnerOptions.getInput(`useCompressionStrategy`) === `true`;\r\n }\r\n static get useCleanupCron() {\r\n return (CloudRunnerOptions.getInput(`useCleanupCron`) || 'true') === 'true';\r\n }\r\n // ### ### ###\r\n // Retained Workspace\r\n // ### ### ###\r\n static get maxRetainedWorkspaces() {\r\n return CloudRunnerOptions.getInput(`maxRetainedWorkspaces`) || `0`;\r\n }\r\n // ### ### ###\r\n // Garbage Collection\r\n // ### ### ###\r\n static get garbageMaxAge() {\r\n return Number(CloudRunnerOptions.getInput(`garbageMaxAge`)) || 24;\r\n }\r\n}\r\nexports.default = CloudRunnerOptions;\r\n","\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.CloudRunnerStatics = void 0;\r\nclass CloudRunnerStatics {\r\n}\r\nexports.CloudRunnerStatics = CloudRunnerStatics;\r\nCloudRunnerStatics.logPrefix = `Cloud-Runner`;\r\n","\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.CloudRunnerStepState = void 0;\r\nclass CloudRunnerStepState {\r\n constructor(image, environmentVariables, secrets) {\r\n this.image = image;\r\n this.environment = environmentVariables;\r\n this.secrets = secrets;\r\n }\r\n}\r\nexports.CloudRunnerStepState = CloudRunnerStepState;\r\n","\"use strict\";\r\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n}));\r\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n});\r\nvar __importStar = (this && this.__importStar) || function (mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n};\r\nvar __importDefault = (this && this.__importDefault) || function (mod) {\r\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\r\n};\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nconst aws_1 = __importDefault(require(\"./providers/aws\"));\r\nconst __1 = require(\"..\");\r\nconst k8s_1 = __importDefault(require(\"./providers/k8s\"));\r\nconst cloud_runner_logger_1 = __importDefault(require(\"./services/cloud-runner-logger\"));\r\nconst cloud_runner_step_state_1 = require(\"./cloud-runner-step-state\");\r\nconst workflow_composition_root_1 = require(\"./workflows/workflow-composition-root\");\r\nconst cloud_runner_error_1 = require(\"./error/cloud-runner-error\");\r\nconst task_parameter_serializer_1 = require(\"./services/task-parameter-serializer\");\r\nconst core = __importStar(require(\"@actions/core\"));\r\nconst test_1 = __importDefault(require(\"./providers/test\"));\r\nconst local_1 = __importDefault(require(\"./providers/local\"));\r\nconst docker_1 = __importDefault(require(\"./providers/docker\"));\r\nconst github_1 = __importDefault(require(\"../github\"));\r\nconst shared_workspace_locking_1 = __importDefault(require(\"./services/shared-workspace-locking\"));\r\nclass CloudRunner {\r\n static get isCloudRunnerEnvironment() {\r\n return process.env[`GITHUB_ACTIONS`] !== `true`;\r\n }\r\n static get isCloudRunnerAsyncEnvironment() {\r\n return process.env[`CI_ASYNC_WORKFLOW`] === `true`;\r\n }\r\n static async setup(buildParameters) {\r\n cloud_runner_logger_1.default.setup();\r\n cloud_runner_logger_1.default.log(`Setting up cloud runner`);\r\n CloudRunner.buildParameters = buildParameters;\r\n if (CloudRunner.buildParameters.githubCheckId === ``) {\r\n CloudRunner.buildParameters.githubCheckId = await github_1.default.createGitHubCheck(CloudRunner.buildParameters.buildGuid);\r\n }\r\n CloudRunner.setupSelectedBuildPlatform();\r\n CloudRunner.defaultSecrets = task_parameter_serializer_1.TaskParameterSerializer.readDefaultSecrets();\r\n CloudRunner.cloudRunnerEnvironmentVariables =\r\n task_parameter_serializer_1.TaskParameterSerializer.createCloudRunnerEnvironmentVariables(buildParameters);\r\n if (github_1.default.githubInputEnabled) {\r\n const buildParameterPropertyNames = Object.getOwnPropertyNames(buildParameters);\r\n for (const element of CloudRunner.cloudRunnerEnvironmentVariables) {\r\n // CloudRunnerLogger.log(`Cloud Runner output ${Input.ToEnvVarFormat(element.name)} = ${element.value}`);\r\n core.setOutput(__1.Input.ToEnvVarFormat(element.name), element.value);\r\n }\r\n for (const element of buildParameterPropertyNames) {\r\n // CloudRunnerLogger.log(`Cloud Runner output ${Input.ToEnvVarFormat(element)} = ${buildParameters[element]}`);\r\n core.setOutput(__1.Input.ToEnvVarFormat(element), buildParameters[element]);\r\n }\r\n core.setOutput(__1.Input.ToEnvVarFormat(`buildArtifact`), `build-${CloudRunner.buildParameters.buildGuid}.tar${CloudRunner.buildParameters.useCompressionStrategy ? '.lz4' : ''}`);\r\n }\r\n }\r\n static setupSelectedBuildPlatform() {\r\n cloud_runner_logger_1.default.log(`Cloud Runner platform selected ${CloudRunner.buildParameters.providerStrategy}`);\r\n switch (CloudRunner.buildParameters.providerStrategy) {\r\n case 'k8s':\r\n CloudRunner.Provider = new k8s_1.default(CloudRunner.buildParameters);\r\n break;\r\n case 'aws':\r\n CloudRunner.Provider = new aws_1.default(CloudRunner.buildParameters);\r\n break;\r\n case 'test':\r\n CloudRunner.Provider = new test_1.default();\r\n break;\r\n case 'local-docker':\r\n CloudRunner.Provider = new docker_1.default();\r\n break;\r\n case 'local-system':\r\n CloudRunner.Provider = new local_1.default();\r\n break;\r\n }\r\n }\r\n static async run(buildParameters, baseImage) {\r\n await CloudRunner.setup(buildParameters);\r\n if (!CloudRunner.buildParameters.isCliMode)\r\n core.startGroup('Setup shared cloud runner resources');\r\n await CloudRunner.Provider.setupWorkflow(CloudRunner.buildParameters.buildGuid, CloudRunner.buildParameters, CloudRunner.buildParameters.branch, CloudRunner.defaultSecrets);\r\n if (!CloudRunner.buildParameters.isCliMode)\r\n core.endGroup();\r\n try {\r\n if (buildParameters.maxRetainedWorkspaces > 0) {\r\n CloudRunner.lockedWorkspace = shared_workspace_locking_1.default.NewWorkspaceName();\r\n const result = await shared_workspace_locking_1.default.GetLockedWorkspace(CloudRunner.lockedWorkspace, CloudRunner.buildParameters.buildGuid, CloudRunner.buildParameters);\r\n if (result) {\r\n cloud_runner_logger_1.default.logLine(`Using retained workspace ${CloudRunner.lockedWorkspace}`);\r\n CloudRunner.cloudRunnerEnvironmentVariables = [\r\n ...CloudRunner.cloudRunnerEnvironmentVariables,\r\n { name: `CI_LOCKED_WORKSPACE`, value: CloudRunner.lockedWorkspace },\r\n ];\r\n }\r\n else {\r\n cloud_runner_logger_1.default.log(`Max retained workspaces reached ${buildParameters.maxRetainedWorkspaces}`);\r\n buildParameters.maxRetainedWorkspaces = 0;\r\n CloudRunner.lockedWorkspace = ``;\r\n }\r\n }\r\n const content = { ...CloudRunner.buildParameters };\r\n content.gitPrivateToken = ``;\r\n content.unitySerial = ``;\r\n const jsonContent = JSON.stringify(content, undefined, 4);\r\n await github_1.default.updateGitHubCheck(jsonContent, CloudRunner.buildParameters.buildGuid);\r\n const output = await new workflow_composition_root_1.WorkflowCompositionRoot().run(new cloud_runner_step_state_1.CloudRunnerStepState(baseImage, CloudRunner.cloudRunnerEnvironmentVariables, CloudRunner.defaultSecrets));\r\n if (!CloudRunner.buildParameters.isCliMode)\r\n core.startGroup('Cleanup shared cloud runner resources');\r\n await CloudRunner.Provider.cleanupWorkflow(CloudRunner.buildParameters.buildGuid, CloudRunner.buildParameters, CloudRunner.buildParameters.branch, CloudRunner.defaultSecrets);\r\n cloud_runner_logger_1.default.log(`Cleanup complete`);\r\n if (!CloudRunner.buildParameters.isCliMode)\r\n core.endGroup();\r\n await github_1.default.updateGitHubCheck(CloudRunner.buildParameters.buildGuid, `success`, `success`, `completed`);\r\n if (__1.BuildParameters.shouldUseRetainedWorkspaceMode(buildParameters)) {\r\n const workspace = CloudRunner.lockedWorkspace || ``;\r\n await shared_workspace_locking_1.default.ReleaseWorkspace(workspace, CloudRunner.buildParameters.buildGuid, CloudRunner.buildParameters);\r\n const isLocked = await shared_workspace_locking_1.default.IsWorkspaceLocked(workspace, CloudRunner.buildParameters);\r\n if (isLocked) {\r\n throw new Error(`still locked after releasing ${await shared_workspace_locking_1.default.GetAllLocksForWorkspace(workspace, buildParameters)}`);\r\n }\r\n CloudRunner.lockedWorkspace = ``;\r\n }\r\n await github_1.default.triggerWorkflowOnComplete(CloudRunner.buildParameters.finalHooks);\r\n if (buildParameters.constantGarbageCollection) {\r\n CloudRunner.Provider.garbageCollect(``, true, buildParameters.garbageMaxAge, true, true);\r\n }\r\n return output;\r\n }\r\n catch (error) {\r\n cloud_runner_logger_1.default.log(JSON.stringify(error, undefined, 4));\r\n await github_1.default.updateGitHubCheck(CloudRunner.buildParameters.buildGuid, `Failed - Error ${error?.message || error}`, `failure`, `completed`);\r\n if (!CloudRunner.buildParameters.isCliMode)\r\n core.endGroup();\r\n await cloud_runner_error_1.CloudRunnerError.handleException(error, CloudRunner.buildParameters, CloudRunner.defaultSecrets);\r\n throw error;\r\n }\r\n }\r\n}\r\nCloudRunner.lockedWorkspace = ``;\r\nCloudRunner.retainedWorkspacePrefix = `retained-workspace`;\r\nexports.default = CloudRunner;\r\n","\"use strict\";\r\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n}));\r\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n});\r\nvar __importStar = (this && this.__importStar) || function (mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n};\r\nvar __importDefault = (this && this.__importDefault) || function (mod) {\r\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\r\n};\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.CloudRunnerError = void 0;\r\nconst cloud_runner_logger_1 = __importDefault(require(\"../services/cloud-runner-logger\"));\r\nconst core = __importStar(require(\"@actions/core\"));\r\nconst cloud_runner_1 = __importDefault(require(\"../cloud-runner\"));\r\nclass CloudRunnerError {\r\n static async handleException(error, buildParameters, secrets) {\r\n cloud_runner_logger_1.default.error(JSON.stringify(error, undefined, 4));\r\n core.setFailed('Cloud Runner failed');\r\n if (cloud_runner_1.default.Provider !== undefined) {\r\n await cloud_runner_1.default.Provider.cleanupWorkflow(buildParameters.buildGuid, buildParameters, buildParameters.branch, secrets);\r\n }\r\n }\r\n}\r\nexports.CloudRunnerError = CloudRunnerError;\r\n","\"use strict\";\r\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n}));\r\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n});\r\nvar __importStar = (this && this.__importStar) || function (mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n};\r\nvar __importDefault = (this && this.__importDefault) || function (mod) {\r\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\r\n};\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.AWSBaseStack = void 0;\r\nconst cloud_runner_logger_1 = __importDefault(require(\"../../services/cloud-runner-logger\"));\r\nconst core = __importStar(require(\"@actions/core\"));\r\nconst base_stack_formation_1 = require(\"./cloud-formations/base-stack-formation\");\r\nconst node_crypto_1 = __importDefault(require(\"node:crypto\"));\r\nclass AWSBaseStack {\r\n constructor(baseStackName) {\r\n this.baseStackName = baseStackName;\r\n }\r\n async setupBaseStack(CF) {\r\n const baseStackName = this.baseStackName;\r\n const baseStack = base_stack_formation_1.BaseStackFormation.formation;\r\n // Cloud Formation Input\r\n const describeStackInput = {\r\n StackName: baseStackName,\r\n };\r\n const parametersWithoutHash = [\r\n { ParameterKey: 'EnvironmentName', ParameterValue: baseStackName },\r\n ];\r\n const parametersHash = node_crypto_1.default\r\n .createHash('md5')\r\n .update(baseStack + JSON.stringify(parametersWithoutHash))\r\n .digest('hex');\r\n const parameters = [\r\n ...parametersWithoutHash,\r\n ...[{ ParameterKey: 'Version', ParameterValue: parametersHash }],\r\n ];\r\n const updateInput = {\r\n StackName: baseStackName,\r\n TemplateBody: baseStack,\r\n Parameters: parameters,\r\n Capabilities: ['CAPABILITY_IAM'],\r\n };\r\n const createStackInput = {\r\n StackName: baseStackName,\r\n TemplateBody: baseStack,\r\n Parameters: parameters,\r\n Capabilities: ['CAPABILITY_IAM'],\r\n };\r\n const stacks = await CF.listStacks({\r\n StackStatusFilter: ['UPDATE_COMPLETE', 'CREATE_COMPLETE', 'ROLLBACK_COMPLETE'],\r\n }).promise();\r\n const stackNames = stacks.StackSummaries?.map((x) => x.StackName) || [];\r\n const stackExists = stackNames.includes(baseStackName) || false;\r\n const describeStack = async () => {\r\n return await CF.describeStacks(describeStackInput).promise();\r\n };\r\n try {\r\n if (!stackExists) {\r\n cloud_runner_logger_1.default.log(`${baseStackName} stack does not exist (${JSON.stringify(stackNames)})`);\r\n await CF.createStack(createStackInput).promise();\r\n cloud_runner_logger_1.default.log(`created stack (version: ${parametersHash})`);\r\n }\r\n const CFState = await describeStack();\r\n let stack = CFState.Stacks?.[0];\r\n if (!stack) {\r\n throw new Error(`Base stack doesn't exist, even after creation, stackExists check: ${stackExists}`);\r\n }\r\n const stackVersion = stack.Parameters?.find((x) => x.ParameterKey === 'Version')?.ParameterValue;\r\n if (stack.StackStatus === 'CREATE_IN_PROGRESS') {\r\n await CF.waitFor('stackCreateComplete', describeStackInput).promise();\r\n }\r\n if (stackExists) {\r\n cloud_runner_logger_1.default.log(`Base stack exists (version: ${stackVersion}, local version: ${parametersHash})`);\r\n if (parametersHash !== stackVersion) {\r\n cloud_runner_logger_1.default.log(`Attempting update of base stack`);\r\n try {\r\n await CF.updateStack(updateInput).promise();\r\n }\r\n catch (error) {\r\n if (error['message'].includes('No updates are to be performed')) {\r\n cloud_runner_logger_1.default.log(`No updates are to be performed`);\r\n }\r\n else {\r\n cloud_runner_logger_1.default.log(`Update Failed (Stack name: ${baseStackName})`);\r\n cloud_runner_logger_1.default.log(error['message']);\r\n }\r\n cloud_runner_logger_1.default.log(`Continuing...`);\r\n }\r\n }\r\n else {\r\n cloud_runner_logger_1.default.log(`No update required`);\r\n }\r\n stack = (await describeStack()).Stacks?.[0];\r\n if (!stack) {\r\n throw new Error(`Base stack doesn't exist, even after updating and creation, stackExists check: ${stackExists}`);\r\n }\r\n if (stack.StackStatus === 'UPDATE_IN_PROGRESS') {\r\n await CF.waitFor('stackUpdateComplete', describeStackInput).promise();\r\n }\r\n }\r\n cloud_runner_logger_1.default.log('base stack is now ready');\r\n }\r\n catch (error) {\r\n core.error(JSON.stringify(await describeStack(), undefined, 4));\r\n throw error;\r\n }\r\n }\r\n}\r\nexports.AWSBaseStack = AWSBaseStack;\r\n","\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.AWSCloudFormationTemplates = void 0;\r\nconst task_definition_formation_1 = require(\"./cloud-formations/task-definition-formation\");\r\nclass AWSCloudFormationTemplates {\r\n static getParameterTemplate(p1) {\r\n return `\n ${p1}:\n Type: String\n Default: ''\n`;\r\n }\r\n static getSecretTemplate(p1) {\r\n return `\n ${p1}Secret:\n Type: AWS::SecretsManager::Secret\n Properties:\n Name: '${p1}'\n SecretString: !Ref ${p1}\n`;\r\n }\r\n static getSecretDefinitionTemplate(p1, p2) {\r\n return `\n - Name: '${p1}'\n ValueFrom: !Ref ${p2}Secret\n`;\r\n }\r\n static insertAtTemplate(template, insertionKey, insertion) {\r\n const index = template.search(insertionKey) + insertionKey.length + '\\n'.length;\r\n template = [template.slice(0, index), insertion, template.slice(index)].join('');\r\n return template;\r\n }\r\n static readTaskCloudFormationTemplate() {\r\n return task_definition_formation_1.TaskDefinitionFormation.formation;\r\n }\r\n}\r\nexports.AWSCloudFormationTemplates = AWSCloudFormationTemplates;\r\n","\"use strict\";\r\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n}));\r\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n});\r\nvar __importStar = (this && this.__importStar) || function (mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n};\r\nvar __importDefault = (this && this.__importDefault) || function (mod) {\r\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\r\n};\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.AWSError = void 0;\r\nconst cloud_runner_logger_1 = __importDefault(require(\"../../services/cloud-runner-logger\"));\r\nconst core = __importStar(require(\"@actions/core\"));\r\nconst cloud_runner_1 = __importDefault(require(\"../../cloud-runner\"));\r\nclass AWSError {\r\n static async handleStackCreationFailure(error, CF, taskDefStackName) {\r\n cloud_runner_logger_1.default.log('aws error: ');\r\n core.error(JSON.stringify(error, undefined, 4));\r\n if (cloud_runner_1.default.buildParameters.cloudRunnerDebug) {\r\n cloud_runner_logger_1.default.log('Getting events and resources for task stack');\r\n const events = (await CF.describeStackEvents({ StackName: taskDefStackName }).promise()).StackEvents;\r\n cloud_runner_logger_1.default.log(JSON.stringify(events, undefined, 4));\r\n }\r\n }\r\n}\r\nexports.AWSError = AWSError;\r\n","\"use strict\";\r\nvar __importDefault = (this && this.__importDefault) || function (mod) {\r\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\r\n};\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.AWSJobStack = void 0;\r\nconst aws_cloud_formation_templates_1 = require(\"./aws-cloud-formation-templates\");\r\nconst cloud_runner_logger_1 = __importDefault(require(\"../../services/cloud-runner-logger\"));\r\nconst aws_error_1 = require(\"./aws-error\");\r\nconst cloud_runner_1 = __importDefault(require(\"../../cloud-runner\"));\r\nconst cleanup_cron_formation_1 = require(\"./cloud-formations/cleanup-cron-formation\");\r\nconst cloud_runner_options_1 = __importDefault(require(\"../../cloud-runner-options\"));\r\nconst task_definition_formation_1 = require(\"./cloud-formations/task-definition-formation\");\r\nclass AWSJobStack {\r\n constructor(baseStackName) {\r\n this.baseStackName = baseStackName;\r\n }\r\n async setupCloudFormations(CF, buildGuid, image, entrypoint, commands, mountdir, workingdir, secrets) {\r\n const taskDefStackName = `${this.baseStackName}-${buildGuid}`;\r\n let taskDefCloudFormation = aws_cloud_formation_templates_1.AWSCloudFormationTemplates.readTaskCloudFormationTemplate();\r\n taskDefCloudFormation = taskDefCloudFormation.replace(`ContainerCpu:\n Default: 1024`, `ContainerCpu:\n Default: ${Number.parseInt(cloud_runner_1.default.buildParameters.containerCpu)}`);\r\n taskDefCloudFormation = taskDefCloudFormation.replace(`ContainerMemory:\n Default: 2048`, `ContainerMemory:\n Default: ${Number.parseInt(cloud_runner_1.default.buildParameters.containerMemory)}`);\r\n if (!cloud_runner_options_1.default.asyncCloudRunner) {\r\n taskDefCloudFormation = aws_cloud_formation_templates_1.AWSCloudFormationTemplates.insertAtTemplate(taskDefCloudFormation, '# template resources logstream', task_definition_formation_1.TaskDefinitionFormation.streamLogs);\r\n }\r\n for (const secret of secrets) {\r\n secret.ParameterKey = `${buildGuid.replace(/[^\\dA-Za-z]/g, '')}${secret.ParameterKey.replace(/[^\\dA-Za-z]/g, '')}`;\r\n if (typeof secret.ParameterValue == 'number') {\r\n secret.ParameterValue = `${secret.ParameterValue}`;\r\n }\r\n if (!secret.ParameterValue || secret.ParameterValue === '') {\r\n secrets = secrets.filter((x) => x !== secret);\r\n continue;\r\n }\r\n taskDefCloudFormation = aws_cloud_formation_templates_1.AWSCloudFormationTemplates.insertAtTemplate(taskDefCloudFormation, 'p1 - input', aws_cloud_formation_templates_1.AWSCloudFormationTemplates.getParameterTemplate(secret.ParameterKey));\r\n taskDefCloudFormation = aws_cloud_formation_templates_1.AWSCloudFormationTemplates.insertAtTemplate(taskDefCloudFormation, '# template resources secrets', aws_cloud_formation_templates_1.AWSCloudFormationTemplates.getSecretTemplate(`${secret.ParameterKey}`));\r\n taskDefCloudFormation = aws_cloud_formation_templates_1.AWSCloudFormationTemplates.insertAtTemplate(taskDefCloudFormation, 'p3 - container def', aws_cloud_formation_templates_1.AWSCloudFormationTemplates.getSecretDefinitionTemplate(secret.EnvironmentVariable, secret.ParameterKey));\r\n }\r\n const secretsMappedToCloudFormationParameters = secrets.map((x) => {\r\n return { ParameterKey: x.ParameterKey.replace(/[^\\dA-Za-z]/g, ''), ParameterValue: x.ParameterValue };\r\n });\r\n const logGroupName = `${this.baseStackName}/${taskDefStackName}`;\r\n const parameters = [\r\n {\r\n ParameterKey: 'EnvironmentName',\r\n ParameterValue: this.baseStackName,\r\n },\r\n {\r\n ParameterKey: 'ImageUrl',\r\n ParameterValue: image,\r\n },\r\n {\r\n ParameterKey: 'ServiceName',\r\n ParameterValue: taskDefStackName,\r\n },\r\n {\r\n ParameterKey: 'LogGroupName',\r\n ParameterValue: logGroupName,\r\n },\r\n {\r\n ParameterKey: 'Command',\r\n ParameterValue: 'echo \"this template should be overwritten when running a task\"',\r\n },\r\n {\r\n ParameterKey: 'EntryPoint',\r\n ParameterValue: entrypoint.join(','),\r\n },\r\n {\r\n ParameterKey: 'WorkingDirectory',\r\n ParameterValue: workingdir,\r\n },\r\n {\r\n ParameterKey: 'EFSMountDirectory',\r\n ParameterValue: mountdir,\r\n },\r\n ...secretsMappedToCloudFormationParameters,\r\n ];\r\n cloud_runner_logger_1.default.log(`Starting AWS job with memory: ${cloud_runner_1.default.buildParameters.containerMemory} cpu: ${cloud_runner_1.default.buildParameters.containerCpu}`);\r\n let previousStackExists = true;\r\n while (previousStackExists) {\r\n previousStackExists = false;\r\n const stacks = await CF.listStacks().promise();\r\n if (!stacks.StackSummaries) {\r\n throw new Error('Faild to get stacks');\r\n }\r\n for (let index = 0; index < stacks.StackSummaries.length; index++) {\r\n const element = stacks.StackSummaries[index];\r\n if (element.StackName === taskDefStackName && element.StackStatus !== 'DELETE_COMPLETE') {\r\n previousStackExists = true;\r\n cloud_runner_logger_1.default.log(`Previous stack still exists: ${JSON.stringify(element)}`);\r\n await new Promise((promise) => setTimeout(promise, 5000));\r\n }\r\n }\r\n }\r\n const createStackInput = {\r\n StackName: taskDefStackName,\r\n TemplateBody: taskDefCloudFormation,\r\n Capabilities: ['CAPABILITY_IAM'],\r\n Parameters: parameters,\r\n };\r\n try {\r\n cloud_runner_logger_1.default.log(`Creating job aws formation ${taskDefStackName}`);\r\n await CF.createStack(createStackInput).promise();\r\n await CF.waitFor('stackCreateComplete', { StackName: taskDefStackName }).promise();\r\n const describeStack = await CF.describeStacks({ StackName: taskDefStackName }).promise();\r\n for (const parameter of parameters) {\r\n if (!describeStack.Stacks?.[0].Parameters?.some((x) => x.ParameterKey === parameter.ParameterKey)) {\r\n throw new Error(`Parameter ${parameter.ParameterKey} not found in stack`);\r\n }\r\n }\r\n }\r\n catch (error) {\r\n await aws_error_1.AWSError.handleStackCreationFailure(error, CF, taskDefStackName);\r\n throw error;\r\n }\r\n const createCleanupStackInput = {\r\n StackName: `${taskDefStackName}-cleanup`,\r\n TemplateBody: cleanup_cron_formation_1.CleanupCronFormation.formation,\r\n Capabilities: ['CAPABILITY_IAM'],\r\n Parameters: [\r\n {\r\n ParameterKey: 'StackName',\r\n ParameterValue: taskDefStackName,\r\n },\r\n {\r\n ParameterKey: 'DeleteStackName',\r\n ParameterValue: `${taskDefStackName}-cleanup`,\r\n },\r\n {\r\n ParameterKey: 'TTL',\r\n ParameterValue: `1080`,\r\n },\r\n {\r\n ParameterKey: 'BUILDGUID',\r\n ParameterValue: cloud_runner_1.default.buildParameters.buildGuid,\r\n },\r\n {\r\n ParameterKey: 'EnvironmentName',\r\n ParameterValue: this.baseStackName,\r\n },\r\n ],\r\n };\r\n if (cloud_runner_options_1.default.useCleanupCron) {\r\n try {\r\n cloud_runner_logger_1.default.log(`Creating job cleanup formation`);\r\n await CF.createStack(createCleanupStackInput).promise();\r\n // await CF.waitFor('stackCreateComplete', { StackName: createCleanupStackInput.StackName }).promise();\r\n }\r\n catch (error) {\r\n await aws_error_1.AWSError.handleStackCreationFailure(error, CF, taskDefStackName);\r\n throw error;\r\n }\r\n }\r\n const taskDefResources = (await CF.describeStackResources({\r\n StackName: taskDefStackName,\r\n }).promise()).StackResources;\r\n const baseResources = (await CF.describeStackResources({ StackName: this.baseStackName }).promise()).StackResources;\r\n return {\r\n taskDefStackName,\r\n taskDefCloudFormation,\r\n taskDefResources,\r\n baseResources,\r\n };\r\n }\r\n}\r\nexports.AWSJobStack = AWSJobStack;\r\n","\"use strict\";\r\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n}));\r\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n});\r\nvar __importStar = (this && this.__importStar) || function (mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n};\r\nvar __importDefault = (this && this.__importDefault) || function (mod) {\r\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\r\n};\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nconst core = __importStar(require(\"@actions/core\"));\r\nconst zlib = __importStar(require(\"node:zlib\"));\r\nconst cloud_runner_logger_1 = __importDefault(require(\"../../services/cloud-runner-logger\"));\r\nconst __1 = require(\"../../..\");\r\nconst cloud_runner_1 = __importDefault(require(\"../../cloud-runner\"));\r\nconst cloud_runner_custom_hooks_1 = require(\"../../services/cloud-runner-custom-hooks\");\r\nconst follow_log_stream_service_1 = require(\"../../services/follow-log-stream-service\");\r\nconst cloud_runner_options_1 = __importDefault(require(\"../../cloud-runner-options\"));\r\nconst github_1 = __importDefault(require(\"../../../github\"));\r\nclass AWSTaskRunner {\r\n static async runTask(taskDef, environment, commands) {\r\n const cluster = taskDef.baseResources?.find((x) => x.LogicalResourceId === 'ECSCluster')?.PhysicalResourceId || '';\r\n const taskDefinition = taskDef.taskDefResources?.find((x) => x.LogicalResourceId === 'TaskDefinition')?.PhysicalResourceId || '';\r\n const SubnetOne = taskDef.baseResources?.find((x) => x.LogicalResourceId === 'PublicSubnetOne')?.PhysicalResourceId || '';\r\n const SubnetTwo = taskDef.baseResources?.find((x) => x.LogicalResourceId === 'PublicSubnetTwo')?.PhysicalResourceId || '';\r\n const ContainerSecurityGroup = taskDef.baseResources?.find((x) => x.LogicalResourceId === 'ContainerSecurityGroup')?.PhysicalResourceId || '';\r\n const streamName = taskDef.taskDefResources?.find((x) => x.LogicalResourceId === 'KinesisStream')?.PhysicalResourceId || '';\r\n const runParameters = {\r\n cluster,\r\n taskDefinition,\r\n platformVersion: '1.4.0',\r\n overrides: {\r\n containerOverrides: [\r\n {\r\n name: taskDef.taskDefStackName,\r\n environment,\r\n command: ['-c', cloud_runner_custom_hooks_1.CloudRunnerCustomHooks.ApplyHooksToCommands(commands, cloud_runner_1.default.buildParameters)],\r\n },\r\n ],\r\n },\r\n launchType: 'FARGATE',\r\n networkConfiguration: {\r\n awsvpcConfiguration: {\r\n subnets: [SubnetOne, SubnetTwo],\r\n assignPublicIp: 'ENABLED',\r\n securityGroups: [ContainerSecurityGroup],\r\n },\r\n },\r\n };\r\n if (JSON.stringify(runParameters.overrides.containerOverrides).length > 8192) {\r\n cloud_runner_logger_1.default.log(JSON.stringify(runParameters.overrides.containerOverrides, undefined, 4));\r\n throw new Error(`Container Overrides length must be at most 8192`);\r\n }\r\n const task = await AWSTaskRunner.ECS.runTask(runParameters).promise();\r\n const taskArn = task.tasks?.[0].taskArn || '';\r\n cloud_runner_logger_1.default.log('Cloud runner job is starting');\r\n await AWSTaskRunner.waitUntilTaskRunning(taskArn, cluster);\r\n cloud_runner_logger_1.default.log(`Cloud runner job status is running ${(await AWSTaskRunner.describeTasks(cluster, taskArn))?.lastStatus} Async:${cloud_runner_options_1.default.asyncCloudRunner}`);\r\n if (cloud_runner_options_1.default.asyncCloudRunner) {\r\n const shouldCleanup = false;\r\n const output = '';\r\n cloud_runner_logger_1.default.log(`Watch Cloud Runner To End: false`);\r\n return { output, shouldCleanup };\r\n }\r\n cloud_runner_logger_1.default.log(`Streaming...`);\r\n const { output, shouldCleanup } = await this.streamLogsUntilTaskStops(cluster, taskArn, streamName);\r\n let exitCode;\r\n let containerState;\r\n let taskData;\r\n while (exitCode === undefined) {\r\n await new Promise((resolve) => resolve(10000));\r\n taskData = await AWSTaskRunner.describeTasks(cluster, taskArn);\r\n containerState = taskData.containers?.[0];\r\n exitCode = containerState?.exitCode;\r\n }\r\n cloud_runner_logger_1.default.log(`Container State: ${JSON.stringify(containerState, undefined, 4)}`);\r\n if (exitCode === undefined) {\r\n cloud_runner_logger_1.default.logWarning(`Undefined exitcode for container`);\r\n }\r\n const wasSuccessful = exitCode === 0;\r\n if (wasSuccessful) {\r\n cloud_runner_logger_1.default.log(`Cloud runner job has finished successfully`);\r\n return { output, shouldCleanup };\r\n }\r\n if (taskData?.stoppedReason === 'Essential container in task exited' && exitCode === 1) {\r\n throw new Error('Container exited with code 1');\r\n }\r\n throw new Error(`Task failed`);\r\n }\r\n static async waitUntilTaskRunning(taskArn, cluster) {\r\n try {\r\n await AWSTaskRunner.ECS.waitFor('tasksRunning', { tasks: [taskArn], cluster }).promise();\r\n }\r\n catch (error_) {\r\n const error = error_;\r\n await new Promise((resolve) => setTimeout(resolve, 3000));\r\n cloud_runner_logger_1.default.log(`Cloud runner job has ended ${(await AWSTaskRunner.describeTasks(cluster, taskArn)).containers?.[0].lastStatus}`);\r\n core.setFailed(error);\r\n core.error(error);\r\n }\r\n }\r\n static async describeTasks(clusterName, taskArn) {\r\n const tasks = await AWSTaskRunner.ECS.describeTasks({\r\n cluster: clusterName,\r\n tasks: [taskArn],\r\n }).promise();\r\n if (tasks.tasks?.[0]) {\r\n return tasks.tasks?.[0];\r\n }\r\n else {\r\n throw new Error('No task found');\r\n }\r\n }\r\n static async streamLogsUntilTaskStops(clusterName, taskArn, kinesisStreamName) {\r\n await new Promise((resolve) => setTimeout(resolve, 3000));\r\n cloud_runner_logger_1.default.log(`Streaming...`);\r\n const stream = await AWSTaskRunner.getLogStream(kinesisStreamName);\r\n let iterator = await AWSTaskRunner.getLogIterator(stream);\r\n const logBaseUrl = `https://${__1.Input.region}.console.aws.amazon.com/cloudwatch/home?region=${__1.Input.region}#logsV2:log-groups/log-group/${cloud_runner_1.default.buildParameters.awsStackName}${AWSTaskRunner.encodedUnderscore}${cloud_runner_1.default.buildParameters.awsStackName}-${cloud_runner_1.default.buildParameters.buildGuid}`;\r\n cloud_runner_logger_1.default.log(`You view the log stream on AWS Cloud Watch: ${logBaseUrl}`);\r\n await github_1.default.updateGitHubCheck(`You view the log stream on AWS Cloud Watch: ${logBaseUrl}`, ``);\r\n let shouldReadLogs = true;\r\n let shouldCleanup = true;\r\n let timestamp = 0;\r\n let output = '';\r\n while (shouldReadLogs) {\r\n await new Promise((resolve) => setTimeout(resolve, 1500));\r\n const taskData = await AWSTaskRunner.describeTasks(clusterName, taskArn);\r\n ({ timestamp, shouldReadLogs } = AWSTaskRunner.checkStreamingShouldContinue(taskData, timestamp, shouldReadLogs));\r\n ({ iterator, shouldReadLogs, output, shouldCleanup } = await AWSTaskRunner.handleLogStreamIteration(iterator, shouldReadLogs, output, shouldCleanup));\r\n }\r\n return { output, shouldCleanup };\r\n }\r\n static async handleLogStreamIteration(iterator, shouldReadLogs, output, shouldCleanup) {\r\n const records = await AWSTaskRunner.Kinesis.getRecords({\r\n ShardIterator: iterator,\r\n }).promise();\r\n iterator = records.NextShardIterator || '';\r\n ({ shouldReadLogs, output, shouldCleanup } = AWSTaskRunner.logRecords(records, iterator, shouldReadLogs, output, shouldCleanup));\r\n return { iterator, shouldReadLogs, output, shouldCleanup };\r\n }\r\n static checkStreamingShouldContinue(taskData, timestamp, shouldReadLogs) {\r\n if (taskData?.lastStatus === 'UNKNOWN') {\r\n cloud_runner_logger_1.default.log('## Cloud runner job unknwon');\r\n }\r\n if (taskData?.lastStatus !== 'RUNNING') {\r\n if (timestamp === 0) {\r\n cloud_runner_logger_1.default.log('## Cloud runner job stopped, streaming end of logs');\r\n timestamp = Date.now();\r\n }\r\n if (timestamp !== 0 && Date.now() - timestamp > 30000) {\r\n cloud_runner_logger_1.default.log('## Cloud runner status is not RUNNING for 30 seconds, last query for logs');\r\n shouldReadLogs = false;\r\n }\r\n cloud_runner_logger_1.default.log(`## Status of job: ${taskData.lastStatus}`);\r\n }\r\n return { timestamp, shouldReadLogs };\r\n }\r\n static logRecords(records, iterator, shouldReadLogs, output, shouldCleanup) {\r\n if (records.Records.length > 0 && iterator) {\r\n for (const record of records.Records) {\r\n const json = JSON.parse(zlib.gunzipSync(Buffer.from(record.Data, 'base64')).toString('utf8'));\r\n if (json.messageType === 'DATA_MESSAGE') {\r\n for (const logEvent of json.logEvents) {\r\n ({ shouldReadLogs, shouldCleanup, output } = follow_log_stream_service_1.FollowLogStreamService.handleIteration(logEvent.message, shouldReadLogs, shouldCleanup, output));\r\n }\r\n }\r\n }\r\n }\r\n return { shouldReadLogs, output, shouldCleanup };\r\n }\r\n static async getLogStream(kinesisStreamName) {\r\n return await AWSTaskRunner.Kinesis.describeStream({\r\n StreamName: kinesisStreamName,\r\n }).promise();\r\n }\r\n static async getLogIterator(stream) {\r\n return ((await AWSTaskRunner.Kinesis.getShardIterator({\r\n ShardIteratorType: 'TRIM_HORIZON',\r\n StreamName: stream.StreamDescription.StreamName,\r\n ShardId: stream.StreamDescription.Shards[0].ShardId,\r\n }).promise()).ShardIterator || '');\r\n }\r\n}\r\nAWSTaskRunner.encodedUnderscore = `$252F`;\r\nexports.default = AWSTaskRunner;\r\n","\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.BaseStackFormation = void 0;\r\nclass BaseStackFormation {\r\n}\r\nexports.BaseStackFormation = BaseStackFormation;\r\nBaseStackFormation.baseStackDecription = `Game-CI base stack`;\r\nBaseStackFormation.formation = `AWSTemplateFormatVersion: '2010-09-09'\nDescription: ${BaseStackFormation.baseStackDecription}\nParameters:\n EnvironmentName:\n Type: String\n Default: development\n Description: 'Your deployment environment: DEV, QA , PROD'\n Version:\n Type: String\n Description: 'hash of template'\n\n # ContainerPort:\n # Type: Number\n # Default: 80\n # Description: What port number the application inside the docker container is binding to\n\nMappings:\n # Hard values for the subnet masks. These masks define\n # the range of internal IP addresses that can be assigned.\n # The VPC can have all IP's from 10.0.0.0 to 10.0.255.255\n # There are four subnets which cover the ranges:\n #\n # 10.0.0.0 - 10.0.0.255\n # 10.0.1.0 - 10.0.1.255\n # 10.0.2.0 - 10.0.2.255\n # 10.0.3.0 - 10.0.3.255\n\n SubnetConfig:\n VPC:\n CIDR: '10.0.0.0/16'\n PublicOne:\n CIDR: '10.0.0.0/24'\n PublicTwo:\n CIDR: '10.0.1.0/24'\n\nResources:\n # VPC in which containers will be networked.\n # It has two public subnets, and two private subnets.\n # We distribute the subnets across the first two available subnets\n # for the region, for high availability.\n VPC:\n Type: AWS::EC2::VPC\n Properties:\n EnableDnsSupport: true\n EnableDnsHostnames: true\n CidrBlock: !FindInMap ['SubnetConfig', 'VPC', 'CIDR']\n\n MainBucket:\n Type: \"AWS::S3::Bucket\"\n Properties:\n BucketName: !Ref EnvironmentName\n\n EFSServerSecurityGroup:\n Type: AWS::EC2::SecurityGroup\n Properties:\n GroupName: 'efs-server-endpoints'\n GroupDescription: Which client ip addrs are allowed to access EFS server\n VpcId: !Ref 'VPC'\n SecurityGroupIngress:\n - IpProtocol: tcp\n FromPort: 2049\n ToPort: 2049\n SourceSecurityGroupId: !Ref ContainerSecurityGroup\n #CidrIp: !FindInMap ['SubnetConfig', 'VPC', 'CIDR']\n # A security group for the containers we will run in Fargate.\n # Rules are added to this security group based on what ingress you\n # add for the cluster.\n ContainerSecurityGroup:\n Type: AWS::EC2::SecurityGroup\n Properties:\n GroupName: 'task security group'\n GroupDescription: Access to the Fargate containers\n VpcId: !Ref 'VPC'\n # SecurityGroupIngress:\n # - IpProtocol: tcp\n # FromPort: !Ref ContainerPort\n # ToPort: !Ref ContainerPort\n # CidrIp: 0.0.0.0/0\n SecurityGroupEgress:\n - IpProtocol: -1\n FromPort: 2049\n ToPort: 2049\n CidrIp: '0.0.0.0/0'\n\n # Two public subnets, where containers can have public IP addresses\n PublicSubnetOne:\n Type: AWS::EC2::Subnet\n Properties:\n AvailabilityZone: !Select\n - 0\n - Fn::GetAZs: !Ref 'AWS::Region'\n VpcId: !Ref 'VPC'\n CidrBlock: !FindInMap ['SubnetConfig', 'PublicOne', 'CIDR']\n # MapPublicIpOnLaunch: true\n\n PublicSubnetTwo:\n Type: AWS::EC2::Subnet\n Properties:\n AvailabilityZone: !Select\n - 1\n - Fn::GetAZs: !Ref 'AWS::Region'\n VpcId: !Ref 'VPC'\n CidrBlock: !FindInMap ['SubnetConfig', 'PublicTwo', 'CIDR']\n # MapPublicIpOnLaunch: true\n\n # Setup networking resources for the public subnets. Containers\n # in the public subnets have public IP addresses and the routing table\n # sends network traffic via the internet gateway.\n InternetGateway:\n Type: AWS::EC2::InternetGateway\n GatewayAttachement:\n Type: AWS::EC2::VPCGatewayAttachment\n Properties:\n VpcId: !Ref 'VPC'\n InternetGatewayId: !Ref 'InternetGateway'\n\n # Attaching a Internet Gateway to route table makes it public.\n PublicRouteTable:\n Type: AWS::EC2::RouteTable\n Properties:\n VpcId: !Ref 'VPC'\n PublicRoute:\n Type: AWS::EC2::Route\n DependsOn: GatewayAttachement\n Properties:\n RouteTableId: !Ref 'PublicRouteTable'\n DestinationCidrBlock: '0.0.0.0/0'\n GatewayId: !Ref 'InternetGateway'\n\n # Attaching a public route table makes a subnet public.\n PublicSubnetOneRouteTableAssociation:\n Type: AWS::EC2::SubnetRouteTableAssociation\n Properties:\n SubnetId: !Ref PublicSubnetOne\n RouteTableId: !Ref PublicRouteTable\n PublicSubnetTwoRouteTableAssociation:\n Type: AWS::EC2::SubnetRouteTableAssociation\n Properties:\n SubnetId: !Ref PublicSubnetTwo\n RouteTableId: !Ref PublicRouteTable\n\n # ECS Resources\n ECSCluster:\n Type: AWS::ECS::Cluster\n\n # A role used to allow AWS Autoscaling to inspect stats and adjust scaleable targets\n # on your AWS account\n AutoscalingRole:\n Type: AWS::IAM::Role\n Properties:\n AssumeRolePolicyDocument:\n Statement:\n - Effect: Allow\n Principal:\n Service: [application-autoscaling.amazonaws.com]\n Action: ['sts:AssumeRole']\n Path: /\n Policies:\n - PolicyName: service-autoscaling\n PolicyDocument:\n Statement:\n - Effect: Allow\n Action:\n - 'application-autoscaling:*'\n - 'cloudwatch:DescribeAlarms'\n - 'cloudwatch:PutMetricAlarm'\n - 'ecs:DescribeServices'\n - 'ecs:UpdateService'\n Resource: '*'\n\n # This is an IAM role which authorizes ECS to manage resources on your\n # account on your behalf, such as updating your load balancer with the\n # details of where your containers are, so that traffic can reach your\n # containers.\n ECSRole:\n Type: AWS::IAM::Role\n Properties:\n AssumeRolePolicyDocument:\n Statement:\n - Effect: Allow\n Principal:\n Service: [ecs.amazonaws.com]\n Action: ['sts:AssumeRole']\n Path: /\n Policies:\n - PolicyName: ecs-service\n PolicyDocument:\n Statement:\n - Effect: Allow\n Action:\n # Rules which allow ECS to attach network interfaces to instances\n # on your behalf in order for awsvpc networking mode to work right\n - 'ec2:AttachNetworkInterface'\n - 'ec2:CreateNetworkInterface'\n - 'ec2:CreateNetworkInterfacePermission'\n - 'ec2:DeleteNetworkInterface'\n - 'ec2:DeleteNetworkInterfacePermission'\n - 'ec2:Describe*'\n - 'ec2:DetachNetworkInterface'\n\n # Rules which allow ECS to update load balancers on your behalf\n # with the information sabout how to send traffic to your containers\n - 'elasticloadbalancing:DeregisterInstancesFromLoadBalancer'\n - 'elasticloadbalancing:DeregisterTargets'\n - 'elasticloadbalancing:Describe*'\n - 'elasticloadbalancing:RegisterInstancesWithLoadBalancer'\n - 'elasticloadbalancing:RegisterTargets'\n Resource: '*'\n\n # This is a role which is used by the ECS tasks themselves.\n ECSTaskExecutionRole:\n Type: AWS::IAM::Role\n Properties:\n AssumeRolePolicyDocument:\n Statement:\n - Effect: Allow\n Principal:\n Service: [ecs-tasks.amazonaws.com]\n Action: ['sts:AssumeRole']\n Path: /\n Policies:\n - PolicyName: AmazonECSTaskExecutionRolePolicy\n PolicyDocument:\n Statement:\n - Effect: Allow\n Action:\n # Allow the use of secret manager\n - 'secretsmanager:GetSecretValue'\n - 'kms:Decrypt'\n\n # Allow the ECS Tasks to download images from ECR\n - 'ecr:GetAuthorizationToken'\n - 'ecr:BatchCheckLayerAvailability'\n - 'ecr:GetDownloadUrlForLayer'\n - 'ecr:BatchGetImage'\n\n # Allow the ECS tasks to upload logs to CloudWatch\n - 'logs:CreateLogStream'\n - 'logs:PutLogEvents'\n Resource: '*'\n\n DeleteCFNLambdaExecutionRole:\n Type: 'AWS::IAM::Role'\n Properties:\n AssumeRolePolicyDocument:\n Version: '2012-10-17'\n Statement:\n - Effect: 'Allow'\n Principal:\n Service: ['lambda.amazonaws.com']\n Action: 'sts:AssumeRole'\n Path: '/'\n Policies:\n - PolicyName: DeleteCFNLambdaExecutionRole\n PolicyDocument:\n Version: '2012-10-17'\n Statement:\n - Effect: 'Allow'\n Action:\n - 'logs:CreateLogGroup'\n - 'logs:CreateLogStream'\n - 'logs:PutLogEvents'\n Resource: 'arn:aws:logs:*:*:*'\n - Effect: 'Allow'\n Action:\n - 'cloudformation:DeleteStack'\n - 'kinesis:DeleteStream'\n - 'secretsmanager:DeleteSecret'\n - 'kinesis:DescribeStreamSummary'\n - 'logs:DeleteLogGroup'\n - 'logs:DeleteSubscriptionFilter'\n - 'ecs:DeregisterTaskDefinition'\n - 'lambda:DeleteFunction'\n - 'lambda:InvokeFunction'\n - 'events:RemoveTargets'\n - 'events:DeleteRule'\n - 'lambda:RemovePermission'\n Resource: '*'\n\n ### cloud watch to kinesis role\n CloudWatchIAMRole:\n Type: AWS::IAM::Role\n Properties:\n AssumeRolePolicyDocument:\n Statement:\n - Effect: Allow\n Principal:\n Service: [logs.amazonaws.com]\n Action: ['sts:AssumeRole']\n Path: /\n Policies:\n - PolicyName: service-autoscaling\n PolicyDocument:\n Statement:\n - Effect: Allow\n Action:\n - 'kinesis:PutRecord'\n Resource: '*'\n\n #####################EFS#####################\n EfsFileStorage:\n Type: 'AWS::EFS::FileSystem'\n Properties:\n BackupPolicy:\n Status: ENABLED\n PerformanceMode: maxIO\n Encrypted: false\n\n FileSystemPolicy:\n Version: '2012-10-17'\n Statement:\n - Effect: 'Allow'\n Action:\n - 'elasticfilesystem:ClientMount'\n - 'elasticfilesystem:ClientWrite'\n - 'elasticfilesystem:ClientRootAccess'\n Principal:\n AWS: '*'\n\n MountTargetResource1:\n Type: AWS::EFS::MountTarget\n Properties:\n FileSystemId: !Ref EfsFileStorage\n SubnetId: !Ref PublicSubnetOne\n SecurityGroups:\n - !Ref EFSServerSecurityGroup\n\n MountTargetResource2:\n Type: AWS::EFS::MountTarget\n Properties:\n FileSystemId: !Ref EfsFileStorage\n SubnetId: !Ref PublicSubnetTwo\n SecurityGroups:\n - !Ref EFSServerSecurityGroup\n\nOutputs:\n EfsFileStorageId:\n Description: 'The connection endpoint for the database.'\n Value: !Ref EfsFileStorage\n Export:\n Name: !Sub ${'${EnvironmentName}'}:EfsFileStorageId\n ClusterName:\n Description: The name of the ECS cluster\n Value: !Ref 'ECSCluster'\n Export:\n Name: !Sub${' ${EnvironmentName}'}:ClusterName\n AutoscalingRole:\n Description: The ARN of the role used for autoscaling\n Value: !GetAtt 'AutoscalingRole.Arn'\n Export:\n Name: !Sub ${'${EnvironmentName}'}:AutoscalingRole\n ECSRole:\n Description: The ARN of the ECS role\n Value: !GetAtt 'ECSRole.Arn'\n Export:\n Name: !Sub ${'${EnvironmentName}'}:ECSRole\n ECSTaskExecutionRole:\n Description: The ARN of the ECS role tsk execution role\n Value: !GetAtt 'ECSTaskExecutionRole.Arn'\n Export:\n Name: !Sub ${'${EnvironmentName}'}:ECSTaskExecutionRole\n\n DeleteCFNLambdaExecutionRole:\n Description: Lambda execution role for cleaning up cloud formations\n Value: !GetAtt 'DeleteCFNLambdaExecutionRole.Arn'\n Export:\n Name: !Sub ${'${EnvironmentName}'}:DeleteCFNLambdaExecutionRole\n\n CloudWatchIAMRole:\n Description: The ARN of the CloudWatch role for subscription filter\n Value: !GetAtt 'CloudWatchIAMRole.Arn'\n Export:\n Name: !Sub ${'${EnvironmentName}'}:CloudWatchIAMRole\n VpcId:\n Description: The ID of the VPC that this stack is deployed in\n Value: !Ref 'VPC'\n Export:\n Name: !Sub ${'${EnvironmentName}'}:VpcId\n PublicSubnetOne:\n Description: Public subnet one\n Value: !Ref 'PublicSubnetOne'\n Export:\n Name: !Sub ${'${EnvironmentName}'}:PublicSubnetOne\n PublicSubnetTwo:\n Description: Public subnet two\n Value: !Ref 'PublicSubnetTwo'\n Export:\n Name: !Sub ${'${EnvironmentName}'}:PublicSubnetTwo\n ContainerSecurityGroup:\n Description: A security group used to allow Fargate containers to receive traffic\n Value: !Ref 'ContainerSecurityGroup'\n Export:\n Name: !Sub ${'${EnvironmentName}'}:ContainerSecurityGroup\n`;\r\n","\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.CleanupCronFormation = void 0;\r\nclass CleanupCronFormation {\r\n}\r\nexports.CleanupCronFormation = CleanupCronFormation;\r\nCleanupCronFormation.formation = `AWSTemplateFormatVersion: '2010-09-09'\nDescription: Schedule automatic deletion of CloudFormation stacks\nMetadata:\n AWS::CloudFormation::Interface:\n ParameterGroups:\n - Label:\n default: Input configuration\n Parameters:\n - StackName\n - TTL\n ParameterLabels:\n StackName:\n default: Stack name\n TTL:\n default: Time-to-live\nParameters:\n EnvironmentName:\n Type: String\n Default: development\n Description: 'Your deployment environment: DEV, QA , PROD'\n BUILDGUID:\n Type: String\n Default: ''\n StackName:\n Type: String\n Description: Stack name that will be deleted.\n DeleteStackName:\n Type: String\n Description: Stack name that will be deleted.\n TTL:\n Type: Number\n Description: Time-to-live in minutes for the stack.\nResources:\n DeleteCFNLambda:\n Type: \"AWS::Lambda::Function\"\n Properties:\n FunctionName: !Join [ \"\", [ 'DeleteCFNLambda', !Ref BUILDGUID ] ]\n Code:\n ZipFile: |\n import boto3\n import os\n import json\n\n stack_name = os.environ['stackName']\n delete_stack_name = os.environ['deleteStackName']\n\n def delete_cfn(stack_name):\n try:\n cfn = boto3.resource('cloudformation')\n stack = cfn.Stack(stack_name)\n stack.delete()\n return \"SUCCESS\"\n except:\n return \"ERROR\"\n\n def handler(event, context):\n print(\"Received event:\")\n print(json.dumps(event))\n result = delete_cfn(stack_name)\n delete_cfn(delete_stack_name)\n return result\n Environment:\n Variables:\n stackName: !Ref 'StackName'\n deleteStackName: !Ref 'DeleteStackName'\n Handler: \"index.handler\"\n Runtime: \"python3.9\"\n Timeout: \"5\"\n Role:\n 'Fn::ImportValue': !Sub '\\${EnvironmentName}:DeleteCFNLambdaExecutionRole'\n DeleteStackEventRule:\n DependsOn:\n - DeleteCFNLambda\n - GenerateCronExpression\n Type: \"AWS::Events::Rule\"\n Properties:\n Name: !Join [ \"\", [ 'DeleteStackEventRule', !Ref BUILDGUID ] ]\n Description: Delete stack event\n ScheduleExpression: !GetAtt GenerateCronExpression.cron_exp\n State: \"ENABLED\"\n Targets:\n -\n Arn: !GetAtt DeleteCFNLambda.Arn\n Id: 'DeleteCFNLambda'\n PermissionForDeleteCFNLambda:\n Type: \"AWS::Lambda::Permission\"\n DependsOn:\n - DeleteStackEventRule\n Properties:\n FunctionName: !Join [ \"\", [ 'DeleteCFNLambda', !Ref BUILDGUID ] ]\n Action: \"lambda:InvokeFunction\"\n Principal: \"events.amazonaws.com\"\n SourceArn: !GetAtt DeleteStackEventRule.Arn\n GenerateCronExpLambda:\n Type: \"AWS::Lambda::Function\"\n Properties:\n FunctionName: !Join [ \"\", [ 'GenerateCronExpressionLambda', !Ref BUILDGUID ] ]\n Code:\n ZipFile: |\n from datetime import datetime, timedelta\n import os\n import logging\n import json\n import cfnresponse\n\n def deletion_time(ttl):\n delete_at_time = datetime.now() + timedelta(minutes=int(ttl))\n hh = delete_at_time.hour\n mm = delete_at_time.minute\n yyyy = delete_at_time.year\n month = delete_at_time.month\n dd = delete_at_time.day\n # minutes hours day month day-of-week year\n cron_exp = \"cron({} {} {} {} ? {})\".format(mm, hh, dd, month, yyyy)\n return cron_exp\n\n def handler(event, context):\n print('Received event: %s' % json.dumps(event))\n status = cfnresponse.SUCCESS\n try:\n if event['RequestType'] == 'Delete':\n cfnresponse.send(event, context, status, {})\n else:\n ttl = event['ResourceProperties']['ttl']\n responseData = {}\n responseData['cron_exp'] = deletion_time(ttl)\n cfnresponse.send(event, context, cfnresponse.SUCCESS, responseData)\n except Exception as e:\n logging.error('Exception: %s' % e, exc_info=True)\n status = cfnresponse.FAILED\n cfnresponse.send(event, context, status, {}, None)\n Handler: \"index.handler\"\n Runtime: \"python3.9\"\n Timeout: \"5\"\n Role:\n 'Fn::ImportValue': !Sub '\\${EnvironmentName}:DeleteCFNLambdaExecutionRole'\n GenerateCronExpression:\n Type: \"Custom::GenerateCronExpression\"\n Version: \"1.0\"\n Properties:\n Name: !Join [ \"\", [ 'GenerateCronExpression', !Ref BUILDGUID ] ]\n ServiceToken: !GetAtt GenerateCronExpLambda.Arn\n ttl: !Ref 'TTL'\n`;\r\n","\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.TaskDefinitionFormation = void 0;\r\nclass TaskDefinitionFormation {\r\n}\r\nexports.TaskDefinitionFormation = TaskDefinitionFormation;\r\nTaskDefinitionFormation.description = `Game CI Cloud Runner Task Stack`;\r\nTaskDefinitionFormation.formation = `AWSTemplateFormatVersion: 2010-09-09\nDescription: ${TaskDefinitionFormation.description}\nParameters:\n EnvironmentName:\n Type: String\n Default: development\n Description: 'Your deployment environment: DEV, QA , PROD'\n ServiceName:\n Type: String\n Default: example\n Description: A name for the service\n LogGroupName:\n Type: String\n Default: example\n Description: Name to use for the log group created for this task\n ImageUrl:\n Type: String\n Default: nginx\n Description: >-\n The url of a docker image that contains the application process that will\n handle the traffic for this service\n ContainerPort:\n Type: Number\n Default: 80\n Description: What port number the application inside the docker container is binding to\n ContainerCpu:\n Default: 1024\n Type: Number\n Description: How much CPU to give the container. 1024 is 1 CPU\n ContainerMemory:\n Default: 4096\n Type: Number\n Description: How much memory in megabytes to give the container\n BUILDGUID:\n Type: String\n Default: ''\n Command:\n Type: String\n Default: 'ls'\n EntryPoint:\n Type: String\n Default: '/bin/sh'\n WorkingDirectory:\n Type: String\n Default: '/efsdata/'\n Role:\n Type: String\n Default: ''\n Description: >-\n (Optional) An IAM role to give the service's containers if the code within\n needs to access other AWS resources like S3 buckets, DynamoDB tables, etc\n EFSMountDirectory:\n Type: String\n Default: '/efsdata'\n # template secrets p1 - input\nMappings:\n SubnetConfig:\n VPC:\n CIDR: 10.0.0.0/16\n PublicOne:\n CIDR: 10.0.0.0/24\n PublicTwo:\n CIDR: 10.0.1.0/24\nConditions:\n HasCustomRole: !Not\n - !Equals\n - Ref: Role\n - ''\nResources:\n LogGroup:\n Type: 'AWS::Logs::LogGroup'\n Properties:\n LogGroupName: !Ref LogGroupName\n Metadata:\n 'AWS::CloudFormation::Designer':\n id: aece53ae-b82d-4267-bc16-ed964b05db27\n # template resources secrets\n\n # template resources logstream\n\n TaskDefinition:\n Type: 'AWS::ECS::TaskDefinition'\n Properties:\n Family: !Ref ServiceName\n Cpu: !Ref ContainerCpu\n Memory: !Ref ContainerMemory\n NetworkMode: awsvpc\n Volumes:\n - Name: efs-data\n EFSVolumeConfiguration:\n FilesystemId:\n 'Fn::ImportValue': !Sub '${'${EnvironmentName}'}:EfsFileStorageId'\n TransitEncryption: ENABLED\n RequiresCompatibilities:\n - FARGATE\n ExecutionRoleArn:\n 'Fn::ImportValue': !Sub '${'${EnvironmentName}'}:ECSTaskExecutionRole'\n TaskRoleArn:\n 'Fn::If':\n - HasCustomRole\n - !Ref Role\n - !Ref 'AWS::NoValue'\n ContainerDefinitions:\n - Name: !Ref ServiceName\n Cpu: !Ref ContainerCpu\n Memory: !Ref ContainerMemory\n Image: !Ref ImageUrl\n EntryPoint:\n Fn::Split:\n - ','\n - !Ref EntryPoint\n Command:\n Fn::Split:\n - ','\n - !Ref Command\n WorkingDirectory: !Ref WorkingDirectory\n Environment:\n - Name: ALLOW_EMPTY_PASSWORD\n Value: 'yes'\n # template - env vars\n MountPoints:\n - SourceVolume: efs-data\n ContainerPath: !Ref EFSMountDirectory\n ReadOnly: false\n Secrets:\n # template secrets p3 - container def\n LogConfiguration:\n LogDriver: awslogs\n Options:\n awslogs-group: !Ref LogGroupName\n awslogs-region: !Ref 'AWS::Region'\n awslogs-stream-prefix: !Ref ServiceName\n DependsOn:\n - LogGroup\n`;\r\nTaskDefinitionFormation.streamLogs = `\n SubscriptionFilter:\n Type: 'AWS::Logs::SubscriptionFilter'\n Properties:\n FilterPattern: ''\n RoleArn:\n 'Fn::ImportValue': !Sub '${'${EnvironmentName}'}:CloudWatchIAMRole'\n LogGroupName: !Ref LogGroupName\n DestinationArn:\n 'Fn::GetAtt':\n - KinesisStream\n - Arn\n Metadata:\n 'AWS::CloudFormation::Designer':\n id: 7f809e91-9e5d-4678-98c1-c5085956c480\n DependsOn:\n - LogGroup\n - KinesisStream\n KinesisStream:\n Type: 'AWS::Kinesis::Stream'\n Properties:\n Name: !Ref ServiceName\n ShardCount: 1\n Metadata:\n 'AWS::CloudFormation::Designer':\n id: c6f18447-b879-4696-8873-f981b2cedd2b\n`;\r\n","\"use strict\";\r\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n}));\r\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n});\r\nvar __importStar = (this && this.__importStar) || function (mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n};\r\nvar __importDefault = (this && this.__importDefault) || function (mod) {\r\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\r\n};\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nconst SDK = __importStar(require(\"aws-sdk\"));\r\nconst aws_task_runner_1 = __importDefault(require(\"./aws-task-runner\"));\r\nconst cloud_runner_logger_1 = __importDefault(require(\"../../services/cloud-runner-logger\"));\r\nconst aws_job_stack_1 = require(\"./aws-job-stack\");\r\nconst aws_base_stack_1 = require(\"./aws-base-stack\");\r\nconst __1 = require(\"../../..\");\r\nconst garbage_collection_service_1 = require(\"./services/garbage-collection-service\");\r\nconst task_service_1 = require(\"./services/task-service\");\r\nconst cloud_runner_options_1 = __importDefault(require(\"../../cloud-runner-options\"));\r\nclass AWSBuildEnvironment {\r\n constructor(buildParameters) {\r\n this.baseStackName = buildParameters.awsStackName;\r\n }\r\n async listResources() {\r\n await task_service_1.TaskService.getCloudFormationJobStacks();\r\n await task_service_1.TaskService.getLogGroups();\r\n await task_service_1.TaskService.getTasks();\r\n return [];\r\n }\r\n listWorkflow() {\r\n throw new Error('Method not implemented.');\r\n }\r\n async watchWorkflow() {\r\n return await task_service_1.TaskService.watch();\r\n }\r\n async listOtherResources() {\r\n await task_service_1.TaskService.getLogGroups();\r\n return '';\r\n }\r\n async garbageCollect(filter, previewOnly, \r\n // eslint-disable-next-line no-unused-vars\r\n olderThan, \r\n // eslint-disable-next-line no-unused-vars\r\n fullCache, \r\n // eslint-disable-next-line no-unused-vars\r\n baseDependencies) {\r\n await garbage_collection_service_1.GarbageCollectionService.cleanup(!previewOnly);\r\n return ``;\r\n }\r\n async cleanupWorkflow(\r\n // eslint-disable-next-line no-unused-vars\r\n buildGuid, \r\n // eslint-disable-next-line no-unused-vars\r\n buildParameters, \r\n // eslint-disable-next-line no-unused-vars\r\n branchName, \r\n // eslint-disable-next-line no-unused-vars\r\n defaultSecretsArray) { }\r\n async setupWorkflow(\r\n // eslint-disable-next-line no-unused-vars\r\n buildGuid, \r\n // eslint-disable-next-line no-unused-vars\r\n buildParameters, \r\n // eslint-disable-next-line no-unused-vars\r\n branchName, \r\n // eslint-disable-next-line no-unused-vars\r\n defaultSecretsArray) {\r\n process.env.AWS_REGION = __1.Input.region;\r\n const CF = new SDK.CloudFormation();\r\n await new aws_base_stack_1.AWSBaseStack(this.baseStackName).setupBaseStack(CF);\r\n }\r\n async runTaskInWorkflow(buildGuid, image, commands, mountdir, workingdir, environment, secrets) {\r\n process.env.AWS_REGION = __1.Input.region;\r\n const ECS = new SDK.ECS();\r\n const CF = new SDK.CloudFormation();\r\n aws_task_runner_1.default.ECS = ECS;\r\n aws_task_runner_1.default.Kinesis = new SDK.Kinesis();\r\n cloud_runner_logger_1.default.log(`AWS Region: ${CF.config.region}`);\r\n const entrypoint = ['/bin/sh'];\r\n const startTimeMs = Date.now();\r\n const taskDef = await new aws_job_stack_1.AWSJobStack(this.baseStackName).setupCloudFormations(CF, buildGuid, image, entrypoint, commands, mountdir, workingdir, secrets);\r\n let postRunTaskTimeMs;\r\n try {\r\n const postSetupStacksTimeMs = Date.now();\r\n cloud_runner_logger_1.default.log(`Setup job time: ${Math.floor((postSetupStacksTimeMs - startTimeMs) / 1000)}s`);\r\n const { output, shouldCleanup } = await aws_task_runner_1.default.runTask(taskDef, environment, commands);\r\n postRunTaskTimeMs = Date.now();\r\n cloud_runner_logger_1.default.log(`Run job time: ${Math.floor((postRunTaskTimeMs - postSetupStacksTimeMs) / 1000)}s`);\r\n if (shouldCleanup) {\r\n await this.cleanupResources(CF, taskDef);\r\n }\r\n const postCleanupTimeMs = Date.now();\r\n if (postRunTaskTimeMs !== undefined)\r\n cloud_runner_logger_1.default.log(`Cleanup job time: ${Math.floor((postCleanupTimeMs - postRunTaskTimeMs) / 1000)}s`);\r\n return output;\r\n }\r\n catch (error) {\r\n cloud_runner_logger_1.default.log(`error running task ${error}`);\r\n await this.cleanupResources(CF, taskDef);\r\n throw error;\r\n }\r\n }\r\n async cleanupResources(CF, taskDef) {\r\n cloud_runner_logger_1.default.log('Cleanup starting');\r\n await CF.deleteStack({\r\n StackName: taskDef.taskDefStackName,\r\n }).promise();\r\n if (cloud_runner_options_1.default.useCleanupCron) {\r\n await CF.deleteStack({\r\n StackName: `${taskDef.taskDefStackName}-cleanup`,\r\n }).promise();\r\n }\r\n await CF.waitFor('stackDeleteComplete', {\r\n StackName: taskDef.taskDefStackName,\r\n }).promise();\r\n await CF.waitFor('stackDeleteComplete', {\r\n StackName: `${taskDef.taskDefStackName}-cleanup`,\r\n }).promise();\r\n cloud_runner_logger_1.default.log(`Deleted Stack: ${taskDef.taskDefStackName}`);\r\n cloud_runner_logger_1.default.log('Cleanup complete');\r\n }\r\n}\r\nexports.default = AWSBuildEnvironment;\r\n","\"use strict\";\r\nvar __importDefault = (this && this.__importDefault) || function (mod) {\r\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\r\n};\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.GarbageCollectionService = void 0;\r\nconst aws_sdk_1 = __importDefault(require(\"aws-sdk\"));\r\nconst input_1 = __importDefault(require(\"../../../../input\"));\r\nconst cloud_runner_logger_1 = __importDefault(require(\"../../../services/cloud-runner-logger\"));\r\nconst task_service_1 = require(\"./task-service\");\r\nclass GarbageCollectionService {\r\n static isOlderThan1day(date) {\r\n const ageDate = new Date(date.getTime() - Date.now());\r\n return ageDate.getDay() > 0;\r\n }\r\n static async cleanup(deleteResources = false, OneDayOlderOnly = false) {\r\n process.env.AWS_REGION = input_1.default.region;\r\n const CF = new aws_sdk_1.default.CloudFormation();\r\n const ecs = new aws_sdk_1.default.ECS();\r\n const cwl = new aws_sdk_1.default.CloudWatchLogs();\r\n const taskDefinitionsInUse = new Array();\r\n const tasks = await task_service_1.TaskService.getTasks();\r\n for (const task of tasks) {\r\n const { taskElement, element } = task;\r\n taskDefinitionsInUse.push(taskElement.taskDefinitionArn);\r\n if (deleteResources && (!OneDayOlderOnly || GarbageCollectionService.isOlderThan1day(taskElement.createdAt))) {\r\n cloud_runner_logger_1.default.log(`Stopping task ${taskElement.containers?.[0].name}`);\r\n await ecs.stopTask({ task: taskElement.taskArn || '', cluster: element }).promise();\r\n }\r\n }\r\n const jobStacks = await task_service_1.TaskService.getCloudFormationJobStacks();\r\n for (const element of jobStacks) {\r\n if ((await CF.describeStackResources({ StackName: element.StackName }).promise()).StackResources?.some((x) => x.ResourceType === 'AWS::ECS::TaskDefinition' && taskDefinitionsInUse.includes(x.PhysicalResourceId))) {\r\n cloud_runner_logger_1.default.log(`Skipping ${element.StackName} - active task was running not deleting`);\r\n return;\r\n }\r\n if (deleteResources && (!OneDayOlderOnly || GarbageCollectionService.isOlderThan1day(element.CreationTime))) {\r\n if (element.StackName === 'game-ci' || element.TemplateDescription === 'Game-CI base stack') {\r\n cloud_runner_logger_1.default.log(`Skipping ${element.StackName} ignore list`);\r\n return;\r\n }\r\n cloud_runner_logger_1.default.log(`Deleting ${element.StackName}`);\r\n const deleteStackInput = { StackName: element.StackName };\r\n await CF.deleteStack(deleteStackInput).promise();\r\n }\r\n }\r\n const logGroups = await task_service_1.TaskService.getLogGroups();\r\n for (const element of logGroups) {\r\n if (deleteResources &&\r\n (!OneDayOlderOnly || GarbageCollectionService.isOlderThan1day(new Date(element.creationTime)))) {\r\n cloud_runner_logger_1.default.log(`Deleting ${element.logGroupName}`);\r\n await cwl.deleteLogGroup({ logGroupName: element.logGroupName || '' }).promise();\r\n }\r\n }\r\n const locks = await task_service_1.TaskService.getLocks();\r\n for (const element of locks) {\r\n cloud_runner_logger_1.default.log(`Lock: ${element.Key}`);\r\n }\r\n }\r\n}\r\nexports.GarbageCollectionService = GarbageCollectionService;\r\n","\"use strict\";\r\nvar __importDefault = (this && this.__importDefault) || function (mod) {\r\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\r\n};\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.TaskService = void 0;\r\nconst aws_sdk_1 = __importDefault(require(\"aws-sdk\"));\r\nconst input_1 = __importDefault(require(\"../../../../input\"));\r\nconst cloud_runner_logger_1 = __importDefault(require(\"../../../services/cloud-runner-logger\"));\r\nconst base_stack_formation_1 = require(\"../cloud-formations/base-stack-formation\");\r\nconst aws_task_runner_1 = __importDefault(require(\"../aws-task-runner\"));\r\nconst cloud_runner_1 = __importDefault(require(\"../../../cloud-runner\"));\r\nclass TaskService {\r\n static async watch() {\r\n // eslint-disable-next-line no-unused-vars\r\n const { output, shouldCleanup } = await aws_task_runner_1.default.streamLogsUntilTaskStops(process.env.cluster || ``, process.env.taskArn || ``, process.env.streamName || ``);\r\n return output;\r\n }\r\n static async getCloudFormationJobStacks() {\r\n const result = [];\r\n cloud_runner_logger_1.default.log(``);\r\n cloud_runner_logger_1.default.log(`List Cloud Formation Stacks`);\r\n process.env.AWS_REGION = input_1.default.region;\r\n const CF = new aws_sdk_1.default.CloudFormation();\r\n const stacks = (await CF.listStacks().promise()).StackSummaries?.filter((_x) => _x.StackStatus !== 'DELETE_COMPLETE' && _x.TemplateDescription !== base_stack_formation_1.BaseStackFormation.baseStackDecription) || [];\r\n cloud_runner_logger_1.default.log(``);\r\n cloud_runner_logger_1.default.log(`Cloud Formation Stacks ${stacks.length}`);\r\n for (const element of stacks) {\r\n const ageDate = new Date(Date.now() - element.CreationTime.getTime());\r\n cloud_runner_logger_1.default.log(`Task Stack ${element.StackName} - Age D${Math.floor(ageDate.getHours() / 24)} H${ageDate.getHours()} M${ageDate.getMinutes()}`);\r\n result.push(element);\r\n }\r\n const baseStacks = (await CF.listStacks().promise()).StackSummaries?.filter((_x) => _x.StackStatus !== 'DELETE_COMPLETE' && _x.TemplateDescription === base_stack_formation_1.BaseStackFormation.baseStackDecription) || [];\r\n cloud_runner_logger_1.default.log(``);\r\n cloud_runner_logger_1.default.log(`Base Stacks ${baseStacks.length}`);\r\n for (const element of baseStacks) {\r\n const ageDate = new Date(Date.now() - element.CreationTime.getTime());\r\n cloud_runner_logger_1.default.log(`Task Stack ${element.StackName} - Age D${Math.floor(ageDate.getHours() / 24)} H${ageDate.getHours()} M${ageDate.getMinutes()}`);\r\n result.push(element);\r\n }\r\n cloud_runner_logger_1.default.log(``);\r\n return result;\r\n }\r\n static async getTasks() {\r\n const result = [];\r\n cloud_runner_logger_1.default.log(``);\r\n cloud_runner_logger_1.default.log(`List Tasks`);\r\n process.env.AWS_REGION = input_1.default.region;\r\n const ecs = new aws_sdk_1.default.ECS();\r\n const clusters = (await ecs.listClusters().promise()).clusterArns || [];\r\n cloud_runner_logger_1.default.log(`Task Clusters ${clusters.length}`);\r\n for (const element of clusters) {\r\n const input = {\r\n cluster: element,\r\n };\r\n const list = (await ecs.listTasks(input).promise()).taskArns || [];\r\n if (list.length > 0) {\r\n const describeInput = { tasks: list, cluster: element };\r\n const describeList = (await ecs.describeTasks(describeInput).promise()).tasks || [];\r\n if (describeList.length === 0) {\r\n cloud_runner_logger_1.default.log(`No Tasks`);\r\n continue;\r\n }\r\n cloud_runner_logger_1.default.log(`Tasks ${describeList.length}`);\r\n for (const taskElement of describeList) {\r\n if (taskElement === undefined) {\r\n continue;\r\n }\r\n taskElement.overrides = {};\r\n taskElement.attachments = [];\r\n if (taskElement.createdAt === undefined) {\r\n cloud_runner_logger_1.default.log(`Skipping ${taskElement.taskDefinitionArn} no createdAt date`);\r\n continue;\r\n }\r\n result.push({ taskElement, element });\r\n }\r\n }\r\n }\r\n cloud_runner_logger_1.default.log(``);\r\n return result;\r\n }\r\n static async awsDescribeJob(job) {\r\n process.env.AWS_REGION = input_1.default.region;\r\n const CF = new aws_sdk_1.default.CloudFormation();\r\n const stack = (await CF.listStacks().promise()).StackSummaries?.find((_x) => _x.StackName === job) || undefined;\r\n const stackInfo = (await CF.describeStackResources({ StackName: job }).promise()) || undefined;\r\n const stackInfo2 = (await CF.describeStacks({ StackName: job }).promise()) || undefined;\r\n if (stack === undefined) {\r\n throw new Error('stack not defined');\r\n }\r\n const ageDate = new Date(Date.now() - stack.CreationTime.getTime());\r\n const message = `\r\n Task Stack ${stack.StackName}\r\n Age D${Math.floor(ageDate.getHours() / 24)} H${ageDate.getHours()} M${ageDate.getMinutes()}\r\n ${JSON.stringify(stack, undefined, 4)}\r\n ${JSON.stringify(stackInfo, undefined, 4)}\r\n ${JSON.stringify(stackInfo2, undefined, 4)}\r\n `;\r\n cloud_runner_logger_1.default.log(message);\r\n return message;\r\n }\r\n static async getLogGroups() {\r\n const result = [];\r\n process.env.AWS_REGION = input_1.default.region;\r\n const ecs = new aws_sdk_1.default.CloudWatchLogs();\r\n let logStreamInput = {\r\n /* logGroupNamePrefix: 'game-ci' */\r\n };\r\n let logGroupsDescribe = await ecs.describeLogGroups(logStreamInput).promise();\r\n const logGroups = logGroupsDescribe.logGroups || [];\r\n while (logGroupsDescribe.nextToken) {\r\n logStreamInput = { /* logGroupNamePrefix: 'game-ci',*/ nextToken: logGroupsDescribe.nextToken };\r\n logGroupsDescribe = await ecs.describeLogGroups(logStreamInput).promise();\r\n logGroups.push(...(logGroupsDescribe?.logGroups || []));\r\n }\r\n cloud_runner_logger_1.default.log(`Log Groups ${logGroups.length}`);\r\n for (const element of logGroups) {\r\n if (element.creationTime === undefined) {\r\n cloud_runner_logger_1.default.log(`Skipping ${element.logGroupName} no createdAt date`);\r\n continue;\r\n }\r\n const ageDate = new Date(Date.now() - element.creationTime);\r\n cloud_runner_logger_1.default.log(`Task Stack ${element.logGroupName} - Age D${Math.floor(ageDate.getHours() / 24)} H${ageDate.getHours()} M${ageDate.getMinutes()}`);\r\n result.push(element);\r\n }\r\n return result;\r\n }\r\n static async getLocks() {\r\n process.env.AWS_REGION = input_1.default.region;\r\n const s3 = new aws_sdk_1.default.S3();\r\n const listRequest = {\r\n Bucket: cloud_runner_1.default.buildParameters.awsStackName,\r\n };\r\n const results = await s3.listObjects(listRequest).promise();\r\n return results.Contents || [];\r\n }\r\n}\r\nexports.TaskService = TaskService;\r\n","\"use strict\";\r\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n}));\r\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n});\r\nvar __importStar = (this && this.__importStar) || function (mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n};\r\nvar __importDefault = (this && this.__importDefault) || function (mod) {\r\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\r\n};\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nconst cloud_runner_logger_1 = __importDefault(require(\"../../services/cloud-runner-logger\"));\r\nconst docker_1 = __importDefault(require(\"../../../docker\"));\r\nconst __1 = require(\"../../..\");\r\nconst node_fs_1 = require(\"node:fs\");\r\nconst cloud_runner_1 = __importDefault(require(\"../../cloud-runner\"));\r\nconst cloud_runner_system_1 = require(\"../../services/cloud-runner-system\");\r\nconst fs = __importStar(require(\"node:fs\"));\r\nconst cloud_runner_custom_hooks_1 = require(\"../../services/cloud-runner-custom-hooks\");\r\nclass LocalDockerCloudRunner {\r\n listResources() {\r\n return new Promise((resolve) => resolve([]));\r\n }\r\n listWorkflow() {\r\n throw new Error('Method not implemented.');\r\n }\r\n watchWorkflow() {\r\n throw new Error('Method not implemented.');\r\n }\r\n garbageCollect(\r\n // eslint-disable-next-line no-unused-vars\r\n filter, \r\n // eslint-disable-next-line no-unused-vars\r\n previewOnly, \r\n // eslint-disable-next-line no-unused-vars\r\n olderThan, \r\n // eslint-disable-next-line no-unused-vars\r\n fullCache, \r\n // eslint-disable-next-line no-unused-vars\r\n baseDependencies) {\r\n return new Promise((result) => result(``));\r\n }\r\n async cleanupWorkflow(buildGuid, buildParameters, \r\n // eslint-disable-next-line no-unused-vars\r\n branchName, \r\n // eslint-disable-next-line no-unused-vars\r\n defaultSecretsArray) {\r\n const { workspace } = __1.Action;\r\n if (fs.existsSync(`${workspace}/cloud-runner-cache/cache/build/build-${buildParameters.buildGuid}.tar${cloud_runner_1.default.buildParameters.useCompressionStrategy ? '.lz4' : ''}`)) {\r\n await cloud_runner_system_1.CloudRunnerSystem.Run(`ls ${workspace}/cloud-runner-cache/cache/build/`);\r\n await cloud_runner_system_1.CloudRunnerSystem.Run(`rm -r ${workspace}/cloud-runner-cache/cache/build/build-${buildParameters.buildGuid}.tar${cloud_runner_1.default.buildParameters.useCompressionStrategy ? '.lz4' : ''}`);\r\n }\r\n }\r\n setupWorkflow(buildGuid, buildParameters, \r\n // eslint-disable-next-line no-unused-vars\r\n branchName, \r\n // eslint-disable-next-line no-unused-vars\r\n defaultSecretsArray) {\r\n this.buildParameters = buildParameters;\r\n }\r\n async runTaskInWorkflow(buildGuid, image, commands, mountdir, workingdir, environment, secrets) {\r\n cloud_runner_logger_1.default.log(buildGuid);\r\n cloud_runner_logger_1.default.log(commands);\r\n const { workspace, actionFolder } = __1.Action;\r\n const content = [];\r\n for (const x of secrets) {\r\n content.push({ name: x.EnvironmentVariable, value: x.ParameterValue });\r\n }\r\n for (const x of environment) {\r\n content.push({ name: x.name, value: x.value });\r\n }\r\n // if (this.buildParameters?.cloudRunnerIntegrationTests) {\r\n // core.info(JSON.stringify(content, undefined, 4));\r\n // core.info(JSON.stringify(secrets, undefined, 4));\r\n // core.info(JSON.stringify(environment, undefined, 4));\r\n // }\r\n // eslint-disable-next-line unicorn/no-for-loop\r\n for (let index = 0; index < content.length; index++) {\r\n if (content[index] === undefined) {\r\n delete content[index];\r\n }\r\n }\r\n let myOutput = '';\r\n const sharedFolder = `/data/`;\r\n // core.info(JSON.stringify({ workspace, actionFolder, ...this.buildParameters, ...content }, undefined, 4));\r\n const entrypointFilePath = `start.sh`;\r\n const fileContents = `#!/bin/bash\nset -e\n\nmkdir -p /github/workspace/cloud-runner-cache\nmkdir -p /data/cache\ncp -a /github/workspace/cloud-runner-cache/. ${sharedFolder}\n${cloud_runner_custom_hooks_1.CloudRunnerCustomHooks.ApplyHooksToCommands(commands, this.buildParameters)}\ncp -a ${sharedFolder}. /github/workspace/cloud-runner-cache/\n`;\r\n node_fs_1.writeFileSync(`${workspace}/${entrypointFilePath}`, fileContents, {\r\n flag: 'w',\r\n });\r\n if (cloud_runner_1.default.buildParameters.cloudRunnerDebug) {\r\n cloud_runner_logger_1.default.log(`Running local-docker: \\n ${fileContents}`);\r\n }\r\n if (fs.existsSync(`${workspace}/cloud-runner-cache`)) {\r\n await cloud_runner_system_1.CloudRunnerSystem.Run(`ls ${workspace}/cloud-runner-cache && du -sh ${workspace}/cloud-runner-cache`);\r\n }\r\n await docker_1.default.run(image, { workspace, actionFolder, ...this.buildParameters }, false, `chmod +x /github/workspace/${entrypointFilePath} && /github/workspace/${entrypointFilePath}`, content, {\r\n listeners: {\r\n stdout: (data) => {\r\n myOutput += data.toString();\r\n },\r\n stderr: (data) => {\r\n myOutput += `[LOCAL-DOCKER-ERROR]${data.toString()}`;\r\n },\r\n },\r\n }, true, false);\r\n return myOutput;\r\n }\r\n}\r\nexports.default = LocalDockerCloudRunner;\r\n","\"use strict\";\r\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n}));\r\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n});\r\nvar __importStar = (this && this.__importStar) || function (mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n};\r\nvar __importDefault = (this && this.__importDefault) || function (mod) {\r\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\r\n};\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nconst k8s = __importStar(require(\"@kubernetes/client-node\"));\r\nconst __1 = require(\"../../..\");\r\nconst core = __importStar(require(\"@actions/core\"));\r\nconst kubernetes_storage_1 = __importDefault(require(\"./kubernetes-storage\"));\r\nconst kubernetes_task_runner_1 = __importDefault(require(\"./kubernetes-task-runner\"));\r\nconst kubernetes_secret_1 = __importDefault(require(\"./kubernetes-secret\"));\r\nconst kubernetes_job_spec_factory_1 = __importDefault(require(\"./kubernetes-job-spec-factory\"));\r\nconst kubernetes_service_account_1 = __importDefault(require(\"./kubernetes-service-account\"));\r\nconst cloud_runner_logger_1 = __importDefault(require(\"../../services/cloud-runner-logger\"));\r\nconst cloud_runner_1 = __importDefault(require(\"../../cloud-runner\"));\r\nconst kubernetes_pods_1 = __importDefault(require(\"./kubernetes-pods\"));\r\nconst follow_log_stream_service_1 = require(\"../../services/follow-log-stream-service\");\r\nclass Kubernetes {\r\n // eslint-disable-next-line no-unused-vars\r\n constructor(buildParameters) {\r\n this.buildGuid = '';\r\n this.pvcName = '';\r\n this.secretName = '';\r\n this.jobName = '';\r\n this.podName = '';\r\n this.containerName = '';\r\n this.cleanupCronJobName = '';\r\n this.serviceAccountName = '';\r\n Kubernetes.Instance = this;\r\n this.kubeConfig = new k8s.KubeConfig();\r\n this.kubeConfig.loadFromDefault();\r\n this.kubeClient = this.kubeConfig.makeApiClient(k8s.CoreV1Api);\r\n this.kubeClientBatch = this.kubeConfig.makeApiClient(k8s.BatchV1Api);\r\n this.namespace = 'default';\r\n cloud_runner_logger_1.default.log('Loaded default Kubernetes configuration for this environment');\r\n }\r\n async listResources() {\r\n const pods = await this.kubeClient.listNamespacedPod(this.namespace);\r\n const serviceAccounts = await this.kubeClient.listNamespacedServiceAccount(this.namespace);\r\n const secrets = await this.kubeClient.listNamespacedSecret(this.namespace);\r\n const jobs = await this.kubeClientBatch.listNamespacedJob(this.namespace);\r\n return [\r\n ...pods.body.items.map((x) => {\r\n return { Name: x.metadata?.name || `` };\r\n }),\r\n ...serviceAccounts.body.items.map((x) => {\r\n return { Name: x.metadata?.name || `` };\r\n }),\r\n ...secrets.body.items.map((x) => {\r\n return { Name: x.metadata?.name || `` };\r\n }),\r\n ...jobs.body.items.map((x) => {\r\n return { Name: x.metadata?.name || `` };\r\n }),\r\n ];\r\n }\r\n listWorkflow() {\r\n throw new Error('Method not implemented.');\r\n }\r\n watchWorkflow() {\r\n throw new Error('Method not implemented.');\r\n }\r\n garbageCollect(\r\n // eslint-disable-next-line no-unused-vars\r\n filter, \r\n // eslint-disable-next-line no-unused-vars\r\n previewOnly, \r\n // eslint-disable-next-line no-unused-vars\r\n olderThan, \r\n // eslint-disable-next-line no-unused-vars\r\n fullCache, \r\n // eslint-disable-next-line no-unused-vars\r\n baseDependencies) {\r\n return new Promise((result) => result(``));\r\n }\r\n async setupWorkflow(buildGuid, buildParameters, \r\n // eslint-disable-next-line no-unused-vars\r\n branchName, \r\n // eslint-disable-next-line no-unused-vars\r\n defaultSecretsArray) {\r\n try {\r\n this.buildParameters = buildParameters;\r\n const id = __1.BuildParameters.shouldUseRetainedWorkspaceMode(buildParameters)\r\n ? cloud_runner_1.default.lockedWorkspace\r\n : buildParameters.buildGuid;\r\n this.pvcName = `unity-builder-pvc-${id}`;\r\n this.cleanupCronJobName = `unity-builder-cronjob-${id}`;\r\n this.serviceAccountName = `service-account-${buildParameters.buildGuid}`;\r\n await kubernetes_storage_1.default.createPersistentVolumeClaim(buildParameters, this.pvcName, this.kubeClient, this.namespace);\r\n await kubernetes_service_account_1.default.createServiceAccount(this.serviceAccountName, this.namespace, this.kubeClient);\r\n }\r\n catch (error) {\r\n throw error;\r\n }\r\n }\r\n async runTaskInWorkflow(buildGuid, image, commands, mountdir, workingdir, environment, secrets) {\r\n try {\r\n cloud_runner_logger_1.default.log('Cloud Runner K8s workflow!');\r\n // Setup\r\n this.buildGuid = buildGuid;\r\n this.secretName = `build-credentials-${this.buildGuid}`;\r\n this.jobName = `unity-builder-job-${this.buildGuid}`;\r\n this.containerName = `main`;\r\n await kubernetes_secret_1.default.createSecret(secrets, this.secretName, this.namespace, this.kubeClient);\r\n let output = '';\r\n // eslint-disable-next-line no-constant-condition\r\n while (true) {\r\n try {\r\n let existsAlready = false;\r\n try {\r\n (await this.kubeClient.readNamespacedPodStatus(this.podName, this.namespace)).body.status;\r\n existsAlready = true;\r\n }\r\n catch {\r\n // empty\r\n }\r\n if (!existsAlready) {\r\n cloud_runner_logger_1.default.log('Job does not exist');\r\n await this.createJob(commands, image, mountdir, workingdir, environment, secrets);\r\n cloud_runner_logger_1.default.log('Watching pod until running');\r\n await kubernetes_task_runner_1.default.watchUntilPodRunning(this.kubeClient, this.podName, this.namespace);\r\n }\r\n cloud_runner_logger_1.default.log('Pod running, streaming logs');\r\n const running = await kubernetes_pods_1.default.IsPodRunning(this.podName, this.namespace, this.kubeClient);\r\n output += await kubernetes_task_runner_1.default.runTask(this.kubeConfig, this.kubeClient, this.jobName, this.podName, kubernetes_job_spec_factory_1.default.MainContainerName, this.namespace, running);\r\n let podStatus = await kubernetes_pods_1.default.GetPodStatus(this.podName, this.namespace, this.kubeClient);\r\n if (!running) {\r\n if (!follow_log_stream_service_1.FollowLogStreamService.DidReceiveEndOfTransmission && podStatus === `Succeeded`) {\r\n output += await kubernetes_task_runner_1.default.runTask(this.kubeConfig, this.kubeClient, this.jobName, this.podName, 'main', this.namespace, true);\r\n cloud_runner_logger_1.default.log(JSON.stringify((await this.kubeClient.listNamespacedEvent(this.namespace)).body.items\r\n .map((x) => {\r\n return {\r\n message: x.message || ``,\r\n name: x.metadata.name || ``,\r\n reason: x.reason || ``,\r\n };\r\n })\r\n .filter((x) => x.name.includes(this.podName)), undefined, 4));\r\n break;\r\n }\r\n if (follow_log_stream_service_1.FollowLogStreamService.DidReceiveEndOfTransmission) {\r\n break;\r\n }\r\n }\r\n podStatus = await kubernetes_pods_1.default.GetPodStatus(this.podName, this.namespace, this.kubeClient);\r\n cloud_runner_logger_1.default.log(`Pod status ${podStatus}, retrying log stream...`);\r\n }\r\n catch (error) {\r\n let errorParsed;\r\n try {\r\n errorParsed = JSON.parse(error);\r\n }\r\n catch {\r\n errorParsed = error;\r\n }\r\n const errorMessage = errorParsed.name || errorParsed.reason || errorParsed.response?.body?.reason || errorParsed.message;\r\n const continueStreaming = errorMessage.includes(`dial timeout, backstop`) ||\r\n errorMessage.includes(`HttpError`) ||\r\n errorMessage.includes(`HttpError: HTTP request failed`) ||\r\n errorMessage.includes(`an error occurred when try to find container`) ||\r\n errorMessage.includes(`not found`) ||\r\n errorMessage.includes(`Not Found`);\r\n if (continueStreaming) {\r\n cloud_runner_logger_1.default.log('Log Stream Container Not Found');\r\n await new Promise((resolve) => resolve(5000));\r\n continue;\r\n }\r\n else {\r\n cloud_runner_logger_1.default.log(`error running k8s workflow ${error}`);\r\n throw error;\r\n }\r\n }\r\n }\r\n await this.cleanupTaskResources();\r\n return output;\r\n }\r\n catch (error) {\r\n cloud_runner_logger_1.default.log('Running job failed');\r\n core.error(JSON.stringify(error, undefined, 4));\r\n await this.cleanupTaskResources();\r\n throw error;\r\n }\r\n }\r\n async createJob(commands, image, mountdir, workingdir, environment, secrets) {\r\n await this.createNamespacedJob(commands, image, mountdir, workingdir, environment, secrets);\r\n const find = await Kubernetes.findPodFromJob(this.kubeClient, this.jobName, this.namespace);\r\n this.setPodNameAndContainerName(find);\r\n }\r\n async doesJobExist(name) {\r\n const jobs = await this.kubeClientBatch.listNamespacedJob(this.namespace);\r\n return jobs.body.items.some((x) => x.metadata?.name === name);\r\n }\r\n async doesFailedJobExist() {\r\n const podStatus = await this.kubeClient.readNamespacedPodStatus(this.podName, this.namespace);\r\n return podStatus.body.status?.phase === `Failed`;\r\n }\r\n async createNamespacedJob(commands, image, mountdir, workingdir, environment, secrets) {\r\n for (let index = 0; index < 3; index++) {\r\n try {\r\n 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);\r\n await new Promise((promise) => setTimeout(promise, 15000));\r\n const result = await this.kubeClientBatch.createNamespacedJob(this.namespace, jobSpec);\r\n cloud_runner_logger_1.default.log(`Build job created`);\r\n await new Promise((promise) => setTimeout(promise, 5000));\r\n cloud_runner_logger_1.default.log('Job created');\r\n return result.body.metadata?.name;\r\n }\r\n catch (error) {\r\n cloud_runner_logger_1.default.log(`Error occured creating job: ${error}`);\r\n throw error;\r\n }\r\n }\r\n }\r\n setPodNameAndContainerName(pod) {\r\n this.podName = pod.metadata?.name || '';\r\n this.containerName = pod.status?.containerStatuses?.[0].name || '';\r\n }\r\n async cleanupTaskResources() {\r\n cloud_runner_logger_1.default.log('cleaning up');\r\n try {\r\n await this.kubeClientBatch.deleteNamespacedJob(this.jobName, this.namespace);\r\n await this.kubeClient.deleteNamespacedPod(this.podName, this.namespace);\r\n }\r\n catch (error) {\r\n cloud_runner_logger_1.default.log(`Failed to cleanup`);\r\n if (error.response.body.reason !== `NotFound`) {\r\n cloud_runner_logger_1.default.log(`Wasn't a not found error: ${error.response.body.reason}`);\r\n throw error;\r\n }\r\n }\r\n try {\r\n await this.kubeClient.deleteNamespacedSecret(this.secretName, this.namespace);\r\n }\r\n catch (error) {\r\n cloud_runner_logger_1.default.log(`Failed to cleanup secret`);\r\n cloud_runner_logger_1.default.log(error.response.body.reason);\r\n }\r\n cloud_runner_logger_1.default.log('cleaned up Secret, Job and Pod');\r\n cloud_runner_logger_1.default.log('cleaning up finished');\r\n }\r\n async cleanupWorkflow(buildGuid, buildParameters, \r\n // eslint-disable-next-line no-unused-vars\r\n branchName, \r\n // eslint-disable-next-line no-unused-vars\r\n defaultSecretsArray) {\r\n if (__1.BuildParameters.shouldUseRetainedWorkspaceMode(buildParameters)) {\r\n return;\r\n }\r\n cloud_runner_logger_1.default.log(`deleting PVC`);\r\n try {\r\n await this.kubeClient.deleteNamespacedPersistentVolumeClaim(this.pvcName, this.namespace);\r\n await this.kubeClient.deleteNamespacedServiceAccount(this.serviceAccountName, this.namespace);\r\n cloud_runner_logger_1.default.log('cleaned up PVC and Service Account');\r\n }\r\n catch (error) {\r\n cloud_runner_logger_1.default.log(`Cleanup failed ${JSON.stringify(error, undefined, 4)}`);\r\n throw error;\r\n }\r\n }\r\n static async findPodFromJob(kubeClient, jobName, namespace) {\r\n const namespacedPods = await kubeClient.listNamespacedPod(namespace);\r\n const pod = namespacedPods.body.items.find((x) => x.metadata?.labels?.['job-name'] === jobName);\r\n if (pod === undefined) {\r\n throw new Error(\"pod with job-name label doesn't exist\");\r\n }\r\n return pod;\r\n }\r\n}\r\nexports.default = Kubernetes;\r\n","\"use strict\";\r\nvar __importDefault = (this && this.__importDefault) || function (mod) {\r\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\r\n};\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nconst client_node_1 = require(\"@kubernetes/client-node\");\r\nconst cloud_runner_custom_hooks_1 = require(\"../../services/cloud-runner-custom-hooks\");\r\nconst cloud_runner_1 = __importDefault(require(\"../../cloud-runner\"));\r\nclass KubernetesJobSpecFactory {\r\n static getJobSpec(command, image, mountdir, workingDirectory, environment, secrets, buildGuid, buildParameters, secretName, pvcName, jobName, k8s) {\r\n environment.push(...[\r\n {\r\n name: 'GITHUB_SHA',\r\n value: buildGuid,\r\n },\r\n {\r\n name: 'GITHUB_WORKSPACE',\r\n value: '/data/repo',\r\n },\r\n {\r\n name: 'PROJECT_PATH',\r\n value: buildParameters.projectPath,\r\n },\r\n {\r\n name: 'BUILD_PATH',\r\n value: buildParameters.buildPath,\r\n },\r\n {\r\n name: 'BUILD_FILE',\r\n value: buildParameters.buildFile,\r\n },\r\n {\r\n name: 'BUILD_NAME',\r\n value: buildParameters.buildName,\r\n },\r\n {\r\n name: 'BUILD_METHOD',\r\n value: buildParameters.buildMethod,\r\n },\r\n {\r\n name: 'CUSTOM_PARAMETERS',\r\n value: buildParameters.customParameters,\r\n },\r\n {\r\n name: 'CHOWN_FILES_TO',\r\n value: buildParameters.chownFilesTo,\r\n },\r\n {\r\n name: 'BUILD_TARGET',\r\n value: buildParameters.targetPlatform,\r\n },\r\n {\r\n name: 'ANDROID_VERSION_CODE',\r\n value: buildParameters.androidVersionCode.toString(),\r\n },\r\n {\r\n name: 'ANDROID_KEYSTORE_NAME',\r\n value: buildParameters.androidKeystoreName,\r\n },\r\n {\r\n name: 'ANDROID_KEYALIAS_NAME',\r\n value: buildParameters.androidKeyaliasName,\r\n },\r\n ]);\r\n const job = new k8s.V1Job();\r\n job.apiVersion = 'batch/v1';\r\n job.kind = 'Job';\r\n job.metadata = {\r\n name: jobName,\r\n labels: {\r\n app: 'unity-builder',\r\n buildGuid,\r\n },\r\n };\r\n job.spec = {\r\n ttlSecondsAfterFinished: 500,\r\n backoffLimit: 0,\r\n template: {\r\n spec: {\r\n volumes: [\r\n {\r\n name: 'build-mount',\r\n persistentVolumeClaim: {\r\n claimName: pvcName,\r\n },\r\n },\r\n ],\r\n containers: [\r\n {\r\n name: KubernetesJobSpecFactory.MainContainerName,\r\n image,\r\n command: ['/bin/sh'],\r\n args: ['-c', `${cloud_runner_custom_hooks_1.CloudRunnerCustomHooks.ApplyHooksToCommands(command, cloud_runner_1.default.buildParameters)}`],\r\n workingDir: `${workingDirectory}`,\r\n resources: {\r\n requests: {\r\n memory: `${Number.parseInt(buildParameters.containerMemory) / 1024}G` || '750M',\r\n cpu: Number.parseInt(buildParameters.containerCpu) / 1024 || '1',\r\n },\r\n },\r\n env: [\r\n ...environment.map((x) => {\r\n const environmentVariable = new client_node_1.V1EnvVar();\r\n environmentVariable.name = x.name;\r\n environmentVariable.value = x.value;\r\n return environmentVariable;\r\n }),\r\n ...secrets.map((x) => {\r\n const secret = new client_node_1.V1EnvVarSource();\r\n secret.secretKeyRef = new client_node_1.V1SecretKeySelector();\r\n secret.secretKeyRef.key = x.ParameterKey;\r\n secret.secretKeyRef.name = secretName;\r\n const environmentVariable = new client_node_1.V1EnvVar();\r\n environmentVariable.name = x.EnvironmentVariable;\r\n environmentVariable.valueFrom = secret;\r\n return environmentVariable;\r\n }),\r\n ],\r\n volumeMounts: [\r\n {\r\n name: 'build-mount',\r\n mountPath: `/${mountdir}`,\r\n },\r\n ],\r\n lifecycle: {\r\n preStop: {\r\n exec: {\r\n command: [\r\n 'bin/bash',\r\n '-c',\r\n `cd /data/builder/action/steps;\n chmod +x /return_license.sh;\n /return_license.sh;`,\r\n ],\r\n },\r\n },\r\n },\r\n },\r\n ],\r\n restartPolicy: 'Never',\r\n },\r\n },\r\n };\r\n job.spec.template.spec.containers[0].resources.requests[`ephemeral-storage`] = '10Gi';\r\n return job;\r\n }\r\n}\r\nKubernetesJobSpecFactory.MainContainerName = 'main';\r\nexports.default = KubernetesJobSpecFactory;\r\n","\"use strict\";\r\nvar __importDefault = (this && this.__importDefault) || function (mod) {\r\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\r\n};\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nconst cloud_runner_logger_1 = __importDefault(require(\"../../services/cloud-runner-logger\"));\r\nclass KubernetesPods {\r\n static async IsPodRunning(podName, namespace, kubeClient) {\r\n const pods = (await kubeClient.listNamespacedPod(namespace)).body.items.filter((x) => podName === x.metadata?.name);\r\n const running = pods.length > 0 && (pods[0].status?.phase === `Running` || pods[0].status?.phase === `Pending`);\r\n const phase = pods[0]?.status?.phase || 'undefined status';\r\n cloud_runner_logger_1.default.log(`Getting pod status: ${phase}`);\r\n if (phase === `Failed`) {\r\n throw new Error(`K8s pod failed`);\r\n }\r\n return running;\r\n }\r\n static async GetPodStatus(podName, namespace, kubeClient) {\r\n const pods = (await kubeClient.listNamespacedPod(namespace)).body.items.find((x) => podName === x.metadata?.name);\r\n const phase = pods?.status?.phase || 'undefined status';\r\n return phase;\r\n }\r\n}\r\nexports.default = KubernetesPods;\r\n","\"use strict\";\r\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n}));\r\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n});\r\nvar __importStar = (this && this.__importStar) || function (mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n};\r\nvar __importDefault = (this && this.__importDefault) || function (mod) {\r\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\r\n};\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nconst k8s = __importStar(require(\"@kubernetes/client-node\"));\r\nconst cloud_runner_logger_1 = __importDefault(require(\"../../services/cloud-runner-logger\"));\r\nconst base64 = __importStar(require(\"base-64\"));\r\nclass KubernetesSecret {\r\n static async createSecret(secrets, secretName, namespace, kubeClient) {\r\n try {\r\n const secret = new k8s.V1Secret();\r\n secret.apiVersion = 'v1';\r\n secret.kind = 'Secret';\r\n secret.type = 'Opaque';\r\n secret.metadata = {\r\n name: secretName,\r\n };\r\n secret.data = {};\r\n for (const buildSecret of secrets) {\r\n secret.data[buildSecret.ParameterKey] = base64.encode(buildSecret.ParameterValue);\r\n }\r\n cloud_runner_logger_1.default.log(`Creating secret: ${secretName}`);\r\n const existingSecrets = await kubeClient.listNamespacedSecret(namespace);\r\n const mappedSecrets = existingSecrets.body.items.map((x) => {\r\n return x.metadata?.name || `no name`;\r\n });\r\n cloud_runner_logger_1.default.log(`ExistsAlready: ${mappedSecrets.includes(secretName)} SecretsCount: ${mappedSecrets.length}`);\r\n await new Promise((promise) => setTimeout(promise, 15000));\r\n await kubeClient.createNamespacedSecret(namespace, secret);\r\n cloud_runner_logger_1.default.log('Created secret');\r\n }\r\n catch (error) {\r\n cloud_runner_logger_1.default.log(`Created secret failed ${error}`);\r\n throw new Error(`Failed to create kubernetes secret`);\r\n }\r\n }\r\n}\r\nexports.default = KubernetesSecret;\r\n","\"use strict\";\r\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n}));\r\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n});\r\nvar __importStar = (this && this.__importStar) || function (mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n};\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nconst k8s = __importStar(require(\"@kubernetes/client-node\"));\r\nclass KubernetesServiceAccount {\r\n static async createServiceAccount(serviceAccountName, namespace, kubeClient) {\r\n const serviceAccount = new k8s.V1ServiceAccount();\r\n serviceAccount.apiVersion = 'v1';\r\n serviceAccount.kind = 'ServiceAccount';\r\n serviceAccount.metadata = {\r\n name: serviceAccountName,\r\n };\r\n serviceAccount.automountServiceAccountToken = false;\r\n return kubeClient.createNamespacedServiceAccount(namespace, serviceAccount);\r\n }\r\n}\r\nexports.default = KubernetesServiceAccount;\r\n","\"use strict\";\r\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n}));\r\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n});\r\nvar __importStar = (this && this.__importStar) || function (mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n};\r\nvar __importDefault = (this && this.__importDefault) || function (mod) {\r\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\r\n};\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nconst async_wait_until_1 = __importDefault(require(\"async-wait-until\"));\r\nconst core = __importStar(require(\"@actions/core\"));\r\nconst k8s = __importStar(require(\"@kubernetes/client-node\"));\r\nconst cloud_runner_logger_1 = __importDefault(require(\"../../services/cloud-runner-logger\"));\r\nconst github_1 = __importDefault(require(\"../../../github\"));\r\nclass KubernetesStorage {\r\n static async createPersistentVolumeClaim(buildParameters, pvcName, kubeClient, namespace) {\r\n if (buildParameters.kubeVolume !== ``) {\r\n cloud_runner_logger_1.default.log(`Kube Volume was input was set ${buildParameters.kubeVolume} overriding ${pvcName}`);\r\n pvcName = buildParameters.kubeVolume;\r\n return;\r\n }\r\n const allPvc = (await kubeClient.listNamespacedPersistentVolumeClaim(namespace)).body.items;\r\n const pvcList = allPvc.map((x) => x.metadata?.name);\r\n cloud_runner_logger_1.default.log(`Current PVCs in namespace ${namespace}`);\r\n cloud_runner_logger_1.default.log(JSON.stringify(pvcList, undefined, 4));\r\n if (pvcList.includes(pvcName)) {\r\n cloud_runner_logger_1.default.log(`pvc ${pvcName} already exists`);\r\n if (github_1.default.githubInputEnabled) {\r\n core.setOutput('volume', pvcName);\r\n }\r\n return;\r\n }\r\n cloud_runner_logger_1.default.log(`Creating PVC ${pvcName} (does not exist)`);\r\n const result = await KubernetesStorage.createPVC(pvcName, buildParameters, kubeClient, namespace);\r\n await KubernetesStorage.handleResult(result, kubeClient, namespace, pvcName);\r\n }\r\n static async getPVCPhase(kubeClient, name, namespace) {\r\n try {\r\n return (await kubeClient.readNamespacedPersistentVolumeClaim(name, namespace)).body.status?.phase;\r\n }\r\n catch (error) {\r\n core.error('Failed to get PVC phase');\r\n core.error(JSON.stringify(error, undefined, 4));\r\n throw error;\r\n }\r\n }\r\n static async watchUntilPVCNotPending(kubeClient, name, namespace) {\r\n try {\r\n cloud_runner_logger_1.default.log(`watch Until PVC Not Pending ${name} ${namespace}`);\r\n cloud_runner_logger_1.default.log(`${await this.getPVCPhase(kubeClient, name, namespace)}`);\r\n await async_wait_until_1.default(async () => {\r\n return (await this.getPVCPhase(kubeClient, name, namespace)) === 'Pending';\r\n }, {\r\n timeout: 750000,\r\n intervalBetweenAttempts: 15000,\r\n });\r\n }\r\n catch (error) {\r\n core.error('Failed to watch PVC');\r\n core.error(error.toString());\r\n core.error(`PVC Body: ${JSON.stringify((await kubeClient.readNamespacedPersistentVolumeClaim(name, namespace)).body, undefined, 4)}`);\r\n throw error;\r\n }\r\n }\r\n static async createPVC(pvcName, buildParameters, kubeClient, namespace) {\r\n const pvc = new k8s.V1PersistentVolumeClaim();\r\n pvc.apiVersion = 'v1';\r\n pvc.kind = 'PersistentVolumeClaim';\r\n pvc.metadata = {\r\n name: pvcName,\r\n };\r\n pvc.spec = {\r\n accessModes: ['ReadWriteOnce'],\r\n storageClassName: buildParameters.kubeStorageClass === '' ? 'standard' : buildParameters.kubeStorageClass,\r\n resources: {\r\n requests: {\r\n storage: buildParameters.kubeVolumeSize,\r\n },\r\n },\r\n };\r\n const result = await kubeClient.createNamespacedPersistentVolumeClaim(namespace, pvc);\r\n return result;\r\n }\r\n static async handleResult(result, kubeClient, namespace, pvcName) {\r\n const name = result.body.metadata?.name || '';\r\n cloud_runner_logger_1.default.log(`PVC ${name} created`);\r\n await this.watchUntilPVCNotPending(kubeClient, name, namespace);\r\n cloud_runner_logger_1.default.log(`PVC ${name} is ready and not pending`);\r\n core.setOutput('volume', pvcName);\r\n }\r\n}\r\nexports.default = KubernetesStorage;\r\n","\"use strict\";\r\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n}));\r\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n});\r\nvar __importStar = (this && this.__importStar) || function (mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n};\r\nvar __importDefault = (this && this.__importDefault) || function (mod) {\r\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\r\n};\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nconst cloud_runner_logger_1 = __importDefault(require(\"../../services/cloud-runner-logger\"));\r\nconst core = __importStar(require(\"@actions/core\"));\r\nconst async_wait_until_1 = __importDefault(require(\"async-wait-until\"));\r\nconst follow_log_stream_service_1 = require(\"../../services/follow-log-stream-service\");\r\nconst cloud_runner_system_1 = require(\"../../services/cloud-runner-system\");\r\nconst cloud_runner_1 = __importDefault(require(\"../../cloud-runner\"));\r\nclass KubernetesTaskRunner {\r\n static async runTask(kubeConfig, kubeClient, jobName, podName, containerName, namespace, alreadyFinished = false) {\r\n const lastReceivedMessage = this.lastReceivedMessage !== `` ? `\\nLast Log Message\"${this.lastReceivedMessage}\"` : ``;\r\n cloud_runner_logger_1.default.log(`Streaming logs from pod: ${podName} container: ${containerName} namespace: ${namespace} finished ${alreadyFinished} ${cloud_runner_1.default.buildParameters.kubeVolumeSize}/${cloud_runner_1.default.buildParameters.containerCpu}/${cloud_runner_1.default.buildParameters.containerMemory}\\n${lastReceivedMessage}`);\r\n let output = '';\r\n let didStreamAnyLogs = false;\r\n let shouldReadLogs = true;\r\n let shouldCleanup = true;\r\n try {\r\n const sinceTime = KubernetesTaskRunner.lastReceivedTimestamp\r\n ? `--since-time=\"${new Date(KubernetesTaskRunner.lastReceivedTimestamp + 1).toISOString()}\" `\r\n : ` `;\r\n let lastMessageSeenIncludedInChunk = false;\r\n let lastMessageSeen = false;\r\n // using this instead of Kube\r\n const logs = await cloud_runner_system_1.CloudRunnerSystem.Run(`kubectl logs ${podName} -f -c ${containerName} --timestamps ${sinceTime}`, false, true);\r\n const splitLogs = logs.split(`\\n`);\r\n for (const chunk of splitLogs) {\r\n if (chunk.replace(/\\s/g, ``) === KubernetesTaskRunner.lastReceivedMessage.replace(/\\s/g, ``) &&\r\n KubernetesTaskRunner.lastReceivedMessage.replace(/\\s/g, ``) !== ``) {\r\n cloud_runner_logger_1.default.log(`Previous log message found ${chunk}`);\r\n lastMessageSeenIncludedInChunk = true;\r\n }\r\n }\r\n for (const chunk of splitLogs) {\r\n const newDate = Date.parse(`${chunk.toString().split(`Z `)[0]}Z`);\r\n if (chunk.replace(/\\s/g, ``) === KubernetesTaskRunner.lastReceivedMessage.replace(/\\s/g, ``)) {\r\n lastMessageSeen = true;\r\n }\r\n if (lastMessageSeenIncludedInChunk && !lastMessageSeen) {\r\n continue;\r\n }\r\n didStreamAnyLogs = true;\r\n const message = cloud_runner_1.default.buildParameters.cloudRunnerDebug ? chunk : chunk.split(`Z `)[1];\r\n KubernetesTaskRunner.lastReceivedMessage = chunk;\r\n KubernetesTaskRunner.lastReceivedTimestamp = newDate;\r\n ({ shouldReadLogs, shouldCleanup, output } = follow_log_stream_service_1.FollowLogStreamService.handleIteration(message, shouldReadLogs, shouldCleanup, output));\r\n }\r\n if (!didStreamAnyLogs) {\r\n core.error('Failed to stream any logs, listing namespace events, check for an error with the container');\r\n core.error(JSON.stringify({\r\n events: (await kubeClient.listNamespacedEvent(namespace)).body.items\r\n .filter((x) => {\r\n return x.involvedObject.name === podName || x.involvedObject.name === jobName;\r\n })\r\n .map((x) => {\r\n return {\r\n type: x.involvedObject.kind,\r\n name: x.involvedObject.name,\r\n message: x.message,\r\n };\r\n }),\r\n }, undefined, 4));\r\n throw new Error(`No logs streamed from k8s`);\r\n }\r\n cloud_runner_logger_1.default.log('end of log stream');\r\n }\r\n catch (error) {\r\n cloud_runner_logger_1.default.log(`k8s stream watching failed ${JSON.stringify(error, undefined, 4)}`);\r\n }\r\n return output;\r\n }\r\n static async watchUntilPodRunning(kubeClient, podName, namespace) {\r\n let success = false;\r\n let message = ``;\r\n cloud_runner_logger_1.default.log(`Watching ${podName} ${namespace}`);\r\n await async_wait_until_1.default(async () => {\r\n const status = await kubeClient.readNamespacedPodStatus(podName, namespace);\r\n const phase = status?.body.status?.phase;\r\n success = phase === 'Running';\r\n message = `Phase:${status.body.status?.phase} \\n Reason:${status.body.status?.conditions?.[0].reason || ''} \\n Message:${status.body.status?.conditions?.[0].message || ''}`;\r\n // CloudRunnerLogger.log(\r\n // JSON.stringify(\r\n // (await kubeClient.listNamespacedEvent(namespace)).body.items\r\n // .map((x) => {\r\n // return {\r\n // message: x.message || ``,\r\n // name: x.metadata.name || ``,\r\n // reason: x.reason || ``,\r\n // };\r\n // })\r\n // .filter((x) => x.name.includes(podName)),\r\n // undefined,\r\n // 4,\r\n // ),\r\n // );\r\n if (success || phase !== 'Pending')\r\n return true;\r\n return false;\r\n }, {\r\n timeout: 2000000,\r\n intervalBetweenAttempts: 15000,\r\n });\r\n if (!success) {\r\n cloud_runner_logger_1.default.log(message);\r\n }\r\n return success;\r\n }\r\n}\r\nKubernetesTaskRunner.lastReceivedMessage = ``;\r\nexports.default = KubernetesTaskRunner;\r\n","\"use strict\";\r\nvar __importDefault = (this && this.__importDefault) || function (mod) {\r\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\r\n};\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nconst cloud_runner_system_1 = require(\"../../services/cloud-runner-system\");\r\nconst cloud_runner_logger_1 = __importDefault(require(\"../../services/cloud-runner-logger\"));\r\nclass LocalCloudRunner {\r\n listResources() {\r\n throw new Error('Method not implemented.');\r\n }\r\n listWorkflow() {\r\n throw new Error('Method not implemented.');\r\n }\r\n watchWorkflow() {\r\n throw new Error('Method not implemented.');\r\n }\r\n garbageCollect(\r\n // eslint-disable-next-line no-unused-vars\r\n filter, \r\n // eslint-disable-next-line no-unused-vars\r\n previewOnly, \r\n // eslint-disable-next-line no-unused-vars\r\n olderThan, \r\n // eslint-disable-next-line no-unused-vars\r\n fullCache, \r\n // eslint-disable-next-line no-unused-vars\r\n baseDependencies) {\r\n throw new Error('Method not implemented.');\r\n }\r\n cleanupWorkflow(\r\n // eslint-disable-next-line no-unused-vars\r\n buildGuid, \r\n // eslint-disable-next-line no-unused-vars\r\n buildParameters, \r\n // eslint-disable-next-line no-unused-vars\r\n branchName, \r\n // eslint-disable-next-line no-unused-vars\r\n defaultSecretsArray) { }\r\n setupWorkflow(\r\n // eslint-disable-next-line no-unused-vars\r\n buildGuid, \r\n // eslint-disable-next-line no-unused-vars\r\n buildParameters, \r\n // eslint-disable-next-line no-unused-vars\r\n branchName, \r\n // eslint-disable-next-line no-unused-vars\r\n defaultSecretsArray) { }\r\n async runTaskInWorkflow(buildGuid, image, commands, \r\n // eslint-disable-next-line no-unused-vars\r\n mountdir, \r\n // eslint-disable-next-line no-unused-vars\r\n workingdir, \r\n // eslint-disable-next-line no-unused-vars\r\n environment, \r\n // eslint-disable-next-line no-unused-vars\r\n secrets) {\r\n cloud_runner_logger_1.default.log(image);\r\n cloud_runner_logger_1.default.log(buildGuid);\r\n cloud_runner_logger_1.default.log(commands);\r\n return await cloud_runner_system_1.CloudRunnerSystem.Run(commands);\r\n }\r\n}\r\nexports.default = LocalCloudRunner;\r\n","\"use strict\";\r\nvar __importDefault = (this && this.__importDefault) || function (mod) {\r\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\r\n};\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nconst cloud_runner_logger_1 = __importDefault(require(\"../../services/cloud-runner-logger\"));\r\nclass TestCloudRunner {\r\n listResources() {\r\n throw new Error('Method not implemented.');\r\n }\r\n listWorkflow() {\r\n throw new Error('Method not implemented.');\r\n }\r\n watchWorkflow() {\r\n throw new Error('Method not implemented.');\r\n }\r\n garbageCollect(\r\n // eslint-disable-next-line no-unused-vars\r\n filter, \r\n // eslint-disable-next-line no-unused-vars\r\n previewOnly) {\r\n throw new Error('Method not implemented.');\r\n }\r\n cleanupWorkflow(\r\n // eslint-disable-next-line no-unused-vars\r\n buildGuid, \r\n // eslint-disable-next-line no-unused-vars\r\n buildParameters, \r\n // eslint-disable-next-line no-unused-vars\r\n branchName, \r\n // eslint-disable-next-line no-unused-vars\r\n defaultSecretsArray) { }\r\n setupWorkflow(\r\n // eslint-disable-next-line no-unused-vars\r\n buildGuid, \r\n // eslint-disable-next-line no-unused-vars\r\n buildParameters, \r\n // eslint-disable-next-line no-unused-vars\r\n branchName, \r\n // eslint-disable-next-line no-unused-vars\r\n defaultSecretsArray) { }\r\n async runTaskInWorkflow(commands, buildGuid, image, \r\n // eslint-disable-next-line no-unused-vars\r\n mountdir, \r\n // eslint-disable-next-line no-unused-vars\r\n workingdir, \r\n // eslint-disable-next-line no-unused-vars\r\n environment, \r\n // eslint-disable-next-line no-unused-vars\r\n secrets) {\r\n cloud_runner_logger_1.default.log(image);\r\n cloud_runner_logger_1.default.log(buildGuid);\r\n cloud_runner_logger_1.default.log(commands);\r\n return await new Promise((result) => {\r\n result(commands);\r\n });\r\n }\r\n}\r\nexports.default = TestCloudRunner;\r\n","\"use strict\";\r\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n 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;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n};\r\nvar __importDefault = (this && this.__importDefault) || function (mod) {\r\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\r\n};\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.Caching = void 0;\r\nconst node_console_1 = require(\"node:console\");\r\nconst node_fs_1 = __importDefault(require(\"node:fs\"));\r\nconst node_path_1 = __importDefault(require(\"node:path\"));\r\nconst cloud_runner_1 = __importDefault(require(\"../cloud-runner\"));\r\nconst cloud_runner_logger_1 = __importDefault(require(\"../services/cloud-runner-logger\"));\r\nconst cloud_runner_folders_1 = require(\"../services/cloud-runner-folders\");\r\nconst cloud_runner_system_1 = require(\"../services/cloud-runner-system\");\r\nconst lfs_hashing_1 = require(\"../services/lfs-hashing\");\r\nconst remote_client_logger_1 = require(\"./remote-client-logger\");\r\nconst cli_1 = require(\"../../cli/cli\");\r\nconst cli_functions_repository_1 = require(\"../../cli/cli-functions-repository\");\r\n// eslint-disable-next-line github/no-then\r\nconst fileExists = async (fpath) => !!(await node_fs_1.default.promises.stat(fpath).catch(() => false));\r\nclass Caching {\r\n static async cachePush() {\r\n try {\r\n const buildParameter = JSON.parse(process.env.BUILD_PARAMETERS || '{}');\r\n cloud_runner_1.default.buildParameters = buildParameter;\r\n await Caching.PushToCache(cli_1.Cli.options['cachePushTo'], cli_1.Cli.options['cachePushFrom'], cli_1.Cli.options['artifactName'] || '');\r\n }\r\n catch (error) {\r\n cloud_runner_logger_1.default.log(`${error}`);\r\n }\r\n }\r\n static async cachePull() {\r\n try {\r\n const buildParameter = JSON.parse(process.env.BUILD_PARAMETERS || '{}');\r\n cloud_runner_1.default.buildParameters = buildParameter;\r\n await Caching.PullFromCache(cli_1.Cli.options['cachePushFrom'], cli_1.Cli.options['cachePushTo'], cli_1.Cli.options['artifactName'] || '');\r\n }\r\n catch (error) {\r\n cloud_runner_logger_1.default.log(`${error}`);\r\n }\r\n }\r\n static async PushToCache(cacheFolder, sourceFolder, cacheArtifactName) {\r\n cloud_runner_logger_1.default.log(`Pushing to cache ${sourceFolder}`);\r\n cacheArtifactName = cacheArtifactName.replace(' ', '');\r\n const startPath = process.cwd();\r\n let compressionSuffix = '';\r\n if (cloud_runner_1.default.buildParameters.useCompressionStrategy === true) {\r\n compressionSuffix = `.lz4`;\r\n }\r\n cloud_runner_logger_1.default.log(`Compression: ${cloud_runner_1.default.buildParameters.useCompressionStrategy} ${compressionSuffix}`);\r\n try {\r\n if (!(await fileExists(cacheFolder))) {\r\n await cloud_runner_system_1.CloudRunnerSystem.Run(`mkdir -p ${cacheFolder}`);\r\n }\r\n process.chdir(node_path_1.default.resolve(sourceFolder, '..'));\r\n if (cloud_runner_1.default.buildParameters.cloudRunnerDebug === true) {\r\n cloud_runner_logger_1.default.log(`Hashed cache folder ${await lfs_hashing_1.LfsHashing.hashAllFiles(sourceFolder)} ${sourceFolder} ${node_path_1.default.basename(sourceFolder)}`);\r\n }\r\n const contents = await node_fs_1.default.promises.readdir(node_path_1.default.basename(sourceFolder));\r\n cloud_runner_logger_1.default.log(`There is ${contents.length} files/dir in the source folder ${node_path_1.default.basename(sourceFolder)}`);\r\n if (contents.length === 0) {\r\n cloud_runner_logger_1.default.log(`Did not push source folder to cache because it was empty ${node_path_1.default.basename(sourceFolder)}`);\r\n process.chdir(`${startPath}`);\r\n return;\r\n }\r\n await cloud_runner_system_1.CloudRunnerSystem.Run(`tar -cf ${cacheArtifactName}.tar${compressionSuffix} ${node_path_1.default.basename(sourceFolder)}`);\r\n await cloud_runner_system_1.CloudRunnerSystem.Run(`du ${cacheArtifactName}.tar${compressionSuffix}`);\r\n node_console_1.assert(await fileExists(`${cacheArtifactName}.tar${compressionSuffix}`), 'cache archive exists');\r\n node_console_1.assert(await fileExists(node_path_1.default.basename(sourceFolder)), 'source folder exists');\r\n await cloud_runner_system_1.CloudRunnerSystem.Run(`mv ${cacheArtifactName}.tar${compressionSuffix} ${cacheFolder}`);\r\n remote_client_logger_1.RemoteClientLogger.log(`moved cache entry ${cacheArtifactName} to ${cacheFolder}`);\r\n node_console_1.assert(await fileExists(`${node_path_1.default.join(cacheFolder, cacheArtifactName)}.tar${compressionSuffix}`), 'cache archive exists inside cache folder');\r\n }\r\n catch (error) {\r\n process.chdir(`${startPath}`);\r\n throw error;\r\n }\r\n process.chdir(`${startPath}`);\r\n }\r\n static async PullFromCache(cacheFolder, destinationFolder, cacheArtifactName = ``) {\r\n cloud_runner_logger_1.default.log(`Pulling from cache ${destinationFolder} ${cloud_runner_1.default.buildParameters.skipCache}`);\r\n if (`${cloud_runner_1.default.buildParameters.skipCache}` === `true`) {\r\n cloud_runner_logger_1.default.log(`Skipping cache debugSkipCache is true`);\r\n return;\r\n }\r\n cacheArtifactName = cacheArtifactName.replace(' ', '');\r\n let compressionSuffix = '';\r\n if (cloud_runner_1.default.buildParameters.useCompressionStrategy === true) {\r\n compressionSuffix = `.lz4`;\r\n }\r\n const startPath = process.cwd();\r\n remote_client_logger_1.RemoteClientLogger.log(`Caching for (lz4 ${compressionSuffix}) ${node_path_1.default.basename(destinationFolder)}`);\r\n try {\r\n if (!(await fileExists(cacheFolder))) {\r\n await node_fs_1.default.promises.mkdir(cacheFolder);\r\n }\r\n if (!(await fileExists(destinationFolder))) {\r\n await node_fs_1.default.promises.mkdir(destinationFolder);\r\n }\r\n const latestInBranch = await (await cloud_runner_system_1.CloudRunnerSystem.Run(`ls -t \"${cacheFolder}\" | grep .tar${compressionSuffix}$ | head -1`))\r\n .replace(/\\n/g, ``)\r\n .replace(`.tar${compressionSuffix}`, '');\r\n process.chdir(cacheFolder);\r\n const cacheSelection = cacheArtifactName !== `` && (await fileExists(`${cacheArtifactName}.tar${compressionSuffix}`))\r\n ? cacheArtifactName\r\n : latestInBranch;\r\n await cloud_runner_logger_1.default.log(`cache key ${cacheArtifactName} selection ${cacheSelection}`);\r\n if (await fileExists(`${cacheSelection}.tar${compressionSuffix}`)) {\r\n const resultsFolder = `results${cloud_runner_1.default.buildParameters.buildGuid}`;\r\n await cloud_runner_system_1.CloudRunnerSystem.Run(`mkdir -p ${resultsFolder}`);\r\n remote_client_logger_1.RemoteClientLogger.log(`cache item exists ${cacheFolder}/${cacheSelection}.tar${compressionSuffix}`);\r\n const fullResultsFolder = node_path_1.default.join(cacheFolder, resultsFolder);\r\n await cloud_runner_system_1.CloudRunnerSystem.Run(`tar -xf ${cacheSelection}.tar${compressionSuffix} -C ${fullResultsFolder}`);\r\n remote_client_logger_1.RemoteClientLogger.log(`cache item extracted to ${fullResultsFolder}`);\r\n node_console_1.assert(await fileExists(fullResultsFolder), `cache extraction results folder exists`);\r\n const destinationParentFolder = node_path_1.default.resolve(destinationFolder, '..');\r\n if (await fileExists(destinationFolder)) {\r\n await node_fs_1.default.promises.rmdir(destinationFolder, { recursive: true });\r\n }\r\n await cloud_runner_system_1.CloudRunnerSystem.Run(`mv \"${node_path_1.default.join(fullResultsFolder, node_path_1.default.basename(destinationFolder))}\" \"${destinationParentFolder}\"`);\r\n const contents = await node_fs_1.default.promises.readdir(node_path_1.default.join(destinationParentFolder, node_path_1.default.basename(destinationFolder)));\r\n cloud_runner_logger_1.default.log(`There is ${contents.length} files/dir in the cache pulled contents for ${node_path_1.default.basename(destinationFolder)}`);\r\n }\r\n else {\r\n remote_client_logger_1.RemoteClientLogger.logWarning(`cache item ${cacheArtifactName} doesn't exist ${destinationFolder}`);\r\n if (cacheSelection !== ``) {\r\n remote_client_logger_1.RemoteClientLogger.logWarning(`cache item ${cacheArtifactName}.tar${compressionSuffix} doesn't exist ${destinationFolder}`);\r\n throw new Error(`Failed to get cache item, but cache hit was found: ${cacheSelection}`);\r\n }\r\n }\r\n }\r\n catch (error) {\r\n process.chdir(startPath);\r\n throw error;\r\n }\r\n process.chdir(startPath);\r\n }\r\n static async handleCachePurging() {\r\n if (process.env.PURGE_REMOTE_BUILDER_CACHE !== undefined) {\r\n remote_client_logger_1.RemoteClientLogger.log(`purging ${cloud_runner_folders_1.CloudRunnerFolders.purgeRemoteCaching}`);\r\n node_fs_1.default.promises.rmdir(cloud_runner_folders_1.CloudRunnerFolders.cacheFolder, { recursive: true });\r\n }\r\n }\r\n}\r\n__decorate([\r\n cli_functions_repository_1.CliFunction(`cache-push`, `push to cache`)\r\n], Caching, \"cachePush\", null);\r\n__decorate([\r\n cli_functions_repository_1.CliFunction(`cache-pull`, `pull from cache`)\r\n], Caching, \"cachePull\", null);\r\nexports.Caching = Caching;\r\n","\"use strict\";\r\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n 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;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n};\r\nvar __importDefault = (this && this.__importDefault) || function (mod) {\r\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\r\n};\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.RemoteClient = void 0;\r\nconst node_fs_1 = __importDefault(require(\"node:fs\"));\r\nconst cloud_runner_1 = __importDefault(require(\"../cloud-runner\"));\r\nconst cloud_runner_folders_1 = require(\"../services/cloud-runner-folders\");\r\nconst caching_1 = require(\"./caching\");\r\nconst lfs_hashing_1 = require(\"../services/lfs-hashing\");\r\nconst remote_client_logger_1 = require(\"./remote-client-logger\");\r\nconst node_path_1 = __importDefault(require(\"node:path\"));\r\nconst node_console_1 = require(\"node:console\");\r\nconst cloud_runner_logger_1 = __importDefault(require(\"../services/cloud-runner-logger\"));\r\nconst cli_functions_repository_1 = require(\"../../cli/cli-functions-repository\");\r\nconst cloud_runner_system_1 = require(\"../services/cloud-runner-system\");\r\nconst yaml_1 = __importDefault(require(\"yaml\"));\r\nconst github_1 = __importDefault(require(\"../../github\"));\r\nconst task_parameter_serializer_1 = require(\"../services/task-parameter-serializer\");\r\nconst build_parameters_1 = __importDefault(require(\"../../build-parameters\"));\r\nclass RemoteClient {\r\n static async runRemoteClientJob() {\r\n cloud_runner_logger_1.default.log(`bootstrap game ci cloud runner...`);\r\n if (!(await RemoteClient.handleRetainedWorkspace())) {\r\n await RemoteClient.bootstrapRepository();\r\n }\r\n await RemoteClient.exportCiParameters();\r\n await RemoteClient.runCustomHookFiles(`before-build`);\r\n }\r\n static async exportCiParameters() {\r\n await task_parameter_serializer_1.TaskParameterSerializer.exportAllCiVariablesWithoutPrefix();\r\n }\r\n static async runCustomHookFiles(hookLifecycle) {\r\n remote_client_logger_1.RemoteClientLogger.log(`RunCustomHookFiles: ${hookLifecycle}`);\r\n const gameCiCustomHooksPath = node_path_1.default.join(cloud_runner_folders_1.CloudRunnerFolders.repoPathAbsolute, `game-ci`, `hooks`);\r\n try {\r\n const files = node_fs_1.default.readdirSync(gameCiCustomHooksPath);\r\n for (const file of files) {\r\n const fileContents = node_fs_1.default.readFileSync(node_path_1.default.join(gameCiCustomHooksPath, file), `utf8`);\r\n const fileContentsObject = yaml_1.default.parse(fileContents.toString());\r\n if (fileContentsObject.hook === hookLifecycle) {\r\n remote_client_logger_1.RemoteClientLogger.log(`Active Hook File ${file} \\n \\n file contents: \\n ${fileContents}`);\r\n await cloud_runner_system_1.CloudRunnerSystem.Run(fileContentsObject.commands);\r\n }\r\n }\r\n }\r\n catch (error) {\r\n remote_client_logger_1.RemoteClientLogger.log(JSON.stringify(error, undefined, 4));\r\n }\r\n }\r\n static async bootstrapRepository() {\r\n await cloud_runner_system_1.CloudRunnerSystem.Run(`mkdir -p ${cloud_runner_folders_1.CloudRunnerFolders.ToLinuxFolder(cloud_runner_folders_1.CloudRunnerFolders.repoPathAbsolute)}`);\r\n await cloud_runner_system_1.CloudRunnerSystem.Run(`mkdir -p ${cloud_runner_folders_1.CloudRunnerFolders.ToLinuxFolder(cloud_runner_folders_1.CloudRunnerFolders.cacheFolderForCacheKeyFull)}`);\r\n process.chdir(cloud_runner_folders_1.CloudRunnerFolders.ToLinuxFolder(cloud_runner_folders_1.CloudRunnerFolders.repoPathAbsolute));\r\n await RemoteClient.cloneRepoWithoutLFSFiles();\r\n await RemoteClient.replaceLargePackageReferencesWithSharedReferences();\r\n await RemoteClient.sizeOfFolder('repo before lfs cache pull', cloud_runner_folders_1.CloudRunnerFolders.ToLinuxFolder(cloud_runner_folders_1.CloudRunnerFolders.repoPathAbsolute));\r\n const lfsHashes = await lfs_hashing_1.LfsHashing.createLFSHashFiles();\r\n if (node_fs_1.default.existsSync(cloud_runner_folders_1.CloudRunnerFolders.libraryFolderAbsolute)) {\r\n remote_client_logger_1.RemoteClientLogger.logWarning(`!Warning!: The Unity library was included in the git repository`);\r\n }\r\n await caching_1.Caching.PullFromCache(cloud_runner_folders_1.CloudRunnerFolders.ToLinuxFolder(cloud_runner_folders_1.CloudRunnerFolders.lfsCacheFolderFull), cloud_runner_folders_1.CloudRunnerFolders.ToLinuxFolder(cloud_runner_folders_1.CloudRunnerFolders.lfsFolderAbsolute), `${lfsHashes.lfsGuidSum}`);\r\n await RemoteClient.sizeOfFolder('repo after lfs cache pull', cloud_runner_folders_1.CloudRunnerFolders.repoPathAbsolute);\r\n await RemoteClient.pullLatestLFS();\r\n await RemoteClient.sizeOfFolder('repo before lfs git pull', cloud_runner_folders_1.CloudRunnerFolders.repoPathAbsolute);\r\n await caching_1.Caching.PushToCache(cloud_runner_folders_1.CloudRunnerFolders.ToLinuxFolder(cloud_runner_folders_1.CloudRunnerFolders.lfsCacheFolderFull), cloud_runner_folders_1.CloudRunnerFolders.ToLinuxFolder(cloud_runner_folders_1.CloudRunnerFolders.lfsFolderAbsolute), `${lfsHashes.lfsGuidSum}`);\r\n await caching_1.Caching.PullFromCache(cloud_runner_folders_1.CloudRunnerFolders.ToLinuxFolder(cloud_runner_folders_1.CloudRunnerFolders.libraryCacheFolderFull), cloud_runner_folders_1.CloudRunnerFolders.ToLinuxFolder(cloud_runner_folders_1.CloudRunnerFolders.libraryFolderAbsolute));\r\n await RemoteClient.sizeOfFolder('repo after library cache pull', cloud_runner_folders_1.CloudRunnerFolders.repoPathAbsolute);\r\n await caching_1.Caching.handleCachePurging();\r\n }\r\n static async sizeOfFolder(message, folder) {\r\n if (cloud_runner_1.default.buildParameters.cloudRunnerDebug) {\r\n cloud_runner_logger_1.default.log(`Size of ${message}`);\r\n await cloud_runner_system_1.CloudRunnerSystem.Run(`du -sh ${folder}`);\r\n }\r\n }\r\n static async cloneRepoWithoutLFSFiles() {\r\n process.chdir(`${cloud_runner_folders_1.CloudRunnerFolders.uniqueCloudRunnerJobFolderAbsolute}`);\r\n if (build_parameters_1.default.shouldUseRetainedWorkspaceMode(cloud_runner_1.default.buildParameters)) {\r\n if (node_fs_1.default.existsSync(node_path_1.default.join(cloud_runner_folders_1.CloudRunnerFolders.repoPathAbsolute, `.git`))) {\r\n process.chdir(cloud_runner_folders_1.CloudRunnerFolders.repoPathAbsolute);\r\n remote_client_logger_1.RemoteClientLogger.log(`${cloud_runner_folders_1.CloudRunnerFolders.repoPathAbsolute} repo exists - skipping clone - retained workspace mode ${build_parameters_1.default.shouldUseRetainedWorkspaceMode(cloud_runner_1.default.buildParameters)}`);\r\n await cloud_runner_system_1.CloudRunnerSystem.Run(`git fetch && git reset --hard ${cloud_runner_1.default.buildParameters.gitSha}`);\r\n return;\r\n }\r\n else {\r\n remote_client_logger_1.RemoteClientLogger.log(`${cloud_runner_folders_1.CloudRunnerFolders.repoPathAbsolute} repo exists, but no git folder, cleaning up`);\r\n await cloud_runner_system_1.CloudRunnerSystem.Run(`tree ${cloud_runner_folders_1.CloudRunnerFolders.ToLinuxFolder(cloud_runner_folders_1.CloudRunnerFolders.repoPathAbsolute)}`);\r\n await cloud_runner_system_1.CloudRunnerSystem.Run(`rm -r ${cloud_runner_folders_1.CloudRunnerFolders.ToLinuxFolder(cloud_runner_folders_1.CloudRunnerFolders.repoPathAbsolute)}`);\r\n }\r\n }\r\n if (node_fs_1.default.existsSync(cloud_runner_folders_1.CloudRunnerFolders.repoPathAbsolute) &&\r\n !node_fs_1.default.existsSync(node_path_1.default.join(cloud_runner_folders_1.CloudRunnerFolders.repoPathAbsolute, `.git`))) {\r\n await cloud_runner_system_1.CloudRunnerSystem.Run(`rm -r ${cloud_runner_folders_1.CloudRunnerFolders.ToLinuxFolder(cloud_runner_folders_1.CloudRunnerFolders.repoPathAbsolute)}`);\r\n }\r\n remote_client_logger_1.RemoteClientLogger.log(`Initializing source repository for cloning with caching of LFS files`);\r\n await cloud_runner_system_1.CloudRunnerSystem.Run(`git config --global advice.detachedHead false`);\r\n remote_client_logger_1.RemoteClientLogger.log(`Cloning the repository being built:`);\r\n await cloud_runner_system_1.CloudRunnerSystem.Run(`git config --global filter.lfs.smudge \"git-lfs smudge --skip -- %f\"`);\r\n await cloud_runner_system_1.CloudRunnerSystem.Run(`git config --global filter.lfs.process \"git-lfs filter-process --skip\"`);\r\n try {\r\n await cloud_runner_system_1.CloudRunnerSystem.Run(`git clone ${cloud_runner_folders_1.CloudRunnerFolders.targetBuildRepoUrl} ${node_path_1.default.basename(cloud_runner_folders_1.CloudRunnerFolders.repoPathAbsolute)}`);\r\n }\r\n catch (error) {\r\n await cloud_runner_system_1.CloudRunnerSystem.Run(`tree ${cloud_runner_folders_1.CloudRunnerFolders.repoPathAbsolute}`);\r\n throw error;\r\n }\r\n process.chdir(cloud_runner_folders_1.CloudRunnerFolders.repoPathAbsolute);\r\n await cloud_runner_system_1.CloudRunnerSystem.Run(`git lfs install`);\r\n node_console_1.assert(node_fs_1.default.existsSync(`.git`), 'git folder exists');\r\n remote_client_logger_1.RemoteClientLogger.log(`${cloud_runner_1.default.buildParameters.branch}`);\r\n await cloud_runner_system_1.CloudRunnerSystem.Run(`git checkout ${cloud_runner_1.default.buildParameters.branch}`);\r\n if (cloud_runner_1.default.buildParameters.gitSha !== undefined) {\r\n await cloud_runner_system_1.CloudRunnerSystem.Run(`git checkout ${cloud_runner_1.default.buildParameters.gitSha}`);\r\n }\r\n else {\r\n remote_client_logger_1.RemoteClientLogger.log(`buildParameter Git Sha is empty`);\r\n }\r\n node_console_1.assert(node_fs_1.default.existsSync(node_path_1.default.join(`.git`, `lfs`)), 'LFS folder should not exist before caching');\r\n remote_client_logger_1.RemoteClientLogger.log(`Checked out ${cloud_runner_1.default.buildParameters.branch}`);\r\n }\r\n static async replaceLargePackageReferencesWithSharedReferences() {\r\n cloud_runner_logger_1.default.log(`Use Shared Pkgs ${cloud_runner_1.default.buildParameters.useLargePackages}`);\r\n github_1.default.updateGitHubCheck(`Use Shared Pkgs ${cloud_runner_1.default.buildParameters.useLargePackages}`, ``);\r\n if (cloud_runner_1.default.buildParameters.useLargePackages) {\r\n await cloud_runner_system_1.CloudRunnerSystem.Run(`tree -L 2 ${cloud_runner_folders_1.CloudRunnerFolders.projectPathAbsolute}`);\r\n const filePath = node_path_1.default.join(cloud_runner_folders_1.CloudRunnerFolders.projectPathAbsolute, `Packages/manifest.json`);\r\n let manifest = node_fs_1.default.readFileSync(filePath, 'utf8');\r\n manifest = manifest.replace(/LargeContent/g, '../../../LargeContent');\r\n node_fs_1.default.writeFileSync(filePath, manifest);\r\n cloud_runner_logger_1.default.log(`Package Manifest \\n ${manifest}`);\r\n github_1.default.updateGitHubCheck(`Package Manifest \\n ${manifest}`, ``);\r\n }\r\n }\r\n static async pullLatestLFS() {\r\n process.chdir(cloud_runner_folders_1.CloudRunnerFolders.repoPathAbsolute);\r\n await cloud_runner_system_1.CloudRunnerSystem.Run(`git config --global filter.lfs.smudge \"git-lfs smudge -- %f\"`);\r\n await cloud_runner_system_1.CloudRunnerSystem.Run(`git config --global filter.lfs.process \"git-lfs filter-process\"`);\r\n if (!cloud_runner_1.default.buildParameters.skipLfs) {\r\n await cloud_runner_system_1.CloudRunnerSystem.Run(`git lfs pull`);\r\n remote_client_logger_1.RemoteClientLogger.log(`pulled latest LFS files`);\r\n node_console_1.assert(node_fs_1.default.existsSync(cloud_runner_folders_1.CloudRunnerFolders.lfsFolderAbsolute));\r\n }\r\n }\r\n static async handleRetainedWorkspace() {\r\n if (!build_parameters_1.default.shouldUseRetainedWorkspaceMode(cloud_runner_1.default.buildParameters)) {\r\n return;\r\n }\r\n remote_client_logger_1.RemoteClientLogger.log(`Retained Workspace: ${build_parameters_1.default.shouldUseRetainedWorkspaceMode(cloud_runner_1.default.buildParameters)}`);\r\n if (node_fs_1.default.existsSync(cloud_runner_folders_1.CloudRunnerFolders.ToLinuxFolder(cloud_runner_folders_1.CloudRunnerFolders.uniqueCloudRunnerJobFolderAbsolute)) &&\r\n node_fs_1.default.existsSync(cloud_runner_folders_1.CloudRunnerFolders.ToLinuxFolder(node_path_1.default.join(cloud_runner_folders_1.CloudRunnerFolders.repoPathAbsolute, `.git`)))) {\r\n cloud_runner_logger_1.default.log(`Retained Workspace Already Exists!`);\r\n process.chdir(cloud_runner_folders_1.CloudRunnerFolders.ToLinuxFolder(cloud_runner_folders_1.CloudRunnerFolders.repoPathAbsolute));\r\n await cloud_runner_system_1.CloudRunnerSystem.Run(`git fetch`);\r\n await cloud_runner_system_1.CloudRunnerSystem.Run(`git lfs pull`);\r\n await cloud_runner_system_1.CloudRunnerSystem.Run(`git reset --hard \"${cloud_runner_1.default.buildParameters.gitSha}\"`);\r\n await cloud_runner_system_1.CloudRunnerSystem.Run(`git checkout ${cloud_runner_1.default.buildParameters.gitSha}`);\r\n return true;\r\n }\r\n return false;\r\n }\r\n}\r\n__decorate([\r\n cli_functions_repository_1.CliFunction(`remote-cli-pre-build`, `sets up a repository, usually before a game-ci build`)\r\n], RemoteClient, \"runRemoteClientJob\", null);\r\nexports.RemoteClient = RemoteClient;\r\n","\"use strict\";\r\nvar __importDefault = (this && this.__importDefault) || function (mod) {\r\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\r\n};\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.RemoteClientLogger = void 0;\r\nconst cloud_runner_logger_1 = __importDefault(require(\"../services/cloud-runner-logger\"));\r\nclass RemoteClientLogger {\r\n static log(message) {\r\n cloud_runner_logger_1.default.log(`[Client] ${message}`);\r\n }\r\n static logCliError(message) {\r\n cloud_runner_logger_1.default.log(`[Client][Error] ${message}`);\r\n }\r\n static logCliDiagnostic(message) {\r\n cloud_runner_logger_1.default.log(`[Client][Diagnostic] ${message}`);\r\n }\r\n static logWarning(message) {\r\n cloud_runner_logger_1.default.logWarning(message);\r\n }\r\n}\r\nexports.RemoteClientLogger = RemoteClientLogger;\r\n","\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nclass CloudRunnerConstants {\r\n}\r\nCloudRunnerConstants.alphabet = '0123456789abcdefghijklmnopqrstuvwxyz';\r\nexports.default = CloudRunnerConstants;\r\n","\"use strict\";\r\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n}));\r\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n});\r\nvar __importStar = (this && this.__importStar) || function (mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n};\r\nvar __importDefault = (this && this.__importDefault) || function (mod) {\r\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\r\n};\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.Hook = exports.CloudRunnerCustomHooks = void 0;\r\nconst __1 = require(\"../..\");\r\nconst yaml_1 = __importDefault(require(\"yaml\"));\r\nconst remote_client_logger_1 = require(\"../remote-client/remote-client-logger\");\r\nconst node_path_1 = __importDefault(require(\"node:path\"));\r\nconst cloud_runner_options_1 = __importDefault(require(\"../cloud-runner-options\"));\r\nconst fs = __importStar(require(\"node:fs\"));\r\nconst cloud_runner_logger_1 = __importDefault(require(\"./cloud-runner-logger\"));\r\n// import CloudRunnerLogger from './cloud-runner-logger';\r\nclass CloudRunnerCustomHooks {\r\n static ApplyHooksToCommands(commands, buildParameters) {\r\n const hooks = CloudRunnerCustomHooks.getHooks(buildParameters.commandHooks);\r\n cloud_runner_logger_1.default.log(`Applying hooks ${hooks.length}`);\r\n return `echo \"---\"\necho \"start cloud runner init\"\n${cloud_runner_options_1.default.cloudRunnerDebug ? `printenv` : `#`}\necho \"start of cloud runner job\"\n${hooks.filter((x) => x.hook.includes(`before`)).map((x) => x.commands) || ' '}\n${commands}\n${hooks.filter((x) => x.hook.includes(`after`)).map((x) => x.commands) || ' '}\necho \"end of cloud runner job\"\necho \"---${buildParameters.logId}\"`;\r\n }\r\n static getHooks(customCommandHooks) {\r\n const experimentHooks = customCommandHooks;\r\n let output = new Array();\r\n if (experimentHooks && experimentHooks !== '') {\r\n try {\r\n output = yaml_1.default.parse(experimentHooks);\r\n }\r\n catch (error) {\r\n throw error;\r\n }\r\n }\r\n return [\r\n ...output.filter((x) => x.hook !== undefined && x.hook.length > 0),\r\n ...CloudRunnerCustomHooks.GetCustomHooksFromFiles(`before`),\r\n ...CloudRunnerCustomHooks.GetCustomHooksFromFiles(`after`),\r\n ];\r\n }\r\n static GetCustomHooksFromFiles(hookLifecycle) {\r\n const results = [];\r\n // RemoteClientLogger.log(`GetCustomHookFiles: ${hookLifecycle}`);\r\n try {\r\n const gameCiCustomHooksPath = node_path_1.default.join(process.cwd(), `game-ci`, `hooks`);\r\n const files = fs.readdirSync(gameCiCustomHooksPath);\r\n for (const file of files) {\r\n if (!cloud_runner_options_1.default.customHookFiles.includes(file.replace(`.yaml`, ``))) {\r\n continue;\r\n }\r\n const fileContents = fs.readFileSync(node_path_1.default.join(gameCiCustomHooksPath, file), `utf8`);\r\n const fileContentsObject = CloudRunnerCustomHooks.ParseHooks(fileContents)[0];\r\n if (fileContentsObject.hook.includes(hookLifecycle)) {\r\n results.push(fileContentsObject);\r\n }\r\n }\r\n }\r\n catch (error) {\r\n remote_client_logger_1.RemoteClientLogger.log(`Failed Getting: ${hookLifecycle} \\n ${JSON.stringify(error, undefined, 4)}`);\r\n }\r\n // RemoteClientLogger.log(`Active Steps From Hooks: \\n ${JSON.stringify(results, undefined, 4)}`);\r\n return results;\r\n }\r\n static ConvertYamlSecrets(object) {\r\n if (object.secrets === undefined) {\r\n object.secrets = [];\r\n return;\r\n }\r\n object.secrets = object.secrets.map((x) => {\r\n return {\r\n ParameterKey: x.name,\r\n EnvironmentVariable: __1.Input.ToEnvVarFormat(x.name),\r\n ParameterValue: x.value,\r\n };\r\n });\r\n }\r\n static ParseHooks(hooks) {\r\n if (hooks === '') {\r\n return [];\r\n }\r\n // if (CloudRunner.buildParameters?.cloudRunnerIntegrationTests) {\r\n // CloudRunnerLogger.log(`Parsing build hooks: ${steps}`);\r\n // }\r\n const isArray = hooks.replace(/\\s/g, ``)[0] === `-`;\r\n const object = isArray ? yaml_1.default.parse(hooks) : [yaml_1.default.parse(hooks)];\r\n for (const hook of object) {\r\n CloudRunnerCustomHooks.ConvertYamlSecrets(hook);\r\n if (hook.secrets === undefined) {\r\n hook.secrets = [];\r\n }\r\n }\r\n if (object === undefined) {\r\n throw new Error(`Failed to parse ${hooks}`);\r\n }\r\n return object;\r\n }\r\n static getSecrets(hooks) {\r\n const secrets = hooks.map((x) => x.secrets).filter((x) => x !== undefined && x.length > 0);\r\n // eslint-disable-next-line unicorn/no-array-reduce\r\n return secrets.length > 0 ? secrets.reduce((x, y) => [...x, ...y]) : [];\r\n }\r\n}\r\nexports.CloudRunnerCustomHooks = CloudRunnerCustomHooks;\r\nclass Hook {\r\n constructor() {\r\n this.commands = new Array();\r\n this.secrets = new Array();\r\n }\r\n}\r\nexports.Hook = Hook;\r\n","\"use strict\";\r\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n}));\r\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n});\r\nvar __importStar = (this && this.__importStar) || function (mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n};\r\nvar __importDefault = (this && this.__importDefault) || function (mod) {\r\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\r\n};\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.CloudRunnerCustomSteps = void 0;\r\nconst yaml_1 = __importDefault(require(\"yaml\"));\r\nconst cloud_runner_1 = __importDefault(require(\"../cloud-runner\"));\r\nconst core = __importStar(require(\"@actions/core\"));\r\nconst custom_workflow_1 = require(\"../workflows/custom-workflow\");\r\nconst remote_client_logger_1 = require(\"../remote-client/remote-client-logger\");\r\nconst node_path_1 = __importDefault(require(\"node:path\"));\r\nconst node_fs_1 = __importDefault(require(\"node:fs\"));\r\nconst input_1 = __importDefault(require(\"../../input\"));\r\nconst cloud_runner_options_1 = __importDefault(require(\"../cloud-runner-options\"));\r\nclass CloudRunnerCustomSteps {\r\n static GetCustomStepsFromFiles(hookLifecycle) {\r\n const results = [];\r\n // RemoteClientLogger.log(\r\n // `GetCustomStepFiles: ${hookLifecycle} CustomStepFiles: ${CloudRunnerOptions.customStepFiles}`,\r\n // );\r\n try {\r\n const gameCiCustomStepsPath = node_path_1.default.join(process.cwd(), `game-ci`, `steps`);\r\n const files = node_fs_1.default.readdirSync(gameCiCustomStepsPath);\r\n for (const file of files) {\r\n if (!cloud_runner_options_1.default.customStepFiles.includes(file.replace(`.yaml`, ``))) {\r\n // RemoteClientLogger.log(`Skipping CustomStepFile: ${file}`);\r\n continue;\r\n }\r\n const fileContents = node_fs_1.default.readFileSync(node_path_1.default.join(gameCiCustomStepsPath, file), `utf8`);\r\n const fileContentsObject = CloudRunnerCustomSteps.ParseSteps(fileContents)[0];\r\n if (fileContentsObject.hook === hookLifecycle) {\r\n results.push(fileContentsObject);\r\n }\r\n }\r\n }\r\n catch (error) {\r\n remote_client_logger_1.RemoteClientLogger.log(`Failed Getting: ${hookLifecycle} \\n ${JSON.stringify(error, undefined, 4)}`);\r\n }\r\n // RemoteClientLogger.log(`Active Steps From Files: \\n ${JSON.stringify(results, undefined, 4)}`);\r\n const builtInCustomSteps = CloudRunnerCustomSteps.ParseSteps(`- name: aws-s3-upload-build\n image: amazon/aws-cli\n hook: after\n commands: |\n aws configure set aws_access_key_id $AWS_ACCESS_KEY_ID --profile default\n aws configure set aws_secret_access_key $AWS_SECRET_ACCESS_KEY --profile default\n aws configure set region $AWS_DEFAULT_REGION --profile default\n aws s3 cp /data/cache/$CI_CACHE_KEY/build/build-${cloud_runner_1.default.buildParameters.buildGuid}.tar${cloud_runner_1.default.buildParameters.useCompressionStrategy ? '.lz4' : ''} s3://${cloud_runner_1.default.buildParameters.awsStackName}/cloud-runner-cache/$CI_CACHE_KEY/build/build-$BUILD_GUID.tar${cloud_runner_1.default.buildParameters.useCompressionStrategy ? '.lz4' : ''}\n rm /data/cache/$CI_CACHE_KEY/build/build-${cloud_runner_1.default.buildParameters.buildGuid}.tar${cloud_runner_1.default.buildParameters.useCompressionStrategy ? '.lz4' : ''}\n secrets:\n - name: awsAccessKeyId\n value: ${process.env.AWS_ACCESS_KEY_ID || ``}\n - name: awsSecretAccessKey\n value: ${process.env.AWS_SECRET_ACCESS_KEY || ``}\n - name: awsDefaultRegion\n value: ${process.env.AWS_REGION || ``}\n- name: aws-s3-pull-build\n image: amazon/aws-cli\n commands: |\n aws configure set aws_access_key_id $CI_AWS_ACCESS_KEY_ID --profile default\n aws configure set aws_secret_access_key $CI_AWS_SECRET_ACCESS_KEY --profile default\n aws configure set region $CI_AWS_DEFAULT_REGION --profile default\n aws s3 ls ${cloud_runner_1.default.buildParameters.awsStackName}/cloud-runner-cache/ || true\n aws s3 ls ${cloud_runner_1.default.buildParameters.awsStackName}/cloud-runner-cache/$CI_CACHE_KEY/build || true\n aws s3 cp s3://${cloud_runner_1.default.buildParameters.awsStackName}/cloud-runner-cache/$CI_CACHE_KEY/build/build-$BUILD_GUID_TARGET.tar${cloud_runner_1.default.buildParameters.useCompressionStrategy ? '.lz4' : ''} /data/cache/$CI_CACHE_KEY/build/build-$BUILD_GUID_TARGET.tar${cloud_runner_1.default.buildParameters.useCompressionStrategy ? '.lz4' : ''}\n secrets:\n - name: CI_AWS_ACCESS_KEY_ID\n - name: CI_AWS_SECRET_ACCESS_KEY\n - name: CI_AWS_DEFAULT_REGION\n - name: BUILD_GUID_TARGET\n- name: steam-deploy-client\n image: steamcmd/steamcmd\n commands: |\n apt-get update\n apt-get install -y curl tar coreutils git tree > /dev/null\n curl -s https://gist.githubusercontent.com/frostebite/1d56f5505b36b403b64193b7a6e54cdc/raw/fa6639ed4ef750c4268ea319d63aa80f52712ffb/deploy-client-steam.sh | bash\n secrets:\n - name: STEAM_USERNAME\n - name: STEAM_PASSWORD\n - name: STEAM_APPID\n - name: STEAM_SSFN_FILE_NAME\n - name: STEAM_SSFN_FILE_CONTENTS\n - name: STEAM_CONFIG_VDF_1\n - name: STEAM_CONFIG_VDF_2\n - name: STEAM_CONFIG_VDF_3\n - name: STEAM_CONFIG_VDF_4\n - name: BUILD_GUID_TARGET\n - name: RELEASE_BRANCH\n- name: steam-deploy-project\n image: steamcmd/steamcmd\n commands: |\n apt-get update\n apt-get install -y curl tar coreutils git tree > /dev/null\n curl -s https://gist.githubusercontent.com/frostebite/969da6a41002a0e901174124b643709f/raw/02403e53fb292026cba81ddcf4ff35fc1eba111d/steam-deploy-project.sh | bash\n secrets:\n - name: STEAM_USERNAME\n - name: STEAM_PASSWORD\n - name: STEAM_APPID\n - name: STEAM_SSFN_FILE_NAME\n - name: STEAM_SSFN_FILE_CONTENTS\n - name: STEAM_CONFIG_VDF_1\n - name: STEAM_CONFIG_VDF_2\n - name: STEAM_CONFIG_VDF_3\n - name: STEAM_CONFIG_VDF_4\n - name: BUILD_GUID_2\n - name: RELEASE_BRANCH\n- name: aws-s3-upload-cache\n image: amazon/aws-cli\n hook: after\n commands: |\n aws configure set aws_access_key_id $CI_AWS_ACCESS_KEY_ID --profile default\n aws configure set aws_secret_access_key $CI_AWS_SECRET_ACCESS_KEY --profile default\n aws configure set region $CI_AWS_DEFAULT_REGION --profile default\n aws s3 cp --recursive /data/cache/$CI_CACHE_KEY/lfs s3://${cloud_runner_1.default.buildParameters.awsStackName}/cloud-runner-cache/$CI_CACHE_KEY/lfs\n rm -r /data/cache/$CI_CACHE_KEY/lfs\n aws s3 cp --recursive /data/cache/$CI_CACHE_KEY/Library s3://${cloud_runner_1.default.buildParameters.awsStackName}/cloud-runner-cache/$CI_CACHE_KEY/Library\n rm -r /data/cache/$CI_CACHE_KEY/Library\n secrets:\n - name: CI_AWS_ACCESS_KEY_ID\n value: ${process.env.AWS_ACCESS_KEY_ID || ``}\n - name: CI_AWS_SECRET_ACCESS_KEY\n value: ${process.env.AWS_SECRET_ACCESS_KEY || ``}\n - name: CI_AWS_DEFAULT_REGION\n value: ${process.env.AWS_REGION || ``}\n- name: aws-s3-pull-cache\n image: amazon/aws-cli\n hook: before\n commands: |\n aws configure set aws_access_key_id $CI_AWS_ACCESS_KEY_ID --profile default\n aws configure set aws_secret_access_key $CI_AWS_SECRET_ACCESS_KEY --profile default\n aws configure set region $CI_AWS_DEFAULT_REGION --profile default\n aws s3 ls ${cloud_runner_1.default.buildParameters.awsStackName}/cloud-runner-cache/ || true\n aws s3 ls ${cloud_runner_1.default.buildParameters.awsStackName}/cloud-runner-cache/$CI_CACHE_KEY/ || true\n BUCKET1=\"${cloud_runner_1.default.buildParameters.awsStackName}/cloud-runner-cache/$CI_CACHE_KEY/Library/\"\n aws s3 ls $BUCKET1 || true\n OBJECT1=\"$(aws s3 ls $BUCKET1 | sort | tail -n 1 | awk '{print $4}' || '')\"\n aws s3 cp s3://$BUCKET1$OBJECT1 /data/cache/$CI_CACHE_KEY/Library/ || true\n BUCKET2=\"${cloud_runner_1.default.buildParameters.awsStackName}/cloud-runner-cache/$CI_CACHE_KEY/lfs/\"\n aws s3 ls $BUCKET2 || true\n OBJECT2=\"$(aws s3 ls $BUCKET2 | sort | tail -n 1 | awk '{print $4}' || '')\"\n aws s3 cp s3://$BUCKET2$OBJECT2 /data/cache/$CI_CACHE_KEY/lfs/ || true\n secrets:\n - name: CI_AWS_ACCESS_KEY_ID\n value: ${process.env.AWS_ACCESS_KEY_ID || ``}\n - name: CI_AWS_SECRET_ACCESS_KEY\n value: ${process.env.AWS_SECRET_ACCESS_KEY || ``}\n - name: CI_AWS_DEFAULT_REGION\n value: ${process.env.AWS_REGION || ``}\n- name: debug-cache\n image: ubuntu\n hook: after\n commands: |\n apt-get update > /dev/null\n ${cloud_runner_options_1.default.cloudRunnerDebug ? `apt-get install -y tree > /dev/null` : `#`}\n ${cloud_runner_options_1.default.cloudRunnerDebug ? `tree -L 3 /data/cache` : `#`}\n secrets:\n - name: awsAccessKeyId\n value: ${process.env.AWS_ACCESS_KEY_ID || ``}\n - name: awsSecretAccessKey\n value: ${process.env.AWS_SECRET_ACCESS_KEY || ``}\n - name: awsDefaultRegion\n value: ${process.env.AWS_REGION || ``}`).filter((x) => cloud_runner_options_1.default.customStepFiles.includes(x.name) && x.hook === hookLifecycle);\r\n if (builtInCustomSteps.length > 0) {\r\n results.push(...builtInCustomSteps);\r\n }\r\n return results;\r\n }\r\n static ConvertYamlSecrets(object) {\r\n if (object.secrets === undefined) {\r\n object.secrets = [];\r\n return;\r\n }\r\n object.secrets = object.secrets.map((x) => {\r\n return {\r\n ParameterKey: x.name,\r\n EnvironmentVariable: input_1.default.ToEnvVarFormat(x.name),\r\n ParameterValue: x.value,\r\n };\r\n });\r\n }\r\n static ParseSteps(steps) {\r\n if (steps === '') {\r\n return [];\r\n }\r\n const isArray = steps.replace(/\\s/g, ``)[0] === `-`;\r\n const object = isArray ? yaml_1.default.parse(steps) : [yaml_1.default.parse(steps)];\r\n for (const step of object) {\r\n CloudRunnerCustomSteps.ConvertYamlSecrets(step);\r\n if (step.secrets === undefined) {\r\n step.secrets = [];\r\n }\r\n else {\r\n for (const secret of step.secrets) {\r\n if (secret.ParameterValue === undefined && process.env[secret.EnvironmentVariable] !== undefined) {\r\n if (cloud_runner_1.default.buildParameters?.cloudRunnerDebug) {\r\n // CloudRunnerLogger.log(`Injecting custom step ${step.name} from env var ${secret.ParameterKey}`);\r\n }\r\n secret.ParameterValue = process.env[secret.ParameterKey] || ``;\r\n }\r\n }\r\n }\r\n if (step.image === undefined) {\r\n step.image = `ubuntu`;\r\n }\r\n }\r\n if (object === undefined) {\r\n throw new Error(`Failed to parse ${steps}`);\r\n }\r\n return object;\r\n }\r\n static async RunPostBuildSteps(cloudRunnerStepState) {\r\n let output = ``;\r\n const steps = [\r\n ...CloudRunnerCustomSteps.ParseSteps(cloud_runner_1.default.buildParameters.postBuildSteps),\r\n ...CloudRunnerCustomSteps.GetCustomStepsFromFiles(`after`),\r\n ];\r\n if (steps.length > 0) {\r\n if (!cloud_runner_1.default.buildParameters.isCliMode)\r\n core.startGroup('post build steps');\r\n output += await custom_workflow_1.CustomWorkflow.runContainerJob(steps, cloudRunnerStepState.environment, cloudRunnerStepState.secrets);\r\n if (!cloud_runner_1.default.buildParameters.isCliMode)\r\n core.endGroup();\r\n }\r\n return output;\r\n }\r\n static async RunPreBuildSteps(cloudRunnerStepState) {\r\n let output = ``;\r\n const steps = [\r\n ...CloudRunnerCustomSteps.ParseSteps(cloud_runner_1.default.buildParameters.preBuildSteps),\r\n ...CloudRunnerCustomSteps.GetCustomStepsFromFiles(`before`),\r\n ];\r\n if (steps.length > 0) {\r\n if (!cloud_runner_1.default.buildParameters.isCliMode)\r\n core.startGroup('pre build steps');\r\n output += await custom_workflow_1.CustomWorkflow.runContainerJob(steps, cloudRunnerStepState.environment, cloudRunnerStepState.secrets);\r\n if (!cloud_runner_1.default.buildParameters.isCliMode)\r\n core.endGroup();\r\n }\r\n return output;\r\n }\r\n}\r\nexports.CloudRunnerCustomSteps = CloudRunnerCustomSteps;\r\n","\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nclass CloudRunnerEnvironmentVariable {\r\n}\r\nexports.default = CloudRunnerEnvironmentVariable;\r\n","\"use strict\";\r\nvar __importDefault = (this && this.__importDefault) || function (mod) {\r\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\r\n};\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.CloudRunnerFolders = void 0;\r\nconst node_path_1 = __importDefault(require(\"node:path\"));\r\nconst cloud_runner_options_1 = __importDefault(require(\"../cloud-runner-options\"));\r\nconst cloud_runner_1 = __importDefault(require(\"./../cloud-runner\"));\r\nconst build_parameters_1 = __importDefault(require(\"../../build-parameters\"));\r\nclass CloudRunnerFolders {\r\n static ToLinuxFolder(folder) {\r\n return folder.replace(/\\\\/g, `/`);\r\n }\r\n // Only the following paths that do not start a path.join with another \"Full\" suffixed property need to start with an absolute /\r\n static get uniqueCloudRunnerJobFolderAbsolute() {\r\n return cloud_runner_1.default.buildParameters && build_parameters_1.default.shouldUseRetainedWorkspaceMode(cloud_runner_1.default.buildParameters)\r\n ? node_path_1.default.join(`/`, CloudRunnerFolders.buildVolumeFolder, cloud_runner_1.default.lockedWorkspace)\r\n : node_path_1.default.join(`/`, CloudRunnerFolders.buildVolumeFolder, cloud_runner_1.default.buildParameters.buildGuid);\r\n }\r\n static get cacheFolderForAllFull() {\r\n return node_path_1.default.join('/', CloudRunnerFolders.buildVolumeFolder, CloudRunnerFolders.cacheFolder);\r\n }\r\n static get cacheFolderForCacheKeyFull() {\r\n return node_path_1.default.join('/', CloudRunnerFolders.buildVolumeFolder, CloudRunnerFolders.cacheFolder, cloud_runner_1.default.buildParameters.cacheKey);\r\n }\r\n static get builderPathAbsolute() {\r\n return node_path_1.default.join(cloud_runner_options_1.default.useSharedBuilder\r\n ? `/${CloudRunnerFolders.buildVolumeFolder}`\r\n : CloudRunnerFolders.uniqueCloudRunnerJobFolderAbsolute, `builder`);\r\n }\r\n static get repoPathAbsolute() {\r\n return node_path_1.default.join(CloudRunnerFolders.uniqueCloudRunnerJobFolderAbsolute, CloudRunnerFolders.repositoryFolder);\r\n }\r\n static get projectPathAbsolute() {\r\n return node_path_1.default.join(CloudRunnerFolders.repoPathAbsolute, cloud_runner_1.default.buildParameters.projectPath);\r\n }\r\n static get libraryFolderAbsolute() {\r\n return node_path_1.default.join(CloudRunnerFolders.projectPathAbsolute, `Library`);\r\n }\r\n static get projectBuildFolderAbsolute() {\r\n return node_path_1.default.join(CloudRunnerFolders.repoPathAbsolute, cloud_runner_1.default.buildParameters.buildPath);\r\n }\r\n static get lfsFolderAbsolute() {\r\n return node_path_1.default.join(CloudRunnerFolders.repoPathAbsolute, `.git`, `lfs`);\r\n }\r\n static get purgeRemoteCaching() {\r\n return process.env.PURGE_REMOTE_BUILDER_CACHE !== undefined;\r\n }\r\n static get lfsCacheFolderFull() {\r\n return node_path_1.default.join(CloudRunnerFolders.cacheFolderForCacheKeyFull, `lfs`);\r\n }\r\n static get libraryCacheFolderFull() {\r\n return node_path_1.default.join(CloudRunnerFolders.cacheFolderForCacheKeyFull, `Library`);\r\n }\r\n static get unityBuilderRepoUrl() {\r\n return `https://${cloud_runner_1.default.buildParameters.gitPrivateToken}@github.com/game-ci/unity-builder.git`;\r\n }\r\n static get targetBuildRepoUrl() {\r\n return `https://${cloud_runner_1.default.buildParameters.gitPrivateToken}@github.com/${cloud_runner_1.default.buildParameters.githubRepo}.git`;\r\n }\r\n static get buildVolumeFolder() {\r\n return 'data';\r\n }\r\n static get cacheFolder() {\r\n return 'cache';\r\n }\r\n}\r\nexports.CloudRunnerFolders = CloudRunnerFolders;\r\nCloudRunnerFolders.repositoryFolder = 'repo';\r\n","\"use strict\";\r\nvar __importDefault = (this && this.__importDefault) || function (mod) {\r\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\r\n};\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nconst nanoid_1 = require(\"nanoid\");\r\nconst cloud_runner_constants_1 = __importDefault(require(\"./cloud-runner-constants\"));\r\nclass CloudRunnerNamespace {\r\n static generateGuid(runNumber, platform) {\r\n const nanoid = nanoid_1.customAlphabet(cloud_runner_constants_1.default.alphabet, 4);\r\n return `${runNumber}-${platform.toLowerCase().replace('standalone', '')}-${nanoid()}`;\r\n }\r\n}\r\nexports.default = CloudRunnerNamespace;\r\n","\"use strict\";\r\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n}));\r\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n});\r\nvar __importStar = (this && this.__importStar) || function (mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n};\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nconst core = __importStar(require(\"@actions/core\"));\r\nclass CloudRunnerLogger {\r\n static setup() {\r\n this.timestamp = this.createTimestamp();\r\n this.globalTimestamp = this.timestamp;\r\n }\r\n static log(message) {\r\n core.info(message);\r\n }\r\n static logWarning(message) {\r\n core.warning(message);\r\n }\r\n static logLine(message) {\r\n core.info(`${message}\\n`);\r\n }\r\n static error(message) {\r\n core.error(message);\r\n }\r\n static logWithTime(message) {\r\n const newTimestamp = this.createTimestamp();\r\n core.info(`${message} (Since previous: ${this.calculateTimeDiff(newTimestamp, this.timestamp)}, Total time: ${this.calculateTimeDiff(newTimestamp, this.globalTimestamp)})`);\r\n this.timestamp = newTimestamp;\r\n }\r\n static calculateTimeDiff(x, y) {\r\n return Math.floor((x - y) / 1000);\r\n }\r\n static createTimestamp() {\r\n return Date.now();\r\n }\r\n}\r\nexports.default = CloudRunnerLogger;\r\n","\"use strict\";\r\nvar __importDefault = (this && this.__importDefault) || function (mod) {\r\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\r\n};\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nconst input_1 = __importDefault(require(\"../../input\"));\r\nconst cloud_runner_options_1 = __importDefault(require(\"../cloud-runner-options\"));\r\nclass CloudRunnerOptionsReader {\r\n static GetProperties() {\r\n return [...Object.getOwnPropertyNames(input_1.default), ...Object.getOwnPropertyNames(cloud_runner_options_1.default)];\r\n }\r\n}\r\nexports.default = CloudRunnerOptionsReader;\r\n","\"use strict\";\r\nvar __importDefault = (this && this.__importDefault) || function (mod) {\r\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\r\n};\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nconst input_1 = __importDefault(require(\"../../input\"));\r\nconst generic_input_reader_1 = require(\"../../input-readers/generic-input-reader\");\r\nconst cloud_runner_options_1 = __importDefault(require(\"../cloud-runner-options\"));\r\nconst formatFunction = (value, arguments_) => {\r\n for (const element of arguments_) {\r\n value = value.replace(`{${element.key}}`, element.value);\r\n }\r\n return value;\r\n};\r\nclass CloudRunnerQueryOverride {\r\n // TODO accept premade secret sources or custom secret source definition yamls\r\n static query(key, alternativeKey) {\r\n if (CloudRunnerQueryOverride.queryOverrides && CloudRunnerQueryOverride.queryOverrides[key] !== undefined) {\r\n return CloudRunnerQueryOverride.queryOverrides[key];\r\n }\r\n if (CloudRunnerQueryOverride.queryOverrides &&\r\n alternativeKey &&\r\n CloudRunnerQueryOverride.queryOverrides[alternativeKey] !== undefined) {\r\n return CloudRunnerQueryOverride.queryOverrides[alternativeKey];\r\n }\r\n return;\r\n }\r\n static shouldUseOverride(query) {\r\n if (cloud_runner_options_1.default.inputPullCommand !== '') {\r\n if (cloud_runner_options_1.default.pullInputList.length > 0) {\r\n const doesInclude = cloud_runner_options_1.default.pullInputList.includes(query) ||\r\n cloud_runner_options_1.default.pullInputList.includes(input_1.default.ToEnvVarFormat(query));\r\n return doesInclude ? true : false;\r\n }\r\n else {\r\n return true;\r\n }\r\n }\r\n }\r\n static async queryOverride(query) {\r\n if (!this.shouldUseOverride(query)) {\r\n throw new Error(`Should not be trying to run override query on ${query}`);\r\n }\r\n return await generic_input_reader_1.GenericInputReader.Run(formatFunction(cloud_runner_options_1.default.inputPullCommand, [{ key: 0, value: query }]));\r\n }\r\n static async PopulateQueryOverrideInput() {\r\n const queries = cloud_runner_options_1.default.pullInputList;\r\n CloudRunnerQueryOverride.queryOverrides = {};\r\n for (const element of queries) {\r\n if (CloudRunnerQueryOverride.shouldUseOverride(element)) {\r\n CloudRunnerQueryOverride.queryOverrides[element] = await CloudRunnerQueryOverride.queryOverride(element);\r\n }\r\n }\r\n }\r\n}\r\nexports.default = CloudRunnerQueryOverride;\r\n","\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.CloudRunnerSystem = void 0;\r\nconst child_process_1 = require(\"child_process\");\r\nconst remote_client_logger_1 = require(\"../remote-client/remote-client-logger\");\r\nclass CloudRunnerSystem {\r\n static async RunAndReadLines(command) {\r\n const result = await CloudRunnerSystem.Run(command, false, true);\r\n return result\r\n .split(`\\n`)\r\n .map((x) => x.replace(`\\r`, ``))\r\n .filter((x) => x !== ``)\r\n .map((x) => {\r\n const lineValues = x.split(` `);\r\n return lineValues[lineValues.length - 1];\r\n });\r\n }\r\n static async Run(command, suppressError = false, suppressLogs = false) {\r\n for (const element of command.split(`\\n`)) {\r\n if (!suppressLogs) {\r\n remote_client_logger_1.RemoteClientLogger.log(element);\r\n }\r\n }\r\n return await new Promise((promise, throwError) => {\r\n let output = '';\r\n const child = child_process_1.exec(command, (error, stdout, stderr) => {\r\n if (!suppressError && error) {\r\n remote_client_logger_1.RemoteClientLogger.log(error.toString());\r\n throwError(error);\r\n }\r\n if (stderr) {\r\n const diagnosticOutput = `${stderr.toString()}`;\r\n if (!suppressLogs) {\r\n remote_client_logger_1.RemoteClientLogger.logCliDiagnostic(diagnosticOutput);\r\n }\r\n output += diagnosticOutput;\r\n }\r\n const outputChunk = `${stdout}`;\r\n output += outputChunk;\r\n });\r\n child.on('close', (code) => {\r\n if (!suppressLogs) {\r\n remote_client_logger_1.RemoteClientLogger.log(`[${code}]`);\r\n }\r\n if (code !== 0 && !suppressError) {\r\n throwError(output);\r\n }\r\n const outputLines = output.split(`\\n`);\r\n for (const element of outputLines) {\r\n if (!suppressLogs) {\r\n remote_client_logger_1.RemoteClientLogger.log(element);\r\n }\r\n }\r\n promise(output);\r\n });\r\n });\r\n }\r\n}\r\nexports.CloudRunnerSystem = CloudRunnerSystem;\r\n","\"use strict\";\r\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n}));\r\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n});\r\nvar __importStar = (this && this.__importStar) || function (mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n};\r\nvar __importDefault = (this && this.__importDefault) || function (mod) {\r\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\r\n};\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.FollowLogStreamService = void 0;\r\nconst cloud_runner_logger_1 = __importDefault(require(\"./cloud-runner-logger\"));\r\nconst core = __importStar(require(\"@actions/core\"));\r\nconst cloud_runner_1 = __importDefault(require(\"../cloud-runner\"));\r\nconst cloud_runner_statics_1 = require(\"../cloud-runner-statics\");\r\nconst github_1 = __importDefault(require(\"../../github\"));\r\nclass FollowLogStreamService {\r\n static handleIteration(message, shouldReadLogs, shouldCleanup, output) {\r\n if (message.includes(`---${cloud_runner_1.default.buildParameters.logId}`)) {\r\n cloud_runner_logger_1.default.log('End of log transmission received');\r\n FollowLogStreamService.DidReceiveEndOfTransmission = true;\r\n shouldReadLogs = false;\r\n }\r\n else if (message.includes('Rebuilding Library because the asset database could not be found!')) {\r\n github_1.default.updateGitHubCheck(`Library was not found, importing new Library`, ``);\r\n core.warning('LIBRARY NOT FOUND!');\r\n core.setOutput('library-found', 'false');\r\n }\r\n else if (message.includes('Build succeeded')) {\r\n github_1.default.updateGitHubCheck(`Build succeeded`, `Build succeeded`);\r\n core.setOutput('build-result', 'success');\r\n }\r\n else if (message.includes('Build fail')) {\r\n github_1.default.updateGitHubCheck(`Build failed\\n${FollowLogStreamService.errors}`, `Build failed`, `failure`, `completed`);\r\n core.setOutput('build-result', 'failed');\r\n core.setFailed('unity build failed');\r\n core.error('BUILD FAILED!');\r\n }\r\n else if (message.toLowerCase().includes('error ')) {\r\n FollowLogStreamService.errors += `\\n${message}`;\r\n }\r\n else if (message.toLowerCase().includes('command failed: ')) {\r\n FollowLogStreamService.errors += `\\n${message}`;\r\n }\r\n else if (message.toLowerCase().includes('error: ')) {\r\n FollowLogStreamService.errors += `\\n${message}`;\r\n }\r\n else if (message.toLowerCase().includes('invalid ')) {\r\n FollowLogStreamService.errors += `\\n${message}`;\r\n }\r\n else if (message.toLowerCase().includes('incompatible ')) {\r\n FollowLogStreamService.errors += `\\n${message}`;\r\n }\r\n else if (message.toLowerCase().includes('cannot be found')) {\r\n FollowLogStreamService.errors += `\\n${message}`;\r\n }\r\n else if (cloud_runner_1.default.buildParameters.cloudRunnerDebug && message.includes(': Listening for Jobs')) {\r\n core.setOutput('cloud runner stop watching', 'true');\r\n shouldReadLogs = false;\r\n shouldCleanup = false;\r\n core.warning('cloud runner stop watching');\r\n }\r\n if (cloud_runner_1.default.buildParameters.cloudRunnerDebug) {\r\n output += `${message}\\n`;\r\n }\r\n cloud_runner_logger_1.default.log(`[${cloud_runner_statics_1.CloudRunnerStatics.logPrefix}] ${message}`);\r\n return { shouldReadLogs, shouldCleanup, output };\r\n }\r\n}\r\nexports.FollowLogStreamService = FollowLogStreamService;\r\nFollowLogStreamService.errors = ``;\r\nFollowLogStreamService.DidReceiveEndOfTransmission = false;\r\n","\"use strict\";\r\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n 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;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n};\r\nvar __importDefault = (this && this.__importDefault) || function (mod) {\r\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\r\n};\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.LfsHashing = void 0;\r\nconst node_path_1 = __importDefault(require(\"node:path\"));\r\nconst cloud_runner_folders_1 = require(\"./cloud-runner-folders\");\r\nconst cloud_runner_system_1 = require(\"./cloud-runner-system\");\r\nconst node_fs_1 = __importDefault(require(\"node:fs\"));\r\nconst cli_1 = require(\"../../cli/cli\");\r\nconst cli_functions_repository_1 = require(\"../../cli/cli-functions-repository\");\r\nclass LfsHashing {\r\n static async createLFSHashFiles() {\r\n await cloud_runner_system_1.CloudRunnerSystem.Run(`git lfs ls-files -l | cut -d ' ' -f1 | sort > .lfs-assets-guid`);\r\n await cloud_runner_system_1.CloudRunnerSystem.Run(`md5sum .lfs-assets-guid > .lfs-assets-guid-sum`);\r\n const lfsHashes = {\r\n lfsGuid: node_fs_1.default\r\n .readFileSync(`${node_path_1.default.join(cloud_runner_folders_1.CloudRunnerFolders.repoPathAbsolute, `.lfs-assets-guid`)}`, 'utf8')\r\n .replace(/\\n/g, ``),\r\n lfsGuidSum: node_fs_1.default\r\n .readFileSync(`${node_path_1.default.join(cloud_runner_folders_1.CloudRunnerFolders.repoPathAbsolute, `.lfs-assets-guid-sum`)}`, 'utf8')\r\n .replace(' .lfs-assets-guid', '')\r\n .replace(/\\n/g, ``),\r\n };\r\n return lfsHashes;\r\n }\r\n static async hashAllFiles(folder) {\r\n const startPath = process.cwd();\r\n process.chdir(folder);\r\n const result = await (await cloud_runner_system_1.CloudRunnerSystem.Run(`find -type f -exec md5sum \"{}\" + | sort | md5sum`))\r\n .replace(/\\n/g, '')\r\n .split(` `)[0];\r\n process.chdir(startPath);\r\n return result;\r\n }\r\n static async hash() {\r\n if (!cli_1.Cli.options) {\r\n return;\r\n }\r\n const folder = cli_1.Cli.options['cachePushFrom'];\r\n LfsHashing.hashAllFiles(folder);\r\n }\r\n}\r\n__decorate([\r\n cli_functions_repository_1.CliFunction(`hash`, `hash all folder contents`)\r\n], LfsHashing, \"hash\", null);\r\nexports.LfsHashing = LfsHashing;\r\n","\"use strict\";\r\nvar __importDefault = (this && this.__importDefault) || function (mod) {\r\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\r\n};\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.SharedWorkspaceLocking = void 0;\r\nconst cloud_runner_system_1 = require(\"./cloud-runner-system\");\r\nconst node_fs_1 = __importDefault(require(\"node:fs\"));\r\nconst cloud_runner_logger_1 = __importDefault(require(\"./cloud-runner-logger\"));\r\nconst cloud_runner_1 = __importDefault(require(\"../cloud-runner\"));\r\nclass SharedWorkspaceLocking {\r\n static get workspaceBucketRoot() {\r\n return `s3://${cloud_runner_1.default.buildParameters.awsStackName}/`;\r\n }\r\n static get workspaceRoot() {\r\n return `${SharedWorkspaceLocking.workspaceBucketRoot}locks/`;\r\n }\r\n static async GetAllWorkspaces(buildParametersContext) {\r\n if (!(await SharedWorkspaceLocking.DoesCacheKeyTopLevelExist(buildParametersContext))) {\r\n return [];\r\n }\r\n return (await SharedWorkspaceLocking.ReadLines(`aws s3 ls ${SharedWorkspaceLocking.workspaceRoot}${buildParametersContext.cacheKey}/`))\r\n .map((x) => x.replace(`/`, ``))\r\n .filter((x) => x.endsWith(`_workspace`))\r\n .map((x) => x.split(`_`)[1]);\r\n }\r\n static async DoesCacheKeyTopLevelExist(buildParametersContext) {\r\n try {\r\n const rootLines = await SharedWorkspaceLocking.ReadLines(`aws s3 ls ${SharedWorkspaceLocking.workspaceBucketRoot}`);\r\n const lockFolderExists = rootLines.map((x) => x.replace(`/`, ``)).includes(`locks`);\r\n if (lockFolderExists) {\r\n const lines = await SharedWorkspaceLocking.ReadLines(`aws s3 ls ${SharedWorkspaceLocking.workspaceRoot}`);\r\n return lines.map((x) => x.replace(`/`, ``)).includes(buildParametersContext.cacheKey);\r\n }\r\n else {\r\n return false;\r\n }\r\n }\r\n catch {\r\n return false;\r\n }\r\n }\r\n static NewWorkspaceName() {\r\n return `${cloud_runner_1.default.retainedWorkspacePrefix}-${cloud_runner_1.default.buildParameters.buildGuid}`;\r\n }\r\n static async GetAllLocksForWorkspace(workspace, buildParametersContext) {\r\n if (!(await SharedWorkspaceLocking.DoesWorkspaceExist(workspace, buildParametersContext))) {\r\n return [];\r\n }\r\n return (await SharedWorkspaceLocking.ReadLines(`aws s3 ls ${SharedWorkspaceLocking.workspaceRoot}${buildParametersContext.cacheKey}/`))\r\n .map((x) => x.replace(`/`, ``))\r\n .filter((x) => x.includes(workspace) && x.endsWith(`_lock`));\r\n }\r\n static async GetLockedWorkspace(workspace, runId, buildParametersContext) {\r\n if (buildParametersContext.maxRetainedWorkspaces === 0) {\r\n return false;\r\n }\r\n if (await SharedWorkspaceLocking.DoesCacheKeyTopLevelExist(buildParametersContext)) {\r\n const workspaces = await SharedWorkspaceLocking.GetFreeWorkspaces(buildParametersContext);\r\n cloud_runner_logger_1.default.log(`run agent ${runId} is trying to access a workspace, free: ${JSON.stringify(workspaces)}`);\r\n for (const element of workspaces) {\r\n const lockResult = await SharedWorkspaceLocking.LockWorkspace(element, runId, buildParametersContext);\r\n cloud_runner_logger_1.default.log(`run agent: ${runId} try lock workspace: ${element} locking attempt result: ${lockResult}`);\r\n if (lockResult) {\r\n return true;\r\n }\r\n }\r\n }\r\n if (await SharedWorkspaceLocking.DoesWorkspaceExist(workspace, buildParametersContext)) {\r\n workspace = SharedWorkspaceLocking.NewWorkspaceName();\r\n cloud_runner_1.default.lockedWorkspace = workspace;\r\n }\r\n const createResult = await SharedWorkspaceLocking.CreateWorkspace(workspace, buildParametersContext);\r\n const lockResult = await SharedWorkspaceLocking.LockWorkspace(workspace, runId, buildParametersContext);\r\n cloud_runner_logger_1.default.log(`run agent ${runId} didn't find a free workspace so created: ${workspace} createWorkspaceSuccess: ${createResult} Lock:${lockResult}`);\r\n return createResult && lockResult;\r\n }\r\n static async DoesWorkspaceExist(workspace, buildParametersContext) {\r\n return ((await SharedWorkspaceLocking.GetAllWorkspaces(buildParametersContext)).filter((x) => x.includes(workspace))\r\n .length > 0);\r\n }\r\n static async HasWorkspaceLock(workspace, runId, buildParametersContext) {\r\n const locks = (await SharedWorkspaceLocking.GetAllLocksForWorkspace(workspace, buildParametersContext))\r\n .map((x) => {\r\n return {\r\n name: x,\r\n timestamp: Number(x.split(`_`)[0]),\r\n };\r\n })\r\n .sort((x) => x.timestamp);\r\n const lockMatches = locks.filter((x) => x.name.includes(runId));\r\n const includesRunLock = lockMatches.length > 0 && locks.indexOf(lockMatches[0]) === 0;\r\n cloud_runner_logger_1.default.log(`Checking has workspace lock, runId: ${runId}, workspace: ${workspace}, success: ${includesRunLock} \\n- Num of locks created by Run Agent: ${lockMatches.length} Num of Locks: ${locks.length}, Time ordered index for Run Agent: ${locks.indexOf(lockMatches[0])} \\n \\n`);\r\n return includesRunLock;\r\n }\r\n static async GetFreeWorkspaces(buildParametersContext) {\r\n const result = [];\r\n const workspaces = await SharedWorkspaceLocking.GetAllWorkspaces(buildParametersContext);\r\n for (const element of workspaces) {\r\n const isLocked = await SharedWorkspaceLocking.IsWorkspaceLocked(element, buildParametersContext);\r\n const isBelowMax = await SharedWorkspaceLocking.IsWorkspaceBelowMax(element, buildParametersContext);\r\n cloud_runner_logger_1.default.log(`workspace ${element} locked:${isLocked} below max:${isBelowMax}`);\r\n if (!isLocked && isBelowMax) {\r\n result.push(element);\r\n }\r\n }\r\n return result;\r\n }\r\n static async IsWorkspaceBelowMax(workspace, buildParametersContext) {\r\n const workspaces = await SharedWorkspaceLocking.GetAllWorkspaces(buildParametersContext);\r\n if (workspace === ``) {\r\n return (workspaces.length < buildParametersContext.maxRetainedWorkspaces ||\r\n buildParametersContext.maxRetainedWorkspaces === 0);\r\n }\r\n const ordered = [];\r\n for (const ws of workspaces) {\r\n ordered.push({\r\n name: ws,\r\n timestamp: await SharedWorkspaceLocking.GetWorkspaceTimestamp(ws, buildParametersContext),\r\n });\r\n }\r\n ordered.sort((x) => x.timestamp);\r\n const matches = ordered.filter((x) => x.name.includes(workspace));\r\n const isWorkspaceBelowMax = matches.length > 0 &&\r\n (ordered.indexOf(matches[0]) < buildParametersContext.maxRetainedWorkspaces ||\r\n buildParametersContext.maxRetainedWorkspaces === 0);\r\n return isWorkspaceBelowMax;\r\n }\r\n static async GetWorkspaceTimestamp(workspace, buildParametersContext) {\r\n if (workspace.split(`_`).length > 0) {\r\n return Number(workspace.split(`_`)[1]);\r\n }\r\n if (!(await SharedWorkspaceLocking.DoesWorkspaceExist(workspace, buildParametersContext))) {\r\n throw new Error(\"Workspace doesn't exist, can't call get all locks\");\r\n }\r\n return (await SharedWorkspaceLocking.ReadLines(`aws s3 ls ${SharedWorkspaceLocking.workspaceRoot}${buildParametersContext.cacheKey}/`))\r\n .map((x) => x.replace(`/`, ``))\r\n .filter((x) => x.includes(workspace) && x.endsWith(`_workspace`))\r\n .map((x) => Number(x))[0];\r\n }\r\n static async IsWorkspaceLocked(workspace, buildParametersContext) {\r\n if (!(await SharedWorkspaceLocking.DoesWorkspaceExist(workspace, buildParametersContext))) {\r\n throw new Error(`workspace doesn't exist ${workspace}`);\r\n }\r\n const files = await SharedWorkspaceLocking.ReadLines(`aws s3 ls ${SharedWorkspaceLocking.workspaceRoot}${buildParametersContext.cacheKey}/`);\r\n const lockFilesExist = files.filter((x) => {\r\n return x.includes(workspace) && x.endsWith(`_lock`);\r\n }).length > 0;\r\n return lockFilesExist;\r\n }\r\n static async CreateWorkspace(workspace, buildParametersContext) {\r\n if (await SharedWorkspaceLocking.DoesWorkspaceExist(workspace, buildParametersContext)) {\r\n throw new Error(`${workspace} already exists`);\r\n }\r\n const timestamp = Date.now();\r\n const file = `${timestamp}_${workspace}_workspace`;\r\n node_fs_1.default.writeFileSync(file, '');\r\n await cloud_runner_system_1.CloudRunnerSystem.Run(`aws s3 cp ./${file} ${SharedWorkspaceLocking.workspaceRoot}${buildParametersContext.cacheKey}/${file}`, false, true);\r\n node_fs_1.default.rmSync(file);\r\n const workspaces = await SharedWorkspaceLocking.GetAllWorkspaces(buildParametersContext);\r\n cloud_runner_logger_1.default.log(`All workspaces ${workspaces}`);\r\n if (!(await SharedWorkspaceLocking.IsWorkspaceBelowMax(workspace, buildParametersContext))) {\r\n cloud_runner_logger_1.default.log(`Workspace is above max ${workspaces} ${buildParametersContext.maxRetainedWorkspaces}`);\r\n await SharedWorkspaceLocking.CleanupWorkspace(workspace, buildParametersContext);\r\n return false;\r\n }\r\n return true;\r\n }\r\n static async LockWorkspace(workspace, runId, buildParametersContext) {\r\n const existingWorkspace = workspace.endsWith(`_workspace`);\r\n const ending = existingWorkspace ? workspace : `${workspace}_workspace`;\r\n const file = `${Date.now()}_${runId}_${ending}_lock`;\r\n node_fs_1.default.writeFileSync(file, '');\r\n await cloud_runner_system_1.CloudRunnerSystem.Run(`aws s3 cp ./${file} ${SharedWorkspaceLocking.workspaceRoot}${buildParametersContext.cacheKey}/${file}`, false, true);\r\n node_fs_1.default.rmSync(file);\r\n const hasLock = await SharedWorkspaceLocking.HasWorkspaceLock(workspace, runId, buildParametersContext);\r\n if (hasLock) {\r\n cloud_runner_1.default.lockedWorkspace = workspace;\r\n }\r\n else {\r\n await cloud_runner_system_1.CloudRunnerSystem.Run(`aws s3 rm ${SharedWorkspaceLocking.workspaceRoot}${buildParametersContext.cacheKey}/${file}`, false, true);\r\n }\r\n return hasLock;\r\n }\r\n static async ReleaseWorkspace(workspace, runId, buildParametersContext) {\r\n const files = await SharedWorkspaceLocking.GetAllLocksForWorkspace(workspace, buildParametersContext);\r\n const file = files.find((x) => x.includes(workspace) && x.endsWith(`_lock`) && x.includes(runId));\r\n cloud_runner_logger_1.default.log(`All Locks ${files} ${workspace} ${runId}`);\r\n cloud_runner_logger_1.default.log(`Deleting lock ${workspace}/${file}`);\r\n cloud_runner_logger_1.default.log(`rm ${SharedWorkspaceLocking.workspaceRoot}${buildParametersContext.cacheKey}/${file}`);\r\n await cloud_runner_system_1.CloudRunnerSystem.Run(`aws s3 rm ${SharedWorkspaceLocking.workspaceRoot}${buildParametersContext.cacheKey}/${file}`, false, true);\r\n return !(await SharedWorkspaceLocking.HasWorkspaceLock(workspace, runId, buildParametersContext));\r\n }\r\n static async CleanupWorkspace(workspace, buildParametersContext) {\r\n await cloud_runner_system_1.CloudRunnerSystem.Run(`aws s3 rm ${SharedWorkspaceLocking.workspaceRoot}${buildParametersContext.cacheKey} --exclude \"*\" --include \"*_${workspace}_*\"`, false, true);\r\n }\r\n static async ReadLines(command) {\r\n return cloud_runner_system_1.CloudRunnerSystem.RunAndReadLines(command);\r\n }\r\n}\r\nexports.SharedWorkspaceLocking = SharedWorkspaceLocking;\r\nexports.default = SharedWorkspaceLocking;\r\n","\"use strict\";\r\nvar __importDefault = (this && this.__importDefault) || function (mod) {\r\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\r\n};\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.TaskParameterSerializer = void 0;\r\nconst __1 = require(\"../..\");\r\nconst cloud_runner_custom_hooks_1 = require(\"./cloud-runner-custom-hooks\");\r\nconst cloud_runner_query_override_1 = __importDefault(require(\"./cloud-runner-query-override\"));\r\nconst cloud_runner_options_reader_1 = __importDefault(require(\"./cloud-runner-options-reader\"));\r\nconst build_parameters_1 = __importDefault(require(\"../../build-parameters\"));\r\nconst cloud_runner_options_1 = __importDefault(require(\"../cloud-runner-options\"));\r\nconst cloud_runner_system_1 = require(\"./cloud-runner-system\");\r\nconst cloud_runner_folders_1 = require(\"./cloud-runner-folders\");\r\nconst node_fs_1 = __importDefault(require(\"node:fs\"));\r\nclass TaskParameterSerializer {\r\n static createCloudRunnerEnvironmentVariables(buildParameters) {\r\n const result = this.uniqBy([\r\n ...[\r\n { name: 'BUILD_TARGET', value: buildParameters.targetPlatform },\r\n { name: 'GITHUB_TOKEN', value: process.env.GITHUB_TOKEN },\r\n ],\r\n ...TaskParameterSerializer.serializeFromObject(buildParameters),\r\n ...TaskParameterSerializer.serializeInput(),\r\n ...TaskParameterSerializer.serializeCloudRunnerOptions(),\r\n ...cloud_runner_custom_hooks_1.CloudRunnerCustomHooks.getSecrets(cloud_runner_custom_hooks_1.CloudRunnerCustomHooks.getHooks(buildParameters.commandHooks)),\r\n ]\r\n .filter((x) => !TaskParameterSerializer.blockedParameterNames.has(x.name) &&\r\n x.value !== '' &&\r\n x.value !== undefined &&\r\n x.value !== `undefined`)\r\n .map((x) => {\r\n x.name = `CI_${TaskParameterSerializer.ToEnvVarFormat(x.name)}`;\r\n x.value = `${x.value}`;\r\n return x;\r\n }), (item) => item.name);\r\n return result;\r\n }\r\n // eslint-disable-next-line no-unused-vars\r\n static uniqBy(a, key) {\r\n const seen = {};\r\n return a.filter(function (item) {\r\n const k = key(item);\r\n return seen.hasOwnProperty(k) ? false : (seen[k] = true);\r\n });\r\n }\r\n static readBuildParameterFromEnvironment() {\r\n const buildParameters = new build_parameters_1.default();\r\n const keys = [\r\n ...new Set(Object.getOwnPropertyNames(process.env)\r\n .filter((x) => !this.blockedParameterNames.has(x) && x.startsWith('CI_'))\r\n .map((x) => TaskParameterSerializer.UndoEnvVarFormat(x))),\r\n ];\r\n for (const element of keys) {\r\n if (element !== `customJob`) {\r\n buildParameters[element] = process.env[`CI_${TaskParameterSerializer.ToEnvVarFormat(element)}`];\r\n }\r\n }\r\n return buildParameters;\r\n }\r\n static serializeInput() {\r\n return TaskParameterSerializer.serializeFromType(__1.Input);\r\n }\r\n static serializeCloudRunnerOptions() {\r\n return TaskParameterSerializer.serializeFromType(cloud_runner_options_1.default);\r\n }\r\n static ToEnvVarFormat(input) {\r\n return cloud_runner_options_1.default.ToEnvVarFormat(input);\r\n }\r\n static UndoEnvVarFormat(element) {\r\n return this.camelize(element.replace('CI_', '').toLowerCase().replace(/_+/g, ' '));\r\n }\r\n static camelize(string) {\r\n return TaskParameterSerializer.uncapitalizeFirstLetter(string\r\n .replace(/(^\\w)|([A-Z])|(\\b\\w)/g, function (word, index) {\r\n return index === 0 ? word.toLowerCase() : word.toUpperCase();\r\n })\r\n .replace(/\\s+/g, ''));\r\n }\r\n static uncapitalizeFirstLetter(string) {\r\n return string.charAt(0).toLowerCase() + string.slice(1);\r\n }\r\n static serializeFromObject(buildParameters) {\r\n const array = [];\r\n const keys = Object.getOwnPropertyNames(buildParameters).filter((x) => !this.blockedParameterNames.has(x));\r\n for (const element of keys) {\r\n array.push({\r\n name: TaskParameterSerializer.ToEnvVarFormat(element),\r\n value: buildParameters[element],\r\n });\r\n }\r\n return array;\r\n }\r\n static serializeFromType(type) {\r\n const array = [];\r\n const input = cloud_runner_options_reader_1.default.GetProperties();\r\n for (const element of input) {\r\n if (typeof type[element] !== 'function' && array.filter((x) => x.name === element).length === 0) {\r\n array.push({\r\n name: element,\r\n value: `${type[element]}`,\r\n });\r\n }\r\n }\r\n return array;\r\n }\r\n static readDefaultSecrets() {\r\n let array = new Array();\r\n array = TaskParameterSerializer.tryAddInput(array, 'UNITY_SERIAL');\r\n array = TaskParameterSerializer.tryAddInput(array, 'UNITY_EMAIL');\r\n array = TaskParameterSerializer.tryAddInput(array, 'UNITY_PASSWORD');\r\n array = TaskParameterSerializer.tryAddInput(array, 'UNITY_LICENSE');\r\n array = TaskParameterSerializer.tryAddInput(array, 'GIT_PRIVATE_TOKEN');\r\n return array;\r\n }\r\n static getValue(key) {\r\n return cloud_runner_query_override_1.default.queryOverrides !== undefined &&\r\n cloud_runner_query_override_1.default.queryOverrides[key] !== undefined\r\n ? cloud_runner_query_override_1.default.queryOverrides[key]\r\n : process.env[key];\r\n }\r\n static tryAddInput(array, key) {\r\n const value = TaskParameterSerializer.getValue(key);\r\n if (value !== undefined && value !== '' && value !== 'null') {\r\n array.push({\r\n ParameterKey: key,\r\n EnvironmentVariable: key,\r\n ParameterValue: value,\r\n });\r\n }\r\n return array;\r\n }\r\n static async exportAllCiVariablesWithoutPrefix() {\r\n const file = `${cloud_runner_folders_1.CloudRunnerFolders.uniqueCloudRunnerJobFolderAbsolute}/setEnv.sh`;\r\n for (const variable of Object.entries(process.env)) {\r\n if (variable[0].includes(`CI_`)) {\r\n const name = variable[0].replace(`CI_`, ``);\r\n const value = `${variable[1] || ``}`;\r\n process.env[name] = value;\r\n node_fs_1.default.appendFileSync(file, `export ${name}=\"$${variable[0]}\"\\n`);\r\n }\r\n }\r\n await cloud_runner_system_1.CloudRunnerSystem.Run(`chmod +x ${file}`);\r\n await cloud_runner_system_1.CloudRunnerSystem.Run(file);\r\n }\r\n}\r\nexports.TaskParameterSerializer = TaskParameterSerializer;\r\nTaskParameterSerializer.blockedParameterNames = new Set([\r\n '0',\r\n 'length',\r\n 'prototype',\r\n '',\r\n 'unityVersion',\r\n 'CACHE_UNITY_INSTALLATION_ON_MAC',\r\n 'RUNNER_TEMP_PATH',\r\n 'NAME',\r\n 'CUSTOM_JOB',\r\n]);\r\n","\"use strict\";\r\nvar __importDefault = (this && this.__importDefault) || function (mod) {\r\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\r\n};\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.AsyncWorkflow = void 0;\r\nconst cloud_runner_environment_variable_1 = __importDefault(require(\"../services/cloud-runner-environment-variable\"));\r\nconst cloud_runner_logger_1 = __importDefault(require(\"../services/cloud-runner-logger\"));\r\nconst cloud_runner_folders_1 = require(\"../services/cloud-runner-folders\");\r\nconst cloud_runner_1 = __importDefault(require(\"../cloud-runner\"));\r\nclass AsyncWorkflow {\r\n static async runAsyncWorkflow(environmentVariables, secrets) {\r\n try {\r\n cloud_runner_logger_1.default.log(`Cloud Runner is running async mode`);\r\n const asyncEnvironmentVariable = new cloud_runner_environment_variable_1.default();\r\n asyncEnvironmentVariable.name = `CI_ASYNC_WORKFLOW`;\r\n asyncEnvironmentVariable.value = `true`;\r\n let output = '';\r\n output += await cloud_runner_1.default.Provider.runTaskInWorkflow(cloud_runner_1.default.buildParameters.buildGuid, `ubuntu`, `apt-get update > /dev/null\r\napt-get install -y curl tar tree npm git git-lfs jq git > /dev/null\r\nmkdir /builder\r\nprintenv\r\ngit config --global advice.detachedHead false\r\ngit config --global filter.lfs.smudge \"git-lfs smudge --skip -- %f\"\r\ngit config --global filter.lfs.process \"git-lfs filter-process --skip\"\r\ngit clone -q -b ${cloud_runner_1.default.buildParameters.cloudRunnerBranch} ${cloud_runner_folders_1.CloudRunnerFolders.unityBuilderRepoUrl} /builder\r\ngit clone -q -b ${cloud_runner_1.default.buildParameters.branch} ${cloud_runner_folders_1.CloudRunnerFolders.targetBuildRepoUrl} /repo\r\ncd /repo\r\ncurl \"https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip\" -o \"awscliv2.zip\"\r\nunzip awscliv2.zip\r\n./aws/install\r\naws --version\r\nnode /builder/dist/index.js -m async-workflow`, `/${cloud_runner_folders_1.CloudRunnerFolders.buildVolumeFolder}`, `/${cloud_runner_folders_1.CloudRunnerFolders.buildVolumeFolder}/`, [...environmentVariables, asyncEnvironmentVariable], [\r\n ...secrets,\r\n ...[\r\n {\r\n ParameterKey: `AWS_ACCESS_KEY_ID`,\r\n EnvironmentVariable: `AWS_ACCESS_KEY_ID`,\r\n ParameterValue: process.env.AWS_ACCESS_KEY_ID || ``,\r\n },\r\n {\r\n ParameterKey: `AWS_SECRET_ACCESS_KEY`,\r\n EnvironmentVariable: `AWS_SECRET_ACCESS_KEY`,\r\n ParameterValue: process.env.AWS_SECRET_ACCESS_KEY || ``,\r\n },\r\n ],\r\n ]);\r\n return output;\r\n }\r\n catch (error) {\r\n throw error;\r\n }\r\n }\r\n}\r\nexports.AsyncWorkflow = AsyncWorkflow;\r\n","\"use strict\";\r\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n}));\r\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n});\r\nvar __importStar = (this && this.__importStar) || function (mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n};\r\nvar __importDefault = (this && this.__importDefault) || function (mod) {\r\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\r\n};\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.BuildAutomationWorkflow = void 0;\r\nconst cloud_runner_logger_1 = __importDefault(require(\"../services/cloud-runner-logger\"));\r\nconst cloud_runner_folders_1 = require(\"../services/cloud-runner-folders\");\r\nconst core = __importStar(require(\"@actions/core\"));\r\nconst cloud_runner_custom_hooks_1 = require(\"../services/cloud-runner-custom-hooks\");\r\nconst node_path_1 = __importDefault(require(\"node:path\"));\r\nconst cloud_runner_1 = __importDefault(require(\"../cloud-runner\"));\r\nconst cloud_runner_custom_steps_1 = require(\"../services/cloud-runner-custom-steps\");\r\nclass BuildAutomationWorkflow {\r\n async run(cloudRunnerStepState) {\r\n return await BuildAutomationWorkflow.standardBuildAutomation(cloudRunnerStepState.image, cloudRunnerStepState);\r\n }\r\n static async standardBuildAutomation(baseImage, cloudRunnerStepState) {\r\n // TODO accept post and pre build steps as yaml files in the repo\r\n cloud_runner_logger_1.default.log(`Cloud Runner is running standard build automation`);\r\n let output = '';\r\n output += await cloud_runner_custom_steps_1.CloudRunnerCustomSteps.RunPreBuildSteps(cloudRunnerStepState);\r\n cloud_runner_logger_1.default.logWithTime('Configurable pre build step(s) time');\r\n if (!cloud_runner_1.default.buildParameters.isCliMode)\r\n core.startGroup('build');\r\n cloud_runner_logger_1.default.log(baseImage);\r\n cloud_runner_logger_1.default.logLine(` `);\r\n cloud_runner_logger_1.default.logLine('Starting build automation job');\r\n output += await cloud_runner_1.default.Provider.runTaskInWorkflow(cloud_runner_1.default.buildParameters.buildGuid, baseImage.toString(), BuildAutomationWorkflow.BuildWorkflow, `/${cloud_runner_folders_1.CloudRunnerFolders.buildVolumeFolder}`, `/${cloud_runner_folders_1.CloudRunnerFolders.buildVolumeFolder}/`, cloudRunnerStepState.environment, cloudRunnerStepState.secrets);\r\n if (!cloud_runner_1.default.buildParameters.isCliMode)\r\n core.endGroup();\r\n cloud_runner_logger_1.default.logWithTime('Build time');\r\n output += await cloud_runner_custom_steps_1.CloudRunnerCustomSteps.RunPostBuildSteps(cloudRunnerStepState);\r\n cloud_runner_logger_1.default.logWithTime('Configurable post build step(s) time');\r\n cloud_runner_logger_1.default.log(`Cloud Runner finished running standard build automation`);\r\n return output;\r\n }\r\n static get BuildWorkflow() {\r\n const setupHooks = cloud_runner_custom_hooks_1.CloudRunnerCustomHooks.getHooks(cloud_runner_1.default.buildParameters.commandHooks).filter((x) => x.step?.includes(`setup`));\r\n const buildHooks = cloud_runner_custom_hooks_1.CloudRunnerCustomHooks.getHooks(cloud_runner_1.default.buildParameters.commandHooks).filter((x) => x.step?.includes(`build`));\r\n const builderPath = cloud_runner_folders_1.CloudRunnerFolders.ToLinuxFolder(node_path_1.default.join(cloud_runner_folders_1.CloudRunnerFolders.builderPathAbsolute, 'dist', `index.js`));\r\n return `apt-get update > /dev/null\n apt-get install -y curl tar tree npm git-lfs jq git > /dev/null\n npm i -g n > /dev/null\n n 16.15.1 > /dev/null\n npm --version\n node --version\n ${setupHooks.filter((x) => x.hook.includes(`before`)).map((x) => x.commands) || ' '}\n export GITHUB_WORKSPACE=\"${cloud_runner_folders_1.CloudRunnerFolders.ToLinuxFolder(cloud_runner_folders_1.CloudRunnerFolders.repoPathAbsolute)}\"\n df -H /data/\n ${BuildAutomationWorkflow.setupCommands(builderPath)}\n ${setupHooks.filter((x) => x.hook.includes(`after`)).map((x) => x.commands) || ' '}\n ${buildHooks.filter((x) => x.hook.includes(`before`)).map((x) => x.commands) || ' '}\n ${BuildAutomationWorkflow.BuildCommands(builderPath)}\n ${buildHooks.filter((x) => x.hook.includes(`after`)).map((x) => x.commands) || ' '}`;\r\n }\r\n static setupCommands(builderPath) {\r\n const commands = `mkdir -p ${cloud_runner_folders_1.CloudRunnerFolders.ToLinuxFolder(cloud_runner_folders_1.CloudRunnerFolders.builderPathAbsolute)} && git clone -q -b ${cloud_runner_1.default.buildParameters.cloudRunnerBranch} ${cloud_runner_folders_1.CloudRunnerFolders.unityBuilderRepoUrl} \"${cloud_runner_folders_1.CloudRunnerFolders.ToLinuxFolder(cloud_runner_folders_1.CloudRunnerFolders.builderPathAbsolute)}\" && chmod +x ${builderPath}`;\r\n const cloneBuilderCommands = `if [ -e \"${cloud_runner_folders_1.CloudRunnerFolders.ToLinuxFolder(cloud_runner_folders_1.CloudRunnerFolders.uniqueCloudRunnerJobFolderAbsolute)}\" ] && [ -e \"${cloud_runner_folders_1.CloudRunnerFolders.ToLinuxFolder(node_path_1.default.join(cloud_runner_folders_1.CloudRunnerFolders.builderPathAbsolute, `.git`))}\" ] ; then echo \"Builder Already Exists!\"; else ${commands} ; fi`;\r\n return `export GIT_DISCOVERY_ACROSS_FILESYSTEM=1\n${cloneBuilderCommands}\nnode ${builderPath} -m remote-cli-pre-build\n. ${cloud_runner_folders_1.CloudRunnerFolders.uniqueCloudRunnerJobFolderAbsolute}/setEnv.sh\nrm ${cloud_runner_folders_1.CloudRunnerFolders.uniqueCloudRunnerJobFolderAbsolute}/setEnv.sh`;\r\n }\r\n static BuildCommands(builderPath) {\r\n const distFolder = node_path_1.default.join(cloud_runner_folders_1.CloudRunnerFolders.builderPathAbsolute, 'dist');\r\n const ubuntuPlatformsFolder = node_path_1.default.join(cloud_runner_folders_1.CloudRunnerFolders.builderPathAbsolute, 'dist', 'platforms', 'ubuntu');\r\n return `echo \"game ci cloud runner initalized\"\n mkdir -p ${`${cloud_runner_folders_1.CloudRunnerFolders.ToLinuxFolder(cloud_runner_folders_1.CloudRunnerFolders.projectBuildFolderAbsolute)}/build`}\n tree ${cloud_runner_folders_1.CloudRunnerFolders.ToLinuxFolder(cloud_runner_folders_1.CloudRunnerFolders.repoPathAbsolute)}\n cd ${cloud_runner_folders_1.CloudRunnerFolders.ToLinuxFolder(cloud_runner_folders_1.CloudRunnerFolders.projectPathAbsolute)}\n cp -r \"${cloud_runner_folders_1.CloudRunnerFolders.ToLinuxFolder(node_path_1.default.join(distFolder, 'default-build-script'))}\" \"/UnityBuilderAction\"\n cp -r \"${cloud_runner_folders_1.CloudRunnerFolders.ToLinuxFolder(node_path_1.default.join(ubuntuPlatformsFolder, 'entrypoint.sh'))}\" \"/entrypoint.sh\"\n cp -r \"${cloud_runner_folders_1.CloudRunnerFolders.ToLinuxFolder(node_path_1.default.join(ubuntuPlatformsFolder, 'steps'))}\" \"/steps\"\n chmod -R +x \"/entrypoint.sh\"\n chmod -R +x \"/steps\"\n echo \"game ci start\"\n /entrypoint.sh\n echo \"game ci caching results\"\n chmod +x ${builderPath}\n node ${builderPath} -m remote-cli-post-build`;\r\n }\r\n}\r\nexports.BuildAutomationWorkflow = BuildAutomationWorkflow;\r\n","\"use strict\";\r\nvar __importDefault = (this && this.__importDefault) || function (mod) {\r\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\r\n};\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.CustomWorkflow = void 0;\r\nconst cloud_runner_logger_1 = __importDefault(require(\"../services/cloud-runner-logger\"));\r\nconst cloud_runner_folders_1 = require(\"../services/cloud-runner-folders\");\r\nconst cloud_runner_custom_steps_1 = require(\"../services/cloud-runner-custom-steps\");\r\nconst cloud_runner_1 = __importDefault(require(\"../cloud-runner\"));\r\nclass CustomWorkflow {\r\n static async runContainerJobFromString(buildSteps, environmentVariables, secrets) {\r\n return await CustomWorkflow.runContainerJob(cloud_runner_custom_steps_1.CloudRunnerCustomSteps.ParseSteps(buildSteps), environmentVariables, secrets);\r\n }\r\n static async runContainerJob(steps, environmentVariables, secrets) {\r\n try {\r\n let output = '';\r\n // if (CloudRunner.buildParameters?.cloudRunnerDebug) {\r\n // CloudRunnerLogger.log(`Custom Job Description \\n${JSON.stringify(buildSteps, undefined, 4)}`);\r\n // }\r\n for (const step of steps) {\r\n cloud_runner_logger_1.default.log(`Cloud Runner is running in custom job mode`);\r\n output += await cloud_runner_1.default.Provider.runTaskInWorkflow(cloud_runner_1.default.buildParameters.buildGuid, step.image, step.commands, `/${cloud_runner_folders_1.CloudRunnerFolders.buildVolumeFolder}`, `/${cloud_runner_folders_1.CloudRunnerFolders.projectPathAbsolute}/`, environmentVariables, [...secrets, ...step.secrets]);\r\n }\r\n return output;\r\n }\r\n catch (error) {\r\n throw error;\r\n }\r\n }\r\n}\r\nexports.CustomWorkflow = CustomWorkflow;\r\n","\"use strict\";\r\nvar __importDefault = (this && this.__importDefault) || function (mod) {\r\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\r\n};\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.WorkflowCompositionRoot = void 0;\r\nconst cloud_runner_step_state_1 = require(\"../cloud-runner-step-state\");\r\nconst custom_workflow_1 = require(\"./custom-workflow\");\r\nconst build_automation_workflow_1 = require(\"./build-automation-workflow\");\r\nconst cloud_runner_1 = __importDefault(require(\"../cloud-runner\"));\r\nconst cloud_runner_options_1 = __importDefault(require(\"../cloud-runner-options\"));\r\nconst async_workflow_1 = require(\"./async-workflow\");\r\nclass WorkflowCompositionRoot {\r\n async run(cloudRunnerStepState) {\r\n try {\r\n if (cloud_runner_options_1.default.asyncCloudRunner &&\r\n !cloud_runner_1.default.isCloudRunnerAsyncEnvironment &&\r\n !cloud_runner_1.default.isCloudRunnerEnvironment) {\r\n return await async_workflow_1.AsyncWorkflow.runAsyncWorkflow(cloudRunnerStepState.environment, cloudRunnerStepState.secrets);\r\n }\r\n if (cloud_runner_1.default.buildParameters.customJob !== '') {\r\n return await custom_workflow_1.CustomWorkflow.runContainerJobFromString(cloud_runner_1.default.buildParameters.customJob, cloudRunnerStepState.environment, cloudRunnerStepState.secrets);\r\n }\r\n return await new build_automation_workflow_1.BuildAutomationWorkflow().run(new cloud_runner_step_state_1.CloudRunnerStepState(cloudRunnerStepState.image.toString(), cloudRunnerStepState.environment, cloudRunnerStepState.secrets));\r\n }\r\n catch (error) {\r\n throw error;\r\n }\r\n }\r\n}\r\nexports.WorkflowCompositionRoot = WorkflowCompositionRoot;\r\n","\"use strict\";\r\nvar __importDefault = (this && this.__importDefault) || function (mod) {\r\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\r\n};\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nconst exec_with_error_check_1 = require(\"./exec-with-error-check\");\r\nconst image_environment_factory_1 = __importDefault(require(\"./image-environment-factory\"));\r\nconst node_fs_1 = require(\"node:fs\");\r\nconst node_path_1 = __importDefault(require(\"node:path\"));\r\nclass Docker {\r\n static async run(image, parameters, silent = false, overrideCommands = '', additionalVariables = [], \r\n // eslint-disable-next-line unicorn/no-useless-undefined\r\n options = undefined, entrypointBash = false, errorWhenMissingUnityBuildResults = true) {\r\n let runCommand = '';\r\n switch (process.platform) {\r\n case 'linux':\r\n runCommand = this.getLinuxCommand(image, parameters, overrideCommands, additionalVariables, entrypointBash);\r\n break;\r\n case 'win32':\r\n runCommand = this.getWindowsCommand(image, parameters);\r\n }\r\n if (options) {\r\n options.silent = silent;\r\n await exec_with_error_check_1.execWithErrorCheck(runCommand, undefined, options, errorWhenMissingUnityBuildResults);\r\n }\r\n else {\r\n await exec_with_error_check_1.execWithErrorCheck(runCommand, undefined, { silent }, errorWhenMissingUnityBuildResults);\r\n }\r\n }\r\n static getLinuxCommand(image, parameters, overrideCommands = '', additionalVariables = [], entrypointBash = false) {\r\n const { workspace, actionFolder, runnerTempPath, sshAgent, gitPrivateToken } = parameters;\r\n const githubHome = node_path_1.default.join(runnerTempPath, '_github_home');\r\n if (!node_fs_1.existsSync(githubHome))\r\n node_fs_1.mkdirSync(githubHome);\r\n const githubWorkflow = node_path_1.default.join(runnerTempPath, '_github_workflow');\r\n if (!node_fs_1.existsSync(githubWorkflow))\r\n node_fs_1.mkdirSync(githubWorkflow);\r\n const commandPrefix = image === `alpine` ? `/bin/sh` : `/bin/bash`;\r\n return `docker run \\\n --workdir /github/workspace \\\n --rm \\\n ${image_environment_factory_1.default.getEnvVarString(parameters, additionalVariables)} \\\n --env UNITY_SERIAL \\\n --env GITHUB_WORKSPACE=/github/workspace \\\n ${gitPrivateToken ? `--env GIT_PRIVATE_TOKEN=\"${gitPrivateToken}\"` : ''} \\\n ${sshAgent ? '--env SSH_AUTH_SOCK=/ssh-agent' : ''} \\\n --volume \"${githubHome}\":\"/root:z\" \\\n --volume \"${githubWorkflow}\":\"/github/workflow:z\" \\\n --volume \"${workspace}\":\"/github/workspace:z\" \\\n --volume \"${actionFolder}/default-build-script:/UnityBuilderAction:z\" \\\n --volume \"${actionFolder}/platforms/ubuntu/steps:/steps:z\" \\\n --volume \"${actionFolder}/platforms/ubuntu/entrypoint.sh:/entrypoint.sh:z\" \\\n --volume \"${actionFolder}/unity-config:/usr/share/unity3d/config/:z\" \\\n ${sshAgent ? `--volume ${sshAgent}:/ssh-agent` : ''} \\\n ${sshAgent ? '--volume /home/runner/.ssh/known_hosts:/root/.ssh/known_hosts:ro' : ''} \\\n ${entrypointBash ? `--entrypoint ${commandPrefix}` : ``} \\\n ${image} \\\n ${entrypointBash ? `-c` : `${commandPrefix} -c`} \\\n \"${overrideCommands !== '' ? overrideCommands : `/entrypoint.sh`}\"`;\r\n }\r\n static getWindowsCommand(image, parameters) {\r\n const { workspace, actionFolder, unitySerial, gitPrivateToken } = parameters;\r\n return `docker run \\\n --workdir c:/github/workspace \\\n --rm \\\n ${image_environment_factory_1.default.getEnvVarString(parameters)} \\\n --env UNITY_SERIAL=\"${unitySerial}\" \\\n --env GITHUB_WORKSPACE=c:/github/workspace \\\n ${gitPrivateToken ? `--env GIT_PRIVATE_TOKEN=\"${gitPrivateToken}\"` : ''} \\\n --volume \"${workspace}\":\"c:/github/workspace\" \\\n --volume \"c:/regkeys\":\"c:/regkeys\" \\\n --volume \"C:/Program Files (x86)/Microsoft Visual Studio\":\"C:/Program Files (x86)/Microsoft Visual Studio\" \\\n --volume \"C:/Program Files (x86)/Windows Kits\":\"C:/Program Files (x86)/Windows Kits\" \\\n --volume \"C:/ProgramData/Microsoft/VisualStudio\":\"C:/ProgramData/Microsoft/VisualStudio\" \\\n --volume \"${actionFolder}/default-build-script\":\"c:/UnityBuilderAction\" \\\n --volume \"${actionFolder}/platforms/windows\":\"c:/steps\" \\\n --volume \"${actionFolder}/BlankProject\":\"c:/BlankProject\" \\\n ${image} \\\n powershell c:/steps/entrypoint.ps1`;\r\n }\r\n}\r\nexports.default = Docker;\r\n","\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nclass NotImplementedException extends Error {\r\n constructor(message = '') {\r\n super(message);\r\n this.name = 'NotImplementedException';\r\n }\r\n}\r\nexports.default = NotImplementedException;\r\n","\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nclass ValidationError extends Error {\r\n constructor(message = '') {\r\n super(message);\r\n this.name = 'ValidationError';\r\n }\r\n}\r\nexports.default = ValidationError;\r\n","\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.execWithErrorCheck = void 0;\r\nconst exec_1 = require(\"@actions/exec\");\r\nasync function execWithErrorCheck(commandLine, arguments_, options, errorWhenMissingUnityBuildResults = true) {\r\n const result = await exec_1.getExecOutput(commandLine, arguments_, options);\r\n if (!errorWhenMissingUnityBuildResults) {\r\n return result.exitCode;\r\n }\r\n // Check for errors in the Build Results section\r\n const match = result.stdout.match(/^#\\s*Build results\\s*#(.*)^Size:/ms);\r\n if (match) {\r\n const buildResults = match[1];\r\n const errorMatch = buildResults.match(/^Errors:\\s*(\\d+)$/m);\r\n if (errorMatch && Number.parseInt(errorMatch[1], 10) !== 0) {\r\n throw new Error(`There was an error building the project. Please read the logs for details.`);\r\n }\r\n }\r\n else {\r\n throw new Error(`There was an error building the project. Please read the logs for details.`);\r\n }\r\n return result.exitCode;\r\n}\r\nexports.execWithErrorCheck = execWithErrorCheck;\r\n","\"use strict\";\r\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n}));\r\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n});\r\nvar __importStar = (this && this.__importStar) || function (mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n};\r\nvar __importDefault = (this && this.__importDefault) || function (mod) {\r\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\r\n};\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nconst cloud_runner_logger_1 = __importDefault(require(\"./cloud-runner/services/cloud-runner-logger\"));\r\nconst cloud_runner_1 = __importDefault(require(\"./cloud-runner/cloud-runner\"));\r\nconst cloud_runner_options_1 = __importDefault(require(\"./cloud-runner/cloud-runner-options\"));\r\nconst core = __importStar(require(\"@actions/core\"));\r\nconst core_1 = require(\"@octokit/core\");\r\nclass GitHub {\r\n static get octokitDefaultToken() {\r\n return new core_1.Octokit({\r\n auth: process.env.CI_GITHUB_TOKEN || process.env.GITHUB_TOKEN,\r\n });\r\n }\r\n static get octokitPAT() {\r\n return new core_1.Octokit({\r\n auth: cloud_runner_1.default.buildParameters.gitPrivateToken,\r\n });\r\n }\r\n static get sha() {\r\n return cloud_runner_1.default.buildParameters.gitSha;\r\n }\r\n static get checkName() {\r\n return `Cloud Runner (${cloud_runner_1.default.buildParameters.buildGuid})`;\r\n }\r\n static get nameReadable() {\r\n return GitHub.checkName;\r\n }\r\n static get checkRunId() {\r\n return cloud_runner_1.default.buildParameters.githubCheckId;\r\n }\r\n static get owner() {\r\n return cloud_runner_options_1.default.githubOwner;\r\n }\r\n static get repo() {\r\n return cloud_runner_options_1.default.githubRepoName;\r\n }\r\n static async createGitHubCheck(summary) {\r\n if (!cloud_runner_1.default.buildParameters.githubChecks) {\r\n return ``;\r\n }\r\n GitHub.startedDate = new Date().toISOString();\r\n cloud_runner_logger_1.default.log(`Creating inital github check`);\r\n const data = {\r\n owner: GitHub.owner,\r\n repo: GitHub.repo,\r\n name: GitHub.checkName,\r\n // eslint-disable-next-line camelcase\r\n head_sha: GitHub.sha,\r\n status: 'queued',\r\n // eslint-disable-next-line camelcase\r\n external_id: cloud_runner_1.default.buildParameters.buildGuid,\r\n // eslint-disable-next-line camelcase\r\n started_at: GitHub.startedDate,\r\n output: {\r\n title: GitHub.nameReadable,\r\n summary,\r\n text: '',\r\n images: [\r\n {\r\n alt: 'Game-CI',\r\n // eslint-disable-next-line camelcase\r\n image_url: 'https://game.ci/assets/images/game-ci-brand-logo-wordmark.svg',\r\n },\r\n ],\r\n },\r\n };\r\n const result = await GitHub.createGitHubCheckRequest(data);\r\n return result.data.id.toString();\r\n }\r\n static async updateGitHubCheck(longDescription, summary, result = `neutral`, status = `in_progress`) {\r\n if (`${cloud_runner_1.default.buildParameters.githubChecks}` !== `true`) {\r\n return;\r\n }\r\n cloud_runner_logger_1.default.log(`githubChecks: ${cloud_runner_1.default.buildParameters.githubChecks} checkRunId: ${GitHub.checkRunId} sha: ${GitHub.sha} async: ${cloud_runner_1.default.isCloudRunnerAsyncEnvironment}`);\r\n GitHub.longDescriptionContent += `\\n${longDescription}`;\r\n if (GitHub.result !== `success` && GitHub.result !== `failure`) {\r\n GitHub.result = result;\r\n }\r\n else {\r\n result = GitHub.result;\r\n }\r\n const data = {\r\n owner: GitHub.owner,\r\n repo: GitHub.repo,\r\n // eslint-disable-next-line camelcase\r\n check_run_id: GitHub.checkRunId,\r\n name: GitHub.checkName,\r\n // eslint-disable-next-line camelcase\r\n head_sha: GitHub.sha,\r\n // eslint-disable-next-line camelcase\r\n started_at: GitHub.startedDate,\r\n status,\r\n output: {\r\n title: GitHub.nameReadable,\r\n summary,\r\n text: GitHub.longDescriptionContent,\r\n annotations: [],\r\n },\r\n };\r\n if (status === `completed`) {\r\n if (GitHub.endedDate !== undefined) {\r\n GitHub.endedDate = new Date().toISOString();\r\n }\r\n // eslint-disable-next-line camelcase\r\n data.completed_at = GitHub.endedDate || GitHub.startedDate;\r\n data.conclusion = result;\r\n }\r\n await (cloud_runner_1.default.isCloudRunnerAsyncEnvironment\r\n ? GitHub.runUpdateAsyncChecksWorkflow(data, `update`)\r\n : GitHub.updateGitHubCheckRequest(data));\r\n }\r\n static async updateGitHubCheckRequest(data) {\r\n return await GitHub.octokitDefaultToken.request(`PATCH /repos/{owner}/{repo}/check-runs/{check_run_id}`, data);\r\n }\r\n static async createGitHubCheckRequest(data) {\r\n return await GitHub.octokitDefaultToken.request(`POST /repos/{owner}/{repo}/check-runs`, data);\r\n }\r\n static async runUpdateAsyncChecksWorkflow(data, mode) {\r\n if (mode === `create`) {\r\n throw new Error(`Not supported: only use update`);\r\n }\r\n const workflowsResult = await GitHub.octokitPAT.request(`GET /repos/{owner}/{repo}/actions/workflows`, {\r\n owner: GitHub.owner,\r\n repo: GitHub.repo,\r\n });\r\n const workflows = workflowsResult.data.workflows;\r\n cloud_runner_logger_1.default.log(`Got ${workflows.length} workflows`);\r\n let selectedId = ``;\r\n for (let index = 0; index < workflowsResult.data.total_count; index++) {\r\n if (workflows[index].name === GitHub.asyncChecksApiWorkflowName) {\r\n selectedId = workflows[index].id.toString();\r\n }\r\n }\r\n if (selectedId === ``) {\r\n core.info(JSON.stringify(workflows));\r\n throw new Error(`no workflow with name \"${GitHub.asyncChecksApiWorkflowName}\"`);\r\n }\r\n await GitHub.octokitPAT.request(`POST /repos/{owner}/{repo}/actions/workflows/{workflow_id}/dispatches`, {\r\n owner: GitHub.owner,\r\n repo: GitHub.repo,\r\n // eslint-disable-next-line camelcase\r\n workflow_id: selectedId,\r\n ref: cloud_runner_options_1.default.branch,\r\n inputs: {\r\n checksObject: JSON.stringify({ data, mode }),\r\n },\r\n });\r\n }\r\n static async triggerWorkflowOnComplete(triggerWorkflowOnComplete) {\r\n const isLocalAsync = cloud_runner_1.default.buildParameters.asyncWorkflow && !cloud_runner_1.default.isCloudRunnerAsyncEnvironment;\r\n if (isLocalAsync) {\r\n return;\r\n }\r\n const workflowsResult = await GitHub.octokitPAT.request(`GET /repos/{owner}/{repo}/actions/workflows`, {\r\n owner: GitHub.owner,\r\n repo: GitHub.repo,\r\n });\r\n const workflows = workflowsResult.data.workflows;\r\n cloud_runner_logger_1.default.log(`Got ${workflows.length} workflows`);\r\n for (const element of triggerWorkflowOnComplete) {\r\n let selectedId = ``;\r\n for (let index = 0; index < workflowsResult.data.total_count; index++) {\r\n if (workflows[index].name === element) {\r\n selectedId = workflows[index].id.toString();\r\n }\r\n }\r\n if (selectedId === ``) {\r\n core.info(JSON.stringify(workflows));\r\n throw new Error(`no workflow with name \"${GitHub.asyncChecksApiWorkflowName}\"`);\r\n }\r\n await GitHub.octokitPAT.request(`POST /repos/{owner}/{repo}/actions/workflows/{workflow_id}/dispatches`, {\r\n owner: GitHub.owner,\r\n repo: GitHub.repo,\r\n // eslint-disable-next-line camelcase\r\n workflow_id: selectedId,\r\n ref: cloud_runner_options_1.default.branch,\r\n inputs: {\r\n buildGuid: cloud_runner_1.default.buildParameters.buildGuid,\r\n },\r\n });\r\n }\r\n }\r\n}\r\nGitHub.asyncChecksApiWorkflowName = `Async Checks API`;\r\nGitHub.githubInputEnabled = true;\r\nGitHub.longDescriptionContent = ``;\r\nGitHub.result = ``;\r\nexports.default = GitHub;\r\n","\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nconst test_license_reader_1 = require(\"./input-readers/test-license-reader\");\r\nclass ImageEnvironmentFactory {\r\n static getEnvVarString(parameters, additionalVariables = []) {\r\n const environmentVariables = ImageEnvironmentFactory.getEnvironmentVariables(parameters, additionalVariables);\r\n let string = '';\r\n for (const p of environmentVariables) {\r\n if (p.value === '' || p.value === undefined) {\r\n continue;\r\n }\r\n if (p.name !== 'ANDROID_KEYSTORE_BASE64' && p.value.toString().includes(`\\n`)) {\r\n string += `--env ${p.name} `;\r\n process.env[p.name] = p.value.toString();\r\n continue;\r\n }\r\n string += `--env ${p.name}=\"${p.value}\" `;\r\n }\r\n return string;\r\n }\r\n static getEnvironmentVariables(parameters, additionalVariables = []) {\r\n let environmentVariables = [\r\n { name: 'UNITY_LICENSE', value: process.env.UNITY_LICENSE || test_license_reader_1.ReadLicense() },\r\n { name: 'UNITY_LICENSE_FILE', value: process.env.UNITY_LICENSE_FILE },\r\n { name: 'UNITY_EMAIL', value: process.env.UNITY_EMAIL },\r\n { name: 'UNITY_PASSWORD', value: process.env.UNITY_PASSWORD },\r\n { name: 'UNITY_SERIAL', value: parameters.unitySerial },\r\n { name: 'UNITY_LICENSING_SERVER', value: parameters.unityLicensingServer },\r\n { name: 'UNITY_VERSION', value: parameters.editorVersion },\r\n { name: 'USYM_UPLOAD_AUTH_TOKEN', value: process.env.USYM_UPLOAD_AUTH_TOKEN },\r\n { name: 'PROJECT_PATH', value: parameters.projectPath },\r\n { name: 'BUILD_TARGET', value: parameters.targetPlatform },\r\n { name: 'BUILD_NAME', value: parameters.buildName },\r\n { name: 'BUILD_PATH', value: parameters.buildPath },\r\n { name: 'BUILD_FILE', value: parameters.buildFile },\r\n { name: 'BUILD_METHOD', value: parameters.buildMethod },\r\n { name: 'VERSION', value: parameters.buildVersion },\r\n { name: 'ANDROID_VERSION_CODE', value: parameters.androidVersionCode },\r\n { name: 'ANDROID_KEYSTORE_NAME', value: parameters.androidKeystoreName },\r\n { name: 'ANDROID_KEYSTORE_BASE64', value: parameters.androidKeystoreBase64 },\r\n { name: 'ANDROID_KEYSTORE_PASS', value: parameters.androidKeystorePass },\r\n { name: 'ANDROID_KEYALIAS_NAME', value: parameters.androidKeyaliasName },\r\n { name: 'ANDROID_KEYALIAS_PASS', value: parameters.androidKeyaliasPass },\r\n { name: 'ANDROID_TARGET_SDK_VERSION', value: parameters.androidTargetSdkVersion },\r\n { name: 'ANDROID_SDK_MANAGER_PARAMETERS', value: parameters.androidSdkManagerParameters },\r\n { name: 'ANDROID_EXPORT_TYPE', value: parameters.androidExportType },\r\n { name: 'ANDROID_SYMBOL_TYPE', value: parameters.androidSymbolType },\r\n { name: 'CUSTOM_PARAMETERS', value: parameters.customParameters },\r\n { name: 'CHOWN_FILES_TO', value: parameters.chownFilesTo },\r\n { name: 'GITHUB_REF', value: process.env.GITHUB_REF },\r\n { name: 'GITHUB_SHA', value: process.env.GITHUB_SHA },\r\n { name: 'GITHUB_REPOSITORY', value: process.env.GITHUB_REPOSITORY },\r\n { name: 'GITHUB_ACTOR', value: process.env.GITHUB_ACTOR },\r\n { name: 'GITHUB_WORKFLOW', value: process.env.GITHUB_WORKFLOW },\r\n { name: 'GITHUB_HEAD_REF', value: process.env.GITHUB_HEAD_REF },\r\n { name: 'GITHUB_BASE_REF', value: process.env.GITHUB_BASE_REF },\r\n { name: 'GITHUB_EVENT_NAME', value: process.env.GITHUB_EVENT_NAME },\r\n { name: 'GITHUB_ACTION', value: process.env.GITHUB_ACTION },\r\n { name: 'GITHUB_EVENT_PATH', value: process.env.GITHUB_EVENT_PATH },\r\n { name: 'RUNNER_OS', value: process.env.RUNNER_OS },\r\n { name: 'RUNNER_TOOL_CACHE', value: process.env.RUNNER_TOOL_CACHE },\r\n { name: 'RUNNER_TEMP', value: process.env.RUNNER_TEMP },\r\n { name: 'RUNNER_WORKSPACE', value: process.env.RUNNER_WORKSPACE },\r\n ];\r\n if (parameters.providerStrategy === 'local-docker') {\r\n for (const element of additionalVariables) {\r\n if (environmentVariables.find((x) => element !== undefined && element.name !== undefined && x.name === element.name) === undefined) {\r\n environmentVariables.push(element);\r\n }\r\n }\r\n for (const variable of environmentVariables) {\r\n if (environmentVariables.find((x) => variable !== undefined && variable.name !== undefined && x.name === variable.name) === undefined) {\r\n environmentVariables = environmentVariables.filter((x) => x !== variable);\r\n }\r\n }\r\n }\r\n if (parameters.sshAgent)\r\n environmentVariables.push({ name: 'SSH_AUTH_SOCK', value: '/ssh-agent' });\r\n return environmentVariables;\r\n }\r\n}\r\nexports.default = ImageEnvironmentFactory;\r\n","\"use strict\";\r\nvar __importDefault = (this && this.__importDefault) || function (mod) {\r\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\r\n};\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nconst platform_1 = __importDefault(require(\"./platform\"));\r\nclass ImageTag {\r\n constructor(imageProperties) {\r\n const { editorVersion, targetPlatform, customImage, cloudRunnerBuilderPlatform } = imageProperties;\r\n if (!ImageTag.versionPattern.test(editorVersion)) {\r\n throw new Error(`Invalid version \"${editorVersion}\".`);\r\n }\r\n // Todo we might as well skip this class for customImage.\r\n // Either\r\n this.customImage = customImage;\r\n // Or\r\n this.repository = 'unityci';\r\n this.name = 'editor';\r\n this.editorVersion = editorVersion;\r\n this.targetPlatform = targetPlatform;\r\n this.cloudRunnerBuilderPlatform = cloudRunnerBuilderPlatform;\r\n const isCloudRunnerLocal = cloudRunnerBuilderPlatform === 'local' || cloudRunnerBuilderPlatform === undefined;\r\n this.builderPlatform = ImageTag.getTargetPlatformToTargetPlatformSuffixMap(targetPlatform, editorVersion);\r\n this.imagePlatformPrefix = ImageTag.getImagePlatformPrefixes(isCloudRunnerLocal ? process.platform : cloudRunnerBuilderPlatform);\r\n this.imageRollingVersion = 1; // Will automatically roll to the latest non-breaking version.\r\n }\r\n static get versionPattern() {\r\n return /^(20\\d{2}\\.\\d\\.\\w{3,4}|3)$/;\r\n }\r\n static get targetPlatformSuffixes() {\r\n return {\r\n generic: '',\r\n webgl: 'webgl',\r\n mac: 'mac-mono',\r\n windows: 'windows-mono',\r\n windowsIl2cpp: 'windows-il2cpp',\r\n wsaPlayer: 'universal-windows-platform',\r\n linux: 'base',\r\n linuxIl2cpp: 'linux-il2cpp',\r\n android: 'android',\r\n ios: 'ios',\r\n tvos: 'appletv',\r\n facebook: 'facebook',\r\n };\r\n }\r\n static getImagePlatformPrefixes(platform) {\r\n switch (platform) {\r\n case 'win32':\r\n return 'windows';\r\n case 'linux':\r\n return 'ubuntu';\r\n default:\r\n return '';\r\n }\r\n }\r\n static getTargetPlatformToTargetPlatformSuffixMap(platform, version) {\r\n const { generic, webgl, mac, windows, windowsIl2cpp, wsaPlayer, linux, linuxIl2cpp, android, ios, tvos, facebook } = ImageTag.targetPlatformSuffixes;\r\n const [major, minor] = version.split('.').map((digit) => Number(digit));\r\n // @see: https://docs.unity3d.com/ScriptReference/BuildTarget.html\r\n switch (platform) {\r\n case platform_1.default.types.StandaloneOSX:\r\n return mac;\r\n case platform_1.default.types.StandaloneWindows:\r\n case platform_1.default.types.StandaloneWindows64:\r\n // Can only build windows-il2cpp on a windows based system\r\n if (process.platform === 'win32') {\r\n // Unity versions before 2019.3 do not support il2cpp\r\n if (major >= 2020 || (major === 2019 && minor >= 3)) {\r\n return windowsIl2cpp;\r\n }\r\n else {\r\n throw new Error(`Windows-based builds are only supported on 2019.3.X+ versions of Unity.\n If you are trying to build for windows-mono, please use a Linux based OS.`);\r\n }\r\n }\r\n return windows;\r\n case platform_1.default.types.StandaloneLinux64: {\r\n // Unity versions before 2019.3 do not support il2cpp\r\n if (major >= 2020 || (major === 2019 && minor >= 3)) {\r\n return linuxIl2cpp;\r\n }\r\n return linux;\r\n }\r\n case platform_1.default.types.iOS:\r\n return ios;\r\n case platform_1.default.types.Android:\r\n return android;\r\n case platform_1.default.types.WebGL:\r\n return webgl;\r\n case platform_1.default.types.WSAPlayer:\r\n if (process.platform !== 'win32') {\r\n throw new Error(`WSAPlayer can only be built on a windows base OS`);\r\n }\r\n return wsaPlayer;\r\n case platform_1.default.types.PS4:\r\n return windows;\r\n case platform_1.default.types.XboxOne:\r\n return windows;\r\n case platform_1.default.types.tvOS:\r\n if (process.platform !== 'win32') {\r\n throw new Error(`tvOS can only be built on a windows base OS`);\r\n }\r\n return tvos;\r\n case platform_1.default.types.Switch:\r\n return windows;\r\n // Unsupported\r\n case platform_1.default.types.Lumin:\r\n return windows;\r\n case platform_1.default.types.BJM:\r\n return windows;\r\n case platform_1.default.types.Stadia:\r\n return windows;\r\n case platform_1.default.types.Facebook:\r\n return facebook;\r\n case platform_1.default.types.NoTarget:\r\n return generic;\r\n // Test specific\r\n case platform_1.default.types.Test:\r\n return generic;\r\n default:\r\n throw new Error(`\n Platform must be one of the ones described in the documentation.\n \"${platform}\" is currently not supported.`);\r\n }\r\n }\r\n get tag() {\r\n const versionAndPlatform = `${this.editorVersion}-${this.builderPlatform}`.replace(/-+$/, '');\r\n return `${this.imagePlatformPrefix}-${versionAndPlatform}-${this.imageRollingVersion}`;\r\n }\r\n get image() {\r\n return `${this.repository}/${this.name}`.replace(/^\\/+/, '');\r\n }\r\n toString() {\r\n const { image, tag, customImage } = this;\r\n if (customImage)\r\n return customImage;\r\n return `${image}:${tag}`; // '0' here represents the docker repo version\r\n }\r\n}\r\nexports.default = ImageTag;\r\n","\"use strict\";\r\nvar __importDefault = (this && this.__importDefault) || function (mod) {\r\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\r\n};\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.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;\r\nconst action_1 = __importDefault(require(\"./action\"));\r\nexports.Action = action_1.default;\r\nconst build_parameters_1 = __importDefault(require(\"./build-parameters\"));\r\nexports.BuildParameters = build_parameters_1.default;\r\nconst cache_1 = __importDefault(require(\"./cache\"));\r\nexports.Cache = cache_1.default;\r\nconst docker_1 = __importDefault(require(\"./docker\"));\r\nexports.Docker = docker_1.default;\r\nconst input_1 = __importDefault(require(\"./input\"));\r\nexports.Input = input_1.default;\r\nconst image_tag_1 = __importDefault(require(\"./image-tag\"));\r\nexports.ImageTag = image_tag_1.default;\r\nconst output_1 = __importDefault(require(\"./output\"));\r\nexports.Output = output_1.default;\r\nconst platform_1 = __importDefault(require(\"./platform\"));\r\nexports.Platform = platform_1.default;\r\nconst project_1 = __importDefault(require(\"./project\"));\r\nexports.Project = project_1.default;\r\nconst unity_1 = __importDefault(require(\"./unity\"));\r\nexports.Unity = unity_1.default;\r\nconst versioning_1 = __importDefault(require(\"./versioning\"));\r\nexports.Versioning = versioning_1.default;\r\nconst cloud_runner_1 = __importDefault(require(\"./cloud-runner/cloud-runner\"));\r\nexports.CloudRunner = cloud_runner_1.default;\r\n","\"use strict\";\r\nvar __importDefault = (this && this.__importDefault) || function (mod) {\r\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\r\n};\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.ActionYamlReader = void 0;\r\nconst node_fs_1 = __importDefault(require(\"node:fs\"));\r\nconst node_path_1 = __importDefault(require(\"node:path\"));\r\nconst yaml_1 = __importDefault(require(\"yaml\"));\r\nclass ActionYamlReader {\r\n constructor() {\r\n let filename = `action.yml`;\r\n if (!node_fs_1.default.existsSync(filename)) {\r\n filename = node_path_1.default.join(__dirname, `..`, filename);\r\n }\r\n this.actionYamlParsed = yaml_1.default.parse(node_fs_1.default.readFileSync(filename).toString());\r\n }\r\n GetActionYamlValue(key) {\r\n return this.actionYamlParsed.inputs[key]?.description || 'No description found in action.yml';\r\n }\r\n}\r\nexports.ActionYamlReader = ActionYamlReader;\r\n","\"use strict\";\r\nvar __importDefault = (this && this.__importDefault) || function (mod) {\r\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\r\n};\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.GenericInputReader = void 0;\r\nconst cloud_runner_system_1 = require(\"../cloud-runner/services/cloud-runner-system\");\r\nconst cloud_runner_options_1 = __importDefault(require(\"../cloud-runner/cloud-runner-options\"));\r\nclass GenericInputReader {\r\n static async Run(command) {\r\n if (cloud_runner_options_1.default.providerStrategy === 'local') {\r\n return '';\r\n }\r\n return await cloud_runner_system_1.CloudRunnerSystem.Run(command, false, true);\r\n }\r\n}\r\nexports.GenericInputReader = GenericInputReader;\r\n","\"use strict\";\r\nvar __importDefault = (this && this.__importDefault) || function (mod) {\r\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\r\n};\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.GitRepoReader = void 0;\r\nconst node_console_1 = require(\"node:console\");\r\nconst node_fs_1 = __importDefault(require(\"node:fs\"));\r\nconst cloud_runner_system_1 = require(\"../cloud-runner/services/cloud-runner-system\");\r\nconst cloud_runner_logger_1 = __importDefault(require(\"../cloud-runner/services/cloud-runner-logger\"));\r\nconst cloud_runner_options_1 = __importDefault(require(\"../cloud-runner/cloud-runner-options\"));\r\nconst input_1 = __importDefault(require(\"../input\"));\r\nclass GitRepoReader {\r\n static async GetRemote() {\r\n if (cloud_runner_options_1.default.providerStrategy === 'local') {\r\n return '';\r\n }\r\n node_console_1.assert(node_fs_1.default.existsSync(`.git`));\r\n const value = (await cloud_runner_system_1.CloudRunnerSystem.Run(`cd ${input_1.default.projectPath} && git remote -v`, false, true)).replace(/ /g, ``);\r\n cloud_runner_logger_1.default.log(`value ${value}`);\r\n node_console_1.assert(value.includes('github.com'));\r\n return value.split('github.com')[1].split('.git')[0].slice(1);\r\n }\r\n static async GetBranch() {\r\n if (cloud_runner_options_1.default.providerStrategy === 'local') {\r\n return '';\r\n }\r\n node_console_1.assert(node_fs_1.default.existsSync(`.git`));\r\n return (await cloud_runner_system_1.CloudRunnerSystem.Run(`cd ${input_1.default.projectPath} && git branch --show-current`, false, true))\r\n .split('\\n')[0]\r\n .replace(/ /g, ``)\r\n .replace('/head', '');\r\n }\r\n}\r\nexports.GitRepoReader = GitRepoReader;\r\n","\"use strict\";\r\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n}));\r\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n});\r\nvar __importStar = (this && this.__importStar) || function (mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n};\r\nvar __importDefault = (this && this.__importDefault) || function (mod) {\r\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\r\n};\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.GithubCliReader = void 0;\r\nconst cloud_runner_system_1 = require(\"../cloud-runner/services/cloud-runner-system\");\r\nconst core = __importStar(require(\"@actions/core\"));\r\nconst cloud_runner_options_1 = __importDefault(require(\"../cloud-runner/cloud-runner-options\"));\r\nclass GithubCliReader {\r\n static async GetGitHubAuthToken() {\r\n if (cloud_runner_options_1.default.providerStrategy === 'local') {\r\n return '';\r\n }\r\n try {\r\n const authStatus = await cloud_runner_system_1.CloudRunnerSystem.Run(`gh auth status`, true, true);\r\n if (authStatus.includes('You are not logged') || authStatus === '') {\r\n return '';\r\n }\r\n return (await cloud_runner_system_1.CloudRunnerSystem.Run(`gh auth status -t`, false, true))\r\n .split(`Token: `)[1]\r\n .replace(/ /g, '')\r\n .replace(/\\n/g, '');\r\n }\r\n catch (error) {\r\n core.info(error || 'Failed to get github auth token from gh cli');\r\n return '';\r\n }\r\n }\r\n}\r\nexports.GithubCliReader = GithubCliReader;\r\n","\"use strict\";\r\nvar __importDefault = (this && this.__importDefault) || function (mod) {\r\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\r\n};\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.ReadLicense = void 0;\r\nconst node_path_1 = __importDefault(require(\"node:path\"));\r\nconst node_fs_1 = __importDefault(require(\"node:fs\"));\r\nconst yaml_1 = __importDefault(require(\"yaml\"));\r\nconst cloud_runner_options_1 = __importDefault(require(\"../cloud-runner/cloud-runner-options\"));\r\nfunction ReadLicense() {\r\n if (cloud_runner_options_1.default.providerStrategy === 'local') {\r\n return '';\r\n }\r\n const pipelineFile = node_path_1.default.join(__dirname, `.github`, `workflows`, `cloud-runner-k8s-pipeline.yml`);\r\n return node_fs_1.default.existsSync(pipelineFile) ? yaml_1.default.parse(node_fs_1.default.readFileSync(pipelineFile, 'utf8')).env.UNITY_LICENSE : '';\r\n}\r\nexports.ReadLicense = ReadLicense;\r\n","\"use strict\";\r\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n}));\r\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n});\r\nvar __importStar = (this && this.__importStar) || function (mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n};\r\nvar __importDefault = (this && this.__importDefault) || function (mod) {\r\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\r\n};\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nconst node_fs_1 = __importDefault(require(\"node:fs\"));\r\nconst node_path_1 = __importDefault(require(\"node:path\"));\r\nconst cli_1 = require(\"./cli/cli\");\r\nconst cloud_runner_query_override_1 = __importDefault(require(\"./cloud-runner/services/cloud-runner-query-override\"));\r\nconst platform_1 = __importDefault(require(\"./platform\"));\r\nconst github_1 = __importDefault(require(\"./github\"));\r\nconst core = __importStar(require(\"@actions/core\"));\r\n/**\r\n * Input variables specified in workflows using \"with\" prop.\r\n *\r\n * Note that input is always passed as a string, even booleans.\r\n *\r\n * Todo: rename to UserInput and remove anything that is not direct input from the user / ci workflow\r\n */\r\nclass Input {\r\n static getInput(query) {\r\n if (github_1.default.githubInputEnabled) {\r\n const coreInput = core.getInput(query);\r\n if (coreInput && coreInput !== '') {\r\n return coreInput;\r\n }\r\n }\r\n const alternativeQuery = Input.ToEnvVarFormat(query);\r\n // Query input sources\r\n if (cli_1.Cli.query(query, alternativeQuery)) {\r\n return cli_1.Cli.query(query, alternativeQuery);\r\n }\r\n if (cloud_runner_query_override_1.default.query(query, alternativeQuery)) {\r\n return cloud_runner_query_override_1.default.query(query, alternativeQuery);\r\n }\r\n if (process.env[query] !== undefined) {\r\n return process.env[query];\r\n }\r\n if (alternativeQuery !== query && process.env[alternativeQuery] !== undefined) {\r\n return process.env[alternativeQuery];\r\n }\r\n }\r\n static get region() {\r\n return Input.getInput('region') || 'eu-west-2';\r\n }\r\n static get githubRepo() {\r\n return Input.getInput('GITHUB_REPOSITORY') || Input.getInput('GITHUB_REPO') || undefined;\r\n }\r\n static get branch() {\r\n if (Input.getInput(`GITHUB_REF`)) {\r\n return Input.getInput(`GITHUB_REF`).replace('refs/', '').replace(`head/`, '').replace(`heads/`, '');\r\n }\r\n else if (Input.getInput('branch')) {\r\n return Input.getInput('branch');\r\n }\r\n else {\r\n return '';\r\n }\r\n }\r\n static get gitSha() {\r\n if (Input.getInput(`GITHUB_SHA`)) {\r\n return Input.getInput(`GITHUB_SHA`);\r\n }\r\n else if (Input.getInput(`GitSHA`)) {\r\n return Input.getInput(`GitSHA`);\r\n }\r\n return '';\r\n }\r\n static get runNumber() {\r\n return Input.getInput('GITHUB_RUN_NUMBER') || '0';\r\n }\r\n static get targetPlatform() {\r\n return Input.getInput('targetPlatform') || platform_1.default.default;\r\n }\r\n static get unityVersion() {\r\n return Input.getInput('unityVersion') || 'auto';\r\n }\r\n static get customImage() {\r\n return Input.getInput('customImage') || '';\r\n }\r\n static get projectPath() {\r\n const input = Input.getInput('projectPath');\r\n let rawProjectPath;\r\n if (input) {\r\n rawProjectPath = input;\r\n }\r\n else if (node_fs_1.default.existsSync(node_path_1.default.join('test-project', 'ProjectSettings', 'ProjectVersion.txt')) &&\r\n !node_fs_1.default.existsSync(node_path_1.default.join('ProjectSettings', 'ProjectVersion.txt'))) {\r\n rawProjectPath = 'test-project';\r\n }\r\n else {\r\n rawProjectPath = '.';\r\n }\r\n return rawProjectPath.replace(/\\/$/, '');\r\n }\r\n static get runnerTempPath() {\r\n return Input.getInput('RUNNER_TEMP') || '';\r\n }\r\n static get buildName() {\r\n return Input.getInput('buildName') || Input.targetPlatform;\r\n }\r\n static get buildsPath() {\r\n return Input.getInput('buildsPath') || 'build';\r\n }\r\n static get unityLicensingServer() {\r\n return Input.getInput('unityLicensingServer') || '';\r\n }\r\n static get buildMethod() {\r\n return Input.getInput('buildMethod') || ''; // Processed in docker file\r\n }\r\n static get customParameters() {\r\n return Input.getInput('customParameters') || '';\r\n }\r\n static get versioningStrategy() {\r\n return Input.getInput('versioning') || 'Semantic';\r\n }\r\n static get specifiedVersion() {\r\n return Input.getInput('version') || '';\r\n }\r\n static get androidVersionCode() {\r\n return Input.getInput('androidVersionCode') || '';\r\n }\r\n static get androidAppBundle() {\r\n core.warning('androidAppBundle is deprecated, please use androidExportType instead');\r\n const input = Input.getInput('androidAppBundle') || false;\r\n return input === 'true';\r\n }\r\n static get androidExportType() {\r\n // TODO: remove this in V3\r\n const exportType = Input.getInput('androidExportType') || '';\r\n if (exportType !== '') {\r\n return exportType;\r\n }\r\n return Input.androidAppBundle ? 'androidAppBundle' : 'androidPackage';\r\n // End TODO\r\n // Use this in V3 when androidAppBundle is removed\r\n // return Input.getInput('androidExportType') || 'androidPackage';\r\n }\r\n static get androidKeystoreName() {\r\n return Input.getInput('androidKeystoreName') || '';\r\n }\r\n static get androidKeystoreBase64() {\r\n return Input.getInput('androidKeystoreBase64') || '';\r\n }\r\n static get androidKeystorePass() {\r\n return Input.getInput('androidKeystorePass') || '';\r\n }\r\n static get androidKeyaliasName() {\r\n return Input.getInput('androidKeyaliasName') || '';\r\n }\r\n static get androidKeyaliasPass() {\r\n return Input.getInput('androidKeyaliasPass') || '';\r\n }\r\n static get androidTargetSdkVersion() {\r\n return Input.getInput('androidTargetSdkVersion') || '';\r\n }\r\n static get androidSymbolType() {\r\n return Input.getInput('androidSymbolType') || 'none';\r\n }\r\n static get sshAgent() {\r\n return Input.getInput('sshAgent') || '';\r\n }\r\n static get gitPrivateToken() {\r\n return Input.getInput('gitPrivateToken');\r\n }\r\n static get chownFilesTo() {\r\n return Input.getInput('chownFilesTo') || '';\r\n }\r\n static get allowDirtyBuild() {\r\n const input = Input.getInput('allowDirtyBuild') || false;\r\n return input === 'true';\r\n }\r\n static get cacheUnityInstallationOnMac() {\r\n const input = Input.getInput('cacheUnityInstallationOnMac') || false;\r\n return input === 'true';\r\n }\r\n static get unityHubVersionOnMac() {\r\n const input = Input.getInput('unityHubVersionOnMac') || '';\r\n return input !== '' ? input : '';\r\n }\r\n static get unitySerial() {\r\n return Input.getInput('UNITY_SERIAL');\r\n }\r\n static get unityLicense() {\r\n return Input.getInput('UNITY_LICENSE');\r\n }\r\n static ToEnvVarFormat(input) {\r\n if (input.toUpperCase() === input) {\r\n return input;\r\n }\r\n return input\r\n .replace(/([A-Z])/g, ' $1')\r\n .trim()\r\n .toUpperCase()\r\n .replace(/ /g, '_');\r\n }\r\n}\r\nexports.default = Input;\r\n","\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nconst exec_with_error_check_1 = require(\"./exec-with-error-check\");\r\nclass MacBuilder {\r\n static async run(actionFolder, silent = false) {\r\n await exec_with_error_check_1.execWithErrorCheck('bash', [`${actionFolder}/platforms/mac/entrypoint.sh`], {\r\n silent,\r\n });\r\n }\r\n}\r\nexports.default = MacBuilder;\r\n","\"use strict\";\r\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n}));\r\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n});\r\nvar __importStar = (this && this.__importStar) || function (mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n};\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nconst core = __importStar(require(\"@actions/core\"));\r\nclass Output {\r\n static async setBuildVersion(buildVersion) {\r\n core.setOutput('buildVersion', buildVersion);\r\n }\r\n static async setAndroidVersionCode(androidVersionCode) {\r\n core.setOutput('androidVersionCode', androidVersionCode);\r\n }\r\n}\r\nexports.default = Output;\r\n","\"use strict\";\r\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n}));\r\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n});\r\nvar __importStar = (this && this.__importStar) || function (mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n};\r\nvar __importDefault = (this && this.__importDefault) || function (mod) {\r\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\r\n};\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nconst node_fs_1 = __importDefault(require(\"node:fs\"));\r\nconst core = __importStar(require(\"@actions/core\"));\r\nconst platform_setup_1 = require(\"./platform-setup/\");\r\nconst validate_windows_1 = __importDefault(require(\"./platform-validation/validate-windows\"));\r\nclass PlatformSetup {\r\n static async setup(buildParameters, actionFolder) {\r\n PlatformSetup.SetupShared(buildParameters, actionFolder);\r\n switch (process.platform) {\r\n case 'win32':\r\n validate_windows_1.default.validate(buildParameters);\r\n platform_setup_1.SetupWindows.setup(buildParameters);\r\n break;\r\n case 'darwin':\r\n await platform_setup_1.SetupMac.setup(buildParameters, actionFolder);\r\n break;\r\n // Add other baseOS's here\r\n }\r\n }\r\n static SetupShared(buildParameters, actionFolder) {\r\n const servicesConfigPath = `${actionFolder}/unity-config/services-config.json`;\r\n const servicesConfigPathTemplate = `${servicesConfigPath}.template`;\r\n if (!node_fs_1.default.existsSync(servicesConfigPathTemplate)) {\r\n core.error(`Missing services config ${servicesConfigPathTemplate}`);\r\n return;\r\n }\r\n let servicesConfig = node_fs_1.default.readFileSync(servicesConfigPathTemplate).toString();\r\n servicesConfig = servicesConfig.replace('%URL%', buildParameters.unityLicensingServer);\r\n node_fs_1.default.writeFileSync(servicesConfigPath, servicesConfig);\r\n platform_setup_1.SetupAndroid.setup(buildParameters);\r\n }\r\n}\r\nexports.default = PlatformSetup;\r\n","\"use strict\";\r\nvar __importDefault = (this && this.__importDefault) || function (mod) {\r\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\r\n};\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.SetupAndroid = exports.SetupMac = exports.SetupWindows = void 0;\r\nconst setup_windows_1 = __importDefault(require(\"./setup-windows\"));\r\nexports.SetupWindows = setup_windows_1.default;\r\nconst setup_mac_1 = __importDefault(require(\"./setup-mac\"));\r\nexports.SetupMac = setup_mac_1.default;\r\nconst setup_android_1 = __importDefault(require(\"./setup-android\"));\r\nexports.SetupAndroid = setup_android_1.default;\r\n","\"use strict\";\r\nvar __importDefault = (this && this.__importDefault) || function (mod) {\r\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\r\n};\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nconst node_fs_1 = __importDefault(require(\"node:fs\"));\r\nconst node_path_1 = __importDefault(require(\"node:path\"));\r\nclass SetupAndroid {\r\n static async setup(buildParameters) {\r\n const { targetPlatform, androidKeystoreBase64, androidKeystoreName, projectPath } = buildParameters;\r\n if (targetPlatform === 'Android' && androidKeystoreBase64 !== '' && androidKeystoreName !== '') {\r\n SetupAndroid.setupAndroidRun(androidKeystoreBase64, androidKeystoreName, projectPath);\r\n }\r\n }\r\n static setupAndroidRun(androidKeystoreBase64, androidKeystoreName, projectPath) {\r\n const decodedKeystore = Buffer.from(androidKeystoreBase64, 'base64').toString('binary');\r\n const githubWorkspace = process.env.GITHUB_WORKSPACE || '';\r\n node_fs_1.default.writeFileSync(node_path_1.default.join(githubWorkspace, projectPath, androidKeystoreName), decodedKeystore, 'binary');\r\n }\r\n}\r\nexports.default = SetupAndroid;\r\n","\"use strict\";\r\nvar __importDefault = (this && this.__importDefault) || function (mod) {\r\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\r\n};\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nconst unity_changeset_1 = require(\"unity-changeset\");\r\nconst exec_1 = require(\"@actions/exec\");\r\nconst cache_1 = require(\"@actions/cache\");\r\nconst node_fs_1 = __importDefault(require(\"node:fs\"));\r\nclass SetupMac {\r\n static async setup(buildParameters, actionFolder) {\r\n const unityEditorPath = `/Applications/Unity/Hub/Editor/${buildParameters.editorVersion}/Unity.app/Contents/MacOS/Unity`;\r\n if (!node_fs_1.default.existsSync(this.unityHubExecPath)) {\r\n await SetupMac.installUnityHub(buildParameters);\r\n }\r\n if (!node_fs_1.default.existsSync(unityEditorPath)) {\r\n await SetupMac.installUnity(buildParameters);\r\n }\r\n await SetupMac.setEnvironmentVariables(buildParameters, actionFolder);\r\n }\r\n static async installUnityHub(buildParameters, silent = false) {\r\n // Can't use quotes in the cache package so we need a different path\r\n const unityHubCachePath = `/Applications/Unity\\\\ Hub.app`;\r\n const targetHubVersion = buildParameters.unityHubVersionOnMac !== ''\r\n ? buildParameters.unityHubVersionOnMac\r\n : await SetupMac.getLatestUnityHubVersion();\r\n const restoreKey = `Cache-MacOS-UnityHub@${targetHubVersion}`;\r\n if (buildParameters.cacheUnityInstallationOnMac) {\r\n const cacheId = await cache_1.restoreCache([unityHubCachePath], restoreKey);\r\n if (cacheId) {\r\n // Cache restored successfully, unity hub is installed now\r\n return;\r\n }\r\n }\r\n const commandSuffix = buildParameters.unityHubVersionOnMac !== '' ? `@${buildParameters.unityHubVersionOnMac}` : '';\r\n const command = `brew install unity-hub${commandSuffix}`;\r\n // Ignoring return code because the log seems to overflow the internal buffer which triggers\r\n // a false error\r\n const errorCode = await exec_1.exec(command, undefined, { silent, ignoreReturnCode: true });\r\n if (errorCode) {\r\n throw new Error(`There was an error installing the Unity Editor. See logs above for details.`);\r\n }\r\n if (buildParameters.cacheUnityInstallationOnMac) {\r\n await cache_1.saveCache([unityHubCachePath], restoreKey);\r\n }\r\n }\r\n /**\r\n * Gets the latest version of Unity Hub available on brew\r\n * @returns The latest version of Unity Hub available on brew\r\n */\r\n static async getLatestUnityHubVersion() {\r\n // Need to check if the latest version available is the same as the one we have cached\r\n const hubVersionCommand = `/bin/bash -c \"brew info unity-hub | grep -o '[0-9]\\\\+\\\\.[0-9]\\\\+\\\\.[0-9]\\\\+'\"`;\r\n const result = await exec_1.getExecOutput(hubVersionCommand, undefined, { silent: true });\r\n if (result.exitCode === 0 && result.stdout !== '') {\r\n return result.stdout;\r\n }\r\n return '';\r\n }\r\n static getModuleParametersForTargetPlatform(targetPlatform) {\r\n let moduleArgument = '';\r\n switch (targetPlatform) {\r\n case 'iOS':\r\n moduleArgument += `--module ios `;\r\n break;\r\n case 'tvOS':\r\n moduleArgument += '--module tvos ';\r\n break;\r\n case 'StandaloneOSX':\r\n moduleArgument += `--module mac-il2cpp `;\r\n break;\r\n case 'Android':\r\n moduleArgument += `--module android `;\r\n break;\r\n case 'WebGL':\r\n moduleArgument += '--module webgl ';\r\n break;\r\n default:\r\n throw new Error(`Unsupported module for target platform: ${targetPlatform}.`);\r\n }\r\n return moduleArgument;\r\n }\r\n static async installUnity(buildParameters, silent = false) {\r\n const unityEditorPath = `/Applications/Unity/Hub/Editor/${buildParameters.editorVersion}`;\r\n const key = `Cache-MacOS-UnityEditor-With-Module-${buildParameters.targetPlatform}@${buildParameters.editorVersion}`;\r\n if (buildParameters.cacheUnityInstallationOnMac) {\r\n const cacheId = await cache_1.restoreCache([unityEditorPath], key);\r\n if (cacheId) {\r\n // Cache restored successfully, unity editor is installed now\r\n return;\r\n }\r\n }\r\n const unityChangeset = await unity_changeset_1.getUnityChangeset(buildParameters.editorVersion);\r\n const moduleArgument = SetupMac.getModuleParametersForTargetPlatform(buildParameters.targetPlatform);\r\n const command = `${this.unityHubExecPath} -- --headless install \\\n --version ${buildParameters.editorVersion} \\\n --changeset ${unityChangeset.changeset} \\\n ${moduleArgument} \\\n --childModules `;\r\n // Ignoring return code because the log seems to overflow the internal buffer which triggers\r\n // a false error\r\n const errorCode = await exec_1.exec(command, undefined, { silent, ignoreReturnCode: true });\r\n if (errorCode) {\r\n throw new Error(`There was an error installing the Unity Editor. See logs above for details.`);\r\n }\r\n if (buildParameters.cacheUnityInstallationOnMac) {\r\n await cache_1.saveCache([unityEditorPath], key);\r\n }\r\n }\r\n static async setEnvironmentVariables(buildParameters, actionFolder) {\r\n // Need to set environment variables from here because we execute\r\n // the scripts on the host for mac\r\n process.env.ACTION_FOLDER = actionFolder;\r\n process.env.UNITY_VERSION = buildParameters.editorVersion;\r\n process.env.UNITY_SERIAL = buildParameters.unitySerial;\r\n process.env.UNITY_LICENSING_SERVER = buildParameters.unityLicensingServer;\r\n process.env.PROJECT_PATH = buildParameters.projectPath;\r\n process.env.BUILD_TARGET = buildParameters.targetPlatform;\r\n process.env.BUILD_NAME = buildParameters.buildName;\r\n process.env.BUILD_PATH = buildParameters.buildPath;\r\n process.env.BUILD_FILE = buildParameters.buildFile;\r\n process.env.BUILD_METHOD = buildParameters.buildMethod;\r\n process.env.VERSION = buildParameters.buildVersion;\r\n process.env.ANDROID_VERSION_CODE = buildParameters.androidVersionCode;\r\n process.env.ANDROID_KEYSTORE_NAME = buildParameters.androidKeystoreName;\r\n process.env.ANDROID_KEYSTORE_BASE64 = buildParameters.androidKeystoreBase64;\r\n process.env.ANDROID_KEYSTORE_PASS = buildParameters.androidKeystorePass;\r\n process.env.ANDROID_KEYALIAS_NAME = buildParameters.androidKeyaliasName;\r\n process.env.ANDROID_KEYALIAS_PASS = buildParameters.androidKeyaliasPass;\r\n process.env.ANDROID_TARGET_SDK_VERSION = buildParameters.androidTargetSdkVersion;\r\n process.env.ANDROID_SDK_MANAGER_PARAMETERS = buildParameters.androidSdkManagerParameters;\r\n process.env.ANDROID_EXPORT_TYPE = buildParameters.androidExportType;\r\n process.env.ANDROID_SYMBOL_TYPE = buildParameters.androidSymbolType;\r\n process.env.CUSTOM_PARAMETERS = buildParameters.customParameters;\r\n process.env.CHOWN_FILES_TO = buildParameters.chownFilesTo;\r\n }\r\n}\r\nSetupMac.unityHubBasePath = `/Applications/\"Unity Hub.app\"`;\r\nSetupMac.unityHubExecPath = `${SetupMac.unityHubBasePath}/Contents/MacOS/\"Unity Hub\"`;\r\nexports.default = SetupMac;\r\n","\"use strict\";\r\nvar __importDefault = (this && this.__importDefault) || function (mod) {\r\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\r\n};\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nconst exec_1 = require(\"@actions/exec\");\r\nconst node_fs_1 = __importDefault(require(\"node:fs\"));\r\nclass SetupWindows {\r\n static async setup(buildParameters) {\r\n const { targetPlatform } = buildParameters;\r\n await SetupWindows.setupWindowsRun(targetPlatform);\r\n }\r\n static async setupWindowsRun(targetPlatform, silent = false) {\r\n if (!node_fs_1.default.existsSync('c:/regkeys')) {\r\n node_fs_1.default.mkdirSync('c:/regkeys');\r\n }\r\n // These all need the Windows 10 SDK\r\n switch (targetPlatform) {\r\n case 'StandaloneWindows':\r\n case 'StandaloneWindows64':\r\n case 'WSAPlayer':\r\n await this.generateWinSDKRegKeys(silent);\r\n break;\r\n }\r\n }\r\n static async generateWinSDKRegKeys(silent = false) {\r\n // Export registry keys that point to the Windows 10 SDK\r\n const exportWinSDKRegKeysCommand = 'reg export \"HKLM\\\\SOFTWARE\\\\WOW6432Node\\\\Microsoft\\\\Microsoft SDKs\\\\Windows\\\\v10.0\" c:/regkeys/winsdk.reg /y';\r\n await exec_1.exec(exportWinSDKRegKeysCommand, undefined, { silent });\r\n }\r\n}\r\nexports.default = SetupWindows;\r\n","\"use strict\";\r\nvar __importDefault = (this && this.__importDefault) || function (mod) {\r\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\r\n};\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nconst node_fs_1 = __importDefault(require(\"node:fs\"));\r\nclass ValidateWindows {\r\n static validate(buildParameters) {\r\n ValidateWindows.validateWindowsPlatformRequirements(buildParameters.targetPlatform);\r\n if (!(process.env.UNITY_EMAIL && process.env.UNITY_PASSWORD)) {\r\n throw new Error(`Unity email and password must be set for Windows based builds to\n authenticate the license. Make sure to set them inside UNITY_EMAIL\n and UNITY_PASSWORD in Github Secrets and pass them into the environment.`);\r\n }\r\n }\r\n static validateWindowsPlatformRequirements(platform) {\r\n switch (platform) {\r\n case 'StandaloneWindows':\r\n case 'StandaloneWindows64':\r\n case 'WSAPlayer':\r\n this.checkForVisualStudio();\r\n this.checkForWin10SDK();\r\n break;\r\n case 'tvOS':\r\n this.checkForVisualStudio();\r\n break;\r\n }\r\n }\r\n static checkForWin10SDK() {\r\n // Check for Windows 10 SDK on runner\r\n const windows10SDKPathExists = node_fs_1.default.existsSync('C:/Program Files (x86)/Windows Kits');\r\n if (!windows10SDKPathExists) {\r\n throw new Error(`Windows 10 SDK not found in default location. Make sure\n the runner has a Windows 10 SDK installed in the default\n location.`);\r\n }\r\n }\r\n static checkForVisualStudio() {\r\n // Note: When upgrading to Server 2022, we will need to move to just \"program files\" since VS will be 64-bit\r\n const visualStudioInstallPathExists = node_fs_1.default.existsSync('C:/Program Files (x86)/Microsoft Visual Studio');\r\n const visualStudioDataPathExists = node_fs_1.default.existsSync('C:/ProgramData/Microsoft/VisualStudio');\r\n if (!visualStudioInstallPathExists || !visualStudioDataPathExists) {\r\n throw new Error(`Visual Studio not found at the default location.\n Make sure the runner has Visual Studio installed in the\n default location`);\r\n }\r\n }\r\n}\r\nexports.default = ValidateWindows;\r\n","\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nclass Platform {\r\n static get default() {\r\n return Platform.types.StandaloneWindows64;\r\n }\r\n static get types() {\r\n return {\r\n StandaloneOSX: 'StandaloneOSX',\r\n StandaloneWindows: 'StandaloneWindows',\r\n StandaloneWindows64: 'StandaloneWindows64',\r\n StandaloneLinux64: 'StandaloneLinux64',\r\n iOS: 'iOS',\r\n Android: 'Android',\r\n WebGL: 'WebGL',\r\n WSAPlayer: 'WSAPlayer',\r\n PS4: 'PS4',\r\n XboxOne: 'XboxOne',\r\n tvOS: 'tvOS',\r\n Switch: 'Switch',\r\n // Unsupported\r\n Lumin: 'Lumin',\r\n BJM: 'BJM',\r\n Stadia: 'Stadia',\r\n Facebook: 'Facebook',\r\n NoTarget: 'NoTarget',\r\n // Test specific\r\n Test: 'Test',\r\n };\r\n }\r\n static isWindows(platform) {\r\n switch (platform) {\r\n case Platform.types.StandaloneWindows:\r\n case Platform.types.StandaloneWindows64:\r\n return true;\r\n default:\r\n return false;\r\n }\r\n }\r\n static isAndroid(platform) {\r\n switch (platform) {\r\n case Platform.types.Android:\r\n return true;\r\n default:\r\n return false;\r\n }\r\n }\r\n}\r\nexports.default = Platform;\r\n","\"use strict\";\r\nvar __importDefault = (this && this.__importDefault) || function (mod) {\r\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\r\n};\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nconst input_1 = __importDefault(require(\"./input\"));\r\nconst unity_1 = __importDefault(require(\"./unity\"));\r\nconst action_1 = __importDefault(require(\"./action\"));\r\nclass Project {\r\n static get relativePath() {\r\n const { projectPath } = input_1.default;\r\n return `${projectPath}`;\r\n }\r\n static get absolutePath() {\r\n const { workspace } = action_1.default;\r\n return `${workspace}/${this.relativePath}`;\r\n }\r\n static get libraryFolder() {\r\n return `${this.relativePath}/${unity_1.default.libraryFolder}`;\r\n }\r\n}\r\nexports.default = Project;\r\n","\"use strict\";\r\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n}));\r\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n});\r\nvar __importStar = (this && this.__importStar) || function (mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n};\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nconst core = __importStar(require(\"@actions/core\"));\r\nconst exec_1 = require(\"@actions/exec\");\r\nclass System {\r\n static async run(command, arguments_ = [], options = {}, shouldLog = true) {\r\n let result = '';\r\n let error = '';\r\n let debug = '';\r\n const listeners = {\r\n stdout: (dataBuffer) => {\r\n result += dataBuffer.toString();\r\n },\r\n stderr: (dataBuffer) => {\r\n error += dataBuffer.toString();\r\n },\r\n debug: (dataString) => {\r\n debug += dataString;\r\n },\r\n };\r\n const showOutput = () => {\r\n if (debug !== '' && shouldLog) {\r\n core.debug(debug);\r\n }\r\n if (result !== '' && shouldLog) {\r\n core.info(result);\r\n }\r\n if (error !== '' && shouldLog) {\r\n core.warning(error);\r\n }\r\n };\r\n const throwContextualError = (message) => {\r\n let commandAsString = command;\r\n if (Array.isArray(arguments_)) {\r\n commandAsString += ` ${arguments_.join(' ')}`;\r\n }\r\n else if (typeof arguments_ === 'string') {\r\n commandAsString += ` ${arguments_}`;\r\n }\r\n throw new Error(`Failed to run \"${commandAsString}\".\\n ${message}`);\r\n };\r\n try {\r\n if (command.trim() === '') {\r\n throw new Error(`Failed to execute empty command`);\r\n }\r\n const exitCode = await exec_1.exec(command, arguments_, { silent: true, listeners, ...options });\r\n showOutput();\r\n if (exitCode !== 0) {\r\n throwContextualError(`Command returned non-zero exit code.\\nError: ${error}`);\r\n }\r\n }\r\n catch (inCommandError) {\r\n showOutput();\r\n throwContextualError(`In-command error caught: ${inCommandError}`);\r\n }\r\n return result;\r\n }\r\n}\r\nexports.default = System;\r\n","\"use strict\";\r\nvar __importDefault = (this && this.__importDefault) || function (mod) {\r\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\r\n};\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nconst node_fs_1 = __importDefault(require(\"node:fs\"));\r\nconst node_path_1 = __importDefault(require(\"node:path\"));\r\nclass UnityVersioning {\r\n static get versionPattern() {\r\n return /20\\d{2}\\.\\d\\.\\w{3,4}|3/;\r\n }\r\n static determineUnityVersion(projectPath, unityVersion) {\r\n if (unityVersion === 'auto') {\r\n return UnityVersioning.read(projectPath);\r\n }\r\n return unityVersion;\r\n }\r\n static read(projectPath) {\r\n const filePath = node_path_1.default.join(projectPath, 'ProjectSettings', 'ProjectVersion.txt');\r\n if (!node_fs_1.default.existsSync(filePath)) {\r\n throw new Error(`Project settings file not found at \"${filePath}\". Have you correctly set the projectPath?`);\r\n }\r\n return UnityVersioning.parse(node_fs_1.default.readFileSync(filePath, 'utf8'));\r\n }\r\n static parse(projectVersionTxt) {\r\n const matches = projectVersionTxt.match(UnityVersioning.versionPattern);\r\n if (!matches || matches.length === 0) {\r\n throw new Error(`Failed to parse version from \"${projectVersionTxt}\".`);\r\n }\r\n return matches[0];\r\n }\r\n}\r\nexports.default = UnityVersioning;\r\n","\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nclass Unity {\r\n static get libraryFolder() {\r\n return 'Library';\r\n }\r\n}\r\nexports.default = Unity;\r\n","\"use strict\";\r\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n}));\r\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n});\r\nvar __importStar = (this && this.__importStar) || function (mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n};\r\nvar __importDefault = (this && this.__importDefault) || function (mod) {\r\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\r\n};\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nconst core = __importStar(require(\"@actions/core\"));\r\nconst not_implemented_exception_1 = __importDefault(require(\"./error/not-implemented-exception\"));\r\nconst validation_error_1 = __importDefault(require(\"./error/validation-error\"));\r\nconst input_1 = __importDefault(require(\"./input\"));\r\nconst system_1 = __importDefault(require(\"./system\"));\r\nclass Versioning {\r\n static get strategies() {\r\n return { None: 'None', Semantic: 'Semantic', Tag: 'Tag', Custom: 'Custom' };\r\n }\r\n static get grepCompatibleInputVersionRegex() {\r\n return '^v?([0-9]+\\\\.)*[0-9]+.*';\r\n }\r\n /**\r\n * Get the branch name of the (related) branch\r\n */\r\n static get branch() {\r\n return this.headRef || this.ref?.slice(11);\r\n }\r\n /**\r\n * For pull requests we can reliably use GITHUB_HEAD_REF\r\n */\r\n static get headRef() {\r\n return process.env.GITHUB_HEAD_REF;\r\n }\r\n /**\r\n * For branches GITHUB_REF will have format `refs/heads/feature-branch-1`\r\n */\r\n static get ref() {\r\n return process.env.GITHUB_REF;\r\n }\r\n /**\r\n * The commit SHA that triggered the workflow run.\r\n */\r\n static get sha() {\r\n return process.env.GITHUB_SHA;\r\n }\r\n /**\r\n * Maximum number of lines to print when logging the git diff\r\n */\r\n static get maxDiffLines() {\r\n return 60;\r\n }\r\n /**\r\n * Log up to maxDiffLines of the git diff.\r\n */\r\n static async logDiff() {\r\n const diffCommand = `git --no-pager diff | head -n ${this.maxDiffLines.toString()}`;\r\n await system_1.default.run('sh', undefined, {\r\n input: Buffer.from(diffCommand),\r\n silent: true,\r\n }, false);\r\n }\r\n /**\r\n * Regex to parse version description into separate fields\r\n */\r\n static get descriptionRegexes() {\r\n return [\r\n /^v?([\\d.]+)-(\\d+)-g(\\w+)-?(\\w+)*/g,\r\n /^v?([\\d.]+-\\w+)-(\\d+)-g(\\w+)-?(\\w+)*/g,\r\n /^v?([\\d.]+-\\w+\\.\\d+)-(\\d+)-g(\\w+)-?(\\w+)*/g,\r\n ];\r\n }\r\n static async determineBuildVersion(strategy, inputVersion) {\r\n // Validate input\r\n if (!Object.hasOwnProperty.call(this.strategies, strategy)) {\r\n throw new validation_error_1.default(`Versioning strategy should be one of ${Object.values(this.strategies).join(', ')}.`);\r\n }\r\n switch (strategy) {\r\n case this.strategies.None:\r\n return 'none';\r\n case this.strategies.Custom:\r\n return inputVersion;\r\n case this.strategies.Semantic:\r\n return await this.generateSemanticVersion();\r\n case this.strategies.Tag:\r\n return await this.generateTagVersion();\r\n default:\r\n throw new not_implemented_exception_1.default(`Strategy ${strategy} is not implemented.`);\r\n }\r\n }\r\n /**\r\n * Automatically generates a version based on SemVer out of the box.\r\n *\r\n * The version works as follows: `..` for example `0.1.2`.\r\n *\r\n * The latest tag dictates `.`\r\n * The number of commits since that tag dictates``.\r\n *\r\n * @See: https://semver.org/\r\n */\r\n static async generateSemanticVersion() {\r\n if (await this.isShallow()) {\r\n await this.fetch();\r\n }\r\n await this.logDiff();\r\n if ((await this.isDirty()) && !input_1.default.allowDirtyBuild) {\r\n throw new Error('Branch is dirty. Refusing to base semantic version on uncommitted changes');\r\n }\r\n if (!(await this.hasAnyVersionTags())) {\r\n const version = `0.0.${await this.getTotalNumberOfCommits()}`;\r\n core.info(`Generated version ${version} (no version tags found).`);\r\n return version;\r\n }\r\n const versionDescriptor = await this.parseSemanticVersion();\r\n if (versionDescriptor) {\r\n const { tag, commits, hash } = versionDescriptor;\r\n // Ensure 3 digits (commits should always be patch level)\r\n const [major, minor, patch] = `${tag}.${commits}`.split('.');\r\n const threeDigitVersion = /^\\d+$/.test(patch) ? `${major}.${minor}.${patch}` : `${major}.0.${minor}`;\r\n core.info(`Found semantic version ${threeDigitVersion} for ${this.branch}@${hash}`);\r\n return `${threeDigitVersion}`;\r\n }\r\n const version = `0.0.${await this.getTotalNumberOfCommits()}`;\r\n core.info(`Generated version ${version} (semantic version couldn't be determined).`);\r\n return version;\r\n }\r\n /**\r\n * Generate the proper version for unity based on an existing tag.\r\n */\r\n static async generateTagVersion() {\r\n let tag = await this.getTag();\r\n if (tag.charAt(0) === 'v') {\r\n tag = tag.slice(1);\r\n }\r\n return tag;\r\n }\r\n /**\r\n * Parses the versionDescription into their named parts.\r\n */\r\n static async parseSemanticVersion() {\r\n const description = await this.getVersionDescription();\r\n for (const descriptionRegex of Versioning.descriptionRegexes) {\r\n try {\r\n const [match, tag, commits, hash] = descriptionRegex.exec(description);\r\n return {\r\n match,\r\n tag,\r\n commits,\r\n hash,\r\n };\r\n }\r\n catch {\r\n continue;\r\n }\r\n }\r\n core.warning(`Failed to parse git describe output or version can not be determined through: \"${description}\".`);\r\n return false;\r\n }\r\n /**\r\n * Returns whether the repository is shallow.\r\n */\r\n static async isShallow() {\r\n const output = await this.git(['rev-parse', '--is-shallow-repository']);\r\n return output !== 'false\\n';\r\n }\r\n /**\r\n * Retrieves refs from the configured remote.\r\n *\r\n * Fetch unshallow for incomplete repository, but fall back to normal fetch.\r\n *\r\n * Note: `--all` should not be used, and would break fetching for push event.\r\n */\r\n static async fetch() {\r\n try {\r\n await this.git(['fetch', '--unshallow']);\r\n }\r\n catch (error) {\r\n core.warning(`Fetch --unshallow caught: ${error}`);\r\n await this.git(['fetch']);\r\n }\r\n }\r\n /**\r\n * Retrieves information about the branch.\r\n *\r\n * Format: `v0.12-24-gd2198ab`\r\n *\r\n * In this format v0.12 is the latest tag, 24 are the number of commits since, and gd2198ab\r\n * identifies the current commit.\r\n */\r\n static async getVersionDescription() {\r\n return this.git(['describe', '--long', '--tags', '--always', this.sha]);\r\n }\r\n /**\r\n * Returns whether there are uncommitted changes that are not ignored.\r\n */\r\n static async isDirty() {\r\n const output = await this.git(['status', '--porcelain']);\r\n const isDirty = output !== '';\r\n if (isDirty) {\r\n core.warning('Changes were made to the following files and folders:\\n');\r\n core.warning(output);\r\n }\r\n return isDirty;\r\n }\r\n /**\r\n * Get the tag if there is one pointing at HEAD\r\n */\r\n static async getTag() {\r\n return (await this.git(['tag', '--points-at', 'HEAD'])).trim();\r\n }\r\n /**\r\n * Whether the current tree has any version tags yet.\r\n *\r\n * Note: Currently this is run in all OSes, so the syntax must be cross-platform.\r\n */\r\n static async hasAnyVersionTags() {\r\n const numberOfTagsAsString = await system_1.default.run('sh', undefined, {\r\n input: Buffer.from(`git tag --list --merged HEAD | grep -E '${this.grepCompatibleInputVersionRegex}' | wc -l`),\r\n cwd: input_1.default.projectPath,\r\n silent: false,\r\n });\r\n const numberOfTags = Number.parseInt(numberOfTagsAsString, 10);\r\n return numberOfTags !== 0;\r\n }\r\n /**\r\n * Get the total number of commits on head.\r\n *\r\n * Note: HEAD should not be used, as it may be detached, resulting in an additional count.\r\n */\r\n static async getTotalNumberOfCommits() {\r\n const numberOfCommitsAsString = await this.git(['rev-list', '--count', this.sha]);\r\n return Number.parseInt(numberOfCommitsAsString, 10);\r\n }\r\n /**\r\n * Run git in the specified project path\r\n */\r\n static async git(arguments_, options = {}) {\r\n return system_1.default.run('git', arguments_, { cwd: input_1.default.projectPath, ...options }, false);\r\n }\r\n}\r\nexports.default = Versioning;\r\n","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\n result[\"default\"] = mod;\n return result;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst core = __importStar(require(\"@actions/core\"));\nconst path = __importStar(require(\"path\"));\nconst utils = __importStar(require(\"./internal/cacheUtils\"));\nconst cacheHttpClient = __importStar(require(\"./internal/cacheHttpClient\"));\nconst tar_1 = require(\"./internal/tar\");\nclass ValidationError extends Error {\n constructor(message) {\n super(message);\n this.name = 'ValidationError';\n Object.setPrototypeOf(this, ValidationError.prototype);\n }\n}\nexports.ValidationError = ValidationError;\nclass ReserveCacheError extends Error {\n constructor(message) {\n super(message);\n this.name = 'ReserveCacheError';\n Object.setPrototypeOf(this, ReserveCacheError.prototype);\n }\n}\nexports.ReserveCacheError = ReserveCacheError;\nfunction checkPaths(paths) {\n if (!paths || paths.length === 0) {\n throw new ValidationError(`Path Validation Error: At least one directory or file path is required`);\n }\n}\nfunction checkKey(key) {\n if (key.length > 512) {\n throw new ValidationError(`Key Validation Error: ${key} cannot be larger than 512 characters.`);\n }\n const regex = /^[^,]*$/;\n if (!regex.test(key)) {\n throw new ValidationError(`Key Validation Error: ${key} cannot contain commas.`);\n }\n}\n/**\n * isFeatureAvailable to check the presence of Actions cache service\n *\n * @returns boolean return true if Actions cache service feature is available, otherwise false\n */\nfunction isFeatureAvailable() {\n return !!process.env['ACTIONS_CACHE_URL'];\n}\nexports.isFeatureAvailable = isFeatureAvailable;\n/**\n * Restores cache from keys\n *\n * @param paths a list of file paths to restore from the cache\n * @param primaryKey an explicit key for restoring the cache\n * @param restoreKeys an optional ordered list of keys to use for restoring the cache if no cache hit occurred for key\n * @param downloadOptions cache download options\n * @param enableCrossOsArchive an optional boolean enabled to restore on windows any cache created on any platform\n * @returns string returns the key for the cache hit, otherwise returns undefined\n */\nfunction restoreCache(paths, primaryKey, restoreKeys, options, enableCrossOsArchive = false) {\n return __awaiter(this, void 0, void 0, function* () {\n checkPaths(paths);\n restoreKeys = restoreKeys || [];\n const keys = [primaryKey, ...restoreKeys];\n core.debug('Resolved Keys:');\n core.debug(JSON.stringify(keys));\n if (keys.length > 10) {\n throw new ValidationError(`Key Validation Error: Keys are limited to a maximum of 10.`);\n }\n for (const key of keys) {\n checkKey(key);\n }\n const compressionMethod = yield utils.getCompressionMethod();\n let archivePath = '';\n try {\n // path are needed to compute version\n const cacheEntry = yield cacheHttpClient.getCacheEntry(keys, paths, {\n compressionMethod,\n enableCrossOsArchive\n });\n if (!(cacheEntry === null || cacheEntry === void 0 ? void 0 : cacheEntry.archiveLocation)) {\n // Cache not found\n return undefined;\n }\n archivePath = path.join(yield utils.createTempDirectory(), utils.getCacheFileName(compressionMethod));\n core.debug(`Archive Path: ${archivePath}`);\n // Download the cache from the cache entry\n yield cacheHttpClient.downloadCache(cacheEntry.archiveLocation, archivePath, options);\n if (core.isDebug()) {\n yield tar_1.listTar(archivePath, compressionMethod);\n }\n const archiveFileSize = utils.getArchiveFileSizeInBytes(archivePath);\n core.info(`Cache Size: ~${Math.round(archiveFileSize / (1024 * 1024))} MB (${archiveFileSize} B)`);\n yield tar_1.extractTar(archivePath, compressionMethod);\n core.info('Cache restored successfully');\n return cacheEntry.cacheKey;\n }\n catch (error) {\n const typedError = error;\n if (typedError.name === ValidationError.name) {\n throw error;\n }\n else {\n // Supress all non-validation cache related errors because caching should be optional\n core.warning(`Failed to restore: ${error.message}`);\n }\n }\n finally {\n // Try to delete the archive to save space\n try {\n yield utils.unlinkFile(archivePath);\n }\n catch (error) {\n core.debug(`Failed to delete archive: ${error}`);\n }\n }\n return undefined;\n });\n}\nexports.restoreCache = restoreCache;\n/**\n * Saves a list of files with the specified key\n *\n * @param paths a list of file paths to be cached\n * @param key an explicit key for restoring the cache\n * @param enableCrossOsArchive an optional boolean enabled to save cache on windows which could be restored on any platform\n * @param options cache upload options\n * @returns number returns cacheId if the cache was saved successfully and throws an error if save fails\n */\nfunction saveCache(paths, key, options, enableCrossOsArchive = false) {\n var _a, _b, _c, _d, _e;\n return __awaiter(this, void 0, void 0, function* () {\n checkPaths(paths);\n checkKey(key);\n const compressionMethod = yield utils.getCompressionMethod();\n let cacheId = -1;\n const cachePaths = yield utils.resolvePaths(paths);\n core.debug('Cache Paths:');\n core.debug(`${JSON.stringify(cachePaths)}`);\n if (cachePaths.length === 0) {\n throw new Error(`Path Validation Error: Path(s) specified in the action for caching do(es) not exist, hence no cache is being saved.`);\n }\n const archiveFolder = yield utils.createTempDirectory();\n const archivePath = path.join(archiveFolder, utils.getCacheFileName(compressionMethod));\n core.debug(`Archive Path: ${archivePath}`);\n try {\n yield tar_1.createTar(archiveFolder, cachePaths, compressionMethod);\n if (core.isDebug()) {\n yield tar_1.listTar(archivePath, compressionMethod);\n }\n const fileSizeLimit = 10 * 1024 * 1024 * 1024; // 10GB per repo limit\n const archiveFileSize = utils.getArchiveFileSizeInBytes(archivePath);\n core.debug(`File Size: ${archiveFileSize}`);\n // For GHES, this check will take place in ReserveCache API with enterprise file size limit\n if (archiveFileSize > fileSizeLimit && !utils.isGhes()) {\n throw new Error(`Cache size of ~${Math.round(archiveFileSize / (1024 * 1024))} MB (${archiveFileSize} B) is over the 10GB limit, not saving cache.`);\n }\n core.debug('Reserving Cache');\n const reserveCacheResponse = yield cacheHttpClient.reserveCache(key, paths, {\n compressionMethod,\n enableCrossOsArchive,\n cacheSize: archiveFileSize\n });\n if ((_a = reserveCacheResponse === null || reserveCacheResponse === void 0 ? void 0 : reserveCacheResponse.result) === null || _a === void 0 ? void 0 : _a.cacheId) {\n cacheId = (_b = reserveCacheResponse === null || reserveCacheResponse === void 0 ? void 0 : reserveCacheResponse.result) === null || _b === void 0 ? void 0 : _b.cacheId;\n }\n else if ((reserveCacheResponse === null || reserveCacheResponse === void 0 ? void 0 : reserveCacheResponse.statusCode) === 400) {\n throw new Error((_d = (_c = reserveCacheResponse === null || reserveCacheResponse === void 0 ? void 0 : reserveCacheResponse.error) === null || _c === void 0 ? void 0 : _c.message) !== null && _d !== void 0 ? _d : `Cache size of ~${Math.round(archiveFileSize / (1024 * 1024))} MB (${archiveFileSize} B) is over the data cap limit, not saving cache.`);\n }\n else {\n throw new ReserveCacheError(`Unable to reserve cache with key ${key}, another job may be creating this cache. More details: ${(_e = reserveCacheResponse === null || reserveCacheResponse === void 0 ? void 0 : reserveCacheResponse.error) === null || _e === void 0 ? void 0 : _e.message}`);\n }\n core.debug(`Saving Cache (ID: ${cacheId})`);\n yield cacheHttpClient.saveCache(cacheId, archivePath, options);\n }\n catch (error) {\n const typedError = error;\n if (typedError.name === ValidationError.name) {\n throw error;\n }\n else if (typedError.name === ReserveCacheError.name) {\n core.info(`Failed to save: ${typedError.message}`);\n }\n else {\n core.warning(`Failed to save: ${typedError.message}`);\n }\n }\n finally {\n // Try to delete the archive to save space\n try {\n yield utils.unlinkFile(archivePath);\n }\n catch (error) {\n core.debug(`Failed to delete archive: ${error}`);\n }\n }\n return cacheId;\n });\n}\nexports.saveCache = saveCache;\n//# sourceMappingURL=cache.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\n result[\"default\"] = mod;\n return result;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst core = __importStar(require(\"@actions/core\"));\nconst http_client_1 = require(\"@actions/http-client\");\nconst auth_1 = require(\"@actions/http-client/lib/auth\");\nconst crypto = __importStar(require(\"crypto\"));\nconst fs = __importStar(require(\"fs\"));\nconst url_1 = require(\"url\");\nconst utils = __importStar(require(\"./cacheUtils\"));\nconst downloadUtils_1 = require(\"./downloadUtils\");\nconst options_1 = require(\"../options\");\nconst requestUtils_1 = require(\"./requestUtils\");\nconst versionSalt = '1.0';\nfunction getCacheApiUrl(resource) {\n const baseUrl = process.env['ACTIONS_CACHE_URL'] || '';\n if (!baseUrl) {\n throw new Error('Cache Service Url not found, unable to restore cache.');\n }\n const url = `${baseUrl}_apis/artifactcache/${resource}`;\n core.debug(`Resource Url: ${url}`);\n return url;\n}\nfunction createAcceptHeader(type, apiVersion) {\n return `${type};api-version=${apiVersion}`;\n}\nfunction getRequestOptions() {\n const requestOptions = {\n headers: {\n Accept: createAcceptHeader('application/json', '6.0-preview.1')\n }\n };\n return requestOptions;\n}\nfunction createHttpClient() {\n const token = process.env['ACTIONS_RUNTIME_TOKEN'] || '';\n const bearerCredentialHandler = new auth_1.BearerCredentialHandler(token);\n return new http_client_1.HttpClient('actions/cache', [bearerCredentialHandler], getRequestOptions());\n}\nfunction getCacheVersion(paths, compressionMethod, enableCrossOsArchive = false) {\n const components = paths;\n // Add compression method to cache version to restore\n // compressed cache as per compression method\n if (compressionMethod) {\n components.push(compressionMethod);\n }\n // Only check for windows platforms if enableCrossOsArchive is false\n if (process.platform === 'win32' && !enableCrossOsArchive) {\n components.push('windows-only');\n }\n // Add salt to cache version to support breaking changes in cache entry\n components.push(versionSalt);\n return crypto\n .createHash('sha256')\n .update(components.join('|'))\n .digest('hex');\n}\nexports.getCacheVersion = getCacheVersion;\nfunction getCacheEntry(keys, paths, options) {\n return __awaiter(this, void 0, void 0, function* () {\n const httpClient = createHttpClient();\n const version = getCacheVersion(paths, options === null || options === void 0 ? void 0 : options.compressionMethod, options === null || options === void 0 ? void 0 : options.enableCrossOsArchive);\n const resource = `cache?keys=${encodeURIComponent(keys.join(','))}&version=${version}`;\n const response = yield requestUtils_1.retryTypedResponse('getCacheEntry', () => __awaiter(this, void 0, void 0, function* () { return httpClient.getJson(getCacheApiUrl(resource)); }));\n // Cache not found\n if (response.statusCode === 204) {\n // List cache for primary key only if cache miss occurs\n if (core.isDebug()) {\n yield printCachesListForDiagnostics(keys[0], httpClient, version);\n }\n return null;\n }\n if (!requestUtils_1.isSuccessStatusCode(response.statusCode)) {\n throw new Error(`Cache service responded with ${response.statusCode}`);\n }\n const cacheResult = response.result;\n const cacheDownloadUrl = cacheResult === null || cacheResult === void 0 ? void 0 : cacheResult.archiveLocation;\n if (!cacheDownloadUrl) {\n // Cache achiveLocation not found. This should never happen, and hence bail out.\n throw new Error('Cache not found.');\n }\n core.setSecret(cacheDownloadUrl);\n core.debug(`Cache Result:`);\n core.debug(JSON.stringify(cacheResult));\n return cacheResult;\n });\n}\nexports.getCacheEntry = getCacheEntry;\nfunction printCachesListForDiagnostics(key, httpClient, version) {\n return __awaiter(this, void 0, void 0, function* () {\n const resource = `caches?key=${encodeURIComponent(key)}`;\n const response = yield requestUtils_1.retryTypedResponse('listCache', () => __awaiter(this, void 0, void 0, function* () { return httpClient.getJson(getCacheApiUrl(resource)); }));\n if (response.statusCode === 200) {\n const cacheListResult = response.result;\n const totalCount = cacheListResult === null || cacheListResult === void 0 ? void 0 : cacheListResult.totalCount;\n if (totalCount && totalCount > 0) {\n core.debug(`No matching cache found for cache key '${key}', version '${version} and scope ${process.env['GITHUB_REF']}. There exist one or more cache(s) with similar key but they have different version or scope. See more info on cache matching here: https://docs.github.com/en/actions/using-workflows/caching-dependencies-to-speed-up-workflows#matching-a-cache-key \\nOther caches with similar key:`);\n for (const cacheEntry of (cacheListResult === null || cacheListResult === void 0 ? void 0 : cacheListResult.artifactCaches) || []) {\n core.debug(`Cache Key: ${cacheEntry === null || cacheEntry === void 0 ? void 0 : cacheEntry.cacheKey}, Cache Version: ${cacheEntry === null || cacheEntry === void 0 ? void 0 : cacheEntry.cacheVersion}, Cache Scope: ${cacheEntry === null || cacheEntry === void 0 ? void 0 : cacheEntry.scope}, Cache Created: ${cacheEntry === null || cacheEntry === void 0 ? void 0 : cacheEntry.creationTime}`);\n }\n }\n }\n });\n}\nfunction downloadCache(archiveLocation, archivePath, options) {\n return __awaiter(this, void 0, void 0, function* () {\n const archiveUrl = new url_1.URL(archiveLocation);\n const downloadOptions = options_1.getDownloadOptions(options);\n if (downloadOptions.useAzureSdk &&\n archiveUrl.hostname.endsWith('.blob.core.windows.net')) {\n // Use Azure storage SDK to download caches hosted on Azure to improve speed and reliability.\n yield downloadUtils_1.downloadCacheStorageSDK(archiveLocation, archivePath, downloadOptions);\n }\n else {\n // Otherwise, download using the Actions http-client.\n yield downloadUtils_1.downloadCacheHttpClient(archiveLocation, archivePath);\n }\n });\n}\nexports.downloadCache = downloadCache;\n// Reserve Cache\nfunction reserveCache(key, paths, options) {\n return __awaiter(this, void 0, void 0, function* () {\n const httpClient = createHttpClient();\n const version = getCacheVersion(paths, options === null || options === void 0 ? void 0 : options.compressionMethod, options === null || options === void 0 ? void 0 : options.enableCrossOsArchive);\n const reserveCacheRequest = {\n key,\n version,\n cacheSize: options === null || options === void 0 ? void 0 : options.cacheSize\n };\n const response = yield requestUtils_1.retryTypedResponse('reserveCache', () => __awaiter(this, void 0, void 0, function* () {\n return httpClient.postJson(getCacheApiUrl('caches'), reserveCacheRequest);\n }));\n return response;\n });\n}\nexports.reserveCache = reserveCache;\nfunction getContentRange(start, end) {\n // Format: `bytes start-end/filesize\n // start and end are inclusive\n // filesize can be *\n // For a 200 byte chunk starting at byte 0:\n // Content-Range: bytes 0-199/*\n return `bytes ${start}-${end}/*`;\n}\nfunction uploadChunk(httpClient, resourceUrl, openStream, start, end) {\n return __awaiter(this, void 0, void 0, function* () {\n core.debug(`Uploading chunk of size ${end -\n start +\n 1} bytes at offset ${start} with content range: ${getContentRange(start, end)}`);\n const additionalHeaders = {\n 'Content-Type': 'application/octet-stream',\n 'Content-Range': getContentRange(start, end)\n };\n const uploadChunkResponse = yield requestUtils_1.retryHttpClientResponse(`uploadChunk (start: ${start}, end: ${end})`, () => __awaiter(this, void 0, void 0, function* () {\n return httpClient.sendStream('PATCH', resourceUrl, openStream(), additionalHeaders);\n }));\n if (!requestUtils_1.isSuccessStatusCode(uploadChunkResponse.message.statusCode)) {\n throw new Error(`Cache service responded with ${uploadChunkResponse.message.statusCode} during upload chunk.`);\n }\n });\n}\nfunction uploadFile(httpClient, cacheId, archivePath, options) {\n return __awaiter(this, void 0, void 0, function* () {\n // Upload Chunks\n const fileSize = utils.getArchiveFileSizeInBytes(archivePath);\n const resourceUrl = getCacheApiUrl(`caches/${cacheId.toString()}`);\n const fd = fs.openSync(archivePath, 'r');\n const uploadOptions = options_1.getUploadOptions(options);\n const concurrency = utils.assertDefined('uploadConcurrency', uploadOptions.uploadConcurrency);\n const maxChunkSize = utils.assertDefined('uploadChunkSize', uploadOptions.uploadChunkSize);\n const parallelUploads = [...new Array(concurrency).keys()];\n core.debug('Awaiting all uploads');\n let offset = 0;\n try {\n yield Promise.all(parallelUploads.map(() => __awaiter(this, void 0, void 0, function* () {\n while (offset < fileSize) {\n const chunkSize = Math.min(fileSize - offset, maxChunkSize);\n const start = offset;\n const end = offset + chunkSize - 1;\n offset += maxChunkSize;\n yield uploadChunk(httpClient, resourceUrl, () => fs\n .createReadStream(archivePath, {\n fd,\n start,\n end,\n autoClose: false\n })\n .on('error', error => {\n throw new Error(`Cache upload failed because file read failed with ${error.message}`);\n }), start, end);\n }\n })));\n }\n finally {\n fs.closeSync(fd);\n }\n return;\n });\n}\nfunction commitCache(httpClient, cacheId, filesize) {\n return __awaiter(this, void 0, void 0, function* () {\n const commitCacheRequest = { size: filesize };\n return yield requestUtils_1.retryTypedResponse('commitCache', () => __awaiter(this, void 0, void 0, function* () {\n return httpClient.postJson(getCacheApiUrl(`caches/${cacheId.toString()}`), commitCacheRequest);\n }));\n });\n}\nfunction saveCache(cacheId, archivePath, options) {\n return __awaiter(this, void 0, void 0, function* () {\n const httpClient = createHttpClient();\n core.debug('Upload cache');\n yield uploadFile(httpClient, cacheId, archivePath, options);\n // Commit Cache\n core.debug('Commiting cache');\n const cacheSize = utils.getArchiveFileSizeInBytes(archivePath);\n core.info(`Cache Size: ~${Math.round(cacheSize / (1024 * 1024))} MB (${cacheSize} B)`);\n const commitCacheResponse = yield commitCache(httpClient, cacheId, cacheSize);\n if (!requestUtils_1.isSuccessStatusCode(commitCacheResponse.statusCode)) {\n throw new Error(`Cache service responded with ${commitCacheResponse.statusCode} during commit cache.`);\n }\n core.info('Cache saved successfully');\n });\n}\nexports.saveCache = saveCache;\n//# sourceMappingURL=cacheHttpClient.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __asyncValues = (this && this.__asyncValues) || function (o) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var m = o[Symbol.asyncIterator], i;\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\n};\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\n result[\"default\"] = mod;\n return result;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst core = __importStar(require(\"@actions/core\"));\nconst exec = __importStar(require(\"@actions/exec\"));\nconst glob = __importStar(require(\"@actions/glob\"));\nconst io = __importStar(require(\"@actions/io\"));\nconst fs = __importStar(require(\"fs\"));\nconst path = __importStar(require(\"path\"));\nconst semver = __importStar(require(\"semver\"));\nconst util = __importStar(require(\"util\"));\nconst uuid_1 = require(\"uuid\");\nconst constants_1 = require(\"./constants\");\n// From https://github.com/actions/toolkit/blob/main/packages/tool-cache/src/tool-cache.ts#L23\nfunction createTempDirectory() {\n return __awaiter(this, void 0, void 0, function* () {\n const IS_WINDOWS = process.platform === 'win32';\n let tempDirectory = process.env['RUNNER_TEMP'] || '';\n if (!tempDirectory) {\n let baseLocation;\n if (IS_WINDOWS) {\n // On Windows use the USERPROFILE env variable\n baseLocation = process.env['USERPROFILE'] || 'C:\\\\';\n }\n else {\n if (process.platform === 'darwin') {\n baseLocation = '/Users';\n }\n else {\n baseLocation = '/home';\n }\n }\n tempDirectory = path.join(baseLocation, 'actions', 'temp');\n }\n const dest = path.join(tempDirectory, uuid_1.v4());\n yield io.mkdirP(dest);\n return dest;\n });\n}\nexports.createTempDirectory = createTempDirectory;\nfunction getArchiveFileSizeInBytes(filePath) {\n return fs.statSync(filePath).size;\n}\nexports.getArchiveFileSizeInBytes = getArchiveFileSizeInBytes;\nfunction resolvePaths(patterns) {\n var e_1, _a;\n var _b;\n return __awaiter(this, void 0, void 0, function* () {\n const paths = [];\n const workspace = (_b = process.env['GITHUB_WORKSPACE']) !== null && _b !== void 0 ? _b : process.cwd();\n const globber = yield glob.create(patterns.join('\\n'), {\n implicitDescendants: false\n });\n try {\n for (var _c = __asyncValues(globber.globGenerator()), _d; _d = yield _c.next(), !_d.done;) {\n const file = _d.value;\n const relativeFile = path\n .relative(workspace, file)\n .replace(new RegExp(`\\\\${path.sep}`, 'g'), '/');\n core.debug(`Matched: ${relativeFile}`);\n // Paths are made relative so the tar entries are all relative to the root of the workspace.\n if (relativeFile === '') {\n // path.relative returns empty string if workspace and file are equal\n paths.push('.');\n }\n else {\n paths.push(`${relativeFile}`);\n }\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (_d && !_d.done && (_a = _c.return)) yield _a.call(_c);\n }\n finally { if (e_1) throw e_1.error; }\n }\n return paths;\n });\n}\nexports.resolvePaths = resolvePaths;\nfunction unlinkFile(filePath) {\n return __awaiter(this, void 0, void 0, function* () {\n return util.promisify(fs.unlink)(filePath);\n });\n}\nexports.unlinkFile = unlinkFile;\nfunction getVersion(app) {\n return __awaiter(this, void 0, void 0, function* () {\n core.debug(`Checking ${app} --version`);\n let versionOutput = '';\n try {\n yield exec.exec(`${app} --version`, [], {\n ignoreReturnCode: true,\n silent: true,\n listeners: {\n stdout: (data) => (versionOutput += data.toString()),\n stderr: (data) => (versionOutput += data.toString())\n }\n });\n }\n catch (err) {\n core.debug(err.message);\n }\n versionOutput = versionOutput.trim();\n core.debug(versionOutput);\n return versionOutput;\n });\n}\n// Use zstandard if possible to maximize cache performance\nfunction getCompressionMethod() {\n return __awaiter(this, void 0, void 0, function* () {\n const versionOutput = yield getVersion('zstd');\n const version = semver.clean(versionOutput);\n if (!versionOutput.toLowerCase().includes('zstd command line interface')) {\n // zstd is not installed\n return constants_1.CompressionMethod.Gzip;\n }\n else if (!version || semver.lt(version, 'v1.3.2')) {\n // zstd is installed but using a version earlier than v1.3.2\n // v1.3.2 is required to use the `--long` options in zstd\n return constants_1.CompressionMethod.ZstdWithoutLong;\n }\n else {\n return constants_1.CompressionMethod.Zstd;\n }\n });\n}\nexports.getCompressionMethod = getCompressionMethod;\nfunction getCacheFileName(compressionMethod) {\n return compressionMethod === constants_1.CompressionMethod.Gzip\n ? constants_1.CacheFilename.Gzip\n : constants_1.CacheFilename.Zstd;\n}\nexports.getCacheFileName = getCacheFileName;\nfunction getGnuTarPathOnWindows() {\n return __awaiter(this, void 0, void 0, function* () {\n if (fs.existsSync(constants_1.GnuTarPathOnWindows)) {\n return constants_1.GnuTarPathOnWindows;\n }\n const versionOutput = yield getVersion('tar');\n return versionOutput.toLowerCase().includes('gnu tar') ? io.which('tar') : '';\n });\n}\nexports.getGnuTarPathOnWindows = getGnuTarPathOnWindows;\nfunction assertDefined(name, value) {\n if (value === undefined) {\n throw Error(`Expected ${name} but value was undefiend`);\n }\n return value;\n}\nexports.assertDefined = assertDefined;\nfunction isGhes() {\n const ghUrl = new URL(process.env['GITHUB_SERVER_URL'] || 'https://github.com');\n return ghUrl.hostname.toUpperCase() !== 'GITHUB.COM';\n}\nexports.isGhes = isGhes;\n//# sourceMappingURL=cacheUtils.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar CacheFilename;\n(function (CacheFilename) {\n CacheFilename[\"Gzip\"] = \"cache.tgz\";\n CacheFilename[\"Zstd\"] = \"cache.tzst\";\n})(CacheFilename = exports.CacheFilename || (exports.CacheFilename = {}));\nvar CompressionMethod;\n(function (CompressionMethod) {\n CompressionMethod[\"Gzip\"] = \"gzip\";\n // Long range mode was added to zstd in v1.3.2.\n // This enum is for earlier version of zstd that does not have --long support\n CompressionMethod[\"ZstdWithoutLong\"] = \"zstd-without-long\";\n CompressionMethod[\"Zstd\"] = \"zstd\";\n})(CompressionMethod = exports.CompressionMethod || (exports.CompressionMethod = {}));\nvar ArchiveToolType;\n(function (ArchiveToolType) {\n ArchiveToolType[\"GNU\"] = \"gnu\";\n ArchiveToolType[\"BSD\"] = \"bsd\";\n})(ArchiveToolType = exports.ArchiveToolType || (exports.ArchiveToolType = {}));\n// The default number of retry attempts.\nexports.DefaultRetryAttempts = 2;\n// The default delay in milliseconds between retry attempts.\nexports.DefaultRetryDelay = 5000;\n// Socket timeout in milliseconds during download. If no traffic is received\n// over the socket during this period, the socket is destroyed and the download\n// is aborted.\nexports.SocketTimeout = 5000;\n// The default path of GNUtar on hosted Windows runners\nexports.GnuTarPathOnWindows = `${process.env['PROGRAMFILES']}\\\\Git\\\\usr\\\\bin\\\\tar.exe`;\n// The default path of BSDtar on hosted Windows runners\nexports.SystemTarPathOnWindows = `${process.env['SYSTEMDRIVE']}\\\\Windows\\\\System32\\\\tar.exe`;\nexports.TarFilename = 'cache.tar';\nexports.ManifestFilename = 'manifest.txt';\n//# sourceMappingURL=constants.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\n result[\"default\"] = mod;\n return result;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst core = __importStar(require(\"@actions/core\"));\nconst http_client_1 = require(\"@actions/http-client\");\nconst storage_blob_1 = require(\"@azure/storage-blob\");\nconst buffer = __importStar(require(\"buffer\"));\nconst fs = __importStar(require(\"fs\"));\nconst stream = __importStar(require(\"stream\"));\nconst util = __importStar(require(\"util\"));\nconst utils = __importStar(require(\"./cacheUtils\"));\nconst constants_1 = require(\"./constants\");\nconst requestUtils_1 = require(\"./requestUtils\");\nconst abort_controller_1 = require(\"@azure/abort-controller\");\n/**\n * Pipes the body of a HTTP response to a stream\n *\n * @param response the HTTP response\n * @param output the writable stream\n */\nfunction pipeResponseToStream(response, output) {\n return __awaiter(this, void 0, void 0, function* () {\n const pipeline = util.promisify(stream.pipeline);\n yield pipeline(response.message, output);\n });\n}\n/**\n * Class for tracking the download state and displaying stats.\n */\nclass DownloadProgress {\n constructor(contentLength) {\n this.contentLength = contentLength;\n this.segmentIndex = 0;\n this.segmentSize = 0;\n this.segmentOffset = 0;\n this.receivedBytes = 0;\n this.displayedComplete = false;\n this.startTime = Date.now();\n }\n /**\n * Progress to the next segment. Only call this method when the previous segment\n * is complete.\n *\n * @param segmentSize the length of the next segment\n */\n nextSegment(segmentSize) {\n this.segmentOffset = this.segmentOffset + this.segmentSize;\n this.segmentIndex = this.segmentIndex + 1;\n this.segmentSize = segmentSize;\n this.receivedBytes = 0;\n core.debug(`Downloading segment at offset ${this.segmentOffset} with length ${this.segmentSize}...`);\n }\n /**\n * Sets the number of bytes received for the current segment.\n *\n * @param receivedBytes the number of bytes received\n */\n setReceivedBytes(receivedBytes) {\n this.receivedBytes = receivedBytes;\n }\n /**\n * Returns the total number of bytes transferred.\n */\n getTransferredBytes() {\n return this.segmentOffset + this.receivedBytes;\n }\n /**\n * Returns true if the download is complete.\n */\n isDone() {\n return this.getTransferredBytes() === this.contentLength;\n }\n /**\n * Prints the current download stats. Once the download completes, this will print one\n * last line and then stop.\n */\n display() {\n if (this.displayedComplete) {\n return;\n }\n const transferredBytes = this.segmentOffset + this.receivedBytes;\n const percentage = (100 * (transferredBytes / this.contentLength)).toFixed(1);\n const elapsedTime = Date.now() - this.startTime;\n const downloadSpeed = (transferredBytes /\n (1024 * 1024) /\n (elapsedTime / 1000)).toFixed(1);\n core.info(`Received ${transferredBytes} of ${this.contentLength} (${percentage}%), ${downloadSpeed} MBs/sec`);\n if (this.isDone()) {\n this.displayedComplete = true;\n }\n }\n /**\n * Returns a function used to handle TransferProgressEvents.\n */\n onProgress() {\n return (progress) => {\n this.setReceivedBytes(progress.loadedBytes);\n };\n }\n /**\n * Starts the timer that displays the stats.\n *\n * @param delayInMs the delay between each write\n */\n startDisplayTimer(delayInMs = 1000) {\n const displayCallback = () => {\n this.display();\n if (!this.isDone()) {\n this.timeoutHandle = setTimeout(displayCallback, delayInMs);\n }\n };\n this.timeoutHandle = setTimeout(displayCallback, delayInMs);\n }\n /**\n * Stops the timer that displays the stats. As this typically indicates the download\n * is complete, this will display one last line, unless the last line has already\n * been written.\n */\n stopDisplayTimer() {\n if (this.timeoutHandle) {\n clearTimeout(this.timeoutHandle);\n this.timeoutHandle = undefined;\n }\n this.display();\n }\n}\nexports.DownloadProgress = DownloadProgress;\n/**\n * Download the cache using the Actions toolkit http-client\n *\n * @param archiveLocation the URL for the cache\n * @param archivePath the local path where the cache is saved\n */\nfunction downloadCacheHttpClient(archiveLocation, archivePath) {\n return __awaiter(this, void 0, void 0, function* () {\n const writeStream = fs.createWriteStream(archivePath);\n const httpClient = new http_client_1.HttpClient('actions/cache');\n const downloadResponse = yield requestUtils_1.retryHttpClientResponse('downloadCache', () => __awaiter(this, void 0, void 0, function* () { return httpClient.get(archiveLocation); }));\n // Abort download if no traffic received over the socket.\n downloadResponse.message.socket.setTimeout(constants_1.SocketTimeout, () => {\n downloadResponse.message.destroy();\n core.debug(`Aborting download, socket timed out after ${constants_1.SocketTimeout} ms`);\n });\n yield pipeResponseToStream(downloadResponse, writeStream);\n // Validate download size.\n const contentLengthHeader = downloadResponse.message.headers['content-length'];\n if (contentLengthHeader) {\n const expectedLength = parseInt(contentLengthHeader);\n const actualLength = utils.getArchiveFileSizeInBytes(archivePath);\n if (actualLength !== expectedLength) {\n throw new Error(`Incomplete download. Expected file size: ${expectedLength}, actual file size: ${actualLength}`);\n }\n }\n else {\n core.debug('Unable to validate download, no Content-Length header');\n }\n });\n}\nexports.downloadCacheHttpClient = downloadCacheHttpClient;\n/**\n * Download the cache using the Azure Storage SDK. Only call this method if the\n * URL points to an Azure Storage endpoint.\n *\n * @param archiveLocation the URL for the cache\n * @param archivePath the local path where the cache is saved\n * @param options the download options with the defaults set\n */\nfunction downloadCacheStorageSDK(archiveLocation, archivePath, options) {\n var _a;\n return __awaiter(this, void 0, void 0, function* () {\n const client = new storage_blob_1.BlockBlobClient(archiveLocation, undefined, {\n retryOptions: {\n // Override the timeout used when downloading each 4 MB chunk\n // The default is 2 min / MB, which is way too slow\n tryTimeoutInMs: options.timeoutInMs\n }\n });\n const properties = yield client.getProperties();\n const contentLength = (_a = properties.contentLength) !== null && _a !== void 0 ? _a : -1;\n if (contentLength < 0) {\n // We should never hit this condition, but just in case fall back to downloading the\n // file as one large stream\n core.debug('Unable to determine content length, downloading file with http-client...');\n yield downloadCacheHttpClient(archiveLocation, archivePath);\n }\n else {\n // Use downloadToBuffer for faster downloads, since internally it splits the\n // file into 4 MB chunks which can then be parallelized and retried independently\n //\n // If the file exceeds the buffer maximum length (~1 GB on 32-bit systems and ~2 GB\n // on 64-bit systems), split the download into multiple segments\n // ~2 GB = 2147483647, beyond this, we start getting out of range error. So, capping it accordingly.\n const maxSegmentSize = Math.min(2147483647, buffer.constants.MAX_LENGTH);\n const downloadProgress = new DownloadProgress(contentLength);\n const fd = fs.openSync(archivePath, 'w');\n try {\n downloadProgress.startDisplayTimer();\n const controller = new abort_controller_1.AbortController();\n const abortSignal = controller.signal;\n while (!downloadProgress.isDone()) {\n const segmentStart = downloadProgress.segmentOffset + downloadProgress.segmentSize;\n const segmentSize = Math.min(maxSegmentSize, contentLength - segmentStart);\n downloadProgress.nextSegment(segmentSize);\n const result = yield promiseWithTimeout(options.segmentTimeoutInMs || 3600000, client.downloadToBuffer(segmentStart, segmentSize, {\n abortSignal,\n concurrency: options.downloadConcurrency,\n onProgress: downloadProgress.onProgress()\n }));\n if (result === 'timeout') {\n controller.abort();\n throw new Error('Aborting cache download as the download time exceeded the timeout.');\n }\n else if (Buffer.isBuffer(result)) {\n fs.writeFileSync(fd, result);\n }\n }\n }\n finally {\n downloadProgress.stopDisplayTimer();\n fs.closeSync(fd);\n }\n }\n });\n}\nexports.downloadCacheStorageSDK = downloadCacheStorageSDK;\nconst promiseWithTimeout = (timeoutMs, promise) => __awaiter(void 0, void 0, void 0, function* () {\n let timeoutHandle;\n const timeoutPromise = new Promise(resolve => {\n timeoutHandle = setTimeout(() => resolve('timeout'), timeoutMs);\n });\n return Promise.race([promise, timeoutPromise]).then(result => {\n clearTimeout(timeoutHandle);\n return result;\n });\n});\n//# sourceMappingURL=downloadUtils.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\n result[\"default\"] = mod;\n return result;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst core = __importStar(require(\"@actions/core\"));\nconst http_client_1 = require(\"@actions/http-client\");\nconst constants_1 = require(\"./constants\");\nfunction isSuccessStatusCode(statusCode) {\n if (!statusCode) {\n return false;\n }\n return statusCode >= 200 && statusCode < 300;\n}\nexports.isSuccessStatusCode = isSuccessStatusCode;\nfunction isServerErrorStatusCode(statusCode) {\n if (!statusCode) {\n return true;\n }\n return statusCode >= 500;\n}\nexports.isServerErrorStatusCode = isServerErrorStatusCode;\nfunction isRetryableStatusCode(statusCode) {\n if (!statusCode) {\n return false;\n }\n const retryableStatusCodes = [\n http_client_1.HttpCodes.BadGateway,\n http_client_1.HttpCodes.ServiceUnavailable,\n http_client_1.HttpCodes.GatewayTimeout\n ];\n return retryableStatusCodes.includes(statusCode);\n}\nexports.isRetryableStatusCode = isRetryableStatusCode;\nfunction sleep(milliseconds) {\n return __awaiter(this, void 0, void 0, function* () {\n return new Promise(resolve => setTimeout(resolve, milliseconds));\n });\n}\nfunction retry(name, method, getStatusCode, maxAttempts = constants_1.DefaultRetryAttempts, delay = constants_1.DefaultRetryDelay, onError = undefined) {\n return __awaiter(this, void 0, void 0, function* () {\n let errorMessage = '';\n let attempt = 1;\n while (attempt <= maxAttempts) {\n let response = undefined;\n let statusCode = undefined;\n let isRetryable = false;\n try {\n response = yield method();\n }\n catch (error) {\n if (onError) {\n response = onError(error);\n }\n isRetryable = true;\n errorMessage = error.message;\n }\n if (response) {\n statusCode = getStatusCode(response);\n if (!isServerErrorStatusCode(statusCode)) {\n return response;\n }\n }\n if (statusCode) {\n isRetryable = isRetryableStatusCode(statusCode);\n errorMessage = `Cache service responded with ${statusCode}`;\n }\n core.debug(`${name} - Attempt ${attempt} of ${maxAttempts} failed with error: ${errorMessage}`);\n if (!isRetryable) {\n core.debug(`${name} - Error is not retryable`);\n break;\n }\n yield sleep(delay);\n attempt++;\n }\n throw Error(`${name} failed: ${errorMessage}`);\n });\n}\nexports.retry = retry;\nfunction retryTypedResponse(name, method, maxAttempts = constants_1.DefaultRetryAttempts, delay = constants_1.DefaultRetryDelay) {\n return __awaiter(this, void 0, void 0, function* () {\n return yield retry(name, method, (response) => response.statusCode, maxAttempts, delay, \n // If the error object contains the statusCode property, extract it and return\n // an TypedResponse so it can be processed by the retry logic.\n (error) => {\n if (error instanceof http_client_1.HttpClientError) {\n return {\n statusCode: error.statusCode,\n result: null,\n headers: {},\n error\n };\n }\n else {\n return undefined;\n }\n });\n });\n}\nexports.retryTypedResponse = retryTypedResponse;\nfunction retryHttpClientResponse(name, method, maxAttempts = constants_1.DefaultRetryAttempts, delay = constants_1.DefaultRetryDelay) {\n return __awaiter(this, void 0, void 0, function* () {\n return yield retry(name, method, (response) => response.message.statusCode, maxAttempts, delay);\n });\n}\nexports.retryHttpClientResponse = retryHttpClientResponse;\n//# sourceMappingURL=requestUtils.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\n result[\"default\"] = mod;\n return result;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst exec_1 = require(\"@actions/exec\");\nconst io = __importStar(require(\"@actions/io\"));\nconst fs_1 = require(\"fs\");\nconst path = __importStar(require(\"path\"));\nconst utils = __importStar(require(\"./cacheUtils\"));\nconst constants_1 = require(\"./constants\");\nconst IS_WINDOWS = process.platform === 'win32';\n// Returns tar path and type: BSD or GNU\nfunction getTarPath() {\n return __awaiter(this, void 0, void 0, function* () {\n switch (process.platform) {\n case 'win32': {\n const gnuTar = yield utils.getGnuTarPathOnWindows();\n const systemTar = constants_1.SystemTarPathOnWindows;\n if (gnuTar) {\n // Use GNUtar as default on windows\n return { path: gnuTar, type: constants_1.ArchiveToolType.GNU };\n }\n else if (fs_1.existsSync(systemTar)) {\n return { path: systemTar, type: constants_1.ArchiveToolType.BSD };\n }\n break;\n }\n case 'darwin': {\n const gnuTar = yield io.which('gtar', false);\n if (gnuTar) {\n // fix permission denied errors when extracting BSD tar archive with GNU tar - https://github.com/actions/cache/issues/527\n return { path: gnuTar, type: constants_1.ArchiveToolType.GNU };\n }\n else {\n return {\n path: yield io.which('tar', true),\n type: constants_1.ArchiveToolType.BSD\n };\n }\n }\n default:\n break;\n }\n // Default assumption is GNU tar is present in path\n return {\n path: yield io.which('tar', true),\n type: constants_1.ArchiveToolType.GNU\n };\n });\n}\n// Return arguments for tar as per tarPath, compressionMethod, method type and os\nfunction getTarArgs(tarPath, compressionMethod, type, archivePath = '') {\n return __awaiter(this, void 0, void 0, function* () {\n const args = [`\"${tarPath.path}\"`];\n const cacheFileName = utils.getCacheFileName(compressionMethod);\n const tarFile = 'cache.tar';\n const workingDirectory = getWorkingDirectory();\n // Speficic args for BSD tar on windows for workaround\n const BSD_TAR_ZSTD = tarPath.type === constants_1.ArchiveToolType.BSD &&\n compressionMethod !== constants_1.CompressionMethod.Gzip &&\n IS_WINDOWS;\n // Method specific args\n switch (type) {\n case 'create':\n args.push('--posix', '-cf', BSD_TAR_ZSTD\n ? tarFile\n : cacheFileName.replace(new RegExp(`\\\\${path.sep}`, 'g'), '/'), '--exclude', BSD_TAR_ZSTD\n ? tarFile\n : cacheFileName.replace(new RegExp(`\\\\${path.sep}`, 'g'), '/'), '-P', '-C', workingDirectory.replace(new RegExp(`\\\\${path.sep}`, 'g'), '/'), '--files-from', constants_1.ManifestFilename);\n break;\n case 'extract':\n args.push('-xf', BSD_TAR_ZSTD\n ? tarFile\n : archivePath.replace(new RegExp(`\\\\${path.sep}`, 'g'), '/'), '-P', '-C', workingDirectory.replace(new RegExp(`\\\\${path.sep}`, 'g'), '/'));\n break;\n case 'list':\n args.push('-tf', BSD_TAR_ZSTD\n ? tarFile\n : archivePath.replace(new RegExp(`\\\\${path.sep}`, 'g'), '/'), '-P');\n break;\n }\n // Platform specific args\n if (tarPath.type === constants_1.ArchiveToolType.GNU) {\n switch (process.platform) {\n case 'win32':\n args.push('--force-local');\n break;\n case 'darwin':\n args.push('--delay-directory-restore');\n break;\n }\n }\n return args;\n });\n}\n// Returns commands to run tar and compression program\nfunction getCommands(compressionMethod, type, archivePath = '') {\n return __awaiter(this, void 0, void 0, function* () {\n let args;\n const tarPath = yield getTarPath();\n const tarArgs = yield getTarArgs(tarPath, compressionMethod, type, archivePath);\n const compressionArgs = type !== 'create'\n ? yield getDecompressionProgram(tarPath, compressionMethod, archivePath)\n : yield getCompressionProgram(tarPath, compressionMethod);\n const BSD_TAR_ZSTD = tarPath.type === constants_1.ArchiveToolType.BSD &&\n compressionMethod !== constants_1.CompressionMethod.Gzip &&\n IS_WINDOWS;\n if (BSD_TAR_ZSTD && type !== 'create') {\n args = [[...compressionArgs].join(' '), [...tarArgs].join(' ')];\n }\n else {\n args = [[...tarArgs].join(' '), [...compressionArgs].join(' ')];\n }\n if (BSD_TAR_ZSTD) {\n return args;\n }\n return [args.join(' ')];\n });\n}\nfunction getWorkingDirectory() {\n var _a;\n return (_a = process.env['GITHUB_WORKSPACE']) !== null && _a !== void 0 ? _a : process.cwd();\n}\n// Common function for extractTar and listTar to get the compression method\nfunction getDecompressionProgram(tarPath, compressionMethod, archivePath) {\n return __awaiter(this, void 0, void 0, function* () {\n // -d: Decompress.\n // unzstd is equivalent to 'zstd -d'\n // --long=#: Enables long distance matching with # bits. Maximum is 30 (1GB) on 32-bit OS and 31 (2GB) on 64-bit.\n // Using 30 here because we also support 32-bit self-hosted runners.\n const BSD_TAR_ZSTD = tarPath.type === constants_1.ArchiveToolType.BSD &&\n compressionMethod !== constants_1.CompressionMethod.Gzip &&\n IS_WINDOWS;\n switch (compressionMethod) {\n case constants_1.CompressionMethod.Zstd:\n return BSD_TAR_ZSTD\n ? [\n 'zstd -d --long=30 --force -o',\n constants_1.TarFilename,\n archivePath.replace(new RegExp(`\\\\${path.sep}`, 'g'), '/')\n ]\n : [\n '--use-compress-program',\n IS_WINDOWS ? '\"zstd -d --long=30\"' : 'unzstd --long=30'\n ];\n case constants_1.CompressionMethod.ZstdWithoutLong:\n return BSD_TAR_ZSTD\n ? [\n 'zstd -d --force -o',\n constants_1.TarFilename,\n archivePath.replace(new RegExp(`\\\\${path.sep}`, 'g'), '/')\n ]\n : ['--use-compress-program', IS_WINDOWS ? '\"zstd -d\"' : 'unzstd'];\n default:\n return ['-z'];\n }\n });\n}\n// Used for creating the archive\n// -T#: Compress using # working thread. If # is 0, attempt to detect and use the number of physical CPU cores.\n// zstdmt is equivalent to 'zstd -T0'\n// --long=#: Enables long distance matching with # bits. Maximum is 30 (1GB) on 32-bit OS and 31 (2GB) on 64-bit.\n// Using 30 here because we also support 32-bit self-hosted runners.\n// Long range mode is added to zstd in v1.3.2 release, so we will not use --long in older version of zstd.\nfunction getCompressionProgram(tarPath, compressionMethod) {\n return __awaiter(this, void 0, void 0, function* () {\n const cacheFileName = utils.getCacheFileName(compressionMethod);\n const BSD_TAR_ZSTD = tarPath.type === constants_1.ArchiveToolType.BSD &&\n compressionMethod !== constants_1.CompressionMethod.Gzip &&\n IS_WINDOWS;\n switch (compressionMethod) {\n case constants_1.CompressionMethod.Zstd:\n return BSD_TAR_ZSTD\n ? [\n 'zstd -T0 --long=30 --force -o',\n cacheFileName.replace(new RegExp(`\\\\${path.sep}`, 'g'), '/'),\n constants_1.TarFilename\n ]\n : [\n '--use-compress-program',\n IS_WINDOWS ? '\"zstd -T0 --long=30\"' : 'zstdmt --long=30'\n ];\n case constants_1.CompressionMethod.ZstdWithoutLong:\n return BSD_TAR_ZSTD\n ? [\n 'zstd -T0 --force -o',\n cacheFileName.replace(new RegExp(`\\\\${path.sep}`, 'g'), '/'),\n constants_1.TarFilename\n ]\n : ['--use-compress-program', IS_WINDOWS ? '\"zstd -T0\"' : 'zstdmt'];\n default:\n return ['-z'];\n }\n });\n}\n// Executes all commands as separate processes\nfunction execCommands(commands, cwd) {\n return __awaiter(this, void 0, void 0, function* () {\n for (const command of commands) {\n try {\n yield exec_1.exec(command, undefined, {\n cwd,\n env: Object.assign(Object.assign({}, process.env), { MSYS: 'winsymlinks:nativestrict' })\n });\n }\n catch (error) {\n throw new Error(`${command.split(' ')[0]} failed with error: ${error === null || error === void 0 ? void 0 : error.message}`);\n }\n }\n });\n}\n// List the contents of a tar\nfunction listTar(archivePath, compressionMethod) {\n return __awaiter(this, void 0, void 0, function* () {\n const commands = yield getCommands(compressionMethod, 'list', archivePath);\n yield execCommands(commands);\n });\n}\nexports.listTar = listTar;\n// Extract a tar\nfunction extractTar(archivePath, compressionMethod) {\n return __awaiter(this, void 0, void 0, function* () {\n // Create directory to extract tar into\n const workingDirectory = getWorkingDirectory();\n yield io.mkdirP(workingDirectory);\n const commands = yield getCommands(compressionMethod, 'extract', archivePath);\n yield execCommands(commands);\n });\n}\nexports.extractTar = extractTar;\n// Create a tar\nfunction createTar(archiveFolder, sourceDirectories, compressionMethod) {\n return __awaiter(this, void 0, void 0, function* () {\n // Write source directories to manifest.txt to avoid command length limits\n fs_1.writeFileSync(path.join(archiveFolder, constants_1.ManifestFilename), sourceDirectories.join('\\n'));\n const commands = yield getCommands(compressionMethod, 'create');\n yield execCommands(commands, archiveFolder);\n });\n}\nexports.createTar = createTar;\n//# sourceMappingURL=tar.js.map","\"use strict\";\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\n result[\"default\"] = mod;\n return result;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst core = __importStar(require(\"@actions/core\"));\n/**\n * Returns a copy of the upload options with defaults filled in.\n *\n * @param copy the original upload options\n */\nfunction getUploadOptions(copy) {\n const result = {\n uploadConcurrency: 4,\n uploadChunkSize: 32 * 1024 * 1024\n };\n if (copy) {\n if (typeof copy.uploadConcurrency === 'number') {\n result.uploadConcurrency = copy.uploadConcurrency;\n }\n if (typeof copy.uploadChunkSize === 'number') {\n result.uploadChunkSize = copy.uploadChunkSize;\n }\n }\n core.debug(`Upload concurrency: ${result.uploadConcurrency}`);\n core.debug(`Upload chunk size: ${result.uploadChunkSize}`);\n return result;\n}\nexports.getUploadOptions = getUploadOptions;\n/**\n * Returns a copy of the download options with defaults filled in.\n *\n * @param copy the original download options\n */\nfunction getDownloadOptions(copy) {\n const result = {\n useAzureSdk: true,\n downloadConcurrency: 8,\n timeoutInMs: 30000,\n segmentTimeoutInMs: 3600000\n };\n if (copy) {\n if (typeof copy.useAzureSdk === 'boolean') {\n result.useAzureSdk = copy.useAzureSdk;\n }\n if (typeof copy.downloadConcurrency === 'number') {\n result.downloadConcurrency = copy.downloadConcurrency;\n }\n if (typeof copy.timeoutInMs === 'number') {\n result.timeoutInMs = copy.timeoutInMs;\n }\n if (typeof copy.segmentTimeoutInMs === 'number') {\n result.segmentTimeoutInMs = copy.segmentTimeoutInMs;\n }\n }\n const segmentDownloadTimeoutMins = process.env['SEGMENT_DOWNLOAD_TIMEOUT_MINS'];\n if (segmentDownloadTimeoutMins &&\n !isNaN(Number(segmentDownloadTimeoutMins)) &&\n isFinite(Number(segmentDownloadTimeoutMins))) {\n result.segmentTimeoutInMs = Number(segmentDownloadTimeoutMins) * 60 * 1000;\n }\n core.debug(`Use Azure SDK: ${result.useAzureSdk}`);\n core.debug(`Download concurrency: ${result.downloadConcurrency}`);\n core.debug(`Request timeout (ms): ${result.timeoutInMs}`);\n core.debug(`Cache segment download timeout mins env var: ${process.env['SEGMENT_DOWNLOAD_TIMEOUT_MINS']}`);\n core.debug(`Segment download timeout (ms): ${result.segmentTimeoutInMs}`);\n return result;\n}\nexports.getDownloadOptions = getDownloadOptions;\n//# sourceMappingURL=options.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getExecOutput = exports.exec = void 0;\nconst string_decoder_1 = require(\"string_decoder\");\nconst tr = __importStar(require(\"./toolrunner\"));\n/**\n * Exec a command.\n * Output will be streamed to the live console.\n * Returns promise with return code\n *\n * @param commandLine command to execute (can include additional args). Must be correctly escaped.\n * @param args optional arguments for tool. Escaping is handled by the lib.\n * @param options optional exec options. See ExecOptions\n * @returns Promise exit code\n */\nfunction exec(commandLine, args, options) {\n return __awaiter(this, void 0, void 0, function* () {\n const commandArgs = tr.argStringToArray(commandLine);\n if (commandArgs.length === 0) {\n throw new Error(`Parameter 'commandLine' cannot be null or empty.`);\n }\n // Path to tool to execute should be first arg\n const toolPath = commandArgs[0];\n args = commandArgs.slice(1).concat(args || []);\n const runner = new tr.ToolRunner(toolPath, args, options);\n return runner.exec();\n });\n}\nexports.exec = exec;\n/**\n * Exec a command and get the output.\n * Output will be streamed to the live console.\n * Returns promise with the exit code and collected stdout and stderr\n *\n * @param commandLine command to execute (can include additional args). Must be correctly escaped.\n * @param args optional arguments for tool. Escaping is handled by the lib.\n * @param options optional exec options. See ExecOptions\n * @returns Promise exit code, stdout, and stderr\n */\nfunction getExecOutput(commandLine, args, options) {\n var _a, _b;\n return __awaiter(this, void 0, void 0, function* () {\n let stdout = '';\n let stderr = '';\n //Using string decoder covers the case where a mult-byte character is split\n const stdoutDecoder = new string_decoder_1.StringDecoder('utf8');\n const stderrDecoder = new string_decoder_1.StringDecoder('utf8');\n const originalStdoutListener = (_a = options === null || options === void 0 ? void 0 : options.listeners) === null || _a === void 0 ? void 0 : _a.stdout;\n const originalStdErrListener = (_b = options === null || options === void 0 ? void 0 : options.listeners) === null || _b === void 0 ? void 0 : _b.stderr;\n const stdErrListener = (data) => {\n stderr += stderrDecoder.write(data);\n if (originalStdErrListener) {\n originalStdErrListener(data);\n }\n };\n const stdOutListener = (data) => {\n stdout += stdoutDecoder.write(data);\n if (originalStdoutListener) {\n originalStdoutListener(data);\n }\n };\n const listeners = Object.assign(Object.assign({}, options === null || options === void 0 ? void 0 : options.listeners), { stdout: stdOutListener, stderr: stdErrListener });\n const exitCode = yield exec(commandLine, args, Object.assign(Object.assign({}, options), { listeners }));\n //flush any remaining characters\n stdout += stdoutDecoder.end();\n stderr += stderrDecoder.end();\n return {\n exitCode,\n stdout,\n stderr\n };\n });\n}\nexports.getExecOutput = getExecOutput;\n//# sourceMappingURL=exec.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.argStringToArray = exports.ToolRunner = void 0;\nconst os = __importStar(require(\"os\"));\nconst events = __importStar(require(\"events\"));\nconst child = __importStar(require(\"child_process\"));\nconst path = __importStar(require(\"path\"));\nconst io = __importStar(require(\"@actions/io\"));\nconst ioUtil = __importStar(require(\"@actions/io/lib/io-util\"));\nconst timers_1 = require(\"timers\");\n/* eslint-disable @typescript-eslint/unbound-method */\nconst IS_WINDOWS = process.platform === 'win32';\n/*\n * Class for running command line tools. Handles quoting and arg parsing in a platform agnostic way.\n */\nclass ToolRunner extends events.EventEmitter {\n constructor(toolPath, args, options) {\n super();\n if (!toolPath) {\n throw new Error(\"Parameter 'toolPath' cannot be null or empty.\");\n }\n this.toolPath = toolPath;\n this.args = args || [];\n this.options = options || {};\n }\n _debug(message) {\n if (this.options.listeners && this.options.listeners.debug) {\n this.options.listeners.debug(message);\n }\n }\n _getCommandString(options, noPrefix) {\n const toolPath = this._getSpawnFileName();\n const args = this._getSpawnArgs(options);\n let cmd = noPrefix ? '' : '[command]'; // omit prefix when piped to a second tool\n if (IS_WINDOWS) {\n // Windows + cmd file\n if (this._isCmdFile()) {\n cmd += toolPath;\n for (const a of args) {\n cmd += ` ${a}`;\n }\n }\n // Windows + verbatim\n else if (options.windowsVerbatimArguments) {\n cmd += `\"${toolPath}\"`;\n for (const a of args) {\n cmd += ` ${a}`;\n }\n }\n // Windows (regular)\n else {\n cmd += this._windowsQuoteCmdArg(toolPath);\n for (const a of args) {\n cmd += ` ${this._windowsQuoteCmdArg(a)}`;\n }\n }\n }\n else {\n // OSX/Linux - this can likely be improved with some form of quoting.\n // creating processes on Unix is fundamentally different than Windows.\n // on Unix, execvp() takes an arg array.\n cmd += toolPath;\n for (const a of args) {\n cmd += ` ${a}`;\n }\n }\n return cmd;\n }\n _processLineBuffer(data, strBuffer, onLine) {\n try {\n let s = strBuffer + data.toString();\n let n = s.indexOf(os.EOL);\n while (n > -1) {\n const line = s.substring(0, n);\n onLine(line);\n // the rest of the string ...\n s = s.substring(n + os.EOL.length);\n n = s.indexOf(os.EOL);\n }\n return s;\n }\n catch (err) {\n // streaming lines to console is best effort. Don't fail a build.\n this._debug(`error processing line. Failed with error ${err}`);\n return '';\n }\n }\n _getSpawnFileName() {\n if (IS_WINDOWS) {\n if (this._isCmdFile()) {\n return process.env['COMSPEC'] || 'cmd.exe';\n }\n }\n return this.toolPath;\n }\n _getSpawnArgs(options) {\n if (IS_WINDOWS) {\n if (this._isCmdFile()) {\n let argline = `/D /S /C \"${this._windowsQuoteCmdArg(this.toolPath)}`;\n for (const a of this.args) {\n argline += ' ';\n argline += options.windowsVerbatimArguments\n ? a\n : this._windowsQuoteCmdArg(a);\n }\n argline += '\"';\n return [argline];\n }\n }\n return this.args;\n }\n _endsWith(str, end) {\n return str.endsWith(end);\n }\n _isCmdFile() {\n const upperToolPath = this.toolPath.toUpperCase();\n return (this._endsWith(upperToolPath, '.CMD') ||\n this._endsWith(upperToolPath, '.BAT'));\n }\n _windowsQuoteCmdArg(arg) {\n // for .exe, apply the normal quoting rules that libuv applies\n if (!this._isCmdFile()) {\n return this._uvQuoteCmdArg(arg);\n }\n // otherwise apply quoting rules specific to the cmd.exe command line parser.\n // the libuv rules are generic and are not designed specifically for cmd.exe\n // command line parser.\n //\n // for a detailed description of the cmd.exe command line parser, refer to\n // http://stackoverflow.com/questions/4094699/how-does-the-windows-command-interpreter-cmd-exe-parse-scripts/7970912#7970912\n // need quotes for empty arg\n if (!arg) {\n return '\"\"';\n }\n // determine whether the arg needs to be quoted\n const cmdSpecialChars = [\n ' ',\n '\\t',\n '&',\n '(',\n ')',\n '[',\n ']',\n '{',\n '}',\n '^',\n '=',\n ';',\n '!',\n \"'\",\n '+',\n ',',\n '`',\n '~',\n '|',\n '<',\n '>',\n '\"'\n ];\n let needsQuotes = false;\n for (const char of arg) {\n if (cmdSpecialChars.some(x => x === char)) {\n needsQuotes = true;\n break;\n }\n }\n // short-circuit if quotes not needed\n if (!needsQuotes) {\n return arg;\n }\n // the following quoting rules are very similar to the rules that by libuv applies.\n //\n // 1) wrap the string in quotes\n //\n // 2) double-up quotes - i.e. \" => \"\"\n //\n // this is different from the libuv quoting rules. libuv replaces \" with \\\", which unfortunately\n // doesn't work well with a cmd.exe command line.\n //\n // note, replacing \" with \"\" also works well if the arg is passed to a downstream .NET console app.\n // for example, the command line:\n // foo.exe \"myarg:\"\"my val\"\"\"\n // is parsed by a .NET console app into an arg array:\n // [ \"myarg:\\\"my val\\\"\" ]\n // which is the same end result when applying libuv quoting rules. although the actual\n // command line from libuv quoting rules would look like:\n // foo.exe \"myarg:\\\"my val\\\"\"\n //\n // 3) double-up slashes that precede a quote,\n // e.g. hello \\world => \"hello \\world\"\n // hello\\\"world => \"hello\\\\\"\"world\"\n // hello\\\\\"world => \"hello\\\\\\\\\"\"world\"\n // hello world\\ => \"hello world\\\\\"\n //\n // technically this is not required for a cmd.exe command line, or the batch argument parser.\n // the reasons for including this as a .cmd quoting rule are:\n //\n // a) this is optimized for the scenario where the argument is passed from the .cmd file to an\n // external program. many programs (e.g. .NET console apps) rely on the slash-doubling rule.\n //\n // b) it's what we've been doing previously (by deferring to node default behavior) and we\n // haven't heard any complaints about that aspect.\n //\n // note, a weakness of the quoting rules chosen here, is that % is not escaped. in fact, % cannot be\n // escaped when used on the command line directly - even though within a .cmd file % can be escaped\n // by using %%.\n //\n // the saving grace is, on the command line, %var% is left as-is if var is not defined. this contrasts\n // the line parsing rules within a .cmd file, where if var is not defined it is replaced with nothing.\n //\n // one option that was explored was replacing % with ^% - i.e. %var% => ^%var^%. this hack would\n // often work, since it is unlikely that var^ would exist, and the ^ character is removed when the\n // variable is used. the problem, however, is that ^ is not removed when %* is used to pass the args\n // to an external program.\n //\n // an unexplored potential solution for the % escaping problem, is to create a wrapper .cmd file.\n // % can be escaped within a .cmd file.\n let reverse = '\"';\n let quoteHit = true;\n for (let i = arg.length; i > 0; i--) {\n // walk the string in reverse\n reverse += arg[i - 1];\n if (quoteHit && arg[i - 1] === '\\\\') {\n reverse += '\\\\'; // double the slash\n }\n else if (arg[i - 1] === '\"') {\n quoteHit = true;\n reverse += '\"'; // double the quote\n }\n else {\n quoteHit = false;\n }\n }\n reverse += '\"';\n return reverse\n .split('')\n .reverse()\n .join('');\n }\n _uvQuoteCmdArg(arg) {\n // Tool runner wraps child_process.spawn() and needs to apply the same quoting as\n // Node in certain cases where the undocumented spawn option windowsVerbatimArguments\n // is used.\n //\n // Since this function is a port of quote_cmd_arg from Node 4.x (technically, lib UV,\n // see https://github.com/nodejs/node/blob/v4.x/deps/uv/src/win/process.c for details),\n // pasting copyright notice from Node within this function:\n //\n // Copyright Joyent, Inc. and other Node contributors. All rights reserved.\n //\n // Permission is hereby granted, free of charge, to any person obtaining a copy\n // of this software and associated documentation files (the \"Software\"), to\n // deal in the Software without restriction, including without limitation the\n // rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n // sell copies of the Software, and to permit persons to whom the Software is\n // furnished to do so, subject to the following conditions:\n //\n // The above copyright notice and this permission notice shall be included in\n // all copies or substantial portions of the Software.\n //\n // THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n // IN THE SOFTWARE.\n if (!arg) {\n // Need double quotation for empty argument\n return '\"\"';\n }\n if (!arg.includes(' ') && !arg.includes('\\t') && !arg.includes('\"')) {\n // No quotation needed\n return arg;\n }\n if (!arg.includes('\"') && !arg.includes('\\\\')) {\n // No embedded double quotes or backslashes, so I can just wrap\n // quote marks around the whole thing.\n return `\"${arg}\"`;\n }\n // Expected input/output:\n // input : hello\"world\n // output: \"hello\\\"world\"\n // input : hello\"\"world\n // output: \"hello\\\"\\\"world\"\n // input : hello\\world\n // output: hello\\world\n // input : hello\\\\world\n // output: hello\\\\world\n // input : hello\\\"world\n // output: \"hello\\\\\\\"world\"\n // input : hello\\\\\"world\n // output: \"hello\\\\\\\\\\\"world\"\n // input : hello world\\\n // output: \"hello world\\\\\" - note the comment in libuv actually reads \"hello world\\\"\n // but it appears the comment is wrong, it should be \"hello world\\\\\"\n let reverse = '\"';\n let quoteHit = true;\n for (let i = arg.length; i > 0; i--) {\n // walk the string in reverse\n reverse += arg[i - 1];\n if (quoteHit && arg[i - 1] === '\\\\') {\n reverse += '\\\\';\n }\n else if (arg[i - 1] === '\"') {\n quoteHit = true;\n reverse += '\\\\';\n }\n else {\n quoteHit = false;\n }\n }\n reverse += '\"';\n return reverse\n .split('')\n .reverse()\n .join('');\n }\n _cloneExecOptions(options) {\n options = options || {};\n const result = {\n cwd: options.cwd || process.cwd(),\n env: options.env || process.env,\n silent: options.silent || false,\n windowsVerbatimArguments: options.windowsVerbatimArguments || false,\n failOnStdErr: options.failOnStdErr || false,\n ignoreReturnCode: options.ignoreReturnCode || false,\n delay: options.delay || 10000\n };\n result.outStream = options.outStream || process.stdout;\n result.errStream = options.errStream || process.stderr;\n return result;\n }\n _getSpawnOptions(options, toolPath) {\n options = options || {};\n const result = {};\n result.cwd = options.cwd;\n result.env = options.env;\n result['windowsVerbatimArguments'] =\n options.windowsVerbatimArguments || this._isCmdFile();\n if (options.windowsVerbatimArguments) {\n result.argv0 = `\"${toolPath}\"`;\n }\n return result;\n }\n /**\n * Exec a tool.\n * Output will be streamed to the live console.\n * Returns promise with return code\n *\n * @param tool path to tool to exec\n * @param options optional exec options. See ExecOptions\n * @returns number\n */\n exec() {\n return __awaiter(this, void 0, void 0, function* () {\n // root the tool path if it is unrooted and contains relative pathing\n if (!ioUtil.isRooted(this.toolPath) &&\n (this.toolPath.includes('/') ||\n (IS_WINDOWS && this.toolPath.includes('\\\\')))) {\n // prefer options.cwd if it is specified, however options.cwd may also need to be rooted\n this.toolPath = path.resolve(process.cwd(), this.options.cwd || process.cwd(), this.toolPath);\n }\n // if the tool is only a file name, then resolve it from the PATH\n // otherwise verify it exists (add extension on Windows if necessary)\n this.toolPath = yield io.which(this.toolPath, true);\n return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {\n this._debug(`exec tool: ${this.toolPath}`);\n this._debug('arguments:');\n for (const arg of this.args) {\n this._debug(` ${arg}`);\n }\n const optionsNonNull = this._cloneExecOptions(this.options);\n if (!optionsNonNull.silent && optionsNonNull.outStream) {\n optionsNonNull.outStream.write(this._getCommandString(optionsNonNull) + os.EOL);\n }\n const state = new ExecState(optionsNonNull, this.toolPath);\n state.on('debug', (message) => {\n this._debug(message);\n });\n if (this.options.cwd && !(yield ioUtil.exists(this.options.cwd))) {\n return reject(new Error(`The cwd: ${this.options.cwd} does not exist!`));\n }\n const fileName = this._getSpawnFileName();\n const cp = child.spawn(fileName, this._getSpawnArgs(optionsNonNull), this._getSpawnOptions(this.options, fileName));\n let stdbuffer = '';\n if (cp.stdout) {\n cp.stdout.on('data', (data) => {\n if (this.options.listeners && this.options.listeners.stdout) {\n this.options.listeners.stdout(data);\n }\n if (!optionsNonNull.silent && optionsNonNull.outStream) {\n optionsNonNull.outStream.write(data);\n }\n stdbuffer = this._processLineBuffer(data, stdbuffer, (line) => {\n if (this.options.listeners && this.options.listeners.stdline) {\n this.options.listeners.stdline(line);\n }\n });\n });\n }\n let errbuffer = '';\n if (cp.stderr) {\n cp.stderr.on('data', (data) => {\n state.processStderr = true;\n if (this.options.listeners && this.options.listeners.stderr) {\n this.options.listeners.stderr(data);\n }\n if (!optionsNonNull.silent &&\n optionsNonNull.errStream &&\n optionsNonNull.outStream) {\n const s = optionsNonNull.failOnStdErr\n ? optionsNonNull.errStream\n : optionsNonNull.outStream;\n s.write(data);\n }\n errbuffer = this._processLineBuffer(data, errbuffer, (line) => {\n if (this.options.listeners && this.options.listeners.errline) {\n this.options.listeners.errline(line);\n }\n });\n });\n }\n cp.on('error', (err) => {\n state.processError = err.message;\n state.processExited = true;\n state.processClosed = true;\n state.CheckComplete();\n });\n cp.on('exit', (code) => {\n state.processExitCode = code;\n state.processExited = true;\n this._debug(`Exit code ${code} received from tool '${this.toolPath}'`);\n state.CheckComplete();\n });\n cp.on('close', (code) => {\n state.processExitCode = code;\n state.processExited = true;\n state.processClosed = true;\n this._debug(`STDIO streams have closed for tool '${this.toolPath}'`);\n state.CheckComplete();\n });\n state.on('done', (error, exitCode) => {\n if (stdbuffer.length > 0) {\n this.emit('stdline', stdbuffer);\n }\n if (errbuffer.length > 0) {\n this.emit('errline', errbuffer);\n }\n cp.removeAllListeners();\n if (error) {\n reject(error);\n }\n else {\n resolve(exitCode);\n }\n });\n if (this.options.input) {\n if (!cp.stdin) {\n throw new Error('child process missing stdin');\n }\n cp.stdin.end(this.options.input);\n }\n }));\n });\n }\n}\nexports.ToolRunner = ToolRunner;\n/**\n * Convert an arg string to an array of args. Handles escaping\n *\n * @param argString string of arguments\n * @returns string[] array of arguments\n */\nfunction argStringToArray(argString) {\n const args = [];\n let inQuotes = false;\n let escaped = false;\n let arg = '';\n function append(c) {\n // we only escape double quotes.\n if (escaped && c !== '\"') {\n arg += '\\\\';\n }\n arg += c;\n escaped = false;\n }\n for (let i = 0; i < argString.length; i++) {\n const c = argString.charAt(i);\n if (c === '\"') {\n if (!escaped) {\n inQuotes = !inQuotes;\n }\n else {\n append(c);\n }\n continue;\n }\n if (c === '\\\\' && escaped) {\n append(c);\n continue;\n }\n if (c === '\\\\' && inQuotes) {\n escaped = true;\n continue;\n }\n if (c === ' ' && !inQuotes) {\n if (arg.length > 0) {\n args.push(arg);\n arg = '';\n }\n continue;\n }\n append(c);\n }\n if (arg.length > 0) {\n args.push(arg.trim());\n }\n return args;\n}\nexports.argStringToArray = argStringToArray;\nclass ExecState extends events.EventEmitter {\n constructor(options, toolPath) {\n super();\n this.processClosed = false; // tracks whether the process has exited and stdio is closed\n this.processError = '';\n this.processExitCode = 0;\n this.processExited = false; // tracks whether the process has exited\n this.processStderr = false; // tracks whether stderr was written to\n this.delay = 10000; // 10 seconds\n this.done = false;\n this.timeout = null;\n if (!toolPath) {\n throw new Error('toolPath must not be empty');\n }\n this.options = options;\n this.toolPath = toolPath;\n if (options.delay) {\n this.delay = options.delay;\n }\n }\n CheckComplete() {\n if (this.done) {\n return;\n }\n if (this.processClosed) {\n this._setResult();\n }\n else if (this.processExited) {\n this.timeout = timers_1.setTimeout(ExecState.HandleTimeout, this.delay, this);\n }\n }\n _debug(message) {\n this.emit('debug', message);\n }\n _setResult() {\n // determine whether there is an error\n let error;\n if (this.processExited) {\n if (this.processError) {\n 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}`);\n }\n else if (this.processExitCode !== 0 && !this.options.ignoreReturnCode) {\n error = new Error(`The process '${this.toolPath}' failed with exit code ${this.processExitCode}`);\n }\n else if (this.processStderr && this.options.failOnStdErr) {\n error = new Error(`The process '${this.toolPath}' failed because one or more lines were written to the STDERR stream`);\n }\n }\n // clear the timeout\n if (this.timeout) {\n clearTimeout(this.timeout);\n this.timeout = null;\n }\n this.done = true;\n this.emit('done', error, this.processExitCode);\n }\n static HandleTimeout(state) {\n if (state.done) {\n return;\n }\n if (!state.processClosed && state.processExited) {\n const message = `The STDIO streams did not close within ${state.delay /\n 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.`;\n state._debug(message);\n }\n state._setResult();\n }\n}\n//# sourceMappingURL=toolrunner.js.map","exports = module.exports = SemVer\n\nvar debug\n/* istanbul ignore next */\nif (typeof process === 'object' &&\n process.env &&\n process.env.NODE_DEBUG &&\n /\\bsemver\\b/i.test(process.env.NODE_DEBUG)) {\n debug = function () {\n var args = Array.prototype.slice.call(arguments, 0)\n args.unshift('SEMVER')\n console.log.apply(console, args)\n }\n} else {\n debug = function () {}\n}\n\n// Note: this is the semver.org version of the spec that it implements\n// Not necessarily the package version of this code.\nexports.SEMVER_SPEC_VERSION = '2.0.0'\n\nvar MAX_LENGTH = 256\nvar MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER ||\n /* istanbul ignore next */ 9007199254740991\n\n// Max safe segment length for coercion.\nvar MAX_SAFE_COMPONENT_LENGTH = 16\n\n// The actual regexps go on exports.re\nvar re = exports.re = []\nvar src = exports.src = []\nvar t = exports.tokens = {}\nvar R = 0\n\nfunction tok (n) {\n t[n] = R++\n}\n\n// The following Regular Expressions can be used for tokenizing,\n// validating, and parsing SemVer version strings.\n\n// ## Numeric Identifier\n// A single `0`, or a non-zero digit followed by zero or more digits.\n\ntok('NUMERICIDENTIFIER')\nsrc[t.NUMERICIDENTIFIER] = '0|[1-9]\\\\d*'\ntok('NUMERICIDENTIFIERLOOSE')\nsrc[t.NUMERICIDENTIFIERLOOSE] = '[0-9]+'\n\n// ## Non-numeric Identifier\n// Zero or more digits, followed by a letter or hyphen, and then zero or\n// more letters, digits, or hyphens.\n\ntok('NONNUMERICIDENTIFIER')\nsrc[t.NONNUMERICIDENTIFIER] = '\\\\d*[a-zA-Z-][a-zA-Z0-9-]*'\n\n// ## Main Version\n// Three dot-separated numeric identifiers.\n\ntok('MAINVERSION')\nsrc[t.MAINVERSION] = '(' + src[t.NUMERICIDENTIFIER] + ')\\\\.' +\n '(' + src[t.NUMERICIDENTIFIER] + ')\\\\.' +\n '(' + src[t.NUMERICIDENTIFIER] + ')'\n\ntok('MAINVERSIONLOOSE')\nsrc[t.MAINVERSIONLOOSE] = '(' + src[t.NUMERICIDENTIFIERLOOSE] + ')\\\\.' +\n '(' + src[t.NUMERICIDENTIFIERLOOSE] + ')\\\\.' +\n '(' + src[t.NUMERICIDENTIFIERLOOSE] + ')'\n\n// ## Pre-release Version Identifier\n// A numeric identifier, or a non-numeric identifier.\n\ntok('PRERELEASEIDENTIFIER')\nsrc[t.PRERELEASEIDENTIFIER] = '(?:' + src[t.NUMERICIDENTIFIER] +\n '|' + src[t.NONNUMERICIDENTIFIER] + ')'\n\ntok('PRERELEASEIDENTIFIERLOOSE')\nsrc[t.PRERELEASEIDENTIFIERLOOSE] = '(?:' + src[t.NUMERICIDENTIFIERLOOSE] +\n '|' + src[t.NONNUMERICIDENTIFIER] + ')'\n\n// ## Pre-release Version\n// Hyphen, followed by one or more dot-separated pre-release version\n// identifiers.\n\ntok('PRERELEASE')\nsrc[t.PRERELEASE] = '(?:-(' + src[t.PRERELEASEIDENTIFIER] +\n '(?:\\\\.' + src[t.PRERELEASEIDENTIFIER] + ')*))'\n\ntok('PRERELEASELOOSE')\nsrc[t.PRERELEASELOOSE] = '(?:-?(' + src[t.PRERELEASEIDENTIFIERLOOSE] +\n '(?:\\\\.' + src[t.PRERELEASEIDENTIFIERLOOSE] + ')*))'\n\n// ## Build Metadata Identifier\n// Any combination of digits, letters, or hyphens.\n\ntok('BUILDIDENTIFIER')\nsrc[t.BUILDIDENTIFIER] = '[0-9A-Za-z-]+'\n\n// ## Build Metadata\n// Plus sign, followed by one or more period-separated build metadata\n// identifiers.\n\ntok('BUILD')\nsrc[t.BUILD] = '(?:\\\\+(' + src[t.BUILDIDENTIFIER] +\n '(?:\\\\.' + src[t.BUILDIDENTIFIER] + ')*))'\n\n// ## Full Version String\n// A main version, followed optionally by a pre-release version and\n// build metadata.\n\n// Note that the only major, minor, patch, and pre-release sections of\n// the version string are capturing groups. The build metadata is not a\n// capturing group, because it should not ever be used in version\n// comparison.\n\ntok('FULL')\ntok('FULLPLAIN')\nsrc[t.FULLPLAIN] = 'v?' + src[t.MAINVERSION] +\n src[t.PRERELEASE] + '?' +\n src[t.BUILD] + '?'\n\nsrc[t.FULL] = '^' + src[t.FULLPLAIN] + '$'\n\n// like full, but allows v1.2.3 and =1.2.3, which people do sometimes.\n// also, 1.0.0alpha1 (prerelease without the hyphen) which is pretty\n// common in the npm registry.\ntok('LOOSEPLAIN')\nsrc[t.LOOSEPLAIN] = '[v=\\\\s]*' + src[t.MAINVERSIONLOOSE] +\n src[t.PRERELEASELOOSE] + '?' +\n src[t.BUILD] + '?'\n\ntok('LOOSE')\nsrc[t.LOOSE] = '^' + src[t.LOOSEPLAIN] + '$'\n\ntok('GTLT')\nsrc[t.GTLT] = '((?:<|>)?=?)'\n\n// Something like \"2.*\" or \"1.2.x\".\n// Note that \"x.x\" is a valid xRange identifer, meaning \"any version\"\n// Only the first item is strictly required.\ntok('XRANGEIDENTIFIERLOOSE')\nsrc[t.XRANGEIDENTIFIERLOOSE] = src[t.NUMERICIDENTIFIERLOOSE] + '|x|X|\\\\*'\ntok('XRANGEIDENTIFIER')\nsrc[t.XRANGEIDENTIFIER] = src[t.NUMERICIDENTIFIER] + '|x|X|\\\\*'\n\ntok('XRANGEPLAIN')\nsrc[t.XRANGEPLAIN] = '[v=\\\\s]*(' + src[t.XRANGEIDENTIFIER] + ')' +\n '(?:\\\\.(' + src[t.XRANGEIDENTIFIER] + ')' +\n '(?:\\\\.(' + src[t.XRANGEIDENTIFIER] + ')' +\n '(?:' + src[t.PRERELEASE] + ')?' +\n src[t.BUILD] + '?' +\n ')?)?'\n\ntok('XRANGEPLAINLOOSE')\nsrc[t.XRANGEPLAINLOOSE] = '[v=\\\\s]*(' + src[t.XRANGEIDENTIFIERLOOSE] + ')' +\n '(?:\\\\.(' + src[t.XRANGEIDENTIFIERLOOSE] + ')' +\n '(?:\\\\.(' + src[t.XRANGEIDENTIFIERLOOSE] + ')' +\n '(?:' + src[t.PRERELEASELOOSE] + ')?' +\n src[t.BUILD] + '?' +\n ')?)?'\n\ntok('XRANGE')\nsrc[t.XRANGE] = '^' + src[t.GTLT] + '\\\\s*' + src[t.XRANGEPLAIN] + '$'\ntok('XRANGELOOSE')\nsrc[t.XRANGELOOSE] = '^' + src[t.GTLT] + '\\\\s*' + src[t.XRANGEPLAINLOOSE] + '$'\n\n// Coercion.\n// Extract anything that could conceivably be a part of a valid semver\ntok('COERCE')\nsrc[t.COERCE] = '(^|[^\\\\d])' +\n '(\\\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '})' +\n '(?:\\\\.(\\\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '}))?' +\n '(?:\\\\.(\\\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '}))?' +\n '(?:$|[^\\\\d])'\ntok('COERCERTL')\nre[t.COERCERTL] = new RegExp(src[t.COERCE], 'g')\n\n// Tilde ranges.\n// Meaning is \"reasonably at or greater than\"\ntok('LONETILDE')\nsrc[t.LONETILDE] = '(?:~>?)'\n\ntok('TILDETRIM')\nsrc[t.TILDETRIM] = '(\\\\s*)' + src[t.LONETILDE] + '\\\\s+'\nre[t.TILDETRIM] = new RegExp(src[t.TILDETRIM], 'g')\nvar tildeTrimReplace = '$1~'\n\ntok('TILDE')\nsrc[t.TILDE] = '^' + src[t.LONETILDE] + src[t.XRANGEPLAIN] + '$'\ntok('TILDELOOSE')\nsrc[t.TILDELOOSE] = '^' + src[t.LONETILDE] + src[t.XRANGEPLAINLOOSE] + '$'\n\n// Caret ranges.\n// Meaning is \"at least and backwards compatible with\"\ntok('LONECARET')\nsrc[t.LONECARET] = '(?:\\\\^)'\n\ntok('CARETTRIM')\nsrc[t.CARETTRIM] = '(\\\\s*)' + src[t.LONECARET] + '\\\\s+'\nre[t.CARETTRIM] = new RegExp(src[t.CARETTRIM], 'g')\nvar caretTrimReplace = '$1^'\n\ntok('CARET')\nsrc[t.CARET] = '^' + src[t.LONECARET] + src[t.XRANGEPLAIN] + '$'\ntok('CARETLOOSE')\nsrc[t.CARETLOOSE] = '^' + src[t.LONECARET] + src[t.XRANGEPLAINLOOSE] + '$'\n\n// A simple gt/lt/eq thing, or just \"\" to indicate \"any version\"\ntok('COMPARATORLOOSE')\nsrc[t.COMPARATORLOOSE] = '^' + src[t.GTLT] + '\\\\s*(' + src[t.LOOSEPLAIN] + ')$|^$'\ntok('COMPARATOR')\nsrc[t.COMPARATOR] = '^' + src[t.GTLT] + '\\\\s*(' + src[t.FULLPLAIN] + ')$|^$'\n\n// An expression to strip any whitespace between the gtlt and the thing\n// it modifies, so that `> 1.2.3` ==> `>1.2.3`\ntok('COMPARATORTRIM')\nsrc[t.COMPARATORTRIM] = '(\\\\s*)' + src[t.GTLT] +\n '\\\\s*(' + src[t.LOOSEPLAIN] + '|' + src[t.XRANGEPLAIN] + ')'\n\n// this one has to use the /g flag\nre[t.COMPARATORTRIM] = new RegExp(src[t.COMPARATORTRIM], 'g')\nvar comparatorTrimReplace = '$1$2$3'\n\n// Something like `1.2.3 - 1.2.4`\n// Note that these all use the loose form, because they'll be\n// checked against either the strict or loose comparator form\n// later.\ntok('HYPHENRANGE')\nsrc[t.HYPHENRANGE] = '^\\\\s*(' + src[t.XRANGEPLAIN] + ')' +\n '\\\\s+-\\\\s+' +\n '(' + src[t.XRANGEPLAIN] + ')' +\n '\\\\s*$'\n\ntok('HYPHENRANGELOOSE')\nsrc[t.HYPHENRANGELOOSE] = '^\\\\s*(' + src[t.XRANGEPLAINLOOSE] + ')' +\n '\\\\s+-\\\\s+' +\n '(' + src[t.XRANGEPLAINLOOSE] + ')' +\n '\\\\s*$'\n\n// Star ranges basically just allow anything at all.\ntok('STAR')\nsrc[t.STAR] = '(<|>)?=?\\\\s*\\\\*'\n\n// Compile to actual regexp objects.\n// All are flag-free, unless they were created above with a flag.\nfor (var i = 0; i < R; i++) {\n debug(i, src[i])\n if (!re[i]) {\n re[i] = new RegExp(src[i])\n }\n}\n\nexports.parse = parse\nfunction parse (version, options) {\n if (!options || typeof options !== 'object') {\n options = {\n loose: !!options,\n includePrerelease: false\n }\n }\n\n if (version instanceof SemVer) {\n return version\n }\n\n if (typeof version !== 'string') {\n return null\n }\n\n if (version.length > MAX_LENGTH) {\n return null\n }\n\n var r = options.loose ? re[t.LOOSE] : re[t.FULL]\n if (!r.test(version)) {\n return null\n }\n\n try {\n return new SemVer(version, options)\n } catch (er) {\n return null\n }\n}\n\nexports.valid = valid\nfunction valid (version, options) {\n var v = parse(version, options)\n return v ? v.version : null\n}\n\nexports.clean = clean\nfunction clean (version, options) {\n var s = parse(version.trim().replace(/^[=v]+/, ''), options)\n return s ? s.version : null\n}\n\nexports.SemVer = SemVer\n\nfunction SemVer (version, options) {\n if (!options || typeof options !== 'object') {\n options = {\n loose: !!options,\n includePrerelease: false\n }\n }\n if (version instanceof SemVer) {\n if (version.loose === options.loose) {\n return version\n } else {\n version = version.version\n }\n } else if (typeof version !== 'string') {\n throw new TypeError('Invalid Version: ' + version)\n }\n\n if (version.length > MAX_LENGTH) {\n throw new TypeError('version is longer than ' + MAX_LENGTH + ' characters')\n }\n\n if (!(this instanceof SemVer)) {\n return new SemVer(version, options)\n }\n\n debug('SemVer', version, options)\n this.options = options\n this.loose = !!options.loose\n\n var m = version.trim().match(options.loose ? re[t.LOOSE] : re[t.FULL])\n\n if (!m) {\n throw new TypeError('Invalid Version: ' + version)\n }\n\n this.raw = version\n\n // these are actually numbers\n this.major = +m[1]\n this.minor = +m[2]\n this.patch = +m[3]\n\n if (this.major > MAX_SAFE_INTEGER || this.major < 0) {\n throw new TypeError('Invalid major version')\n }\n\n if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) {\n throw new TypeError('Invalid minor version')\n }\n\n if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) {\n throw new TypeError('Invalid patch version')\n }\n\n // numberify any prerelease numeric ids\n if (!m[4]) {\n this.prerelease = []\n } else {\n this.prerelease = m[4].split('.').map(function (id) {\n if (/^[0-9]+$/.test(id)) {\n var num = +id\n if (num >= 0 && num < MAX_SAFE_INTEGER) {\n return num\n }\n }\n return id\n })\n }\n\n this.build = m[5] ? m[5].split('.') : []\n this.format()\n}\n\nSemVer.prototype.format = function () {\n this.version = this.major + '.' + this.minor + '.' + this.patch\n if (this.prerelease.length) {\n this.version += '-' + this.prerelease.join('.')\n }\n return this.version\n}\n\nSemVer.prototype.toString = function () {\n return this.version\n}\n\nSemVer.prototype.compare = function (other) {\n debug('SemVer.compare', this.version, this.options, other)\n if (!(other instanceof SemVer)) {\n other = new SemVer(other, this.options)\n }\n\n return this.compareMain(other) || this.comparePre(other)\n}\n\nSemVer.prototype.compareMain = function (other) {\n if (!(other instanceof SemVer)) {\n other = new SemVer(other, this.options)\n }\n\n return compareIdentifiers(this.major, other.major) ||\n compareIdentifiers(this.minor, other.minor) ||\n compareIdentifiers(this.patch, other.patch)\n}\n\nSemVer.prototype.comparePre = function (other) {\n if (!(other instanceof SemVer)) {\n other = new SemVer(other, this.options)\n }\n\n // NOT having a prerelease is > having one\n if (this.prerelease.length && !other.prerelease.length) {\n return -1\n } else if (!this.prerelease.length && other.prerelease.length) {\n return 1\n } else if (!this.prerelease.length && !other.prerelease.length) {\n return 0\n }\n\n var i = 0\n do {\n var a = this.prerelease[i]\n var b = other.prerelease[i]\n debug('prerelease compare', i, a, b)\n if (a === undefined && b === undefined) {\n return 0\n } else if (b === undefined) {\n return 1\n } else if (a === undefined) {\n return -1\n } else if (a === b) {\n continue\n } else {\n return compareIdentifiers(a, b)\n }\n } while (++i)\n}\n\nSemVer.prototype.compareBuild = function (other) {\n if (!(other instanceof SemVer)) {\n other = new SemVer(other, this.options)\n }\n\n var i = 0\n do {\n var a = this.build[i]\n var b = other.build[i]\n debug('prerelease compare', i, a, b)\n if (a === undefined && b === undefined) {\n return 0\n } else if (b === undefined) {\n return 1\n } else if (a === undefined) {\n return -1\n } else if (a === b) {\n continue\n } else {\n return compareIdentifiers(a, b)\n }\n } while (++i)\n}\n\n// preminor will bump the version up to the next minor release, and immediately\n// down to pre-release. premajor and prepatch work the same way.\nSemVer.prototype.inc = function (release, identifier) {\n switch (release) {\n case 'premajor':\n this.prerelease.length = 0\n this.patch = 0\n this.minor = 0\n this.major++\n this.inc('pre', identifier)\n break\n case 'preminor':\n this.prerelease.length = 0\n this.patch = 0\n this.minor++\n this.inc('pre', identifier)\n break\n case 'prepatch':\n // If this is already a prerelease, it will bump to the next version\n // drop any prereleases that might already exist, since they are not\n // relevant at this point.\n this.prerelease.length = 0\n this.inc('patch', identifier)\n this.inc('pre', identifier)\n break\n // If the input is a non-prerelease version, this acts the same as\n // prepatch.\n case 'prerelease':\n if (this.prerelease.length === 0) {\n this.inc('patch', identifier)\n }\n this.inc('pre', identifier)\n break\n\n case 'major':\n // If this is a pre-major version, bump up to the same major version.\n // Otherwise increment major.\n // 1.0.0-5 bumps to 1.0.0\n // 1.1.0 bumps to 2.0.0\n if (this.minor !== 0 ||\n this.patch !== 0 ||\n this.prerelease.length === 0) {\n this.major++\n }\n this.minor = 0\n this.patch = 0\n this.prerelease = []\n break\n case 'minor':\n // If this is a pre-minor version, bump up to the same minor version.\n // Otherwise increment minor.\n // 1.2.0-5 bumps to 1.2.0\n // 1.2.1 bumps to 1.3.0\n if (this.patch !== 0 || this.prerelease.length === 0) {\n this.minor++\n }\n this.patch = 0\n this.prerelease = []\n break\n case 'patch':\n // If this is not a pre-release version, it will increment the patch.\n // If it is a pre-release it will bump up to the same patch version.\n // 1.2.0-5 patches to 1.2.0\n // 1.2.0 patches to 1.2.1\n if (this.prerelease.length === 0) {\n this.patch++\n }\n this.prerelease = []\n break\n // This probably shouldn't be used publicly.\n // 1.0.0 \"pre\" would become 1.0.0-0 which is the wrong direction.\n case 'pre':\n if (this.prerelease.length === 0) {\n this.prerelease = [0]\n } else {\n var i = this.prerelease.length\n while (--i >= 0) {\n if (typeof this.prerelease[i] === 'number') {\n this.prerelease[i]++\n i = -2\n }\n }\n if (i === -1) {\n // didn't increment anything\n this.prerelease.push(0)\n }\n }\n if (identifier) {\n // 1.2.0-beta.1 bumps to 1.2.0-beta.2,\n // 1.2.0-beta.fooblz or 1.2.0-beta bumps to 1.2.0-beta.0\n if (this.prerelease[0] === identifier) {\n if (isNaN(this.prerelease[1])) {\n this.prerelease = [identifier, 0]\n }\n } else {\n this.prerelease = [identifier, 0]\n }\n }\n break\n\n default:\n throw new Error('invalid increment argument: ' + release)\n }\n this.format()\n this.raw = this.version\n return this\n}\n\nexports.inc = inc\nfunction inc (version, release, loose, identifier) {\n if (typeof (loose) === 'string') {\n identifier = loose\n loose = undefined\n }\n\n try {\n return new SemVer(version, loose).inc(release, identifier).version\n } catch (er) {\n return null\n }\n}\n\nexports.diff = diff\nfunction diff (version1, version2) {\n if (eq(version1, version2)) {\n return null\n } else {\n var v1 = parse(version1)\n var v2 = parse(version2)\n var prefix = ''\n if (v1.prerelease.length || v2.prerelease.length) {\n prefix = 'pre'\n var defaultResult = 'prerelease'\n }\n for (var key in v1) {\n if (key === 'major' || key === 'minor' || key === 'patch') {\n if (v1[key] !== v2[key]) {\n return prefix + key\n }\n }\n }\n return defaultResult // may be undefined\n }\n}\n\nexports.compareIdentifiers = compareIdentifiers\n\nvar numeric = /^[0-9]+$/\nfunction compareIdentifiers (a, b) {\n var anum = numeric.test(a)\n var bnum = numeric.test(b)\n\n if (anum && bnum) {\n a = +a\n b = +b\n }\n\n return a === b ? 0\n : (anum && !bnum) ? -1\n : (bnum && !anum) ? 1\n : a < b ? -1\n : 1\n}\n\nexports.rcompareIdentifiers = rcompareIdentifiers\nfunction rcompareIdentifiers (a, b) {\n return compareIdentifiers(b, a)\n}\n\nexports.major = major\nfunction major (a, loose) {\n return new SemVer(a, loose).major\n}\n\nexports.minor = minor\nfunction minor (a, loose) {\n return new SemVer(a, loose).minor\n}\n\nexports.patch = patch\nfunction patch (a, loose) {\n return new SemVer(a, loose).patch\n}\n\nexports.compare = compare\nfunction compare (a, b, loose) {\n return new SemVer(a, loose).compare(new SemVer(b, loose))\n}\n\nexports.compareLoose = compareLoose\nfunction compareLoose (a, b) {\n return compare(a, b, true)\n}\n\nexports.compareBuild = compareBuild\nfunction compareBuild (a, b, loose) {\n var versionA = new SemVer(a, loose)\n var versionB = new SemVer(b, loose)\n return versionA.compare(versionB) || versionA.compareBuild(versionB)\n}\n\nexports.rcompare = rcompare\nfunction rcompare (a, b, loose) {\n return compare(b, a, loose)\n}\n\nexports.sort = sort\nfunction sort (list, loose) {\n return list.sort(function (a, b) {\n return exports.compareBuild(a, b, loose)\n })\n}\n\nexports.rsort = rsort\nfunction rsort (list, loose) {\n return list.sort(function (a, b) {\n return exports.compareBuild(b, a, loose)\n })\n}\n\nexports.gt = gt\nfunction gt (a, b, loose) {\n return compare(a, b, loose) > 0\n}\n\nexports.lt = lt\nfunction lt (a, b, loose) {\n return compare(a, b, loose) < 0\n}\n\nexports.eq = eq\nfunction eq (a, b, loose) {\n return compare(a, b, loose) === 0\n}\n\nexports.neq = neq\nfunction neq (a, b, loose) {\n return compare(a, b, loose) !== 0\n}\n\nexports.gte = gte\nfunction gte (a, b, loose) {\n return compare(a, b, loose) >= 0\n}\n\nexports.lte = lte\nfunction lte (a, b, loose) {\n return compare(a, b, loose) <= 0\n}\n\nexports.cmp = cmp\nfunction cmp (a, op, b, loose) {\n switch (op) {\n case '===':\n if (typeof a === 'object')\n a = a.version\n if (typeof b === 'object')\n b = b.version\n return a === b\n\n case '!==':\n if (typeof a === 'object')\n a = a.version\n if (typeof b === 'object')\n b = b.version\n return a !== b\n\n case '':\n case '=':\n case '==':\n return eq(a, b, loose)\n\n case '!=':\n return neq(a, b, loose)\n\n case '>':\n return gt(a, b, loose)\n\n case '>=':\n return gte(a, b, loose)\n\n case '<':\n return lt(a, b, loose)\n\n case '<=':\n return lte(a, b, loose)\n\n default:\n throw new TypeError('Invalid operator: ' + op)\n }\n}\n\nexports.Comparator = Comparator\nfunction Comparator (comp, options) {\n if (!options || typeof options !== 'object') {\n options = {\n loose: !!options,\n includePrerelease: false\n }\n }\n\n if (comp instanceof Comparator) {\n if (comp.loose === !!options.loose) {\n return comp\n } else {\n comp = comp.value\n }\n }\n\n if (!(this instanceof Comparator)) {\n return new Comparator(comp, options)\n }\n\n debug('comparator', comp, options)\n this.options = options\n this.loose = !!options.loose\n this.parse(comp)\n\n if (this.semver === ANY) {\n this.value = ''\n } else {\n this.value = this.operator + this.semver.version\n }\n\n debug('comp', this)\n}\n\nvar ANY = {}\nComparator.prototype.parse = function (comp) {\n var r = this.options.loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR]\n var m = comp.match(r)\n\n if (!m) {\n throw new TypeError('Invalid comparator: ' + comp)\n }\n\n this.operator = m[1] !== undefined ? m[1] : ''\n if (this.operator === '=') {\n this.operator = ''\n }\n\n // if it literally is just '>' or '' then allow anything.\n if (!m[2]) {\n this.semver = ANY\n } else {\n this.semver = new SemVer(m[2], this.options.loose)\n }\n}\n\nComparator.prototype.toString = function () {\n return this.value\n}\n\nComparator.prototype.test = function (version) {\n debug('Comparator.test', version, this.options.loose)\n\n if (this.semver === ANY || version === ANY) {\n return true\n }\n\n if (typeof version === 'string') {\n try {\n version = new SemVer(version, this.options)\n } catch (er) {\n return false\n }\n }\n\n return cmp(version, this.operator, this.semver, this.options)\n}\n\nComparator.prototype.intersects = function (comp, options) {\n if (!(comp instanceof Comparator)) {\n throw new TypeError('a Comparator is required')\n }\n\n if (!options || typeof options !== 'object') {\n options = {\n loose: !!options,\n includePrerelease: false\n }\n }\n\n var rangeTmp\n\n if (this.operator === '') {\n if (this.value === '') {\n return true\n }\n rangeTmp = new Range(comp.value, options)\n return satisfies(this.value, rangeTmp, options)\n } else if (comp.operator === '') {\n if (comp.value === '') {\n return true\n }\n rangeTmp = new Range(this.value, options)\n return satisfies(comp.semver, rangeTmp, options)\n }\n\n var sameDirectionIncreasing =\n (this.operator === '>=' || this.operator === '>') &&\n (comp.operator === '>=' || comp.operator === '>')\n var sameDirectionDecreasing =\n (this.operator === '<=' || this.operator === '<') &&\n (comp.operator === '<=' || comp.operator === '<')\n var sameSemVer = this.semver.version === comp.semver.version\n var differentDirectionsInclusive =\n (this.operator === '>=' || this.operator === '<=') &&\n (comp.operator === '>=' || comp.operator === '<=')\n var oppositeDirectionsLessThan =\n cmp(this.semver, '<', comp.semver, options) &&\n ((this.operator === '>=' || this.operator === '>') &&\n (comp.operator === '<=' || comp.operator === '<'))\n var oppositeDirectionsGreaterThan =\n cmp(this.semver, '>', comp.semver, options) &&\n ((this.operator === '<=' || this.operator === '<') &&\n (comp.operator === '>=' || comp.operator === '>'))\n\n return sameDirectionIncreasing || sameDirectionDecreasing ||\n (sameSemVer && differentDirectionsInclusive) ||\n oppositeDirectionsLessThan || oppositeDirectionsGreaterThan\n}\n\nexports.Range = Range\nfunction Range (range, options) {\n if (!options || typeof options !== 'object') {\n options = {\n loose: !!options,\n includePrerelease: false\n }\n }\n\n if (range instanceof Range) {\n if (range.loose === !!options.loose &&\n range.includePrerelease === !!options.includePrerelease) {\n return range\n } else {\n return new Range(range.raw, options)\n }\n }\n\n if (range instanceof Comparator) {\n return new Range(range.value, options)\n }\n\n if (!(this instanceof Range)) {\n return new Range(range, options)\n }\n\n this.options = options\n this.loose = !!options.loose\n this.includePrerelease = !!options.includePrerelease\n\n // First, split based on boolean or ||\n this.raw = range\n this.set = range.split(/\\s*\\|\\|\\s*/).map(function (range) {\n return this.parseRange(range.trim())\n }, this).filter(function (c) {\n // throw out any that are not relevant for whatever reason\n return c.length\n })\n\n if (!this.set.length) {\n throw new TypeError('Invalid SemVer Range: ' + range)\n }\n\n this.format()\n}\n\nRange.prototype.format = function () {\n this.range = this.set.map(function (comps) {\n return comps.join(' ').trim()\n }).join('||').trim()\n return this.range\n}\n\nRange.prototype.toString = function () {\n return this.range\n}\n\nRange.prototype.parseRange = function (range) {\n var loose = this.options.loose\n range = range.trim()\n // `1.2.3 - 1.2.4` => `>=1.2.3 <=1.2.4`\n var hr = loose ? re[t.HYPHENRANGELOOSE] : re[t.HYPHENRANGE]\n range = range.replace(hr, hyphenReplace)\n debug('hyphen replace', range)\n // `> 1.2.3 < 1.2.5` => `>1.2.3 <1.2.5`\n range = range.replace(re[t.COMPARATORTRIM], comparatorTrimReplace)\n debug('comparator trim', range, re[t.COMPARATORTRIM])\n\n // `~ 1.2.3` => `~1.2.3`\n range = range.replace(re[t.TILDETRIM], tildeTrimReplace)\n\n // `^ 1.2.3` => `^1.2.3`\n range = range.replace(re[t.CARETTRIM], caretTrimReplace)\n\n // normalize spaces\n range = range.split(/\\s+/).join(' ')\n\n // At this point, the range is completely trimmed and\n // ready to be split into comparators.\n\n var compRe = loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR]\n var set = range.split(' ').map(function (comp) {\n return parseComparator(comp, this.options)\n }, this).join(' ').split(/\\s+/)\n if (this.options.loose) {\n // in loose mode, throw out any that are not valid comparators\n set = set.filter(function (comp) {\n return !!comp.match(compRe)\n })\n }\n set = set.map(function (comp) {\n return new Comparator(comp, this.options)\n }, this)\n\n return set\n}\n\nRange.prototype.intersects = function (range, options) {\n if (!(range instanceof Range)) {\n throw new TypeError('a Range is required')\n }\n\n return this.set.some(function (thisComparators) {\n return (\n isSatisfiable(thisComparators, options) &&\n range.set.some(function (rangeComparators) {\n return (\n isSatisfiable(rangeComparators, options) &&\n thisComparators.every(function (thisComparator) {\n return rangeComparators.every(function (rangeComparator) {\n return thisComparator.intersects(rangeComparator, options)\n })\n })\n )\n })\n )\n })\n}\n\n// take a set of comparators and determine whether there\n// exists a version which can satisfy it\nfunction isSatisfiable (comparators, options) {\n var result = true\n var remainingComparators = comparators.slice()\n var testComparator = remainingComparators.pop()\n\n while (result && remainingComparators.length) {\n result = remainingComparators.every(function (otherComparator) {\n return testComparator.intersects(otherComparator, options)\n })\n\n testComparator = remainingComparators.pop()\n }\n\n return result\n}\n\n// Mostly just for testing and legacy API reasons\nexports.toComparators = toComparators\nfunction toComparators (range, options) {\n return new Range(range, options).set.map(function (comp) {\n return comp.map(function (c) {\n return c.value\n }).join(' ').trim().split(' ')\n })\n}\n\n// comprised of xranges, tildes, stars, and gtlt's at this point.\n// already replaced the hyphen ranges\n// turn into a set of JUST comparators.\nfunction parseComparator (comp, options) {\n debug('comp', comp, options)\n comp = replaceCarets(comp, options)\n debug('caret', comp)\n comp = replaceTildes(comp, options)\n debug('tildes', comp)\n comp = replaceXRanges(comp, options)\n debug('xrange', comp)\n comp = replaceStars(comp, options)\n debug('stars', comp)\n return comp\n}\n\nfunction isX (id) {\n return !id || id.toLowerCase() === 'x' || id === '*'\n}\n\n// ~, ~> --> * (any, kinda silly)\n// ~2, ~2.x, ~2.x.x, ~>2, ~>2.x ~>2.x.x --> >=2.0.0 <3.0.0\n// ~2.0, ~2.0.x, ~>2.0, ~>2.0.x --> >=2.0.0 <2.1.0\n// ~1.2, ~1.2.x, ~>1.2, ~>1.2.x --> >=1.2.0 <1.3.0\n// ~1.2.3, ~>1.2.3 --> >=1.2.3 <1.3.0\n// ~1.2.0, ~>1.2.0 --> >=1.2.0 <1.3.0\nfunction replaceTildes (comp, options) {\n return comp.trim().split(/\\s+/).map(function (comp) {\n return replaceTilde(comp, options)\n }).join(' ')\n}\n\nfunction replaceTilde (comp, options) {\n var r = options.loose ? re[t.TILDELOOSE] : re[t.TILDE]\n return comp.replace(r, function (_, M, m, p, pr) {\n debug('tilde', comp, _, M, m, p, pr)\n var ret\n\n if (isX(M)) {\n ret = ''\n } else if (isX(m)) {\n ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0'\n } else if (isX(p)) {\n // ~1.2 == >=1.2.0 <1.3.0\n ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0'\n } else if (pr) {\n debug('replaceTilde pr', pr)\n ret = '>=' + M + '.' + m + '.' + p + '-' + pr +\n ' <' + M + '.' + (+m + 1) + '.0'\n } else {\n // ~1.2.3 == >=1.2.3 <1.3.0\n ret = '>=' + M + '.' + m + '.' + p +\n ' <' + M + '.' + (+m + 1) + '.0'\n }\n\n debug('tilde return', ret)\n return ret\n })\n}\n\n// ^ --> * (any, kinda silly)\n// ^2, ^2.x, ^2.x.x --> >=2.0.0 <3.0.0\n// ^2.0, ^2.0.x --> >=2.0.0 <3.0.0\n// ^1.2, ^1.2.x --> >=1.2.0 <2.0.0\n// ^1.2.3 --> >=1.2.3 <2.0.0\n// ^1.2.0 --> >=1.2.0 <2.0.0\nfunction replaceCarets (comp, options) {\n return comp.trim().split(/\\s+/).map(function (comp) {\n return replaceCaret(comp, options)\n }).join(' ')\n}\n\nfunction replaceCaret (comp, options) {\n debug('caret', comp, options)\n var r = options.loose ? re[t.CARETLOOSE] : re[t.CARET]\n return comp.replace(r, function (_, M, m, p, pr) {\n debug('caret', comp, _, M, m, p, pr)\n var ret\n\n if (isX(M)) {\n ret = ''\n } else if (isX(m)) {\n ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0'\n } else if (isX(p)) {\n if (M === '0') {\n ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0'\n } else {\n ret = '>=' + M + '.' + m + '.0 <' + (+M + 1) + '.0.0'\n }\n } else if (pr) {\n debug('replaceCaret pr', pr)\n if (M === '0') {\n if (m === '0') {\n ret = '>=' + M + '.' + m + '.' + p + '-' + pr +\n ' <' + M + '.' + m + '.' + (+p + 1)\n } else {\n ret = '>=' + M + '.' + m + '.' + p + '-' + pr +\n ' <' + M + '.' + (+m + 1) + '.0'\n }\n } else {\n ret = '>=' + M + '.' + m + '.' + p + '-' + pr +\n ' <' + (+M + 1) + '.0.0'\n }\n } else {\n debug('no pr')\n if (M === '0') {\n if (m === '0') {\n ret = '>=' + M + '.' + m + '.' + p +\n ' <' + M + '.' + m + '.' + (+p + 1)\n } else {\n ret = '>=' + M + '.' + m + '.' + p +\n ' <' + M + '.' + (+m + 1) + '.0'\n }\n } else {\n ret = '>=' + M + '.' + m + '.' + p +\n ' <' + (+M + 1) + '.0.0'\n }\n }\n\n debug('caret return', ret)\n return ret\n })\n}\n\nfunction replaceXRanges (comp, options) {\n debug('replaceXRanges', comp, options)\n return comp.split(/\\s+/).map(function (comp) {\n return replaceXRange(comp, options)\n }).join(' ')\n}\n\nfunction replaceXRange (comp, options) {\n comp = comp.trim()\n var r = options.loose ? re[t.XRANGELOOSE] : re[t.XRANGE]\n return comp.replace(r, function (ret, gtlt, M, m, p, pr) {\n debug('xRange', comp, ret, gtlt, M, m, p, pr)\n var xM = isX(M)\n var xm = xM || isX(m)\n var xp = xm || isX(p)\n var anyX = xp\n\n if (gtlt === '=' && anyX) {\n gtlt = ''\n }\n\n // if we're including prereleases in the match, then we need\n // to fix this to -0, the lowest possible prerelease value\n pr = options.includePrerelease ? '-0' : ''\n\n if (xM) {\n if (gtlt === '>' || gtlt === '<') {\n // nothing is allowed\n ret = '<0.0.0-0'\n } else {\n // nothing is forbidden\n ret = '*'\n }\n } else if (gtlt && anyX) {\n // we know patch is an x, because we have any x at all.\n // replace X with 0\n if (xm) {\n m = 0\n }\n p = 0\n\n if (gtlt === '>') {\n // >1 => >=2.0.0\n // >1.2 => >=1.3.0\n // >1.2.3 => >= 1.2.4\n gtlt = '>='\n if (xm) {\n M = +M + 1\n m = 0\n p = 0\n } else {\n m = +m + 1\n p = 0\n }\n } else if (gtlt === '<=') {\n // <=0.7.x is actually <0.8.0, since any 0.7.x should\n // pass. Similarly, <=7.x is actually <8.0.0, etc.\n gtlt = '<'\n if (xm) {\n M = +M + 1\n } else {\n m = +m + 1\n }\n }\n\n ret = gtlt + M + '.' + m + '.' + p + pr\n } else if (xm) {\n ret = '>=' + M + '.0.0' + pr + ' <' + (+M + 1) + '.0.0' + pr\n } else if (xp) {\n ret = '>=' + M + '.' + m + '.0' + pr +\n ' <' + M + '.' + (+m + 1) + '.0' + pr\n }\n\n debug('xRange return', ret)\n\n return ret\n })\n}\n\n// Because * is AND-ed with everything else in the comparator,\n// and '' means \"any version\", just remove the *s entirely.\nfunction replaceStars (comp, options) {\n debug('replaceStars', comp, options)\n // Looseness is ignored here. star is always as loose as it gets!\n return comp.trim().replace(re[t.STAR], '')\n}\n\n// This function is passed to string.replace(re[t.HYPHENRANGE])\n// M, m, patch, prerelease, build\n// 1.2 - 3.4.5 => >=1.2.0 <=3.4.5\n// 1.2.3 - 3.4 => >=1.2.0 <3.5.0 Any 3.4.x will do\n// 1.2 - 3.4 => >=1.2.0 <3.5.0\nfunction hyphenReplace ($0,\n from, fM, fm, fp, fpr, fb,\n to, tM, tm, tp, tpr, tb) {\n if (isX(fM)) {\n from = ''\n } else if (isX(fm)) {\n from = '>=' + fM + '.0.0'\n } else if (isX(fp)) {\n from = '>=' + fM + '.' + fm + '.0'\n } else {\n from = '>=' + from\n }\n\n if (isX(tM)) {\n to = ''\n } else if (isX(tm)) {\n to = '<' + (+tM + 1) + '.0.0'\n } else if (isX(tp)) {\n to = '<' + tM + '.' + (+tm + 1) + '.0'\n } else if (tpr) {\n to = '<=' + tM + '.' + tm + '.' + tp + '-' + tpr\n } else {\n to = '<=' + to\n }\n\n return (from + ' ' + to).trim()\n}\n\n// if ANY of the sets match ALL of its comparators, then pass\nRange.prototype.test = function (version) {\n if (!version) {\n return false\n }\n\n if (typeof version === 'string') {\n try {\n version = new SemVer(version, this.options)\n } catch (er) {\n return false\n }\n }\n\n for (var i = 0; i < this.set.length; i++) {\n if (testSet(this.set[i], version, this.options)) {\n return true\n }\n }\n return false\n}\n\nfunction testSet (set, version, options) {\n for (var i = 0; i < set.length; i++) {\n if (!set[i].test(version)) {\n return false\n }\n }\n\n if (version.prerelease.length && !options.includePrerelease) {\n // Find the set of versions that are allowed to have prereleases\n // For example, ^1.2.3-pr.1 desugars to >=1.2.3-pr.1 <2.0.0\n // That should allow `1.2.3-pr.2` to pass.\n // However, `1.2.4-alpha.notready` should NOT be allowed,\n // even though it's within the range set by the comparators.\n for (i = 0; i < set.length; i++) {\n debug(set[i].semver)\n if (set[i].semver === ANY) {\n continue\n }\n\n if (set[i].semver.prerelease.length > 0) {\n var allowed = set[i].semver\n if (allowed.major === version.major &&\n allowed.minor === version.minor &&\n allowed.patch === version.patch) {\n return true\n }\n }\n }\n\n // Version has a -pre, but it's not one of the ones we like.\n return false\n }\n\n return true\n}\n\nexports.satisfies = satisfies\nfunction satisfies (version, range, options) {\n try {\n range = new Range(range, options)\n } catch (er) {\n return false\n }\n return range.test(version)\n}\n\nexports.maxSatisfying = maxSatisfying\nfunction maxSatisfying (versions, range, options) {\n var max = null\n var maxSV = null\n try {\n var rangeObj = new Range(range, options)\n } catch (er) {\n return null\n }\n versions.forEach(function (v) {\n if (rangeObj.test(v)) {\n // satisfies(v, range, options)\n if (!max || maxSV.compare(v) === -1) {\n // compare(max, v, true)\n max = v\n maxSV = new SemVer(max, options)\n }\n }\n })\n return max\n}\n\nexports.minSatisfying = minSatisfying\nfunction minSatisfying (versions, range, options) {\n var min = null\n var minSV = null\n try {\n var rangeObj = new Range(range, options)\n } catch (er) {\n return null\n }\n versions.forEach(function (v) {\n if (rangeObj.test(v)) {\n // satisfies(v, range, options)\n if (!min || minSV.compare(v) === 1) {\n // compare(min, v, true)\n min = v\n minSV = new SemVer(min, options)\n }\n }\n })\n return min\n}\n\nexports.minVersion = minVersion\nfunction minVersion (range, loose) {\n range = new Range(range, loose)\n\n var minver = new SemVer('0.0.0')\n if (range.test(minver)) {\n return minver\n }\n\n minver = new SemVer('0.0.0-0')\n if (range.test(minver)) {\n return minver\n }\n\n minver = null\n for (var i = 0; i < range.set.length; ++i) {\n var comparators = range.set[i]\n\n comparators.forEach(function (comparator) {\n // Clone to avoid manipulating the comparator's semver object.\n var compver = new SemVer(comparator.semver.version)\n switch (comparator.operator) {\n case '>':\n if (compver.prerelease.length === 0) {\n compver.patch++\n } else {\n compver.prerelease.push(0)\n }\n compver.raw = compver.format()\n /* fallthrough */\n case '':\n case '>=':\n if (!minver || gt(minver, compver)) {\n minver = compver\n }\n break\n case '<':\n case '<=':\n /* Ignore maximum versions */\n break\n /* istanbul ignore next */\n default:\n throw new Error('Unexpected operation: ' + comparator.operator)\n }\n })\n }\n\n if (minver && range.test(minver)) {\n return minver\n }\n\n return null\n}\n\nexports.validRange = validRange\nfunction validRange (range, options) {\n try {\n // Return '*' instead of '' so that truthiness works.\n // This will throw if it's invalid anyway\n return new Range(range, options).range || '*'\n } catch (er) {\n return null\n }\n}\n\n// Determine if version is less than all the versions possible in the range\nexports.ltr = ltr\nfunction ltr (version, range, options) {\n return outside(version, range, '<', options)\n}\n\n// Determine if version is greater than all the versions possible in the range.\nexports.gtr = gtr\nfunction gtr (version, range, options) {\n return outside(version, range, '>', options)\n}\n\nexports.outside = outside\nfunction outside (version, range, hilo, options) {\n version = new SemVer(version, options)\n range = new Range(range, options)\n\n var gtfn, ltefn, ltfn, comp, ecomp\n switch (hilo) {\n case '>':\n gtfn = gt\n ltefn = lte\n ltfn = lt\n comp = '>'\n ecomp = '>='\n break\n case '<':\n gtfn = lt\n ltefn = gte\n ltfn = gt\n comp = '<'\n ecomp = '<='\n break\n default:\n throw new TypeError('Must provide a hilo val of \"<\" or \">\"')\n }\n\n // If it satisifes the range it is not outside\n if (satisfies(version, range, options)) {\n return false\n }\n\n // From now on, variable terms are as if we're in \"gtr\" mode.\n // but note that everything is flipped for the \"ltr\" function.\n\n for (var i = 0; i < range.set.length; ++i) {\n var comparators = range.set[i]\n\n var high = null\n var low = null\n\n comparators.forEach(function (comparator) {\n if (comparator.semver === ANY) {\n comparator = new Comparator('>=0.0.0')\n }\n high = high || comparator\n low = low || comparator\n if (gtfn(comparator.semver, high.semver, options)) {\n high = comparator\n } else if (ltfn(comparator.semver, low.semver, options)) {\n low = comparator\n }\n })\n\n // If the edge version comparator has a operator then our version\n // isn't outside it\n if (high.operator === comp || high.operator === ecomp) {\n return false\n }\n\n // If the lowest version comparator has an operator and our version\n // is less than it then it isn't higher than the range\n if ((!low.operator || low.operator === comp) &&\n ltefn(version, low.semver)) {\n return false\n } else if (low.operator === ecomp && ltfn(version, low.semver)) {\n return false\n }\n }\n return true\n}\n\nexports.prerelease = prerelease\nfunction prerelease (version, options) {\n var parsed = parse(version, options)\n return (parsed && parsed.prerelease.length) ? parsed.prerelease : null\n}\n\nexports.intersects = intersects\nfunction intersects (r1, r2, options) {\n r1 = new Range(r1, options)\n r2 = new Range(r2, options)\n return r1.intersects(r2)\n}\n\nexports.coerce = coerce\nfunction coerce (version, options) {\n if (version instanceof SemVer) {\n return version\n }\n\n if (typeof version === 'number') {\n version = String(version)\n }\n\n if (typeof version !== 'string') {\n return null\n }\n\n options = options || {}\n\n var match = null\n if (!options.rtl) {\n match = version.match(re[t.COERCE])\n } else {\n // Find the right-most coercible string that does not share\n // a terminus with a more left-ward coercible string.\n // Eg, '1.2.3.4' wants to coerce '2.3.4', not '3.4' or '4'\n //\n // Walk through the string checking with a /g regexp\n // Manually set the index so as to pick up overlapping matches.\n // Stop when we get a match that ends at the string end, since no\n // coercible string can be more right-ward without the same terminus.\n var next\n while ((next = re[t.COERCERTL].exec(version)) &&\n (!match || match.index + match[0].length !== version.length)\n ) {\n if (!match ||\n next.index + next[0].length !== match.index + match[0].length) {\n match = next\n }\n re[t.COERCERTL].lastIndex = next.index + next[1].length + next[2].length\n }\n // leave it in a clean state\n re[t.COERCERTL].lastIndex = -1\n }\n\n if (match === null) {\n return null\n }\n\n return parse(match[2] +\n '.' + (match[3] || '0') +\n '.' + (match[4] || '0'), options)\n}\n","var v1 = require('./v1');\nvar v4 = require('./v4');\n\nvar uuid = v4;\nuuid.v1 = v1;\nuuid.v4 = v4;\n\nmodule.exports = uuid;\n","/**\n * Convert array of 16 byte values to UUID string format of the form:\n * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX\n */\nvar byteToHex = [];\nfor (var i = 0; i < 256; ++i) {\n byteToHex[i] = (i + 0x100).toString(16).substr(1);\n}\n\nfunction bytesToUuid(buf, offset) {\n var i = offset || 0;\n var bth = byteToHex;\n // join used to fix memory issue caused by concatenation: https://bugs.chromium.org/p/v8/issues/detail?id=3175#c4\n return ([\n bth[buf[i++]], bth[buf[i++]],\n bth[buf[i++]], bth[buf[i++]], '-',\n bth[buf[i++]], bth[buf[i++]], '-',\n bth[buf[i++]], bth[buf[i++]], '-',\n bth[buf[i++]], bth[buf[i++]], '-',\n bth[buf[i++]], bth[buf[i++]],\n bth[buf[i++]], bth[buf[i++]],\n bth[buf[i++]], bth[buf[i++]]\n ]).join('');\n}\n\nmodule.exports = bytesToUuid;\n","// Unique ID creation requires a high quality random # generator. In node.js\n// this is pretty straight-forward - we use the crypto API.\n\nvar crypto = require('crypto');\n\nmodule.exports = function nodeRNG() {\n return crypto.randomBytes(16);\n};\n","var rng = require('./lib/rng');\nvar bytesToUuid = require('./lib/bytesToUuid');\n\n// **`v1()` - Generate time-based UUID**\n//\n// Inspired by https://github.com/LiosK/UUID.js\n// and http://docs.python.org/library/uuid.html\n\nvar _nodeId;\nvar _clockseq;\n\n// Previous uuid creation time\nvar _lastMSecs = 0;\nvar _lastNSecs = 0;\n\n// See https://github.com/uuidjs/uuid for API details\nfunction v1(options, buf, offset) {\n var i = buf && offset || 0;\n var b = buf || [];\n\n options = options || {};\n var node = options.node || _nodeId;\n var clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq;\n\n // node and clockseq need to be initialized to random values if they're not\n // specified. We do this lazily to minimize issues related to insufficient\n // system entropy. See #189\n if (node == null || clockseq == null) {\n var seedBytes = rng();\n if (node == null) {\n // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1)\n node = _nodeId = [\n seedBytes[0] | 0x01,\n seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]\n ];\n }\n if (clockseq == null) {\n // Per 4.2.2, randomize (14 bit) clockseq\n clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff;\n }\n }\n\n // UUID timestamps are 100 nano-second units since the Gregorian epoch,\n // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so\n // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs'\n // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00.\n var msecs = options.msecs !== undefined ? options.msecs : new Date().getTime();\n\n // Per 4.2.1.2, use count of uuid's generated during the current clock\n // cycle to simulate higher resolution clock\n var nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1;\n\n // Time since last uuid creation (in msecs)\n var dt = (msecs - _lastMSecs) + (nsecs - _lastNSecs)/10000;\n\n // Per 4.2.1.2, Bump clockseq on clock regression\n if (dt < 0 && options.clockseq === undefined) {\n clockseq = clockseq + 1 & 0x3fff;\n }\n\n // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new\n // time interval\n if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) {\n nsecs = 0;\n }\n\n // Per 4.2.1.2 Throw error if too many uuids are requested\n if (nsecs >= 10000) {\n throw new Error('uuid.v1(): Can\\'t create more than 10M uuids/sec');\n }\n\n _lastMSecs = msecs;\n _lastNSecs = nsecs;\n _clockseq = clockseq;\n\n // Per 4.1.4 - Convert from unix epoch to Gregorian epoch\n msecs += 12219292800000;\n\n // `time_low`\n var tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000;\n b[i++] = tl >>> 24 & 0xff;\n b[i++] = tl >>> 16 & 0xff;\n b[i++] = tl >>> 8 & 0xff;\n b[i++] = tl & 0xff;\n\n // `time_mid`\n var tmh = (msecs / 0x100000000 * 10000) & 0xfffffff;\n b[i++] = tmh >>> 8 & 0xff;\n b[i++] = tmh & 0xff;\n\n // `time_high_and_version`\n b[i++] = tmh >>> 24 & 0xf | 0x10; // include version\n b[i++] = tmh >>> 16 & 0xff;\n\n // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant)\n b[i++] = clockseq >>> 8 | 0x80;\n\n // `clock_seq_low`\n b[i++] = clockseq & 0xff;\n\n // `node`\n for (var n = 0; n < 6; ++n) {\n b[i + n] = node[n];\n }\n\n return buf ? buf : bytesToUuid(b);\n}\n\nmodule.exports = v1;\n","var rng = require('./lib/rng');\nvar bytesToUuid = require('./lib/bytesToUuid');\n\nfunction v4(options, buf, offset) {\n var i = buf && offset || 0;\n\n if (typeof(options) == 'string') {\n buf = options === 'binary' ? new Array(16) : null;\n options = null;\n }\n options = options || {};\n\n var rnds = options.random || (options.rng || rng)();\n\n // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`\n rnds[6] = (rnds[6] & 0x0f) | 0x40;\n rnds[8] = (rnds[8] & 0x3f) | 0x80;\n\n // Copy bytes to buffer, if provided\n if (buf) {\n for (var ii = 0; ii < 16; ++ii) {\n buf[i + ii] = rnds[ii];\n }\n }\n\n return buf || bytesToUuid(rnds);\n}\n\nmodule.exports = v4;\n","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.issue = exports.issueCommand = void 0;\nconst os = __importStar(require(\"os\"));\nconst utils_1 = require(\"./utils\");\n/**\n * Commands\n *\n * Command Format:\n * ::name key=value,key=value::message\n *\n * Examples:\n * ::warning::This is the message\n * ::set-env name=MY_VAR::some value\n */\nfunction issueCommand(command, properties, message) {\n const cmd = new Command(command, properties, message);\n process.stdout.write(cmd.toString() + os.EOL);\n}\nexports.issueCommand = issueCommand;\nfunction issue(name, message = '') {\n issueCommand(name, {}, message);\n}\nexports.issue = issue;\nconst CMD_STRING = '::';\nclass Command {\n constructor(command, properties, message) {\n if (!command) {\n command = 'missing.command';\n }\n this.command = command;\n this.properties = properties;\n this.message = message;\n }\n toString() {\n let cmdStr = CMD_STRING + this.command;\n if (this.properties && Object.keys(this.properties).length > 0) {\n cmdStr += ' ';\n let first = true;\n for (const key in this.properties) {\n if (this.properties.hasOwnProperty(key)) {\n const val = this.properties[key];\n if (val) {\n if (first) {\n first = false;\n }\n else {\n cmdStr += ',';\n }\n cmdStr += `${key}=${escapeProperty(val)}`;\n }\n }\n }\n }\n cmdStr += `${CMD_STRING}${escapeData(this.message)}`;\n return cmdStr;\n }\n}\nfunction escapeData(s) {\n return utils_1.toCommandValue(s)\n .replace(/%/g, '%25')\n .replace(/\\r/g, '%0D')\n .replace(/\\n/g, '%0A');\n}\nfunction escapeProperty(s) {\n return utils_1.toCommandValue(s)\n .replace(/%/g, '%25')\n .replace(/\\r/g, '%0D')\n .replace(/\\n/g, '%0A')\n .replace(/:/g, '%3A')\n .replace(/,/g, '%2C');\n}\n//# sourceMappingURL=command.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.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;\nconst command_1 = require(\"./command\");\nconst file_command_1 = require(\"./file-command\");\nconst utils_1 = require(\"./utils\");\nconst os = __importStar(require(\"os\"));\nconst path = __importStar(require(\"path\"));\nconst oidc_utils_1 = require(\"./oidc-utils\");\n/**\n * The code to exit an action\n */\nvar ExitCode;\n(function (ExitCode) {\n /**\n * A code indicating that the action was successful\n */\n ExitCode[ExitCode[\"Success\"] = 0] = \"Success\";\n /**\n * A code indicating that the action was a failure\n */\n ExitCode[ExitCode[\"Failure\"] = 1] = \"Failure\";\n})(ExitCode = exports.ExitCode || (exports.ExitCode = {}));\n//-----------------------------------------------------------------------\n// Variables\n//-----------------------------------------------------------------------\n/**\n * Sets env variable for this action and future actions in the job\n * @param name the name of the variable to set\n * @param val the value of the variable. Non-string values will be converted to a string via JSON.stringify\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction exportVariable(name, val) {\n const convertedVal = utils_1.toCommandValue(val);\n process.env[name] = convertedVal;\n const filePath = process.env['GITHUB_ENV'] || '';\n if (filePath) {\n return file_command_1.issueFileCommand('ENV', file_command_1.prepareKeyValueMessage(name, val));\n }\n command_1.issueCommand('set-env', { name }, convertedVal);\n}\nexports.exportVariable = exportVariable;\n/**\n * Registers a secret which will get masked from logs\n * @param secret value of the secret\n */\nfunction setSecret(secret) {\n command_1.issueCommand('add-mask', {}, secret);\n}\nexports.setSecret = setSecret;\n/**\n * Prepends inputPath to the PATH (for this action and future actions)\n * @param inputPath\n */\nfunction addPath(inputPath) {\n const filePath = process.env['GITHUB_PATH'] || '';\n if (filePath) {\n file_command_1.issueFileCommand('PATH', inputPath);\n }\n else {\n command_1.issueCommand('add-path', {}, inputPath);\n }\n process.env['PATH'] = `${inputPath}${path.delimiter}${process.env['PATH']}`;\n}\nexports.addPath = addPath;\n/**\n * Gets the value of an input.\n * Unless trimWhitespace is set to false in InputOptions, the value is also trimmed.\n * Returns an empty string if the value is not defined.\n *\n * @param name name of the input to get\n * @param options optional. See InputOptions.\n * @returns string\n */\nfunction getInput(name, options) {\n const val = process.env[`INPUT_${name.replace(/ /g, '_').toUpperCase()}`] || '';\n if (options && options.required && !val) {\n throw new Error(`Input required and not supplied: ${name}`);\n }\n if (options && options.trimWhitespace === false) {\n return val;\n }\n return val.trim();\n}\nexports.getInput = getInput;\n/**\n * Gets the values of an multiline input. Each value is also trimmed.\n *\n * @param name name of the input to get\n * @param options optional. See InputOptions.\n * @returns string[]\n *\n */\nfunction getMultilineInput(name, options) {\n const inputs = getInput(name, options)\n .split('\\n')\n .filter(x => x !== '');\n if (options && options.trimWhitespace === false) {\n return inputs;\n }\n return inputs.map(input => input.trim());\n}\nexports.getMultilineInput = getMultilineInput;\n/**\n * Gets the input value of the boolean type in the YAML 1.2 \"core schema\" specification.\n * Support boolean input list: `true | True | TRUE | false | False | FALSE` .\n * The return value is also in boolean type.\n * ref: https://yaml.org/spec/1.2/spec.html#id2804923\n *\n * @param name name of the input to get\n * @param options optional. See InputOptions.\n * @returns boolean\n */\nfunction getBooleanInput(name, options) {\n const trueValue = ['true', 'True', 'TRUE'];\n const falseValue = ['false', 'False', 'FALSE'];\n const val = getInput(name, options);\n if (trueValue.includes(val))\n return true;\n if (falseValue.includes(val))\n return false;\n throw new TypeError(`Input does not meet YAML 1.2 \"Core Schema\" specification: ${name}\\n` +\n `Support boolean input list: \\`true | True | TRUE | false | False | FALSE\\``);\n}\nexports.getBooleanInput = getBooleanInput;\n/**\n * Sets the value of an output.\n *\n * @param name name of the output to set\n * @param value value to store. Non-string values will be converted to a string via JSON.stringify\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction setOutput(name, value) {\n const filePath = process.env['GITHUB_OUTPUT'] || '';\n if (filePath) {\n return file_command_1.issueFileCommand('OUTPUT', file_command_1.prepareKeyValueMessage(name, value));\n }\n process.stdout.write(os.EOL);\n command_1.issueCommand('set-output', { name }, utils_1.toCommandValue(value));\n}\nexports.setOutput = setOutput;\n/**\n * Enables or disables the echoing of commands into stdout for the rest of the step.\n * Echoing is disabled by default if ACTIONS_STEP_DEBUG is not set.\n *\n */\nfunction setCommandEcho(enabled) {\n command_1.issue('echo', enabled ? 'on' : 'off');\n}\nexports.setCommandEcho = setCommandEcho;\n//-----------------------------------------------------------------------\n// Results\n//-----------------------------------------------------------------------\n/**\n * Sets the action status to failed.\n * When the action exits it will be with an exit code of 1\n * @param message add error issue message\n */\nfunction setFailed(message) {\n process.exitCode = ExitCode.Failure;\n error(message);\n}\nexports.setFailed = setFailed;\n//-----------------------------------------------------------------------\n// Logging Commands\n//-----------------------------------------------------------------------\n/**\n * Gets whether Actions Step Debug is on or not\n */\nfunction isDebug() {\n return process.env['RUNNER_DEBUG'] === '1';\n}\nexports.isDebug = isDebug;\n/**\n * Writes debug message to user log\n * @param message debug message\n */\nfunction debug(message) {\n command_1.issueCommand('debug', {}, message);\n}\nexports.debug = debug;\n/**\n * Adds an error issue\n * @param message error issue message. Errors will be converted to string via toString()\n * @param properties optional properties to add to the annotation.\n */\nfunction error(message, properties = {}) {\n command_1.issueCommand('error', utils_1.toCommandProperties(properties), message instanceof Error ? message.toString() : message);\n}\nexports.error = error;\n/**\n * Adds a warning issue\n * @param message warning issue message. Errors will be converted to string via toString()\n * @param properties optional properties to add to the annotation.\n */\nfunction warning(message, properties = {}) {\n command_1.issueCommand('warning', utils_1.toCommandProperties(properties), message instanceof Error ? message.toString() : message);\n}\nexports.warning = warning;\n/**\n * Adds a notice issue\n * @param message notice issue message. Errors will be converted to string via toString()\n * @param properties optional properties to add to the annotation.\n */\nfunction notice(message, properties = {}) {\n command_1.issueCommand('notice', utils_1.toCommandProperties(properties), message instanceof Error ? message.toString() : message);\n}\nexports.notice = notice;\n/**\n * Writes info to log with console.log.\n * @param message info message\n */\nfunction info(message) {\n process.stdout.write(message + os.EOL);\n}\nexports.info = info;\n/**\n * Begin an output group.\n *\n * Output until the next `groupEnd` will be foldable in this group\n *\n * @param name The name of the output group\n */\nfunction startGroup(name) {\n command_1.issue('group', name);\n}\nexports.startGroup = startGroup;\n/**\n * End an output group.\n */\nfunction endGroup() {\n command_1.issue('endgroup');\n}\nexports.endGroup = endGroup;\n/**\n * Wrap an asynchronous function call in a group.\n *\n * Returns the same type as the function itself.\n *\n * @param name The name of the group\n * @param fn The function to wrap in the group\n */\nfunction group(name, fn) {\n return __awaiter(this, void 0, void 0, function* () {\n startGroup(name);\n let result;\n try {\n result = yield fn();\n }\n finally {\n endGroup();\n }\n return result;\n });\n}\nexports.group = group;\n//-----------------------------------------------------------------------\n// Wrapper action state\n//-----------------------------------------------------------------------\n/**\n * Saves state for current action, the state can only be retrieved by this action's post job execution.\n *\n * @param name name of the state to store\n * @param value value to store. Non-string values will be converted to a string via JSON.stringify\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction saveState(name, value) {\n const filePath = process.env['GITHUB_STATE'] || '';\n if (filePath) {\n return file_command_1.issueFileCommand('STATE', file_command_1.prepareKeyValueMessage(name, value));\n }\n command_1.issueCommand('save-state', { name }, utils_1.toCommandValue(value));\n}\nexports.saveState = saveState;\n/**\n * Gets the value of an state set by this action's main execution.\n *\n * @param name name of the state to get\n * @returns string\n */\nfunction getState(name) {\n return process.env[`STATE_${name}`] || '';\n}\nexports.getState = getState;\nfunction getIDToken(aud) {\n return __awaiter(this, void 0, void 0, function* () {\n return yield oidc_utils_1.OidcClient.getIDToken(aud);\n });\n}\nexports.getIDToken = getIDToken;\n/**\n * Summary exports\n */\nvar summary_1 = require(\"./summary\");\nObject.defineProperty(exports, \"summary\", { enumerable: true, get: function () { return summary_1.summary; } });\n/**\n * @deprecated use core.summary\n */\nvar summary_2 = require(\"./summary\");\nObject.defineProperty(exports, \"markdownSummary\", { enumerable: true, get: function () { return summary_2.markdownSummary; } });\n/**\n * Path exports\n */\nvar path_utils_1 = require(\"./path-utils\");\nObject.defineProperty(exports, \"toPosixPath\", { enumerable: true, get: function () { return path_utils_1.toPosixPath; } });\nObject.defineProperty(exports, \"toWin32Path\", { enumerable: true, get: function () { return path_utils_1.toWin32Path; } });\nObject.defineProperty(exports, \"toPlatformPath\", { enumerable: true, get: function () { return path_utils_1.toPlatformPath; } });\n//# sourceMappingURL=core.js.map","\"use strict\";\n// For internal use, subject to change.\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.prepareKeyValueMessage = exports.issueFileCommand = void 0;\n// We use any as a valid input type\n/* eslint-disable @typescript-eslint/no-explicit-any */\nconst fs = __importStar(require(\"fs\"));\nconst os = __importStar(require(\"os\"));\nconst uuid_1 = require(\"uuid\");\nconst utils_1 = require(\"./utils\");\nfunction issueFileCommand(command, message) {\n const filePath = process.env[`GITHUB_${command}`];\n if (!filePath) {\n throw new Error(`Unable to find environment variable for file command ${command}`);\n }\n if (!fs.existsSync(filePath)) {\n throw new Error(`Missing file at path: ${filePath}`);\n }\n fs.appendFileSync(filePath, `${utils_1.toCommandValue(message)}${os.EOL}`, {\n encoding: 'utf8'\n });\n}\nexports.issueFileCommand = issueFileCommand;\nfunction prepareKeyValueMessage(key, value) {\n const delimiter = `ghadelimiter_${uuid_1.v4()}`;\n const convertedValue = utils_1.toCommandValue(value);\n // These should realistically never happen, but just in case someone finds a\n // way to exploit uuid generation let's not allow keys or values that contain\n // the delimiter.\n if (key.includes(delimiter)) {\n throw new Error(`Unexpected input: name should not contain the delimiter \"${delimiter}\"`);\n }\n if (convertedValue.includes(delimiter)) {\n throw new Error(`Unexpected input: value should not contain the delimiter \"${delimiter}\"`);\n }\n return `${key}<<${delimiter}${os.EOL}${convertedValue}${os.EOL}${delimiter}`;\n}\nexports.prepareKeyValueMessage = prepareKeyValueMessage;\n//# sourceMappingURL=file-command.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.OidcClient = void 0;\nconst http_client_1 = require(\"@actions/http-client\");\nconst auth_1 = require(\"@actions/http-client/lib/auth\");\nconst core_1 = require(\"./core\");\nclass OidcClient {\n static createHttpClient(allowRetry = true, maxRetry = 10) {\n const requestOptions = {\n allowRetries: allowRetry,\n maxRetries: maxRetry\n };\n return new http_client_1.HttpClient('actions/oidc-client', [new auth_1.BearerCredentialHandler(OidcClient.getRequestToken())], requestOptions);\n }\n static getRequestToken() {\n const token = process.env['ACTIONS_ID_TOKEN_REQUEST_TOKEN'];\n if (!token) {\n throw new Error('Unable to get ACTIONS_ID_TOKEN_REQUEST_TOKEN env variable');\n }\n return token;\n }\n static getIDTokenUrl() {\n const runtimeUrl = process.env['ACTIONS_ID_TOKEN_REQUEST_URL'];\n if (!runtimeUrl) {\n throw new Error('Unable to get ACTIONS_ID_TOKEN_REQUEST_URL env variable');\n }\n return runtimeUrl;\n }\n static getCall(id_token_url) {\n var _a;\n return __awaiter(this, void 0, void 0, function* () {\n const httpclient = OidcClient.createHttpClient();\n const res = yield httpclient\n .getJson(id_token_url)\n .catch(error => {\n throw new Error(`Failed to get ID Token. \\n \n Error Code : ${error.statusCode}\\n \n Error Message: ${error.result.message}`);\n });\n const id_token = (_a = res.result) === null || _a === void 0 ? void 0 : _a.value;\n if (!id_token) {\n throw new Error('Response json body do not have ID Token field');\n }\n return id_token;\n });\n }\n static getIDToken(audience) {\n return __awaiter(this, void 0, void 0, function* () {\n try {\n // New ID Token is requested from action service\n let id_token_url = OidcClient.getIDTokenUrl();\n if (audience) {\n const encodedAudience = encodeURIComponent(audience);\n id_token_url = `${id_token_url}&audience=${encodedAudience}`;\n }\n core_1.debug(`ID token url is ${id_token_url}`);\n const id_token = yield OidcClient.getCall(id_token_url);\n core_1.setSecret(id_token);\n return id_token;\n }\n catch (error) {\n throw new Error(`Error message: ${error.message}`);\n }\n });\n }\n}\nexports.OidcClient = OidcClient;\n//# sourceMappingURL=oidc-utils.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.toPlatformPath = exports.toWin32Path = exports.toPosixPath = void 0;\nconst path = __importStar(require(\"path\"));\n/**\n * toPosixPath converts the given path to the posix form. On Windows, \\\\ will be\n * replaced with /.\n *\n * @param pth. Path to transform.\n * @return string Posix path.\n */\nfunction toPosixPath(pth) {\n return pth.replace(/[\\\\]/g, '/');\n}\nexports.toPosixPath = toPosixPath;\n/**\n * toWin32Path converts the given path to the win32 form. On Linux, / will be\n * replaced with \\\\.\n *\n * @param pth. Path to transform.\n * @return string Win32 path.\n */\nfunction toWin32Path(pth) {\n return pth.replace(/[/]/g, '\\\\');\n}\nexports.toWin32Path = toWin32Path;\n/**\n * toPlatformPath converts the given path to a platform-specific path. It does\n * this by replacing instances of / and \\ with the platform-specific path\n * separator.\n *\n * @param pth The path to platformize.\n * @return string The platform-specific path.\n */\nfunction toPlatformPath(pth) {\n return pth.replace(/[/\\\\]/g, path.sep);\n}\nexports.toPlatformPath = toPlatformPath;\n//# sourceMappingURL=path-utils.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.summary = exports.markdownSummary = exports.SUMMARY_DOCS_URL = exports.SUMMARY_ENV_VAR = void 0;\nconst os_1 = require(\"os\");\nconst fs_1 = require(\"fs\");\nconst { access, appendFile, writeFile } = fs_1.promises;\nexports.SUMMARY_ENV_VAR = 'GITHUB_STEP_SUMMARY';\nexports.SUMMARY_DOCS_URL = 'https://docs.github.com/actions/using-workflows/workflow-commands-for-github-actions#adding-a-job-summary';\nclass Summary {\n constructor() {\n this._buffer = '';\n }\n /**\n * Finds the summary file path from the environment, rejects if env var is not found or file does not exist\n * Also checks r/w permissions.\n *\n * @returns step summary file path\n */\n filePath() {\n return __awaiter(this, void 0, void 0, function* () {\n if (this._filePath) {\n return this._filePath;\n }\n const pathFromEnv = process.env[exports.SUMMARY_ENV_VAR];\n if (!pathFromEnv) {\n throw new Error(`Unable to find environment variable for $${exports.SUMMARY_ENV_VAR}. Check if your runtime environment supports job summaries.`);\n }\n try {\n yield access(pathFromEnv, fs_1.constants.R_OK | fs_1.constants.W_OK);\n }\n catch (_a) {\n throw new Error(`Unable to access summary file: '${pathFromEnv}'. Check if the file has correct read/write permissions.`);\n }\n this._filePath = pathFromEnv;\n return this._filePath;\n });\n }\n /**\n * Wraps content in an HTML tag, adding any HTML attributes\n *\n * @param {string} tag HTML tag to wrap\n * @param {string | null} content content within the tag\n * @param {[attribute: string]: string} attrs key-value list of HTML attributes to add\n *\n * @returns {string} content wrapped in HTML element\n */\n wrap(tag, content, attrs = {}) {\n const htmlAttrs = Object.entries(attrs)\n .map(([key, value]) => ` ${key}=\"${value}\"`)\n .join('');\n if (!content) {\n return `<${tag}${htmlAttrs}>`;\n }\n return `<${tag}${htmlAttrs}>${content}`;\n }\n /**\n * Writes text in the buffer to the summary buffer file and empties buffer. Will append by default.\n *\n * @param {SummaryWriteOptions} [options] (optional) options for write operation\n *\n * @returns {Promise} summary instance\n */\n write(options) {\n return __awaiter(this, void 0, void 0, function* () {\n const overwrite = !!(options === null || options === void 0 ? void 0 : options.overwrite);\n const filePath = yield this.filePath();\n const writeFunc = overwrite ? writeFile : appendFile;\n yield writeFunc(filePath, this._buffer, { encoding: 'utf8' });\n return this.emptyBuffer();\n });\n }\n /**\n * Clears the summary buffer and wipes the summary file\n *\n * @returns {Summary} summary instance\n */\n clear() {\n return __awaiter(this, void 0, void 0, function* () {\n return this.emptyBuffer().write({ overwrite: true });\n });\n }\n /**\n * Returns the current summary buffer as a string\n *\n * @returns {string} string of summary buffer\n */\n stringify() {\n return this._buffer;\n }\n /**\n * If the summary buffer is empty\n *\n * @returns {boolen} true if the buffer is empty\n */\n isEmptyBuffer() {\n return this._buffer.length === 0;\n }\n /**\n * Resets the summary buffer without writing to summary file\n *\n * @returns {Summary} summary instance\n */\n emptyBuffer() {\n this._buffer = '';\n return this;\n }\n /**\n * Adds raw text to the summary buffer\n *\n * @param {string} text content to add\n * @param {boolean} [addEOL=false] (optional) append an EOL to the raw text (default: false)\n *\n * @returns {Summary} summary instance\n */\n addRaw(text, addEOL = false) {\n this._buffer += text;\n return addEOL ? this.addEOL() : this;\n }\n /**\n * Adds the operating system-specific end-of-line marker to the buffer\n *\n * @returns {Summary} summary instance\n */\n addEOL() {\n return this.addRaw(os_1.EOL);\n }\n /**\n * Adds an HTML codeblock to the summary buffer\n *\n * @param {string} code content to render within fenced code block\n * @param {string} lang (optional) language to syntax highlight code\n *\n * @returns {Summary} summary instance\n */\n addCodeBlock(code, lang) {\n const attrs = Object.assign({}, (lang && { lang }));\n const element = this.wrap('pre', this.wrap('code', code), attrs);\n return this.addRaw(element).addEOL();\n }\n /**\n * Adds an HTML list to the summary buffer\n *\n * @param {string[]} items list of items to render\n * @param {boolean} [ordered=false] (optional) if the rendered list should be ordered or not (default: false)\n *\n * @returns {Summary} summary instance\n */\n addList(items, ordered = false) {\n const tag = ordered ? 'ol' : 'ul';\n const listItems = items.map(item => this.wrap('li', item)).join('');\n const element = this.wrap(tag, listItems);\n return this.addRaw(element).addEOL();\n }\n /**\n * Adds an HTML table to the summary buffer\n *\n * @param {SummaryTableCell[]} rows table rows\n *\n * @returns {Summary} summary instance\n */\n addTable(rows) {\n const tableBody = rows\n .map(row => {\n const cells = row\n .map(cell => {\n if (typeof cell === 'string') {\n return this.wrap('td', cell);\n }\n const { header, data, colspan, rowspan } = cell;\n const tag = header ? 'th' : 'td';\n const attrs = Object.assign(Object.assign({}, (colspan && { colspan })), (rowspan && { rowspan }));\n return this.wrap(tag, data, attrs);\n })\n .join('');\n return this.wrap('tr', cells);\n })\n .join('');\n const element = this.wrap('table', tableBody);\n return this.addRaw(element).addEOL();\n }\n /**\n * Adds a collapsable HTML details element to the summary buffer\n *\n * @param {string} label text for the closed state\n * @param {string} content collapsable content\n *\n * @returns {Summary} summary instance\n */\n addDetails(label, content) {\n const element = this.wrap('details', this.wrap('summary', label) + content);\n return this.addRaw(element).addEOL();\n }\n /**\n * Adds an HTML image tag to the summary buffer\n *\n * @param {string} src path to the image you to embed\n * @param {string} alt text description of the image\n * @param {SummaryImageOptions} options (optional) addition image attributes\n *\n * @returns {Summary} summary instance\n */\n addImage(src, alt, options) {\n const { width, height } = options || {};\n const attrs = Object.assign(Object.assign({}, (width && { width })), (height && { height }));\n const element = this.wrap('img', null, Object.assign({ src, alt }, attrs));\n return this.addRaw(element).addEOL();\n }\n /**\n * Adds an HTML section heading element\n *\n * @param {string} text heading text\n * @param {number | string} [level=1] (optional) the heading level, default: 1\n *\n * @returns {Summary} summary instance\n */\n addHeading(text, level) {\n const tag = `h${level}`;\n const allowedTag = ['h1', 'h2', 'h3', 'h4', 'h5', 'h6'].includes(tag)\n ? tag\n : 'h1';\n const element = this.wrap(allowedTag, text);\n return this.addRaw(element).addEOL();\n }\n /**\n * Adds an HTML thematic break (
) to the summary buffer\n *\n * @returns {Summary} summary instance\n */\n addSeparator() {\n const element = this.wrap('hr', null);\n return this.addRaw(element).addEOL();\n }\n /**\n * Adds an HTML line break (
) to the summary buffer\n *\n * @returns {Summary} summary instance\n */\n addBreak() {\n const element = this.wrap('br', null);\n return this.addRaw(element).addEOL();\n }\n /**\n * Adds an HTML blockquote to the summary buffer\n *\n * @param {string} text quote text\n * @param {string} cite (optional) citation url\n *\n * @returns {Summary} summary instance\n */\n addQuote(text, cite) {\n const attrs = Object.assign({}, (cite && { cite }));\n const element = this.wrap('blockquote', text, attrs);\n return this.addRaw(element).addEOL();\n }\n /**\n * Adds an HTML anchor tag to the summary buffer\n *\n * @param {string} text link text/content\n * @param {string} href hyperlink\n *\n * @returns {Summary} summary instance\n */\n addLink(text, href) {\n const element = this.wrap('a', text, { href });\n return this.addRaw(element).addEOL();\n }\n}\nconst _summary = new Summary();\n/**\n * @deprecated use `core.summary`\n */\nexports.markdownSummary = _summary;\nexports.summary = _summary;\n//# sourceMappingURL=summary.js.map","\"use strict\";\n// We use any as a valid input type\n/* eslint-disable @typescript-eslint/no-explicit-any */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.toCommandProperties = exports.toCommandValue = void 0;\n/**\n * Sanitizes an input into a string so it can be passed into issueCommand safely\n * @param input input to sanitize into a string\n */\nfunction toCommandValue(input) {\n if (input === null || input === undefined) {\n return '';\n }\n else if (typeof input === 'string' || input instanceof String) {\n return input;\n }\n return JSON.stringify(input);\n}\nexports.toCommandValue = toCommandValue;\n/**\n *\n * @param annotationProperties\n * @returns The command properties to send with the actual annotation command\n * See IssueCommandProperties: https://github.com/actions/runner/blob/main/src/Runner.Worker/ActionCommandManager.cs#L646\n */\nfunction toCommandProperties(annotationProperties) {\n if (!Object.keys(annotationProperties).length) {\n return {};\n }\n return {\n title: annotationProperties.title,\n file: annotationProperties.file,\n line: annotationProperties.startLine,\n endLine: annotationProperties.endLine,\n col: annotationProperties.startColumn,\n endColumn: annotationProperties.endColumn\n };\n}\nexports.toCommandProperties = toCommandProperties;\n//# sourceMappingURL=utils.js.map","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nObject.defineProperty(exports, \"v1\", {\n enumerable: true,\n get: function () {\n return _v.default;\n }\n});\nObject.defineProperty(exports, \"v3\", {\n enumerable: true,\n get: function () {\n return _v2.default;\n }\n});\nObject.defineProperty(exports, \"v4\", {\n enumerable: true,\n get: function () {\n return _v3.default;\n }\n});\nObject.defineProperty(exports, \"v5\", {\n enumerable: true,\n get: function () {\n return _v4.default;\n }\n});\nObject.defineProperty(exports, \"NIL\", {\n enumerable: true,\n get: function () {\n return _nil.default;\n }\n});\nObject.defineProperty(exports, \"version\", {\n enumerable: true,\n get: function () {\n return _version.default;\n }\n});\nObject.defineProperty(exports, \"validate\", {\n enumerable: true,\n get: function () {\n return _validate.default;\n }\n});\nObject.defineProperty(exports, \"stringify\", {\n enumerable: true,\n get: function () {\n return _stringify.default;\n }\n});\nObject.defineProperty(exports, \"parse\", {\n enumerable: true,\n get: function () {\n return _parse.default;\n }\n});\n\nvar _v = _interopRequireDefault(require(\"./v1.js\"));\n\nvar _v2 = _interopRequireDefault(require(\"./v3.js\"));\n\nvar _v3 = _interopRequireDefault(require(\"./v4.js\"));\n\nvar _v4 = _interopRequireDefault(require(\"./v5.js\"));\n\nvar _nil = _interopRequireDefault(require(\"./nil.js\"));\n\nvar _version = _interopRequireDefault(require(\"./version.js\"));\n\nvar _validate = _interopRequireDefault(require(\"./validate.js\"));\n\nvar _stringify = _interopRequireDefault(require(\"./stringify.js\"));\n\nvar _parse = _interopRequireDefault(require(\"./parse.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _crypto = _interopRequireDefault(require(\"crypto\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction md5(bytes) {\n if (Array.isArray(bytes)) {\n bytes = Buffer.from(bytes);\n } else if (typeof bytes === 'string') {\n bytes = Buffer.from(bytes, 'utf8');\n }\n\n return _crypto.default.createHash('md5').update(bytes).digest();\n}\n\nvar _default = md5;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _default = '00000000-0000-0000-0000-000000000000';\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _validate = _interopRequireDefault(require(\"./validate.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction parse(uuid) {\n if (!(0, _validate.default)(uuid)) {\n throw TypeError('Invalid UUID');\n }\n\n let v;\n const arr = new Uint8Array(16); // Parse ########-....-....-....-............\n\n arr[0] = (v = parseInt(uuid.slice(0, 8), 16)) >>> 24;\n arr[1] = v >>> 16 & 0xff;\n arr[2] = v >>> 8 & 0xff;\n arr[3] = v & 0xff; // Parse ........-####-....-....-............\n\n arr[4] = (v = parseInt(uuid.slice(9, 13), 16)) >>> 8;\n arr[5] = v & 0xff; // Parse ........-....-####-....-............\n\n arr[6] = (v = parseInt(uuid.slice(14, 18), 16)) >>> 8;\n arr[7] = v & 0xff; // Parse ........-....-....-####-............\n\n arr[8] = (v = parseInt(uuid.slice(19, 23), 16)) >>> 8;\n arr[9] = v & 0xff; // Parse ........-....-....-....-############\n // (Use \"/\" to avoid 32-bit truncation when bit-shifting high-order bytes)\n\n arr[10] = (v = parseInt(uuid.slice(24, 36), 16)) / 0x10000000000 & 0xff;\n arr[11] = v / 0x100000000 & 0xff;\n arr[12] = v >>> 24 & 0xff;\n arr[13] = v >>> 16 & 0xff;\n arr[14] = v >>> 8 & 0xff;\n arr[15] = v & 0xff;\n return arr;\n}\n\nvar _default = parse;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _default = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = rng;\n\nvar _crypto = _interopRequireDefault(require(\"crypto\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nconst rnds8Pool = new Uint8Array(256); // # of random values to pre-allocate\n\nlet poolPtr = rnds8Pool.length;\n\nfunction rng() {\n if (poolPtr > rnds8Pool.length - 16) {\n _crypto.default.randomFillSync(rnds8Pool);\n\n poolPtr = 0;\n }\n\n return rnds8Pool.slice(poolPtr, poolPtr += 16);\n}","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _crypto = _interopRequireDefault(require(\"crypto\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction sha1(bytes) {\n if (Array.isArray(bytes)) {\n bytes = Buffer.from(bytes);\n } else if (typeof bytes === 'string') {\n bytes = Buffer.from(bytes, 'utf8');\n }\n\n return _crypto.default.createHash('sha1').update(bytes).digest();\n}\n\nvar _default = sha1;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _validate = _interopRequireDefault(require(\"./validate.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/**\n * Convert array of 16 byte values to UUID string format of the form:\n * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX\n */\nconst byteToHex = [];\n\nfor (let i = 0; i < 256; ++i) {\n byteToHex.push((i + 0x100).toString(16).substr(1));\n}\n\nfunction stringify(arr, offset = 0) {\n // Note: Be careful editing this code! It's been tuned for performance\n // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434\n const uuid = (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase(); // Consistency check for valid UUID. If this throws, it's likely due to one\n // of the following:\n // - One or more input array values don't map to a hex octet (leading to\n // \"undefined\" in the uuid)\n // - Invalid input values for the RFC `version` or `variant` fields\n\n if (!(0, _validate.default)(uuid)) {\n throw TypeError('Stringified UUID is invalid');\n }\n\n return uuid;\n}\n\nvar _default = stringify;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _rng = _interopRequireDefault(require(\"./rng.js\"));\n\nvar _stringify = _interopRequireDefault(require(\"./stringify.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n// **`v1()` - Generate time-based UUID**\n//\n// Inspired by https://github.com/LiosK/UUID.js\n// and http://docs.python.org/library/uuid.html\nlet _nodeId;\n\nlet _clockseq; // Previous uuid creation time\n\n\nlet _lastMSecs = 0;\nlet _lastNSecs = 0; // See https://github.com/uuidjs/uuid for API details\n\nfunction v1(options, buf, offset) {\n let i = buf && offset || 0;\n const b = buf || new Array(16);\n options = options || {};\n let node = options.node || _nodeId;\n let clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq; // node and clockseq need to be initialized to random values if they're not\n // specified. We do this lazily to minimize issues related to insufficient\n // system entropy. See #189\n\n if (node == null || clockseq == null) {\n const seedBytes = options.random || (options.rng || _rng.default)();\n\n if (node == null) {\n // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1)\n node = _nodeId = [seedBytes[0] | 0x01, seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]];\n }\n\n if (clockseq == null) {\n // Per 4.2.2, randomize (14 bit) clockseq\n clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff;\n }\n } // UUID timestamps are 100 nano-second units since the Gregorian epoch,\n // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so\n // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs'\n // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00.\n\n\n let msecs = options.msecs !== undefined ? options.msecs : Date.now(); // Per 4.2.1.2, use count of uuid's generated during the current clock\n // cycle to simulate higher resolution clock\n\n let nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1; // Time since last uuid creation (in msecs)\n\n const dt = msecs - _lastMSecs + (nsecs - _lastNSecs) / 10000; // Per 4.2.1.2, Bump clockseq on clock regression\n\n if (dt < 0 && options.clockseq === undefined) {\n clockseq = clockseq + 1 & 0x3fff;\n } // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new\n // time interval\n\n\n if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) {\n nsecs = 0;\n } // Per 4.2.1.2 Throw error if too many uuids are requested\n\n\n if (nsecs >= 10000) {\n throw new Error(\"uuid.v1(): Can't create more than 10M uuids/sec\");\n }\n\n _lastMSecs = msecs;\n _lastNSecs = nsecs;\n _clockseq = clockseq; // Per 4.1.4 - Convert from unix epoch to Gregorian epoch\n\n msecs += 12219292800000; // `time_low`\n\n const tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000;\n b[i++] = tl >>> 24 & 0xff;\n b[i++] = tl >>> 16 & 0xff;\n b[i++] = tl >>> 8 & 0xff;\n b[i++] = tl & 0xff; // `time_mid`\n\n const tmh = msecs / 0x100000000 * 10000 & 0xfffffff;\n b[i++] = tmh >>> 8 & 0xff;\n b[i++] = tmh & 0xff; // `time_high_and_version`\n\n b[i++] = tmh >>> 24 & 0xf | 0x10; // include version\n\n b[i++] = tmh >>> 16 & 0xff; // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant)\n\n b[i++] = clockseq >>> 8 | 0x80; // `clock_seq_low`\n\n b[i++] = clockseq & 0xff; // `node`\n\n for (let n = 0; n < 6; ++n) {\n b[i + n] = node[n];\n }\n\n return buf || (0, _stringify.default)(b);\n}\n\nvar _default = v1;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _v = _interopRequireDefault(require(\"./v35.js\"));\n\nvar _md = _interopRequireDefault(require(\"./md5.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nconst v3 = (0, _v.default)('v3', 0x30, _md.default);\nvar _default = v3;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = _default;\nexports.URL = exports.DNS = void 0;\n\nvar _stringify = _interopRequireDefault(require(\"./stringify.js\"));\n\nvar _parse = _interopRequireDefault(require(\"./parse.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction stringToBytes(str) {\n str = unescape(encodeURIComponent(str)); // UTF8 escape\n\n const bytes = [];\n\n for (let i = 0; i < str.length; ++i) {\n bytes.push(str.charCodeAt(i));\n }\n\n return bytes;\n}\n\nconst DNS = '6ba7b810-9dad-11d1-80b4-00c04fd430c8';\nexports.DNS = DNS;\nconst URL = '6ba7b811-9dad-11d1-80b4-00c04fd430c8';\nexports.URL = URL;\n\nfunction _default(name, version, hashfunc) {\n function generateUUID(value, namespace, buf, offset) {\n if (typeof value === 'string') {\n value = stringToBytes(value);\n }\n\n if (typeof namespace === 'string') {\n namespace = (0, _parse.default)(namespace);\n }\n\n if (namespace.length !== 16) {\n throw TypeError('Namespace must be array-like (16 iterable integer values, 0-255)');\n } // Compute hash of namespace and value, Per 4.3\n // Future: Use spread syntax when supported on all platforms, e.g. `bytes =\n // hashfunc([...namespace, ... value])`\n\n\n let bytes = new Uint8Array(16 + value.length);\n bytes.set(namespace);\n bytes.set(value, namespace.length);\n bytes = hashfunc(bytes);\n bytes[6] = bytes[6] & 0x0f | version;\n bytes[8] = bytes[8] & 0x3f | 0x80;\n\n if (buf) {\n offset = offset || 0;\n\n for (let i = 0; i < 16; ++i) {\n buf[offset + i] = bytes[i];\n }\n\n return buf;\n }\n\n return (0, _stringify.default)(bytes);\n } // Function#name is not settable on some platforms (#270)\n\n\n try {\n generateUUID.name = name; // eslint-disable-next-line no-empty\n } catch (err) {} // For CommonJS default export support\n\n\n generateUUID.DNS = DNS;\n generateUUID.URL = URL;\n return generateUUID;\n}","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _rng = _interopRequireDefault(require(\"./rng.js\"));\n\nvar _stringify = _interopRequireDefault(require(\"./stringify.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction v4(options, buf, offset) {\n options = options || {};\n\n const rnds = options.random || (options.rng || _rng.default)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`\n\n\n rnds[6] = rnds[6] & 0x0f | 0x40;\n rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided\n\n if (buf) {\n offset = offset || 0;\n\n for (let i = 0; i < 16; ++i) {\n buf[offset + i] = rnds[i];\n }\n\n return buf;\n }\n\n return (0, _stringify.default)(rnds);\n}\n\nvar _default = v4;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _v = _interopRequireDefault(require(\"./v35.js\"));\n\nvar _sha = _interopRequireDefault(require(\"./sha1.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nconst v5 = (0, _v.default)('v5', 0x50, _sha.default);\nvar _default = v5;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _regex = _interopRequireDefault(require(\"./regex.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction validate(uuid) {\n return typeof uuid === 'string' && _regex.default.test(uuid);\n}\n\nvar _default = validate;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _validate = _interopRequireDefault(require(\"./validate.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction version(uuid) {\n if (!(0, _validate.default)(uuid)) {\n throw TypeError('Invalid UUID');\n }\n\n return parseInt(uuid.substr(14, 1), 16);\n}\n\nvar _default = version;\nexports.default = _default;","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getExecOutput = exports.exec = void 0;\nconst string_decoder_1 = require(\"string_decoder\");\nconst tr = __importStar(require(\"./toolrunner\"));\n/**\n * Exec a command.\n * Output will be streamed to the live console.\n * Returns promise with return code\n *\n * @param commandLine command to execute (can include additional args). Must be correctly escaped.\n * @param args optional arguments for tool. Escaping is handled by the lib.\n * @param options optional exec options. See ExecOptions\n * @returns Promise exit code\n */\nfunction exec(commandLine, args, options) {\n return __awaiter(this, void 0, void 0, function* () {\n const commandArgs = tr.argStringToArray(commandLine);\n if (commandArgs.length === 0) {\n throw new Error(`Parameter 'commandLine' cannot be null or empty.`);\n }\n // Path to tool to execute should be first arg\n const toolPath = commandArgs[0];\n args = commandArgs.slice(1).concat(args || []);\n const runner = new tr.ToolRunner(toolPath, args, options);\n return runner.exec();\n });\n}\nexports.exec = exec;\n/**\n * Exec a command and get the output.\n * Output will be streamed to the live console.\n * Returns promise with the exit code and collected stdout and stderr\n *\n * @param commandLine command to execute (can include additional args). Must be correctly escaped.\n * @param args optional arguments for tool. Escaping is handled by the lib.\n * @param options optional exec options. See ExecOptions\n * @returns Promise exit code, stdout, and stderr\n */\nfunction getExecOutput(commandLine, args, options) {\n var _a, _b;\n return __awaiter(this, void 0, void 0, function* () {\n let stdout = '';\n let stderr = '';\n //Using string decoder covers the case where a mult-byte character is split\n const stdoutDecoder = new string_decoder_1.StringDecoder('utf8');\n const stderrDecoder = new string_decoder_1.StringDecoder('utf8');\n const originalStdoutListener = (_a = options === null || options === void 0 ? void 0 : options.listeners) === null || _a === void 0 ? void 0 : _a.stdout;\n const originalStdErrListener = (_b = options === null || options === void 0 ? void 0 : options.listeners) === null || _b === void 0 ? void 0 : _b.stderr;\n const stdErrListener = (data) => {\n stderr += stderrDecoder.write(data);\n if (originalStdErrListener) {\n originalStdErrListener(data);\n }\n };\n const stdOutListener = (data) => {\n stdout += stdoutDecoder.write(data);\n if (originalStdoutListener) {\n originalStdoutListener(data);\n }\n };\n const listeners = Object.assign(Object.assign({}, options === null || options === void 0 ? void 0 : options.listeners), { stdout: stdOutListener, stderr: stdErrListener });\n const exitCode = yield exec(commandLine, args, Object.assign(Object.assign({}, options), { listeners }));\n //flush any remaining characters\n stdout += stdoutDecoder.end();\n stderr += stderrDecoder.end();\n return {\n exitCode,\n stdout,\n stderr\n };\n });\n}\nexports.getExecOutput = getExecOutput;\n//# sourceMappingURL=exec.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.argStringToArray = exports.ToolRunner = void 0;\nconst os = __importStar(require(\"os\"));\nconst events = __importStar(require(\"events\"));\nconst child = __importStar(require(\"child_process\"));\nconst path = __importStar(require(\"path\"));\nconst io = __importStar(require(\"@actions/io\"));\nconst ioUtil = __importStar(require(\"@actions/io/lib/io-util\"));\nconst timers_1 = require(\"timers\");\n/* eslint-disable @typescript-eslint/unbound-method */\nconst IS_WINDOWS = process.platform === 'win32';\n/*\n * Class for running command line tools. Handles quoting and arg parsing in a platform agnostic way.\n */\nclass ToolRunner extends events.EventEmitter {\n constructor(toolPath, args, options) {\n super();\n if (!toolPath) {\n throw new Error(\"Parameter 'toolPath' cannot be null or empty.\");\n }\n this.toolPath = toolPath;\n this.args = args || [];\n this.options = options || {};\n }\n _debug(message) {\n if (this.options.listeners && this.options.listeners.debug) {\n this.options.listeners.debug(message);\n }\n }\n _getCommandString(options, noPrefix) {\n const toolPath = this._getSpawnFileName();\n const args = this._getSpawnArgs(options);\n let cmd = noPrefix ? '' : '[command]'; // omit prefix when piped to a second tool\n if (IS_WINDOWS) {\n // Windows + cmd file\n if (this._isCmdFile()) {\n cmd += toolPath;\n for (const a of args) {\n cmd += ` ${a}`;\n }\n }\n // Windows + verbatim\n else if (options.windowsVerbatimArguments) {\n cmd += `\"${toolPath}\"`;\n for (const a of args) {\n cmd += ` ${a}`;\n }\n }\n // Windows (regular)\n else {\n cmd += this._windowsQuoteCmdArg(toolPath);\n for (const a of args) {\n cmd += ` ${this._windowsQuoteCmdArg(a)}`;\n }\n }\n }\n else {\n // OSX/Linux - this can likely be improved with some form of quoting.\n // creating processes on Unix is fundamentally different than Windows.\n // on Unix, execvp() takes an arg array.\n cmd += toolPath;\n for (const a of args) {\n cmd += ` ${a}`;\n }\n }\n return cmd;\n }\n _processLineBuffer(data, strBuffer, onLine) {\n try {\n let s = strBuffer + data.toString();\n let n = s.indexOf(os.EOL);\n while (n > -1) {\n const line = s.substring(0, n);\n onLine(line);\n // the rest of the string ...\n s = s.substring(n + os.EOL.length);\n n = s.indexOf(os.EOL);\n }\n return s;\n }\n catch (err) {\n // streaming lines to console is best effort. Don't fail a build.\n this._debug(`error processing line. Failed with error ${err}`);\n return '';\n }\n }\n _getSpawnFileName() {\n if (IS_WINDOWS) {\n if (this._isCmdFile()) {\n return process.env['COMSPEC'] || 'cmd.exe';\n }\n }\n return this.toolPath;\n }\n _getSpawnArgs(options) {\n if (IS_WINDOWS) {\n if (this._isCmdFile()) {\n let argline = `/D /S /C \"${this._windowsQuoteCmdArg(this.toolPath)}`;\n for (const a of this.args) {\n argline += ' ';\n argline += options.windowsVerbatimArguments\n ? a\n : this._windowsQuoteCmdArg(a);\n }\n argline += '\"';\n return [argline];\n }\n }\n return this.args;\n }\n _endsWith(str, end) {\n return str.endsWith(end);\n }\n _isCmdFile() {\n const upperToolPath = this.toolPath.toUpperCase();\n return (this._endsWith(upperToolPath, '.CMD') ||\n this._endsWith(upperToolPath, '.BAT'));\n }\n _windowsQuoteCmdArg(arg) {\n // for .exe, apply the normal quoting rules that libuv applies\n if (!this._isCmdFile()) {\n return this._uvQuoteCmdArg(arg);\n }\n // otherwise apply quoting rules specific to the cmd.exe command line parser.\n // the libuv rules are generic and are not designed specifically for cmd.exe\n // command line parser.\n //\n // for a detailed description of the cmd.exe command line parser, refer to\n // http://stackoverflow.com/questions/4094699/how-does-the-windows-command-interpreter-cmd-exe-parse-scripts/7970912#7970912\n // need quotes for empty arg\n if (!arg) {\n return '\"\"';\n }\n // determine whether the arg needs to be quoted\n const cmdSpecialChars = [\n ' ',\n '\\t',\n '&',\n '(',\n ')',\n '[',\n ']',\n '{',\n '}',\n '^',\n '=',\n ';',\n '!',\n \"'\",\n '+',\n ',',\n '`',\n '~',\n '|',\n '<',\n '>',\n '\"'\n ];\n let needsQuotes = false;\n for (const char of arg) {\n if (cmdSpecialChars.some(x => x === char)) {\n needsQuotes = true;\n break;\n }\n }\n // short-circuit if quotes not needed\n if (!needsQuotes) {\n return arg;\n }\n // the following quoting rules are very similar to the rules that by libuv applies.\n //\n // 1) wrap the string in quotes\n //\n // 2) double-up quotes - i.e. \" => \"\"\n //\n // this is different from the libuv quoting rules. libuv replaces \" with \\\", which unfortunately\n // doesn't work well with a cmd.exe command line.\n //\n // note, replacing \" with \"\" also works well if the arg is passed to a downstream .NET console app.\n // for example, the command line:\n // foo.exe \"myarg:\"\"my val\"\"\"\n // is parsed by a .NET console app into an arg array:\n // [ \"myarg:\\\"my val\\\"\" ]\n // which is the same end result when applying libuv quoting rules. although the actual\n // command line from libuv quoting rules would look like:\n // foo.exe \"myarg:\\\"my val\\\"\"\n //\n // 3) double-up slashes that precede a quote,\n // e.g. hello \\world => \"hello \\world\"\n // hello\\\"world => \"hello\\\\\"\"world\"\n // hello\\\\\"world => \"hello\\\\\\\\\"\"world\"\n // hello world\\ => \"hello world\\\\\"\n //\n // technically this is not required for a cmd.exe command line, or the batch argument parser.\n // the reasons for including this as a .cmd quoting rule are:\n //\n // a) this is optimized for the scenario where the argument is passed from the .cmd file to an\n // external program. many programs (e.g. .NET console apps) rely on the slash-doubling rule.\n //\n // b) it's what we've been doing previously (by deferring to node default behavior) and we\n // haven't heard any complaints about that aspect.\n //\n // note, a weakness of the quoting rules chosen here, is that % is not escaped. in fact, % cannot be\n // escaped when used on the command line directly - even though within a .cmd file % can be escaped\n // by using %%.\n //\n // the saving grace is, on the command line, %var% is left as-is if var is not defined. this contrasts\n // the line parsing rules within a .cmd file, where if var is not defined it is replaced with nothing.\n //\n // one option that was explored was replacing % with ^% - i.e. %var% => ^%var^%. this hack would\n // often work, since it is unlikely that var^ would exist, and the ^ character is removed when the\n // variable is used. the problem, however, is that ^ is not removed when %* is used to pass the args\n // to an external program.\n //\n // an unexplored potential solution for the % escaping problem, is to create a wrapper .cmd file.\n // % can be escaped within a .cmd file.\n let reverse = '\"';\n let quoteHit = true;\n for (let i = arg.length; i > 0; i--) {\n // walk the string in reverse\n reverse += arg[i - 1];\n if (quoteHit && arg[i - 1] === '\\\\') {\n reverse += '\\\\'; // double the slash\n }\n else if (arg[i - 1] === '\"') {\n quoteHit = true;\n reverse += '\"'; // double the quote\n }\n else {\n quoteHit = false;\n }\n }\n reverse += '\"';\n return reverse\n .split('')\n .reverse()\n .join('');\n }\n _uvQuoteCmdArg(arg) {\n // Tool runner wraps child_process.spawn() and needs to apply the same quoting as\n // Node in certain cases where the undocumented spawn option windowsVerbatimArguments\n // is used.\n //\n // Since this function is a port of quote_cmd_arg from Node 4.x (technically, lib UV,\n // see https://github.com/nodejs/node/blob/v4.x/deps/uv/src/win/process.c for details),\n // pasting copyright notice from Node within this function:\n //\n // Copyright Joyent, Inc. and other Node contributors. All rights reserved.\n //\n // Permission is hereby granted, free of charge, to any person obtaining a copy\n // of this software and associated documentation files (the \"Software\"), to\n // deal in the Software without restriction, including without limitation the\n // rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n // sell copies of the Software, and to permit persons to whom the Software is\n // furnished to do so, subject to the following conditions:\n //\n // The above copyright notice and this permission notice shall be included in\n // all copies or substantial portions of the Software.\n //\n // THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n // IN THE SOFTWARE.\n if (!arg) {\n // Need double quotation for empty argument\n return '\"\"';\n }\n if (!arg.includes(' ') && !arg.includes('\\t') && !arg.includes('\"')) {\n // No quotation needed\n return arg;\n }\n if (!arg.includes('\"') && !arg.includes('\\\\')) {\n // No embedded double quotes or backslashes, so I can just wrap\n // quote marks around the whole thing.\n return `\"${arg}\"`;\n }\n // Expected input/output:\n // input : hello\"world\n // output: \"hello\\\"world\"\n // input : hello\"\"world\n // output: \"hello\\\"\\\"world\"\n // input : hello\\world\n // output: hello\\world\n // input : hello\\\\world\n // output: hello\\\\world\n // input : hello\\\"world\n // output: \"hello\\\\\\\"world\"\n // input : hello\\\\\"world\n // output: \"hello\\\\\\\\\\\"world\"\n // input : hello world\\\n // output: \"hello world\\\\\" - note the comment in libuv actually reads \"hello world\\\"\n // but it appears the comment is wrong, it should be \"hello world\\\\\"\n let reverse = '\"';\n let quoteHit = true;\n for (let i = arg.length; i > 0; i--) {\n // walk the string in reverse\n reverse += arg[i - 1];\n if (quoteHit && arg[i - 1] === '\\\\') {\n reverse += '\\\\';\n }\n else if (arg[i - 1] === '\"') {\n quoteHit = true;\n reverse += '\\\\';\n }\n else {\n quoteHit = false;\n }\n }\n reverse += '\"';\n return reverse\n .split('')\n .reverse()\n .join('');\n }\n _cloneExecOptions(options) {\n options = options || {};\n const result = {\n cwd: options.cwd || process.cwd(),\n env: options.env || process.env,\n silent: options.silent || false,\n windowsVerbatimArguments: options.windowsVerbatimArguments || false,\n failOnStdErr: options.failOnStdErr || false,\n ignoreReturnCode: options.ignoreReturnCode || false,\n delay: options.delay || 10000\n };\n result.outStream = options.outStream || process.stdout;\n result.errStream = options.errStream || process.stderr;\n return result;\n }\n _getSpawnOptions(options, toolPath) {\n options = options || {};\n const result = {};\n result.cwd = options.cwd;\n result.env = options.env;\n result['windowsVerbatimArguments'] =\n options.windowsVerbatimArguments || this._isCmdFile();\n if (options.windowsVerbatimArguments) {\n result.argv0 = `\"${toolPath}\"`;\n }\n return result;\n }\n /**\n * Exec a tool.\n * Output will be streamed to the live console.\n * Returns promise with return code\n *\n * @param tool path to tool to exec\n * @param options optional exec options. See ExecOptions\n * @returns number\n */\n exec() {\n return __awaiter(this, void 0, void 0, function* () {\n // root the tool path if it is unrooted and contains relative pathing\n if (!ioUtil.isRooted(this.toolPath) &&\n (this.toolPath.includes('/') ||\n (IS_WINDOWS && this.toolPath.includes('\\\\')))) {\n // prefer options.cwd if it is specified, however options.cwd may also need to be rooted\n this.toolPath = path.resolve(process.cwd(), this.options.cwd || process.cwd(), this.toolPath);\n }\n // if the tool is only a file name, then resolve it from the PATH\n // otherwise verify it exists (add extension on Windows if necessary)\n this.toolPath = yield io.which(this.toolPath, true);\n return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {\n this._debug(`exec tool: ${this.toolPath}`);\n this._debug('arguments:');\n for (const arg of this.args) {\n this._debug(` ${arg}`);\n }\n const optionsNonNull = this._cloneExecOptions(this.options);\n if (!optionsNonNull.silent && optionsNonNull.outStream) {\n optionsNonNull.outStream.write(this._getCommandString(optionsNonNull) + os.EOL);\n }\n const state = new ExecState(optionsNonNull, this.toolPath);\n state.on('debug', (message) => {\n this._debug(message);\n });\n if (this.options.cwd && !(yield ioUtil.exists(this.options.cwd))) {\n return reject(new Error(`The cwd: ${this.options.cwd} does not exist!`));\n }\n const fileName = this._getSpawnFileName();\n const cp = child.spawn(fileName, this._getSpawnArgs(optionsNonNull), this._getSpawnOptions(this.options, fileName));\n let stdbuffer = '';\n if (cp.stdout) {\n cp.stdout.on('data', (data) => {\n if (this.options.listeners && this.options.listeners.stdout) {\n this.options.listeners.stdout(data);\n }\n if (!optionsNonNull.silent && optionsNonNull.outStream) {\n optionsNonNull.outStream.write(data);\n }\n stdbuffer = this._processLineBuffer(data, stdbuffer, (line) => {\n if (this.options.listeners && this.options.listeners.stdline) {\n this.options.listeners.stdline(line);\n }\n });\n });\n }\n let errbuffer = '';\n if (cp.stderr) {\n cp.stderr.on('data', (data) => {\n state.processStderr = true;\n if (this.options.listeners && this.options.listeners.stderr) {\n this.options.listeners.stderr(data);\n }\n if (!optionsNonNull.silent &&\n optionsNonNull.errStream &&\n optionsNonNull.outStream) {\n const s = optionsNonNull.failOnStdErr\n ? optionsNonNull.errStream\n : optionsNonNull.outStream;\n s.write(data);\n }\n errbuffer = this._processLineBuffer(data, errbuffer, (line) => {\n if (this.options.listeners && this.options.listeners.errline) {\n this.options.listeners.errline(line);\n }\n });\n });\n }\n cp.on('error', (err) => {\n state.processError = err.message;\n state.processExited = true;\n state.processClosed = true;\n state.CheckComplete();\n });\n cp.on('exit', (code) => {\n state.processExitCode = code;\n state.processExited = true;\n this._debug(`Exit code ${code} received from tool '${this.toolPath}'`);\n state.CheckComplete();\n });\n cp.on('close', (code) => {\n state.processExitCode = code;\n state.processExited = true;\n state.processClosed = true;\n this._debug(`STDIO streams have closed for tool '${this.toolPath}'`);\n state.CheckComplete();\n });\n state.on('done', (error, exitCode) => {\n if (stdbuffer.length > 0) {\n this.emit('stdline', stdbuffer);\n }\n if (errbuffer.length > 0) {\n this.emit('errline', errbuffer);\n }\n cp.removeAllListeners();\n if (error) {\n reject(error);\n }\n else {\n resolve(exitCode);\n }\n });\n if (this.options.input) {\n if (!cp.stdin) {\n throw new Error('child process missing stdin');\n }\n cp.stdin.end(this.options.input);\n }\n }));\n });\n }\n}\nexports.ToolRunner = ToolRunner;\n/**\n * Convert an arg string to an array of args. Handles escaping\n *\n * @param argString string of arguments\n * @returns string[] array of arguments\n */\nfunction argStringToArray(argString) {\n const args = [];\n let inQuotes = false;\n let escaped = false;\n let arg = '';\n function append(c) {\n // we only escape double quotes.\n if (escaped && c !== '\"') {\n arg += '\\\\';\n }\n arg += c;\n escaped = false;\n }\n for (let i = 0; i < argString.length; i++) {\n const c = argString.charAt(i);\n if (c === '\"') {\n if (!escaped) {\n inQuotes = !inQuotes;\n }\n else {\n append(c);\n }\n continue;\n }\n if (c === '\\\\' && escaped) {\n append(c);\n continue;\n }\n if (c === '\\\\' && inQuotes) {\n escaped = true;\n continue;\n }\n if (c === ' ' && !inQuotes) {\n if (arg.length > 0) {\n args.push(arg);\n arg = '';\n }\n continue;\n }\n append(c);\n }\n if (arg.length > 0) {\n args.push(arg.trim());\n }\n return args;\n}\nexports.argStringToArray = argStringToArray;\nclass ExecState extends events.EventEmitter {\n constructor(options, toolPath) {\n super();\n this.processClosed = false; // tracks whether the process has exited and stdio is closed\n this.processError = '';\n this.processExitCode = 0;\n this.processExited = false; // tracks whether the process has exited\n this.processStderr = false; // tracks whether stderr was written to\n this.delay = 10000; // 10 seconds\n this.done = false;\n this.timeout = null;\n if (!toolPath) {\n throw new Error('toolPath must not be empty');\n }\n this.options = options;\n this.toolPath = toolPath;\n if (options.delay) {\n this.delay = options.delay;\n }\n }\n CheckComplete() {\n if (this.done) {\n return;\n }\n if (this.processClosed) {\n this._setResult();\n }\n else if (this.processExited) {\n this.timeout = timers_1.setTimeout(ExecState.HandleTimeout, this.delay, this);\n }\n }\n _debug(message) {\n this.emit('debug', message);\n }\n _setResult() {\n // determine whether there is an error\n let error;\n if (this.processExited) {\n if (this.processError) {\n 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}`);\n }\n else if (this.processExitCode !== 0 && !this.options.ignoreReturnCode) {\n error = new Error(`The process '${this.toolPath}' failed with exit code ${this.processExitCode}`);\n }\n else if (this.processStderr && this.options.failOnStdErr) {\n error = new Error(`The process '${this.toolPath}' failed because one or more lines were written to the STDERR stream`);\n }\n }\n // clear the timeout\n if (this.timeout) {\n clearTimeout(this.timeout);\n this.timeout = null;\n }\n this.done = true;\n this.emit('done', error, this.processExitCode);\n }\n static HandleTimeout(state) {\n if (state.done) {\n return;\n }\n if (!state.processClosed && state.processExited) {\n const message = `The STDIO streams did not close within ${state.delay /\n 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.`;\n state._debug(message);\n }\n state._setResult();\n }\n}\n//# sourceMappingURL=toolrunner.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.create = void 0;\nconst internal_globber_1 = require(\"./internal-globber\");\n/**\n * Constructs a globber\n *\n * @param patterns Patterns separated by newlines\n * @param options Glob options\n */\nfunction create(patterns, options) {\n return __awaiter(this, void 0, void 0, function* () {\n return yield internal_globber_1.DefaultGlobber.create(patterns, options);\n });\n}\nexports.create = create;\n//# sourceMappingURL=glob.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getOptions = void 0;\nconst core = __importStar(require(\"@actions/core\"));\n/**\n * Returns a copy with defaults filled in.\n */\nfunction getOptions(copy) {\n const result = {\n followSymbolicLinks: true,\n implicitDescendants: true,\n omitBrokenSymbolicLinks: true\n };\n if (copy) {\n if (typeof copy.followSymbolicLinks === 'boolean') {\n result.followSymbolicLinks = copy.followSymbolicLinks;\n core.debug(`followSymbolicLinks '${result.followSymbolicLinks}'`);\n }\n if (typeof copy.implicitDescendants === 'boolean') {\n result.implicitDescendants = copy.implicitDescendants;\n core.debug(`implicitDescendants '${result.implicitDescendants}'`);\n }\n if (typeof copy.omitBrokenSymbolicLinks === 'boolean') {\n result.omitBrokenSymbolicLinks = copy.omitBrokenSymbolicLinks;\n core.debug(`omitBrokenSymbolicLinks '${result.omitBrokenSymbolicLinks}'`);\n }\n }\n return result;\n}\nexports.getOptions = getOptions;\n//# sourceMappingURL=internal-glob-options-helper.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __asyncValues = (this && this.__asyncValues) || function (o) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var m = o[Symbol.asyncIterator], i;\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\n};\nvar __await = (this && this.__await) || function (v) { return this instanceof __await ? (this.v = v, this) : new __await(v); }\nvar __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _arguments, generator) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\n function fulfill(value) { resume(\"next\", value); }\n function reject(value) { resume(\"throw\", value); }\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.DefaultGlobber = void 0;\nconst core = __importStar(require(\"@actions/core\"));\nconst fs = __importStar(require(\"fs\"));\nconst globOptionsHelper = __importStar(require(\"./internal-glob-options-helper\"));\nconst path = __importStar(require(\"path\"));\nconst patternHelper = __importStar(require(\"./internal-pattern-helper\"));\nconst internal_match_kind_1 = require(\"./internal-match-kind\");\nconst internal_pattern_1 = require(\"./internal-pattern\");\nconst internal_search_state_1 = require(\"./internal-search-state\");\nconst IS_WINDOWS = process.platform === 'win32';\nclass DefaultGlobber {\n constructor(options) {\n this.patterns = [];\n this.searchPaths = [];\n this.options = globOptionsHelper.getOptions(options);\n }\n getSearchPaths() {\n // Return a copy\n return this.searchPaths.slice();\n }\n glob() {\n var e_1, _a;\n return __awaiter(this, void 0, void 0, function* () {\n const result = [];\n try {\n for (var _b = __asyncValues(this.globGenerator()), _c; _c = yield _b.next(), !_c.done;) {\n const itemPath = _c.value;\n result.push(itemPath);\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (_c && !_c.done && (_a = _b.return)) yield _a.call(_b);\n }\n finally { if (e_1) throw e_1.error; }\n }\n return result;\n });\n }\n globGenerator() {\n return __asyncGenerator(this, arguments, function* globGenerator_1() {\n // Fill in defaults options\n const options = globOptionsHelper.getOptions(this.options);\n // Implicit descendants?\n const patterns = [];\n for (const pattern of this.patterns) {\n patterns.push(pattern);\n if (options.implicitDescendants &&\n (pattern.trailingSeparator ||\n pattern.segments[pattern.segments.length - 1] !== '**')) {\n patterns.push(new internal_pattern_1.Pattern(pattern.negate, true, pattern.segments.concat('**')));\n }\n }\n // Push the search paths\n const stack = [];\n for (const searchPath of patternHelper.getSearchPaths(patterns)) {\n core.debug(`Search path '${searchPath}'`);\n // Exists?\n try {\n // Intentionally using lstat. Detection for broken symlink\n // will be performed later (if following symlinks).\n yield __await(fs.promises.lstat(searchPath));\n }\n catch (err) {\n if (err.code === 'ENOENT') {\n continue;\n }\n throw err;\n }\n stack.unshift(new internal_search_state_1.SearchState(searchPath, 1));\n }\n // Search\n const traversalChain = []; // used to detect cycles\n while (stack.length) {\n // Pop\n const item = stack.pop();\n // Match?\n const match = patternHelper.match(patterns, item.path);\n const partialMatch = !!match || patternHelper.partialMatch(patterns, item.path);\n if (!match && !partialMatch) {\n continue;\n }\n // Stat\n const stats = yield __await(DefaultGlobber.stat(item, options, traversalChain)\n // Broken symlink, or symlink cycle detected, or no longer exists\n );\n // Broken symlink, or symlink cycle detected, or no longer exists\n if (!stats) {\n continue;\n }\n // Directory\n if (stats.isDirectory()) {\n // Matched\n if (match & internal_match_kind_1.MatchKind.Directory) {\n yield yield __await(item.path);\n }\n // Descend?\n else if (!partialMatch) {\n continue;\n }\n // Push the child items in reverse\n const childLevel = item.level + 1;\n const childItems = (yield __await(fs.promises.readdir(item.path))).map(x => new internal_search_state_1.SearchState(path.join(item.path, x), childLevel));\n stack.push(...childItems.reverse());\n }\n // File\n else if (match & internal_match_kind_1.MatchKind.File) {\n yield yield __await(item.path);\n }\n }\n });\n }\n /**\n * Constructs a DefaultGlobber\n */\n static create(patterns, options) {\n return __awaiter(this, void 0, void 0, function* () {\n const result = new DefaultGlobber(options);\n if (IS_WINDOWS) {\n patterns = patterns.replace(/\\r\\n/g, '\\n');\n patterns = patterns.replace(/\\r/g, '\\n');\n }\n const lines = patterns.split('\\n').map(x => x.trim());\n for (const line of lines) {\n // Empty or comment\n if (!line || line.startsWith('#')) {\n continue;\n }\n // Pattern\n else {\n result.patterns.push(new internal_pattern_1.Pattern(line));\n }\n }\n result.searchPaths.push(...patternHelper.getSearchPaths(result.patterns));\n return result;\n });\n }\n static stat(item, options, traversalChain) {\n return __awaiter(this, void 0, void 0, function* () {\n // Note:\n // `stat` returns info about the target of a symlink (or symlink chain)\n // `lstat` returns info about a symlink itself\n let stats;\n if (options.followSymbolicLinks) {\n try {\n // Use `stat` (following symlinks)\n stats = yield fs.promises.stat(item.path);\n }\n catch (err) {\n if (err.code === 'ENOENT') {\n if (options.omitBrokenSymbolicLinks) {\n core.debug(`Broken symlink '${item.path}'`);\n return undefined;\n }\n throw new Error(`No information found for the path '${item.path}'. This may indicate a broken symbolic link.`);\n }\n throw err;\n }\n }\n else {\n // Use `lstat` (not following symlinks)\n stats = yield fs.promises.lstat(item.path);\n }\n // Note, isDirectory() returns false for the lstat of a symlink\n if (stats.isDirectory() && options.followSymbolicLinks) {\n // Get the realpath\n const realPath = yield fs.promises.realpath(item.path);\n // Fixup the traversal chain to match the item level\n while (traversalChain.length >= item.level) {\n traversalChain.pop();\n }\n // Test for a cycle\n if (traversalChain.some((x) => x === realPath)) {\n core.debug(`Symlink cycle detected for path '${item.path}' and realpath '${realPath}'`);\n return undefined;\n }\n // Update the traversal chain\n traversalChain.push(realPath);\n }\n return stats;\n });\n }\n}\nexports.DefaultGlobber = DefaultGlobber;\n//# sourceMappingURL=internal-globber.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.MatchKind = void 0;\n/**\n * Indicates whether a pattern matches a path\n */\nvar MatchKind;\n(function (MatchKind) {\n /** Not matched */\n MatchKind[MatchKind[\"None\"] = 0] = \"None\";\n /** Matched if the path is a directory */\n MatchKind[MatchKind[\"Directory\"] = 1] = \"Directory\";\n /** Matched if the path is a regular file */\n MatchKind[MatchKind[\"File\"] = 2] = \"File\";\n /** Matched */\n MatchKind[MatchKind[\"All\"] = 3] = \"All\";\n})(MatchKind = exports.MatchKind || (exports.MatchKind = {}));\n//# sourceMappingURL=internal-match-kind.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.safeTrimTrailingSeparator = exports.normalizeSeparators = exports.hasRoot = exports.hasAbsoluteRoot = exports.ensureAbsoluteRoot = exports.dirname = void 0;\nconst path = __importStar(require(\"path\"));\nconst assert_1 = __importDefault(require(\"assert\"));\nconst IS_WINDOWS = process.platform === 'win32';\n/**\n * Similar to path.dirname except normalizes the path separators and slightly better handling for Windows UNC paths.\n *\n * For example, on Linux/macOS:\n * - `/ => /`\n * - `/hello => /`\n *\n * For example, on Windows:\n * - `C:\\ => C:\\`\n * - `C:\\hello => C:\\`\n * - `C: => C:`\n * - `C:hello => C:`\n * - `\\ => \\`\n * - `\\hello => \\`\n * - `\\\\hello => \\\\hello`\n * - `\\\\hello\\world => \\\\hello\\world`\n */\nfunction dirname(p) {\n // Normalize slashes and trim unnecessary trailing slash\n p = safeTrimTrailingSeparator(p);\n // Windows UNC root, e.g. \\\\hello or \\\\hello\\world\n if (IS_WINDOWS && /^\\\\\\\\[^\\\\]+(\\\\[^\\\\]+)?$/.test(p)) {\n return p;\n }\n // Get dirname\n let result = path.dirname(p);\n // Trim trailing slash for Windows UNC root, e.g. \\\\hello\\world\\\n if (IS_WINDOWS && /^\\\\\\\\[^\\\\]+\\\\[^\\\\]+\\\\$/.test(result)) {\n result = safeTrimTrailingSeparator(result);\n }\n return result;\n}\nexports.dirname = dirname;\n/**\n * Roots the path if not already rooted. On Windows, relative roots like `\\`\n * or `C:` are expanded based on the current working directory.\n */\nfunction ensureAbsoluteRoot(root, itemPath) {\n assert_1.default(root, `ensureAbsoluteRoot parameter 'root' must not be empty`);\n assert_1.default(itemPath, `ensureAbsoluteRoot parameter 'itemPath' must not be empty`);\n // Already rooted\n if (hasAbsoluteRoot(itemPath)) {\n return itemPath;\n }\n // Windows\n if (IS_WINDOWS) {\n // Check for itemPath like C: or C:foo\n if (itemPath.match(/^[A-Z]:[^\\\\/]|^[A-Z]:$/i)) {\n let cwd = process.cwd();\n assert_1.default(cwd.match(/^[A-Z]:\\\\/i), `Expected current directory to start with an absolute drive root. Actual '${cwd}'`);\n // Drive letter matches cwd? Expand to cwd\n if (itemPath[0].toUpperCase() === cwd[0].toUpperCase()) {\n // Drive only, e.g. C:\n if (itemPath.length === 2) {\n // Preserve specified drive letter case (upper or lower)\n return `${itemPath[0]}:\\\\${cwd.substr(3)}`;\n }\n // Drive + path, e.g. C:foo\n else {\n if (!cwd.endsWith('\\\\')) {\n cwd += '\\\\';\n }\n // Preserve specified drive letter case (upper or lower)\n return `${itemPath[0]}:\\\\${cwd.substr(3)}${itemPath.substr(2)}`;\n }\n }\n // Different drive\n else {\n return `${itemPath[0]}:\\\\${itemPath.substr(2)}`;\n }\n }\n // Check for itemPath like \\ or \\foo\n else if (normalizeSeparators(itemPath).match(/^\\\\$|^\\\\[^\\\\]/)) {\n const cwd = process.cwd();\n assert_1.default(cwd.match(/^[A-Z]:\\\\/i), `Expected current directory to start with an absolute drive root. Actual '${cwd}'`);\n return `${cwd[0]}:\\\\${itemPath.substr(1)}`;\n }\n }\n assert_1.default(hasAbsoluteRoot(root), `ensureAbsoluteRoot parameter 'root' must have an absolute root`);\n // Otherwise ensure root ends with a separator\n if (root.endsWith('/') || (IS_WINDOWS && root.endsWith('\\\\'))) {\n // Intentionally empty\n }\n else {\n // Append separator\n root += path.sep;\n }\n return root + itemPath;\n}\nexports.ensureAbsoluteRoot = ensureAbsoluteRoot;\n/**\n * On Linux/macOS, true if path starts with `/`. On Windows, true for paths like:\n * `\\\\hello\\share` and `C:\\hello` (and using alternate separator).\n */\nfunction hasAbsoluteRoot(itemPath) {\n assert_1.default(itemPath, `hasAbsoluteRoot parameter 'itemPath' must not be empty`);\n // Normalize separators\n itemPath = normalizeSeparators(itemPath);\n // Windows\n if (IS_WINDOWS) {\n // E.g. \\\\hello\\share or C:\\hello\n return itemPath.startsWith('\\\\\\\\') || /^[A-Z]:\\\\/i.test(itemPath);\n }\n // E.g. /hello\n return itemPath.startsWith('/');\n}\nexports.hasAbsoluteRoot = hasAbsoluteRoot;\n/**\n * On Linux/macOS, true if path starts with `/`. On Windows, true for paths like:\n * `\\`, `\\hello`, `\\\\hello\\share`, `C:`, and `C:\\hello` (and using alternate separator).\n */\nfunction hasRoot(itemPath) {\n assert_1.default(itemPath, `isRooted parameter 'itemPath' must not be empty`);\n // Normalize separators\n itemPath = normalizeSeparators(itemPath);\n // Windows\n if (IS_WINDOWS) {\n // E.g. \\ or \\hello or \\\\hello\n // E.g. C: or C:\\hello\n return itemPath.startsWith('\\\\') || /^[A-Z]:/i.test(itemPath);\n }\n // E.g. /hello\n return itemPath.startsWith('/');\n}\nexports.hasRoot = hasRoot;\n/**\n * Removes redundant slashes and converts `/` to `\\` on Windows\n */\nfunction normalizeSeparators(p) {\n p = p || '';\n // Windows\n if (IS_WINDOWS) {\n // Convert slashes on Windows\n p = p.replace(/\\//g, '\\\\');\n // Remove redundant slashes\n const isUnc = /^\\\\\\\\+[^\\\\]/.test(p); // e.g. \\\\hello\n return (isUnc ? '\\\\' : '') + p.replace(/\\\\\\\\+/g, '\\\\'); // preserve leading \\\\ for UNC\n }\n // Remove redundant slashes\n return p.replace(/\\/\\/+/g, '/');\n}\nexports.normalizeSeparators = normalizeSeparators;\n/**\n * Normalizes the path separators and trims the trailing separator (when safe).\n * For example, `/foo/ => /foo` but `/ => /`\n */\nfunction safeTrimTrailingSeparator(p) {\n // Short-circuit if empty\n if (!p) {\n return '';\n }\n // Normalize separators\n p = normalizeSeparators(p);\n // No trailing slash\n if (!p.endsWith(path.sep)) {\n return p;\n }\n // Check '/' on Linux/macOS and '\\' on Windows\n if (p === path.sep) {\n return p;\n }\n // On Windows check if drive root. E.g. C:\\\n if (IS_WINDOWS && /^[A-Z]:\\\\$/i.test(p)) {\n return p;\n }\n // Otherwise trim trailing slash\n return p.substr(0, p.length - 1);\n}\nexports.safeTrimTrailingSeparator = safeTrimTrailingSeparator;\n//# sourceMappingURL=internal-path-helper.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Path = void 0;\nconst path = __importStar(require(\"path\"));\nconst pathHelper = __importStar(require(\"./internal-path-helper\"));\nconst assert_1 = __importDefault(require(\"assert\"));\nconst IS_WINDOWS = process.platform === 'win32';\n/**\n * Helper class for parsing paths into segments\n */\nclass Path {\n /**\n * Constructs a Path\n * @param itemPath Path or array of segments\n */\n constructor(itemPath) {\n this.segments = [];\n // String\n if (typeof itemPath === 'string') {\n assert_1.default(itemPath, `Parameter 'itemPath' must not be empty`);\n // Normalize slashes and trim unnecessary trailing slash\n itemPath = pathHelper.safeTrimTrailingSeparator(itemPath);\n // Not rooted\n if (!pathHelper.hasRoot(itemPath)) {\n this.segments = itemPath.split(path.sep);\n }\n // Rooted\n else {\n // Add all segments, while not at the root\n let remaining = itemPath;\n let dir = pathHelper.dirname(remaining);\n while (dir !== remaining) {\n // Add the segment\n const basename = path.basename(remaining);\n this.segments.unshift(basename);\n // Truncate the last segment\n remaining = dir;\n dir = pathHelper.dirname(remaining);\n }\n // Remainder is the root\n this.segments.unshift(remaining);\n }\n }\n // Array\n else {\n // Must not be empty\n assert_1.default(itemPath.length > 0, `Parameter 'itemPath' must not be an empty array`);\n // Each segment\n for (let i = 0; i < itemPath.length; i++) {\n let segment = itemPath[i];\n // Must not be empty\n assert_1.default(segment, `Parameter 'itemPath' must not contain any empty segments`);\n // Normalize slashes\n segment = pathHelper.normalizeSeparators(itemPath[i]);\n // Root segment\n if (i === 0 && pathHelper.hasRoot(segment)) {\n segment = pathHelper.safeTrimTrailingSeparator(segment);\n assert_1.default(segment === pathHelper.dirname(segment), `Parameter 'itemPath' root segment contains information for multiple segments`);\n this.segments.push(segment);\n }\n // All other segments\n else {\n // Must not contain slash\n assert_1.default(!segment.includes(path.sep), `Parameter 'itemPath' contains unexpected path separators`);\n this.segments.push(segment);\n }\n }\n }\n }\n /**\n * Converts the path to it's string representation\n */\n toString() {\n // First segment\n let result = this.segments[0];\n // All others\n let skipSlash = result.endsWith(path.sep) || (IS_WINDOWS && /^[A-Z]:$/i.test(result));\n for (let i = 1; i < this.segments.length; i++) {\n if (skipSlash) {\n skipSlash = false;\n }\n else {\n result += path.sep;\n }\n result += this.segments[i];\n }\n return result;\n }\n}\nexports.Path = Path;\n//# sourceMappingURL=internal-path.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.partialMatch = exports.match = exports.getSearchPaths = void 0;\nconst pathHelper = __importStar(require(\"./internal-path-helper\"));\nconst internal_match_kind_1 = require(\"./internal-match-kind\");\nconst IS_WINDOWS = process.platform === 'win32';\n/**\n * Given an array of patterns, returns an array of paths to search.\n * Duplicates and paths under other included paths are filtered out.\n */\nfunction getSearchPaths(patterns) {\n // Ignore negate patterns\n patterns = patterns.filter(x => !x.negate);\n // Create a map of all search paths\n const searchPathMap = {};\n for (const pattern of patterns) {\n const key = IS_WINDOWS\n ? pattern.searchPath.toUpperCase()\n : pattern.searchPath;\n searchPathMap[key] = 'candidate';\n }\n const result = [];\n for (const pattern of patterns) {\n // Check if already included\n const key = IS_WINDOWS\n ? pattern.searchPath.toUpperCase()\n : pattern.searchPath;\n if (searchPathMap[key] === 'included') {\n continue;\n }\n // Check for an ancestor search path\n let foundAncestor = false;\n let tempKey = key;\n let parent = pathHelper.dirname(tempKey);\n while (parent !== tempKey) {\n if (searchPathMap[parent]) {\n foundAncestor = true;\n break;\n }\n tempKey = parent;\n parent = pathHelper.dirname(tempKey);\n }\n // Include the search pattern in the result\n if (!foundAncestor) {\n result.push(pattern.searchPath);\n searchPathMap[key] = 'included';\n }\n }\n return result;\n}\nexports.getSearchPaths = getSearchPaths;\n/**\n * Matches the patterns against the path\n */\nfunction match(patterns, itemPath) {\n let result = internal_match_kind_1.MatchKind.None;\n for (const pattern of patterns) {\n if (pattern.negate) {\n result &= ~pattern.match(itemPath);\n }\n else {\n result |= pattern.match(itemPath);\n }\n }\n return result;\n}\nexports.match = match;\n/**\n * Checks whether to descend further into the directory\n */\nfunction partialMatch(patterns, itemPath) {\n return patterns.some(x => !x.negate && x.partialMatch(itemPath));\n}\nexports.partialMatch = partialMatch;\n//# sourceMappingURL=internal-pattern-helper.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Pattern = void 0;\nconst os = __importStar(require(\"os\"));\nconst path = __importStar(require(\"path\"));\nconst pathHelper = __importStar(require(\"./internal-path-helper\"));\nconst assert_1 = __importDefault(require(\"assert\"));\nconst minimatch_1 = require(\"minimatch\");\nconst internal_match_kind_1 = require(\"./internal-match-kind\");\nconst internal_path_1 = require(\"./internal-path\");\nconst IS_WINDOWS = process.platform === 'win32';\nclass Pattern {\n constructor(patternOrNegate, isImplicitPattern = false, segments, homedir) {\n /**\n * Indicates whether matches should be excluded from the result set\n */\n this.negate = false;\n // Pattern overload\n let pattern;\n if (typeof patternOrNegate === 'string') {\n pattern = patternOrNegate.trim();\n }\n // Segments overload\n else {\n // Convert to pattern\n segments = segments || [];\n assert_1.default(segments.length, `Parameter 'segments' must not empty`);\n const root = Pattern.getLiteral(segments[0]);\n assert_1.default(root && pathHelper.hasAbsoluteRoot(root), `Parameter 'segments' first element must be a root path`);\n pattern = new internal_path_1.Path(segments).toString().trim();\n if (patternOrNegate) {\n pattern = `!${pattern}`;\n }\n }\n // Negate\n while (pattern.startsWith('!')) {\n this.negate = !this.negate;\n pattern = pattern.substr(1).trim();\n }\n // Normalize slashes and ensures absolute root\n pattern = Pattern.fixupPattern(pattern, homedir);\n // Segments\n this.segments = new internal_path_1.Path(pattern).segments;\n // Trailing slash indicates the pattern should only match directories, not regular files\n this.trailingSeparator = pathHelper\n .normalizeSeparators(pattern)\n .endsWith(path.sep);\n pattern = pathHelper.safeTrimTrailingSeparator(pattern);\n // Search path (literal path prior to the first glob segment)\n let foundGlob = false;\n const searchSegments = this.segments\n .map(x => Pattern.getLiteral(x))\n .filter(x => !foundGlob && !(foundGlob = x === ''));\n this.searchPath = new internal_path_1.Path(searchSegments).toString();\n // Root RegExp (required when determining partial match)\n this.rootRegExp = new RegExp(Pattern.regExpEscape(searchSegments[0]), IS_WINDOWS ? 'i' : '');\n this.isImplicitPattern = isImplicitPattern;\n // Create minimatch\n const minimatchOptions = {\n dot: true,\n nobrace: true,\n nocase: IS_WINDOWS,\n nocomment: true,\n noext: true,\n nonegate: true\n };\n pattern = IS_WINDOWS ? pattern.replace(/\\\\/g, '/') : pattern;\n this.minimatch = new minimatch_1.Minimatch(pattern, minimatchOptions);\n }\n /**\n * Matches the pattern against the specified path\n */\n match(itemPath) {\n // Last segment is globstar?\n if (this.segments[this.segments.length - 1] === '**') {\n // Normalize slashes\n itemPath = pathHelper.normalizeSeparators(itemPath);\n // Append a trailing slash. Otherwise Minimatch will not match the directory immediately\n // preceding the globstar. For example, given the pattern `/foo/**`, Minimatch returns\n // false for `/foo` but returns true for `/foo/`. Append a trailing slash to handle that quirk.\n if (!itemPath.endsWith(path.sep) && this.isImplicitPattern === false) {\n // Note, this is safe because the constructor ensures the pattern has an absolute root.\n // For example, formats like C: and C:foo on Windows are resolved to an absolute root.\n itemPath = `${itemPath}${path.sep}`;\n }\n }\n else {\n // Normalize slashes and trim unnecessary trailing slash\n itemPath = pathHelper.safeTrimTrailingSeparator(itemPath);\n }\n // Match\n if (this.minimatch.match(itemPath)) {\n return this.trailingSeparator ? internal_match_kind_1.MatchKind.Directory : internal_match_kind_1.MatchKind.All;\n }\n return internal_match_kind_1.MatchKind.None;\n }\n /**\n * Indicates whether the pattern may match descendants of the specified path\n */\n partialMatch(itemPath) {\n // Normalize slashes and trim unnecessary trailing slash\n itemPath = pathHelper.safeTrimTrailingSeparator(itemPath);\n // matchOne does not handle root path correctly\n if (pathHelper.dirname(itemPath) === itemPath) {\n return this.rootRegExp.test(itemPath);\n }\n return this.minimatch.matchOne(itemPath.split(IS_WINDOWS ? /\\\\+/ : /\\/+/), this.minimatch.set[0], true);\n }\n /**\n * Escapes glob patterns within a path\n */\n static globEscape(s) {\n return (IS_WINDOWS ? s : s.replace(/\\\\/g, '\\\\\\\\')) // escape '\\' on Linux/macOS\n .replace(/(\\[)(?=[^/]+\\])/g, '[[]') // escape '[' when ']' follows within the path segment\n .replace(/\\?/g, '[?]') // escape '?'\n .replace(/\\*/g, '[*]'); // escape '*'\n }\n /**\n * Normalizes slashes and ensures absolute root\n */\n static fixupPattern(pattern, homedir) {\n // Empty\n assert_1.default(pattern, 'pattern cannot be empty');\n // Must not contain `.` segment, unless first segment\n // Must not contain `..` segment\n const literalSegments = new internal_path_1.Path(pattern).segments.map(x => Pattern.getLiteral(x));\n assert_1.default(literalSegments.every((x, i) => (x !== '.' || i === 0) && x !== '..'), `Invalid pattern '${pattern}'. Relative pathing '.' and '..' is not allowed.`);\n // Must not contain globs in root, e.g. Windows UNC path \\\\foo\\b*r\n assert_1.default(!pathHelper.hasRoot(pattern) || literalSegments[0], `Invalid pattern '${pattern}'. Root segment must not contain globs.`);\n // Normalize slashes\n pattern = pathHelper.normalizeSeparators(pattern);\n // Replace leading `.` segment\n if (pattern === '.' || pattern.startsWith(`.${path.sep}`)) {\n pattern = Pattern.globEscape(process.cwd()) + pattern.substr(1);\n }\n // Replace leading `~` segment\n else if (pattern === '~' || pattern.startsWith(`~${path.sep}`)) {\n homedir = homedir || os.homedir();\n assert_1.default(homedir, 'Unable to determine HOME directory');\n assert_1.default(pathHelper.hasAbsoluteRoot(homedir), `Expected HOME directory to be a rooted path. Actual '${homedir}'`);\n pattern = Pattern.globEscape(homedir) + pattern.substr(1);\n }\n // Replace relative drive root, e.g. pattern is C: or C:foo\n else if (IS_WINDOWS &&\n (pattern.match(/^[A-Z]:$/i) || pattern.match(/^[A-Z]:[^\\\\]/i))) {\n let root = pathHelper.ensureAbsoluteRoot('C:\\\\dummy-root', pattern.substr(0, 2));\n if (pattern.length > 2 && !root.endsWith('\\\\')) {\n root += '\\\\';\n }\n pattern = Pattern.globEscape(root) + pattern.substr(2);\n }\n // Replace relative root, e.g. pattern is \\ or \\foo\n else if (IS_WINDOWS && (pattern === '\\\\' || pattern.match(/^\\\\[^\\\\]/))) {\n let root = pathHelper.ensureAbsoluteRoot('C:\\\\dummy-root', '\\\\');\n if (!root.endsWith('\\\\')) {\n root += '\\\\';\n }\n pattern = Pattern.globEscape(root) + pattern.substr(1);\n }\n // Otherwise ensure absolute root\n else {\n pattern = pathHelper.ensureAbsoluteRoot(Pattern.globEscape(process.cwd()), pattern);\n }\n return pathHelper.normalizeSeparators(pattern);\n }\n /**\n * Attempts to unescape a pattern segment to create a literal path segment.\n * Otherwise returns empty string.\n */\n static getLiteral(segment) {\n let literal = '';\n for (let i = 0; i < segment.length; i++) {\n const c = segment[i];\n // Escape\n if (c === '\\\\' && !IS_WINDOWS && i + 1 < segment.length) {\n literal += segment[++i];\n continue;\n }\n // Wildcard\n else if (c === '*' || c === '?') {\n return '';\n }\n // Character set\n else if (c === '[' && i + 1 < segment.length) {\n let set = '';\n let closed = -1;\n for (let i2 = i + 1; i2 < segment.length; i2++) {\n const c2 = segment[i2];\n // Escape\n if (c2 === '\\\\' && !IS_WINDOWS && i2 + 1 < segment.length) {\n set += segment[++i2];\n continue;\n }\n // Closed\n else if (c2 === ']') {\n closed = i2;\n break;\n }\n // Otherwise\n else {\n set += c2;\n }\n }\n // Closed?\n if (closed >= 0) {\n // Cannot convert\n if (set.length > 1) {\n return '';\n }\n // Convert to literal\n if (set) {\n literal += set;\n i = closed;\n continue;\n }\n }\n // Otherwise fall thru\n }\n // Append\n literal += c;\n }\n return literal;\n }\n /**\n * Escapes regexp special characters\n * https://javascript.info/regexp-escaping\n */\n static regExpEscape(s) {\n return s.replace(/[[\\\\^$.|?*+()]/g, '\\\\$&');\n }\n}\nexports.Pattern = Pattern;\n//# sourceMappingURL=internal-pattern.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.SearchState = void 0;\nclass SearchState {\n constructor(path, level) {\n this.path = path;\n this.level = level;\n }\n}\nexports.SearchState = SearchState;\n//# sourceMappingURL=internal-search-state.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.PersonalAccessTokenCredentialHandler = exports.BearerCredentialHandler = exports.BasicCredentialHandler = void 0;\nclass BasicCredentialHandler {\n constructor(username, password) {\n this.username = username;\n this.password = password;\n }\n prepareRequest(options) {\n if (!options.headers) {\n throw Error('The request has no headers');\n }\n options.headers['Authorization'] = `Basic ${Buffer.from(`${this.username}:${this.password}`).toString('base64')}`;\n }\n // This handler cannot handle 401\n canHandleAuthentication() {\n return false;\n }\n handleAuthentication() {\n return __awaiter(this, void 0, void 0, function* () {\n throw new Error('not implemented');\n });\n }\n}\nexports.BasicCredentialHandler = BasicCredentialHandler;\nclass BearerCredentialHandler {\n constructor(token) {\n this.token = token;\n }\n // currently implements pre-authorization\n // TODO: support preAuth = false where it hooks on 401\n prepareRequest(options) {\n if (!options.headers) {\n throw Error('The request has no headers');\n }\n options.headers['Authorization'] = `Bearer ${this.token}`;\n }\n // This handler cannot handle 401\n canHandleAuthentication() {\n return false;\n }\n handleAuthentication() {\n return __awaiter(this, void 0, void 0, function* () {\n throw new Error('not implemented');\n });\n }\n}\nexports.BearerCredentialHandler = BearerCredentialHandler;\nclass PersonalAccessTokenCredentialHandler {\n constructor(token) {\n this.token = token;\n }\n // currently implements pre-authorization\n // TODO: support preAuth = false where it hooks on 401\n prepareRequest(options) {\n if (!options.headers) {\n throw Error('The request has no headers');\n }\n options.headers['Authorization'] = `Basic ${Buffer.from(`PAT:${this.token}`).toString('base64')}`;\n }\n // This handler cannot handle 401\n canHandleAuthentication() {\n return false;\n }\n handleAuthentication() {\n return __awaiter(this, void 0, void 0, function* () {\n throw new Error('not implemented');\n });\n }\n}\nexports.PersonalAccessTokenCredentialHandler = PersonalAccessTokenCredentialHandler;\n//# sourceMappingURL=auth.js.map","\"use strict\";\n/* eslint-disable @typescript-eslint/no-explicit-any */\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.HttpClient = exports.isHttps = exports.HttpClientResponse = exports.HttpClientError = exports.getProxyUrl = exports.MediaTypes = exports.Headers = exports.HttpCodes = void 0;\nconst http = __importStar(require(\"http\"));\nconst https = __importStar(require(\"https\"));\nconst pm = __importStar(require(\"./proxy\"));\nconst tunnel = __importStar(require(\"tunnel\"));\nvar HttpCodes;\n(function (HttpCodes) {\n HttpCodes[HttpCodes[\"OK\"] = 200] = \"OK\";\n HttpCodes[HttpCodes[\"MultipleChoices\"] = 300] = \"MultipleChoices\";\n HttpCodes[HttpCodes[\"MovedPermanently\"] = 301] = \"MovedPermanently\";\n HttpCodes[HttpCodes[\"ResourceMoved\"] = 302] = \"ResourceMoved\";\n HttpCodes[HttpCodes[\"SeeOther\"] = 303] = \"SeeOther\";\n HttpCodes[HttpCodes[\"NotModified\"] = 304] = \"NotModified\";\n HttpCodes[HttpCodes[\"UseProxy\"] = 305] = \"UseProxy\";\n HttpCodes[HttpCodes[\"SwitchProxy\"] = 306] = \"SwitchProxy\";\n HttpCodes[HttpCodes[\"TemporaryRedirect\"] = 307] = \"TemporaryRedirect\";\n HttpCodes[HttpCodes[\"PermanentRedirect\"] = 308] = \"PermanentRedirect\";\n HttpCodes[HttpCodes[\"BadRequest\"] = 400] = \"BadRequest\";\n HttpCodes[HttpCodes[\"Unauthorized\"] = 401] = \"Unauthorized\";\n HttpCodes[HttpCodes[\"PaymentRequired\"] = 402] = \"PaymentRequired\";\n HttpCodes[HttpCodes[\"Forbidden\"] = 403] = \"Forbidden\";\n HttpCodes[HttpCodes[\"NotFound\"] = 404] = \"NotFound\";\n HttpCodes[HttpCodes[\"MethodNotAllowed\"] = 405] = \"MethodNotAllowed\";\n HttpCodes[HttpCodes[\"NotAcceptable\"] = 406] = \"NotAcceptable\";\n HttpCodes[HttpCodes[\"ProxyAuthenticationRequired\"] = 407] = \"ProxyAuthenticationRequired\";\n HttpCodes[HttpCodes[\"RequestTimeout\"] = 408] = \"RequestTimeout\";\n HttpCodes[HttpCodes[\"Conflict\"] = 409] = \"Conflict\";\n HttpCodes[HttpCodes[\"Gone\"] = 410] = \"Gone\";\n HttpCodes[HttpCodes[\"TooManyRequests\"] = 429] = \"TooManyRequests\";\n HttpCodes[HttpCodes[\"InternalServerError\"] = 500] = \"InternalServerError\";\n HttpCodes[HttpCodes[\"NotImplemented\"] = 501] = \"NotImplemented\";\n HttpCodes[HttpCodes[\"BadGateway\"] = 502] = \"BadGateway\";\n HttpCodes[HttpCodes[\"ServiceUnavailable\"] = 503] = \"ServiceUnavailable\";\n HttpCodes[HttpCodes[\"GatewayTimeout\"] = 504] = \"GatewayTimeout\";\n})(HttpCodes = exports.HttpCodes || (exports.HttpCodes = {}));\nvar Headers;\n(function (Headers) {\n Headers[\"Accept\"] = \"accept\";\n Headers[\"ContentType\"] = \"content-type\";\n})(Headers = exports.Headers || (exports.Headers = {}));\nvar MediaTypes;\n(function (MediaTypes) {\n MediaTypes[\"ApplicationJson\"] = \"application/json\";\n})(MediaTypes = exports.MediaTypes || (exports.MediaTypes = {}));\n/**\n * Returns the proxy URL, depending upon the supplied url and proxy environment variables.\n * @param serverUrl The server URL where the request will be sent. For example, https://api.github.com\n */\nfunction getProxyUrl(serverUrl) {\n const proxyUrl = pm.getProxyUrl(new URL(serverUrl));\n return proxyUrl ? proxyUrl.href : '';\n}\nexports.getProxyUrl = getProxyUrl;\nconst HttpRedirectCodes = [\n HttpCodes.MovedPermanently,\n HttpCodes.ResourceMoved,\n HttpCodes.SeeOther,\n HttpCodes.TemporaryRedirect,\n HttpCodes.PermanentRedirect\n];\nconst HttpResponseRetryCodes = [\n HttpCodes.BadGateway,\n HttpCodes.ServiceUnavailable,\n HttpCodes.GatewayTimeout\n];\nconst RetryableHttpVerbs = ['OPTIONS', 'GET', 'DELETE', 'HEAD'];\nconst ExponentialBackoffCeiling = 10;\nconst ExponentialBackoffTimeSlice = 5;\nclass HttpClientError extends Error {\n constructor(message, statusCode) {\n super(message);\n this.name = 'HttpClientError';\n this.statusCode = statusCode;\n Object.setPrototypeOf(this, HttpClientError.prototype);\n }\n}\nexports.HttpClientError = HttpClientError;\nclass HttpClientResponse {\n constructor(message) {\n this.message = message;\n }\n readBody() {\n return __awaiter(this, void 0, void 0, function* () {\n return new Promise((resolve) => __awaiter(this, void 0, void 0, function* () {\n let output = Buffer.alloc(0);\n this.message.on('data', (chunk) => {\n output = Buffer.concat([output, chunk]);\n });\n this.message.on('end', () => {\n resolve(output.toString());\n });\n }));\n });\n }\n}\nexports.HttpClientResponse = HttpClientResponse;\nfunction isHttps(requestUrl) {\n const parsedUrl = new URL(requestUrl);\n return parsedUrl.protocol === 'https:';\n}\nexports.isHttps = isHttps;\nclass HttpClient {\n constructor(userAgent, handlers, requestOptions) {\n this._ignoreSslError = false;\n this._allowRedirects = true;\n this._allowRedirectDowngrade = false;\n this._maxRedirects = 50;\n this._allowRetries = false;\n this._maxRetries = 1;\n this._keepAlive = false;\n this._disposed = false;\n this.userAgent = userAgent;\n this.handlers = handlers || [];\n this.requestOptions = requestOptions;\n if (requestOptions) {\n if (requestOptions.ignoreSslError != null) {\n this._ignoreSslError = requestOptions.ignoreSslError;\n }\n this._socketTimeout = requestOptions.socketTimeout;\n if (requestOptions.allowRedirects != null) {\n this._allowRedirects = requestOptions.allowRedirects;\n }\n if (requestOptions.allowRedirectDowngrade != null) {\n this._allowRedirectDowngrade = requestOptions.allowRedirectDowngrade;\n }\n if (requestOptions.maxRedirects != null) {\n this._maxRedirects = Math.max(requestOptions.maxRedirects, 0);\n }\n if (requestOptions.keepAlive != null) {\n this._keepAlive = requestOptions.keepAlive;\n }\n if (requestOptions.allowRetries != null) {\n this._allowRetries = requestOptions.allowRetries;\n }\n if (requestOptions.maxRetries != null) {\n this._maxRetries = requestOptions.maxRetries;\n }\n }\n }\n options(requestUrl, additionalHeaders) {\n return __awaiter(this, void 0, void 0, function* () {\n return this.request('OPTIONS', requestUrl, null, additionalHeaders || {});\n });\n }\n get(requestUrl, additionalHeaders) {\n return __awaiter(this, void 0, void 0, function* () {\n return this.request('GET', requestUrl, null, additionalHeaders || {});\n });\n }\n del(requestUrl, additionalHeaders) {\n return __awaiter(this, void 0, void 0, function* () {\n return this.request('DELETE', requestUrl, null, additionalHeaders || {});\n });\n }\n post(requestUrl, data, additionalHeaders) {\n return __awaiter(this, void 0, void 0, function* () {\n return this.request('POST', requestUrl, data, additionalHeaders || {});\n });\n }\n patch(requestUrl, data, additionalHeaders) {\n return __awaiter(this, void 0, void 0, function* () {\n return this.request('PATCH', requestUrl, data, additionalHeaders || {});\n });\n }\n put(requestUrl, data, additionalHeaders) {\n return __awaiter(this, void 0, void 0, function* () {\n return this.request('PUT', requestUrl, data, additionalHeaders || {});\n });\n }\n head(requestUrl, additionalHeaders) {\n return __awaiter(this, void 0, void 0, function* () {\n return this.request('HEAD', requestUrl, null, additionalHeaders || {});\n });\n }\n sendStream(verb, requestUrl, stream, additionalHeaders) {\n return __awaiter(this, void 0, void 0, function* () {\n return this.request(verb, requestUrl, stream, additionalHeaders);\n });\n }\n /**\n * Gets a typed object from an endpoint\n * Be aware that not found returns a null. Other errors (4xx, 5xx) reject the promise\n */\n getJson(requestUrl, additionalHeaders = {}) {\n return __awaiter(this, void 0, void 0, function* () {\n additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson);\n const res = yield this.get(requestUrl, additionalHeaders);\n return this._processResponse(res, this.requestOptions);\n });\n }\n postJson(requestUrl, obj, additionalHeaders = {}) {\n return __awaiter(this, void 0, void 0, function* () {\n const data = JSON.stringify(obj, null, 2);\n additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson);\n additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson);\n const res = yield this.post(requestUrl, data, additionalHeaders);\n return this._processResponse(res, this.requestOptions);\n });\n }\n putJson(requestUrl, obj, additionalHeaders = {}) {\n return __awaiter(this, void 0, void 0, function* () {\n const data = JSON.stringify(obj, null, 2);\n additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson);\n additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson);\n const res = yield this.put(requestUrl, data, additionalHeaders);\n return this._processResponse(res, this.requestOptions);\n });\n }\n patchJson(requestUrl, obj, additionalHeaders = {}) {\n return __awaiter(this, void 0, void 0, function* () {\n const data = JSON.stringify(obj, null, 2);\n additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson);\n additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson);\n const res = yield this.patch(requestUrl, data, additionalHeaders);\n return this._processResponse(res, this.requestOptions);\n });\n }\n /**\n * Makes a raw http request.\n * All other methods such as get, post, patch, and request ultimately call this.\n * Prefer get, del, post and patch\n */\n request(verb, requestUrl, data, headers) {\n return __awaiter(this, void 0, void 0, function* () {\n if (this._disposed) {\n throw new Error('Client has already been disposed.');\n }\n const parsedUrl = new URL(requestUrl);\n let info = this._prepareRequest(verb, parsedUrl, headers);\n // Only perform retries on reads since writes may not be idempotent.\n const maxTries = this._allowRetries && RetryableHttpVerbs.includes(verb)\n ? this._maxRetries + 1\n : 1;\n let numTries = 0;\n let response;\n do {\n response = yield this.requestRaw(info, data);\n // Check if it's an authentication challenge\n if (response &&\n response.message &&\n response.message.statusCode === HttpCodes.Unauthorized) {\n let authenticationHandler;\n for (const handler of this.handlers) {\n if (handler.canHandleAuthentication(response)) {\n authenticationHandler = handler;\n break;\n }\n }\n if (authenticationHandler) {\n return authenticationHandler.handleAuthentication(this, info, data);\n }\n else {\n // We have received an unauthorized response but have no handlers to handle it.\n // Let the response return to the caller.\n return response;\n }\n }\n let redirectsRemaining = this._maxRedirects;\n while (response.message.statusCode &&\n HttpRedirectCodes.includes(response.message.statusCode) &&\n this._allowRedirects &&\n redirectsRemaining > 0) {\n const redirectUrl = response.message.headers['location'];\n if (!redirectUrl) {\n // if there's no location to redirect to, we won't\n break;\n }\n const parsedRedirectUrl = new URL(redirectUrl);\n if (parsedUrl.protocol === 'https:' &&\n parsedUrl.protocol !== parsedRedirectUrl.protocol &&\n !this._allowRedirectDowngrade) {\n 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.');\n }\n // we need to finish reading the response before reassigning response\n // which will leak the open socket.\n yield response.readBody();\n // strip authorization header if redirected to a different hostname\n if (parsedRedirectUrl.hostname !== parsedUrl.hostname) {\n for (const header in headers) {\n // header names are case insensitive\n if (header.toLowerCase() === 'authorization') {\n delete headers[header];\n }\n }\n }\n // let's make the request with the new redirectUrl\n info = this._prepareRequest(verb, parsedRedirectUrl, headers);\n response = yield this.requestRaw(info, data);\n redirectsRemaining--;\n }\n if (!response.message.statusCode ||\n !HttpResponseRetryCodes.includes(response.message.statusCode)) {\n // If not a retry code, return immediately instead of retrying\n return response;\n }\n numTries += 1;\n if (numTries < maxTries) {\n yield response.readBody();\n yield this._performExponentialBackoff(numTries);\n }\n } while (numTries < maxTries);\n return response;\n });\n }\n /**\n * Needs to be called if keepAlive is set to true in request options.\n */\n dispose() {\n if (this._agent) {\n this._agent.destroy();\n }\n this._disposed = true;\n }\n /**\n * Raw request.\n * @param info\n * @param data\n */\n requestRaw(info, data) {\n return __awaiter(this, void 0, void 0, function* () {\n return new Promise((resolve, reject) => {\n function callbackForResult(err, res) {\n if (err) {\n reject(err);\n }\n else if (!res) {\n // If `err` is not passed, then `res` must be passed.\n reject(new Error('Unknown error'));\n }\n else {\n resolve(res);\n }\n }\n this.requestRawWithCallback(info, data, callbackForResult);\n });\n });\n }\n /**\n * Raw request with callback.\n * @param info\n * @param data\n * @param onResult\n */\n requestRawWithCallback(info, data, onResult) {\n if (typeof data === 'string') {\n if (!info.options.headers) {\n info.options.headers = {};\n }\n info.options.headers['Content-Length'] = Buffer.byteLength(data, 'utf8');\n }\n let callbackCalled = false;\n function handleResult(err, res) {\n if (!callbackCalled) {\n callbackCalled = true;\n onResult(err, res);\n }\n }\n const req = info.httpModule.request(info.options, (msg) => {\n const res = new HttpClientResponse(msg);\n handleResult(undefined, res);\n });\n let socket;\n req.on('socket', sock => {\n socket = sock;\n });\n // If we ever get disconnected, we want the socket to timeout eventually\n req.setTimeout(this._socketTimeout || 3 * 60000, () => {\n if (socket) {\n socket.end();\n }\n handleResult(new Error(`Request timeout: ${info.options.path}`));\n });\n req.on('error', function (err) {\n // err has statusCode property\n // res should have headers\n handleResult(err);\n });\n if (data && typeof data === 'string') {\n req.write(data, 'utf8');\n }\n if (data && typeof data !== 'string') {\n data.on('close', function () {\n req.end();\n });\n data.pipe(req);\n }\n else {\n req.end();\n }\n }\n /**\n * Gets an http agent. This function is useful when you need an http agent that handles\n * routing through a proxy server - depending upon the url and proxy environment variables.\n * @param serverUrl The server URL where the request will be sent. For example, https://api.github.com\n */\n getAgent(serverUrl) {\n const parsedUrl = new URL(serverUrl);\n return this._getAgent(parsedUrl);\n }\n _prepareRequest(method, requestUrl, headers) {\n const info = {};\n info.parsedUrl = requestUrl;\n const usingSsl = info.parsedUrl.protocol === 'https:';\n info.httpModule = usingSsl ? https : http;\n const defaultPort = usingSsl ? 443 : 80;\n info.options = {};\n info.options.host = info.parsedUrl.hostname;\n info.options.port = info.parsedUrl.port\n ? parseInt(info.parsedUrl.port)\n : defaultPort;\n info.options.path =\n (info.parsedUrl.pathname || '') + (info.parsedUrl.search || '');\n info.options.method = method;\n info.options.headers = this._mergeHeaders(headers);\n if (this.userAgent != null) {\n info.options.headers['user-agent'] = this.userAgent;\n }\n info.options.agent = this._getAgent(info.parsedUrl);\n // gives handlers an opportunity to participate\n if (this.handlers) {\n for (const handler of this.handlers) {\n handler.prepareRequest(info.options);\n }\n }\n return info;\n }\n _mergeHeaders(headers) {\n if (this.requestOptions && this.requestOptions.headers) {\n return Object.assign({}, lowercaseKeys(this.requestOptions.headers), lowercaseKeys(headers || {}));\n }\n return lowercaseKeys(headers || {});\n }\n _getExistingOrDefaultHeader(additionalHeaders, header, _default) {\n let clientHeader;\n if (this.requestOptions && this.requestOptions.headers) {\n clientHeader = lowercaseKeys(this.requestOptions.headers)[header];\n }\n return additionalHeaders[header] || clientHeader || _default;\n }\n _getAgent(parsedUrl) {\n let agent;\n const proxyUrl = pm.getProxyUrl(parsedUrl);\n const useProxy = proxyUrl && proxyUrl.hostname;\n if (this._keepAlive && useProxy) {\n agent = this._proxyAgent;\n }\n if (this._keepAlive && !useProxy) {\n agent = this._agent;\n }\n // if agent is already assigned use that agent.\n if (agent) {\n return agent;\n }\n const usingSsl = parsedUrl.protocol === 'https:';\n let maxSockets = 100;\n if (this.requestOptions) {\n maxSockets = this.requestOptions.maxSockets || http.globalAgent.maxSockets;\n }\n // This is `useProxy` again, but we need to check `proxyURl` directly for TypeScripts's flow analysis.\n if (proxyUrl && proxyUrl.hostname) {\n const agentOptions = {\n maxSockets,\n keepAlive: this._keepAlive,\n proxy: Object.assign(Object.assign({}, ((proxyUrl.username || proxyUrl.password) && {\n proxyAuth: `${proxyUrl.username}:${proxyUrl.password}`\n })), { host: proxyUrl.hostname, port: proxyUrl.port })\n };\n let tunnelAgent;\n const overHttps = proxyUrl.protocol === 'https:';\n if (usingSsl) {\n tunnelAgent = overHttps ? tunnel.httpsOverHttps : tunnel.httpsOverHttp;\n }\n else {\n tunnelAgent = overHttps ? tunnel.httpOverHttps : tunnel.httpOverHttp;\n }\n agent = tunnelAgent(agentOptions);\n this._proxyAgent = agent;\n }\n // if reusing agent across request and tunneling agent isn't assigned create a new agent\n if (this._keepAlive && !agent) {\n const options = { keepAlive: this._keepAlive, maxSockets };\n agent = usingSsl ? new https.Agent(options) : new http.Agent(options);\n this._agent = agent;\n }\n // if not using private agent and tunnel agent isn't setup then use global agent\n if (!agent) {\n agent = usingSsl ? https.globalAgent : http.globalAgent;\n }\n if (usingSsl && this._ignoreSslError) {\n // we don't want to set NODE_TLS_REJECT_UNAUTHORIZED=0 since that will affect request for entire process\n // http.RequestOptions doesn't expose a way to modify RequestOptions.agent.options\n // we have to cast it to any and change it directly\n agent.options = Object.assign(agent.options || {}, {\n rejectUnauthorized: false\n });\n }\n return agent;\n }\n _performExponentialBackoff(retryNumber) {\n return __awaiter(this, void 0, void 0, function* () {\n retryNumber = Math.min(ExponentialBackoffCeiling, retryNumber);\n const ms = ExponentialBackoffTimeSlice * Math.pow(2, retryNumber);\n return new Promise(resolve => setTimeout(() => resolve(), ms));\n });\n }\n _processResponse(res, options) {\n return __awaiter(this, void 0, void 0, function* () {\n return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {\n const statusCode = res.message.statusCode || 0;\n const response = {\n statusCode,\n result: null,\n headers: {}\n };\n // not found leads to null obj returned\n if (statusCode === HttpCodes.NotFound) {\n resolve(response);\n }\n // get the result from the body\n function dateTimeDeserializer(key, value) {\n if (typeof value === 'string') {\n const a = new Date(value);\n if (!isNaN(a.valueOf())) {\n return a;\n }\n }\n return value;\n }\n let obj;\n let contents;\n try {\n contents = yield res.readBody();\n if (contents && contents.length > 0) {\n if (options && options.deserializeDates) {\n obj = JSON.parse(contents, dateTimeDeserializer);\n }\n else {\n obj = JSON.parse(contents);\n }\n response.result = obj;\n }\n response.headers = res.message.headers;\n }\n catch (err) {\n // Invalid resource (contents not json); leaving result obj null\n }\n // note that 3xx redirects are handled by the http layer.\n if (statusCode > 299) {\n let msg;\n // if exception/error in body, attempt to get better error\n if (obj && obj.message) {\n msg = obj.message;\n }\n else if (contents && contents.length > 0) {\n // it may be the case that the exception is in the body message as string\n msg = contents;\n }\n else {\n msg = `Failed request: (${statusCode})`;\n }\n const err = new HttpClientError(msg, statusCode);\n err.result = response.result;\n reject(err);\n }\n else {\n resolve(response);\n }\n }));\n });\n }\n}\nexports.HttpClient = HttpClient;\nconst lowercaseKeys = (obj) => Object.keys(obj).reduce((c, k) => ((c[k.toLowerCase()] = obj[k]), c), {});\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.checkBypass = exports.getProxyUrl = void 0;\nfunction getProxyUrl(reqUrl) {\n const usingSsl = reqUrl.protocol === 'https:';\n if (checkBypass(reqUrl)) {\n return undefined;\n }\n const proxyVar = (() => {\n if (usingSsl) {\n return process.env['https_proxy'] || process.env['HTTPS_PROXY'];\n }\n else {\n return process.env['http_proxy'] || process.env['HTTP_PROXY'];\n }\n })();\n if (proxyVar) {\n return new URL(proxyVar);\n }\n else {\n return undefined;\n }\n}\nexports.getProxyUrl = getProxyUrl;\nfunction checkBypass(reqUrl) {\n if (!reqUrl.hostname) {\n return false;\n }\n const noProxy = process.env['no_proxy'] || process.env['NO_PROXY'] || '';\n if (!noProxy) {\n return false;\n }\n // Determine the request port\n let reqPort;\n if (reqUrl.port) {\n reqPort = Number(reqUrl.port);\n }\n else if (reqUrl.protocol === 'http:') {\n reqPort = 80;\n }\n else if (reqUrl.protocol === 'https:') {\n reqPort = 443;\n }\n // Format the request hostname and hostname with port\n const upperReqHosts = [reqUrl.hostname.toUpperCase()];\n if (typeof reqPort === 'number') {\n upperReqHosts.push(`${upperReqHosts[0]}:${reqPort}`);\n }\n // Compare request host against noproxy\n for (const upperNoProxyItem of noProxy\n .split(',')\n .map(x => x.trim().toUpperCase())\n .filter(x => x)) {\n if (upperReqHosts.some(x => x === upperNoProxyItem)) {\n return true;\n }\n }\n return false;\n}\nexports.checkBypass = checkBypass;\n//# sourceMappingURL=proxy.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\n result[\"default\"] = mod;\n return result;\n};\nvar _a;\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst assert_1 = require(\"assert\");\nconst fs = __importStar(require(\"fs\"));\nconst path = __importStar(require(\"path\"));\n_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;\nexports.IS_WINDOWS = process.platform === 'win32';\nfunction exists(fsPath) {\n return __awaiter(this, void 0, void 0, function* () {\n try {\n yield exports.stat(fsPath);\n }\n catch (err) {\n if (err.code === 'ENOENT') {\n return false;\n }\n throw err;\n }\n return true;\n });\n}\nexports.exists = exists;\nfunction isDirectory(fsPath, useStat = false) {\n return __awaiter(this, void 0, void 0, function* () {\n const stats = useStat ? yield exports.stat(fsPath) : yield exports.lstat(fsPath);\n return stats.isDirectory();\n });\n}\nexports.isDirectory = isDirectory;\n/**\n * On OSX/Linux, true if path starts with '/'. On Windows, true for paths like:\n * \\, \\hello, \\\\hello\\share, C:, and C:\\hello (and corresponding alternate separator cases).\n */\nfunction isRooted(p) {\n p = normalizeSeparators(p);\n if (!p) {\n throw new Error('isRooted() parameter \"p\" cannot be empty');\n }\n if (exports.IS_WINDOWS) {\n return (p.startsWith('\\\\') || /^[A-Z]:/i.test(p) // e.g. \\ or \\hello or \\\\hello\n ); // e.g. C: or C:\\hello\n }\n return p.startsWith('/');\n}\nexports.isRooted = isRooted;\n/**\n * Recursively create a directory at `fsPath`.\n *\n * This implementation is optimistic, meaning it attempts to create the full\n * path first, and backs up the path stack from there.\n *\n * @param fsPath The path to create\n * @param maxDepth The maximum recursion depth\n * @param depth The current recursion depth\n */\nfunction mkdirP(fsPath, maxDepth = 1000, depth = 1) {\n return __awaiter(this, void 0, void 0, function* () {\n assert_1.ok(fsPath, 'a path argument must be provided');\n fsPath = path.resolve(fsPath);\n if (depth >= maxDepth)\n return exports.mkdir(fsPath);\n try {\n yield exports.mkdir(fsPath);\n return;\n }\n catch (err) {\n switch (err.code) {\n case 'ENOENT': {\n yield mkdirP(path.dirname(fsPath), maxDepth, depth + 1);\n yield exports.mkdir(fsPath);\n return;\n }\n default: {\n let stats;\n try {\n stats = yield exports.stat(fsPath);\n }\n catch (err2) {\n throw err;\n }\n if (!stats.isDirectory())\n throw err;\n }\n }\n }\n });\n}\nexports.mkdirP = mkdirP;\n/**\n * Best effort attempt to determine whether a file exists and is executable.\n * @param filePath file path to check\n * @param extensions additional file extensions to try\n * @return if file exists and is executable, returns the file path. otherwise empty string.\n */\nfunction tryGetExecutablePath(filePath, extensions) {\n return __awaiter(this, void 0, void 0, function* () {\n let stats = undefined;\n try {\n // test file exists\n stats = yield exports.stat(filePath);\n }\n catch (err) {\n if (err.code !== 'ENOENT') {\n // eslint-disable-next-line no-console\n console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`);\n }\n }\n if (stats && stats.isFile()) {\n if (exports.IS_WINDOWS) {\n // on Windows, test for valid extension\n const upperExt = path.extname(filePath).toUpperCase();\n if (extensions.some(validExt => validExt.toUpperCase() === upperExt)) {\n return filePath;\n }\n }\n else {\n if (isUnixExecutable(stats)) {\n return filePath;\n }\n }\n }\n // try each extension\n const originalFilePath = filePath;\n for (const extension of extensions) {\n filePath = originalFilePath + extension;\n stats = undefined;\n try {\n stats = yield exports.stat(filePath);\n }\n catch (err) {\n if (err.code !== 'ENOENT') {\n // eslint-disable-next-line no-console\n console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`);\n }\n }\n if (stats && stats.isFile()) {\n if (exports.IS_WINDOWS) {\n // preserve the case of the actual file (since an extension was appended)\n try {\n const directory = path.dirname(filePath);\n const upperName = path.basename(filePath).toUpperCase();\n for (const actualName of yield exports.readdir(directory)) {\n if (upperName === actualName.toUpperCase()) {\n filePath = path.join(directory, actualName);\n break;\n }\n }\n }\n catch (err) {\n // eslint-disable-next-line no-console\n console.log(`Unexpected error attempting to determine the actual case of the file '${filePath}': ${err}`);\n }\n return filePath;\n }\n else {\n if (isUnixExecutable(stats)) {\n return filePath;\n }\n }\n }\n }\n return '';\n });\n}\nexports.tryGetExecutablePath = tryGetExecutablePath;\nfunction normalizeSeparators(p) {\n p = p || '';\n if (exports.IS_WINDOWS) {\n // convert slashes on Windows\n p = p.replace(/\\//g, '\\\\');\n // remove redundant slashes\n return p.replace(/\\\\\\\\+/g, '\\\\');\n }\n // remove redundant slashes\n return p.replace(/\\/\\/+/g, '/');\n}\n// on Mac/Linux, test the execute bit\n// R W X R W X R W X\n// 256 128 64 32 16 8 4 2 1\nfunction isUnixExecutable(stats) {\n return ((stats.mode & 1) > 0 ||\n ((stats.mode & 8) > 0 && stats.gid === process.getgid()) ||\n ((stats.mode & 64) > 0 && stats.uid === process.getuid()));\n}\n//# sourceMappingURL=io-util.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\n result[\"default\"] = mod;\n return result;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst childProcess = __importStar(require(\"child_process\"));\nconst path = __importStar(require(\"path\"));\nconst util_1 = require(\"util\");\nconst ioUtil = __importStar(require(\"./io-util\"));\nconst exec = util_1.promisify(childProcess.exec);\n/**\n * Copies a file or folder.\n * Based off of shelljs - https://github.com/shelljs/shelljs/blob/9237f66c52e5daa40458f94f9565e18e8132f5a6/src/cp.js\n *\n * @param source source path\n * @param dest destination path\n * @param options optional. See CopyOptions.\n */\nfunction cp(source, dest, options = {}) {\n return __awaiter(this, void 0, void 0, function* () {\n const { force, recursive } = readCopyOptions(options);\n const destStat = (yield ioUtil.exists(dest)) ? yield ioUtil.stat(dest) : null;\n // Dest is an existing file, but not forcing\n if (destStat && destStat.isFile() && !force) {\n return;\n }\n // If dest is an existing directory, should copy inside.\n const newDest = destStat && destStat.isDirectory()\n ? path.join(dest, path.basename(source))\n : dest;\n if (!(yield ioUtil.exists(source))) {\n throw new Error(`no such file or directory: ${source}`);\n }\n const sourceStat = yield ioUtil.stat(source);\n if (sourceStat.isDirectory()) {\n if (!recursive) {\n throw new Error(`Failed to copy. ${source} is a directory, but tried to copy without recursive flag.`);\n }\n else {\n yield cpDirRecursive(source, newDest, 0, force);\n }\n }\n else {\n if (path.relative(source, newDest) === '') {\n // a file cannot be copied to itself\n throw new Error(`'${newDest}' and '${source}' are the same file`);\n }\n yield copyFile(source, newDest, force);\n }\n });\n}\nexports.cp = cp;\n/**\n * Moves a path.\n *\n * @param source source path\n * @param dest destination path\n * @param options optional. See MoveOptions.\n */\nfunction mv(source, dest, options = {}) {\n return __awaiter(this, void 0, void 0, function* () {\n if (yield ioUtil.exists(dest)) {\n let destExists = true;\n if (yield ioUtil.isDirectory(dest)) {\n // If dest is directory copy src into dest\n dest = path.join(dest, path.basename(source));\n destExists = yield ioUtil.exists(dest);\n }\n if (destExists) {\n if (options.force == null || options.force) {\n yield rmRF(dest);\n }\n else {\n throw new Error('Destination already exists');\n }\n }\n }\n yield mkdirP(path.dirname(dest));\n yield ioUtil.rename(source, dest);\n });\n}\nexports.mv = mv;\n/**\n * Remove a path recursively with force\n *\n * @param inputPath path to remove\n */\nfunction rmRF(inputPath) {\n return __awaiter(this, void 0, void 0, function* () {\n if (ioUtil.IS_WINDOWS) {\n // Node doesn't provide a delete operation, only an unlink function. This means that if the file is being used by another\n // program (e.g. antivirus), it won't be deleted. To address this, we shell out the work to rd/del.\n try {\n if (yield ioUtil.isDirectory(inputPath, true)) {\n yield exec(`rd /s /q \"${inputPath}\"`);\n }\n else {\n yield exec(`del /f /a \"${inputPath}\"`);\n }\n }\n catch (err) {\n // if you try to delete a file that doesn't exist, desired result is achieved\n // other errors are valid\n if (err.code !== 'ENOENT')\n throw err;\n }\n // Shelling out fails to remove a symlink folder with missing source, this unlink catches that\n try {\n yield ioUtil.unlink(inputPath);\n }\n catch (err) {\n // if you try to delete a file that doesn't exist, desired result is achieved\n // other errors are valid\n if (err.code !== 'ENOENT')\n throw err;\n }\n }\n else {\n let isDir = false;\n try {\n isDir = yield ioUtil.isDirectory(inputPath);\n }\n catch (err) {\n // if you try to delete a file that doesn't exist, desired result is achieved\n // other errors are valid\n if (err.code !== 'ENOENT')\n throw err;\n return;\n }\n if (isDir) {\n yield exec(`rm -rf \"${inputPath}\"`);\n }\n else {\n yield ioUtil.unlink(inputPath);\n }\n }\n });\n}\nexports.rmRF = rmRF;\n/**\n * Make a directory. Creates the full path with folders in between\n * Will throw if it fails\n *\n * @param fsPath path to create\n * @returns Promise\n */\nfunction mkdirP(fsPath) {\n return __awaiter(this, void 0, void 0, function* () {\n yield ioUtil.mkdirP(fsPath);\n });\n}\nexports.mkdirP = mkdirP;\n/**\n * Returns path of a tool had the tool actually been invoked. Resolves via paths.\n * If you check and the tool does not exist, it will throw.\n *\n * @param tool name of the tool\n * @param check whether to check if tool exists\n * @returns Promise path to tool\n */\nfunction which(tool, check) {\n return __awaiter(this, void 0, void 0, function* () {\n if (!tool) {\n throw new Error(\"parameter 'tool' is required\");\n }\n // recursive when check=true\n if (check) {\n const result = yield which(tool, false);\n if (!result) {\n if (ioUtil.IS_WINDOWS) {\n 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.`);\n }\n else {\n 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.`);\n }\n }\n return result;\n }\n const matches = yield findInPath(tool);\n if (matches && matches.length > 0) {\n return matches[0];\n }\n return '';\n });\n}\nexports.which = which;\n/**\n * Returns a list of all occurrences of the given tool on the system path.\n *\n * @returns Promise the paths of the tool\n */\nfunction findInPath(tool) {\n return __awaiter(this, void 0, void 0, function* () {\n if (!tool) {\n throw new Error(\"parameter 'tool' is required\");\n }\n // build the list of extensions to try\n const extensions = [];\n if (ioUtil.IS_WINDOWS && process.env['PATHEXT']) {\n for (const extension of process.env['PATHEXT'].split(path.delimiter)) {\n if (extension) {\n extensions.push(extension);\n }\n }\n }\n // if it's rooted, return it if exists. otherwise return empty.\n if (ioUtil.isRooted(tool)) {\n const filePath = yield ioUtil.tryGetExecutablePath(tool, extensions);\n if (filePath) {\n return [filePath];\n }\n return [];\n }\n // if any path separators, return empty\n if (tool.includes(path.sep)) {\n return [];\n }\n // build the list of directories\n //\n // Note, technically \"where\" checks the current directory on Windows. From a toolkit perspective,\n // it feels like we should not do this. Checking the current directory seems like more of a use\n // case of a shell, and the which() function exposed by the toolkit should strive for consistency\n // across platforms.\n const directories = [];\n if (process.env.PATH) {\n for (const p of process.env.PATH.split(path.delimiter)) {\n if (p) {\n directories.push(p);\n }\n }\n }\n // find all matches\n const matches = [];\n for (const directory of directories) {\n const filePath = yield ioUtil.tryGetExecutablePath(path.join(directory, tool), extensions);\n if (filePath) {\n matches.push(filePath);\n }\n }\n return matches;\n });\n}\nexports.findInPath = findInPath;\nfunction readCopyOptions(options) {\n const force = options.force == null ? true : options.force;\n const recursive = Boolean(options.recursive);\n return { force, recursive };\n}\nfunction cpDirRecursive(sourceDir, destDir, currentDepth, force) {\n return __awaiter(this, void 0, void 0, function* () {\n // Ensure there is not a run away recursive copy\n if (currentDepth >= 255)\n return;\n currentDepth++;\n yield mkdirP(destDir);\n const files = yield ioUtil.readdir(sourceDir);\n for (const fileName of files) {\n const srcFile = `${sourceDir}/${fileName}`;\n const destFile = `${destDir}/${fileName}`;\n const srcFileStat = yield ioUtil.lstat(srcFile);\n if (srcFileStat.isDirectory()) {\n // Recurse\n yield cpDirRecursive(srcFile, destFile, currentDepth, force);\n }\n else {\n yield copyFile(srcFile, destFile, force);\n }\n }\n // Change the mode for the newly created directory\n yield ioUtil.chmod(destDir, (yield ioUtil.stat(sourceDir)).mode);\n });\n}\n// Buffered file copy\nfunction copyFile(srcFile, destFile, force) {\n return __awaiter(this, void 0, void 0, function* () {\n if ((yield ioUtil.lstat(srcFile)).isSymbolicLink()) {\n // unlink/re-link it\n try {\n yield ioUtil.lstat(destFile);\n yield ioUtil.unlink(destFile);\n }\n catch (e) {\n // Try to override file permission\n if (e.code === 'EPERM') {\n yield ioUtil.chmod(destFile, '0666');\n yield ioUtil.unlink(destFile);\n }\n // other errors = it doesn't exist, no work to do\n }\n // Copy over symlink\n const symlinkFull = yield ioUtil.readlink(srcFile);\n yield ioUtil.symlink(symlinkFull, destFile, ioUtil.IS_WINDOWS ? 'junction' : null);\n }\n else if (!(yield ioUtil.exists(destFile)) || force) {\n yield ioUtil.copyFile(srcFile, destFile);\n }\n });\n}\n//# sourceMappingURL=io.js.map","'use strict';\n\nObject.defineProperty(exports, '__esModule', { value: true });\n\n// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n/// \nconst listenersMap = new WeakMap();\nconst abortedMap = new WeakMap();\n/**\n * An aborter instance implements AbortSignal interface, can abort HTTP requests.\n *\n * - Call AbortSignal.none to create a new AbortSignal instance that cannot be cancelled.\n * Use `AbortSignal.none` when you are required to pass a cancellation token but the operation\n * cannot or will not ever be cancelled.\n *\n * @example\n * Abort without timeout\n * ```ts\n * await doAsyncWork(AbortSignal.none);\n * ```\n */\nclass AbortSignal {\n constructor() {\n /**\n * onabort event listener.\n */\n this.onabort = null;\n listenersMap.set(this, []);\n abortedMap.set(this, false);\n }\n /**\n * Status of whether aborted or not.\n *\n * @readonly\n */\n get aborted() {\n if (!abortedMap.has(this)) {\n throw new TypeError(\"Expected `this` to be an instance of AbortSignal.\");\n }\n return abortedMap.get(this);\n }\n /**\n * Creates a new AbortSignal instance that will never be aborted.\n *\n * @readonly\n */\n static get none() {\n return new AbortSignal();\n }\n /**\n * Added new \"abort\" event listener, only support \"abort\" event.\n *\n * @param _type - Only support \"abort\" event\n * @param listener - The listener to be added\n */\n addEventListener(\n // tslint:disable-next-line:variable-name\n _type, listener) {\n if (!listenersMap.has(this)) {\n throw new TypeError(\"Expected `this` to be an instance of AbortSignal.\");\n }\n const listeners = listenersMap.get(this);\n listeners.push(listener);\n }\n /**\n * Remove \"abort\" event listener, only support \"abort\" event.\n *\n * @param _type - Only support \"abort\" event\n * @param listener - The listener to be removed\n */\n removeEventListener(\n // tslint:disable-next-line:variable-name\n _type, listener) {\n if (!listenersMap.has(this)) {\n throw new TypeError(\"Expected `this` to be an instance of AbortSignal.\");\n }\n const listeners = listenersMap.get(this);\n const index = listeners.indexOf(listener);\n if (index > -1) {\n listeners.splice(index, 1);\n }\n }\n /**\n * Dispatches a synthetic event to the AbortSignal.\n */\n dispatchEvent(_event) {\n throw new Error(\"This is a stub dispatchEvent implementation that should not be used. It only exists for type-checking purposes.\");\n }\n}\n/**\n * Helper to trigger an abort event immediately, the onabort and all abort event listeners will be triggered.\n * Will try to trigger abort event for all linked AbortSignal nodes.\n *\n * - If there is a timeout, the timer will be cancelled.\n * - If aborted is true, nothing will happen.\n *\n * @internal\n */\n// eslint-disable-next-line @azure/azure-sdk/ts-use-interface-parameters\nfunction abortSignal(signal) {\n if (signal.aborted) {\n return;\n }\n if (signal.onabort) {\n signal.onabort.call(signal);\n }\n const listeners = listenersMap.get(signal);\n if (listeners) {\n // Create a copy of listeners so mutations to the array\n // (e.g. via removeListener calls) don't affect the listeners\n // we invoke.\n listeners.slice().forEach((listener) => {\n listener.call(signal, { type: \"abort\" });\n });\n }\n abortedMap.set(signal, true);\n}\n\n// Copyright (c) Microsoft Corporation.\n/**\n * This error is thrown when an asynchronous operation has been aborted.\n * Check for this error by testing the `name` that the name property of the\n * error matches `\"AbortError\"`.\n *\n * @example\n * ```ts\n * const controller = new AbortController();\n * controller.abort();\n * try {\n * doAsyncWork(controller.signal)\n * } catch (e) {\n * if (e.name === 'AbortError') {\n * // handle abort error here.\n * }\n * }\n * ```\n */\nclass AbortError extends Error {\n constructor(message) {\n super(message);\n this.name = \"AbortError\";\n }\n}\n/**\n * An AbortController provides an AbortSignal and the associated controls to signal\n * that an asynchronous operation should be aborted.\n *\n * @example\n * Abort an operation when another event fires\n * ```ts\n * const controller = new AbortController();\n * const signal = controller.signal;\n * doAsyncWork(signal);\n * button.addEventListener('click', () => controller.abort());\n * ```\n *\n * @example\n * Share aborter cross multiple operations in 30s\n * ```ts\n * // Upload the same data to 2 different data centers at the same time,\n * // abort another when any of them is finished\n * const controller = AbortController.withTimeout(30 * 1000);\n * doAsyncWork(controller.signal).then(controller.abort);\n * doAsyncWork(controller.signal).then(controller.abort);\n *```\n *\n * @example\n * Cascaded aborting\n * ```ts\n * // All operations can't take more than 30 seconds\n * const aborter = Aborter.timeout(30 * 1000);\n *\n * // Following 2 operations can't take more than 25 seconds\n * await doAsyncWork(aborter.withTimeout(25 * 1000));\n * await doAsyncWork(aborter.withTimeout(25 * 1000));\n * ```\n */\nclass AbortController {\n // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n constructor(parentSignals) {\n this._signal = new AbortSignal();\n if (!parentSignals) {\n return;\n }\n // coerce parentSignals into an array\n if (!Array.isArray(parentSignals)) {\n // eslint-disable-next-line prefer-rest-params\n parentSignals = arguments;\n }\n for (const parentSignal of parentSignals) {\n // if the parent signal has already had abort() called,\n // then call abort on this signal as well.\n if (parentSignal.aborted) {\n this.abort();\n }\n else {\n // when the parent signal aborts, this signal should as well.\n parentSignal.addEventListener(\"abort\", () => {\n this.abort();\n });\n }\n }\n }\n /**\n * The AbortSignal associated with this controller that will signal aborted\n * when the abort method is called on this controller.\n *\n * @readonly\n */\n get signal() {\n return this._signal;\n }\n /**\n * Signal that any operations passed this controller's associated abort signal\n * to cancel any remaining work and throw an `AbortError`.\n */\n abort() {\n abortSignal(this._signal);\n }\n /**\n * Creates a new AbortSignal instance that will abort after the provided ms.\n * @param ms - Elapsed time in milliseconds to trigger an abort.\n */\n static timeout(ms) {\n const signal = new AbortSignal();\n const timer = setTimeout(abortSignal, ms, signal);\n // Prevent the active Timer from keeping the Node.js event loop active.\n if (typeof timer.unref === \"function\") {\n timer.unref();\n }\n return signal;\n }\n}\n\nexports.AbortController = AbortController;\nexports.AbortError = AbortError;\nexports.AbortSignal = AbortSignal;\n//# sourceMappingURL=index.js.map\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', { value: true });\n\n// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n/**\n * A static-key-based credential that supports updating\n * the underlying key value.\n */\nclass AzureKeyCredential {\n /**\n * Create an instance of an AzureKeyCredential for use\n * with a service client.\n *\n * @param key - The initial value of the key to use in authentication\n */\n constructor(key) {\n if (!key) {\n throw new Error(\"key must be a non-empty string\");\n }\n this._key = key;\n }\n /**\n * The value of the key to be used in authentication\n */\n get key() {\n return this._key;\n }\n /**\n * Change the value of the key.\n *\n * Updates will take effect upon the next request after\n * updating the key value.\n *\n * @param newKey - The new key value to be used\n */\n update(newKey) {\n this._key = newKey;\n }\n}\n\n// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n/**\n * Helper TypeGuard that checks if something is defined or not.\n * @param thing - Anything\n * @internal\n */\nfunction isDefined(thing) {\n return typeof thing !== \"undefined\" && thing !== null;\n}\n/**\n * Helper TypeGuard that checks if the input is an object with the specified properties.\n * Note: The properties may be inherited.\n * @param thing - Anything.\n * @param properties - The name of the properties that should appear in the object.\n * @internal\n */\nfunction isObjectWithProperties(thing, properties) {\n if (!isDefined(thing) || typeof thing !== \"object\") {\n return false;\n }\n for (const property of properties) {\n if (!objectHasProperty(thing, property)) {\n return false;\n }\n }\n return true;\n}\n/**\n * Helper TypeGuard that checks if the input is an object with the specified property.\n * Note: The property may be inherited.\n * @param thing - Any object.\n * @param property - The name of the property that should appear in the object.\n * @internal\n */\nfunction objectHasProperty(thing, property) {\n return typeof thing === \"object\" && property in thing;\n}\n\n// Copyright (c) Microsoft Corporation.\n/**\n * A static name/key-based credential that supports updating\n * the underlying name and key values.\n */\nclass AzureNamedKeyCredential {\n /**\n * Create an instance of an AzureNamedKeyCredential for use\n * with a service client.\n *\n * @param name - The initial value of the name to use in authentication.\n * @param key - The initial value of the key to use in authentication.\n */\n constructor(name, key) {\n if (!name || !key) {\n throw new TypeError(\"name and key must be non-empty strings\");\n }\n this._name = name;\n this._key = key;\n }\n /**\n * The value of the key to be used in authentication.\n */\n get key() {\n return this._key;\n }\n /**\n * The value of the name to be used in authentication.\n */\n get name() {\n return this._name;\n }\n /**\n * Change the value of the key.\n *\n * Updates will take effect upon the next request after\n * updating the key value.\n *\n * @param newName - The new name value to be used.\n * @param newKey - The new key value to be used.\n */\n update(newName, newKey) {\n if (!newName || !newKey) {\n throw new TypeError(\"newName and newKey must be non-empty strings\");\n }\n this._name = newName;\n this._key = newKey;\n }\n}\n/**\n * Tests an object to determine whether it implements NamedKeyCredential.\n *\n * @param credential - The assumed NamedKeyCredential to be tested.\n */\nfunction isNamedKeyCredential(credential) {\n return (isObjectWithProperties(credential, [\"name\", \"key\"]) &&\n typeof credential.key === \"string\" &&\n typeof credential.name === \"string\");\n}\n\n// Copyright (c) Microsoft Corporation.\n/**\n * A static-signature-based credential that supports updating\n * the underlying signature value.\n */\nclass AzureSASCredential {\n /**\n * Create an instance of an AzureSASCredential for use\n * with a service client.\n *\n * @param signature - The initial value of the shared access signature to use in authentication\n */\n constructor(signature) {\n if (!signature) {\n throw new Error(\"shared access signature must be a non-empty string\");\n }\n this._signature = signature;\n }\n /**\n * The value of the shared access signature to be used in authentication\n */\n get signature() {\n return this._signature;\n }\n /**\n * Change the value of the signature.\n *\n * Updates will take effect upon the next request after\n * updating the signature value.\n *\n * @param newSignature - The new shared access signature value to be used\n */\n update(newSignature) {\n if (!newSignature) {\n throw new Error(\"shared access signature must be a non-empty string\");\n }\n this._signature = newSignature;\n }\n}\n/**\n * Tests an object to determine whether it implements SASCredential.\n *\n * @param credential - The assumed SASCredential to be tested.\n */\nfunction isSASCredential(credential) {\n return (isObjectWithProperties(credential, [\"signature\"]) && typeof credential.signature === \"string\");\n}\n\n// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n/**\n * Tests an object to determine whether it implements TokenCredential.\n *\n * @param credential - The assumed TokenCredential to be tested.\n */\nfunction isTokenCredential(credential) {\n // Check for an object with a 'getToken' function and possibly with\n // a 'signRequest' function. We do this check to make sure that\n // a ServiceClientCredentials implementor (like TokenClientCredentials\n // in ms-rest-nodeauth) doesn't get mistaken for a TokenCredential if\n // it doesn't actually implement TokenCredential also.\n const castCredential = credential;\n return (castCredential &&\n typeof castCredential.getToken === \"function\" &&\n (castCredential.signRequest === undefined || castCredential.getToken.length > 0));\n}\n\nexports.AzureKeyCredential = AzureKeyCredential;\nexports.AzureNamedKeyCredential = AzureNamedKeyCredential;\nexports.AzureSASCredential = AzureSASCredential;\nexports.isNamedKeyCredential = isNamedKeyCredential;\nexports.isSASCredential = isSASCredential;\nexports.isTokenCredential = isTokenCredential;\n//# sourceMappingURL=index.js.map\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', { value: true });\n\nvar uuid = require('uuid');\nvar util = require('util');\nvar tslib = require('tslib');\nvar xml2js = require('xml2js');\nvar coreUtil = require('@azure/core-util');\nvar logger$1 = require('@azure/logger');\nvar coreAuth = require('@azure/core-auth');\nvar os = require('os');\nvar http = require('http');\nvar https = require('https');\nvar tough = require('tough-cookie');\nvar abortController = require('@azure/abort-controller');\nvar tunnel = require('tunnel');\nvar stream = require('stream');\nvar FormData = require('form-data');\nvar node_fetch = require('node-fetch');\nvar coreTracing = require('@azure/core-tracing');\n\nfunction _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }\n\nfunction _interopNamespace(e) {\n if (e && e.__esModule) return e;\n var n = Object.create(null);\n if (e) {\n Object.keys(e).forEach(function (k) {\n if (k !== 'default') {\n var d = Object.getOwnPropertyDescriptor(e, k);\n Object.defineProperty(n, k, d.get ? d : {\n enumerable: true,\n get: function () { return e[k]; }\n });\n }\n });\n }\n n[\"default\"] = e;\n return Object.freeze(n);\n}\n\nvar xml2js__namespace = /*#__PURE__*/_interopNamespace(xml2js);\nvar os__namespace = /*#__PURE__*/_interopNamespace(os);\nvar http__namespace = /*#__PURE__*/_interopNamespace(http);\nvar https__namespace = /*#__PURE__*/_interopNamespace(https);\nvar tough__namespace = /*#__PURE__*/_interopNamespace(tough);\nvar tunnel__namespace = /*#__PURE__*/_interopNamespace(tunnel);\nvar FormData__default = /*#__PURE__*/_interopDefaultLegacy(FormData);\nvar node_fetch__default = /*#__PURE__*/_interopDefaultLegacy(node_fetch);\n\n// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n/**\n * A collection of HttpHeaders that can be sent with a HTTP request.\n */\nfunction getHeaderKey(headerName) {\n return headerName.toLowerCase();\n}\nfunction isHttpHeadersLike(object) {\n if (object && typeof object === \"object\") {\n const castObject = object;\n if (typeof castObject.rawHeaders === \"function\" &&\n typeof castObject.clone === \"function\" &&\n typeof castObject.get === \"function\" &&\n typeof castObject.set === \"function\" &&\n typeof castObject.contains === \"function\" &&\n typeof castObject.remove === \"function\" &&\n typeof castObject.headersArray === \"function\" &&\n typeof castObject.headerValues === \"function\" &&\n typeof castObject.headerNames === \"function\" &&\n typeof castObject.toJson === \"function\") {\n return true;\n }\n }\n return false;\n}\n/**\n * A collection of HTTP header key/value pairs.\n */\nclass HttpHeaders {\n constructor(rawHeaders) {\n this._headersMap = {};\n if (rawHeaders) {\n for (const headerName in rawHeaders) {\n this.set(headerName, rawHeaders[headerName]);\n }\n }\n }\n /**\n * Set a header in this collection with the provided name and value. The name is\n * case-insensitive.\n * @param headerName - The name of the header to set. This value is case-insensitive.\n * @param headerValue - The value of the header to set.\n */\n set(headerName, headerValue) {\n this._headersMap[getHeaderKey(headerName)] = {\n name: headerName,\n value: headerValue.toString(),\n };\n }\n /**\n * Get the header value for the provided header name, or undefined if no header exists in this\n * collection with the provided name.\n * @param headerName - The name of the header.\n */\n get(headerName) {\n const header = this._headersMap[getHeaderKey(headerName)];\n return !header ? undefined : header.value;\n }\n /**\n * Get whether or not this header collection contains a header entry for the provided header name.\n */\n contains(headerName) {\n return !!this._headersMap[getHeaderKey(headerName)];\n }\n /**\n * Remove the header with the provided headerName. Return whether or not the header existed and\n * was removed.\n * @param headerName - The name of the header to remove.\n */\n remove(headerName) {\n const result = this.contains(headerName);\n delete this._headersMap[getHeaderKey(headerName)];\n return result;\n }\n /**\n * Get the headers that are contained this collection as an object.\n */\n rawHeaders() {\n return this.toJson({ preserveCase: true });\n }\n /**\n * Get the headers that are contained in this collection as an array.\n */\n headersArray() {\n const headers = [];\n for (const headerKey in this._headersMap) {\n headers.push(this._headersMap[headerKey]);\n }\n return headers;\n }\n /**\n * Get the header names that are contained in this collection.\n */\n headerNames() {\n const headerNames = [];\n const headers = this.headersArray();\n for (let i = 0; i < headers.length; ++i) {\n headerNames.push(headers[i].name);\n }\n return headerNames;\n }\n /**\n * Get the header values that are contained in this collection.\n */\n headerValues() {\n const headerValues = [];\n const headers = this.headersArray();\n for (let i = 0; i < headers.length; ++i) {\n headerValues.push(headers[i].value);\n }\n return headerValues;\n }\n /**\n * Get the JSON object representation of this HTTP header collection.\n */\n toJson(options = {}) {\n const result = {};\n if (options.preserveCase) {\n for (const headerKey in this._headersMap) {\n const header = this._headersMap[headerKey];\n result[header.name] = header.value;\n }\n }\n else {\n for (const headerKey in this._headersMap) {\n const header = this._headersMap[headerKey];\n result[getHeaderKey(header.name)] = header.value;\n }\n }\n return result;\n }\n /**\n * Get the string representation of this HTTP header collection.\n */\n toString() {\n return JSON.stringify(this.toJson({ preserveCase: true }));\n }\n /**\n * Create a deep clone/copy of this HttpHeaders collection.\n */\n clone() {\n const resultPreservingCasing = {};\n for (const headerKey in this._headersMap) {\n const header = this._headersMap[headerKey];\n resultPreservingCasing[header.name] = header.value;\n }\n return new HttpHeaders(resultPreservingCasing);\n }\n}\n\n// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n/**\n * Encodes a string in base64 format.\n * @param value - The string to encode\n */\nfunction encodeString(value) {\n return Buffer.from(value).toString(\"base64\");\n}\n/**\n * Encodes a byte array in base64 format.\n * @param value - The Uint8Aray to encode\n */\nfunction encodeByteArray(value) {\n // Buffer.from accepts | -- the TypeScript definition is off here\n // https://nodejs.org/api/buffer.html#buffer_class_method_buffer_from_arraybuffer_byteoffset_length\n const bufferValue = value instanceof Buffer ? value : Buffer.from(value.buffer);\n return bufferValue.toString(\"base64\");\n}\n/**\n * Decodes a base64 string into a byte array.\n * @param value - The base64 string to decode\n */\nfunction decodeString(value) {\n return Buffer.from(value, \"base64\");\n}\n\n// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n/**\n * A set of constants used internally when processing requests.\n */\nconst Constants = {\n /**\n * The core-http version\n */\n coreHttpVersion: \"2.3.1\",\n /**\n * Specifies HTTP.\n */\n HTTP: \"http:\",\n /**\n * Specifies HTTPS.\n */\n HTTPS: \"https:\",\n /**\n * Specifies HTTP Proxy.\n */\n HTTP_PROXY: \"HTTP_PROXY\",\n /**\n * Specifies HTTPS Proxy.\n */\n HTTPS_PROXY: \"HTTPS_PROXY\",\n /**\n * Specifies NO Proxy.\n */\n NO_PROXY: \"NO_PROXY\",\n /**\n * Specifies ALL Proxy.\n */\n ALL_PROXY: \"ALL_PROXY\",\n HttpConstants: {\n /**\n * Http Verbs\n */\n HttpVerbs: {\n PUT: \"PUT\",\n GET: \"GET\",\n DELETE: \"DELETE\",\n POST: \"POST\",\n MERGE: \"MERGE\",\n HEAD: \"HEAD\",\n PATCH: \"PATCH\",\n },\n StatusCodes: {\n TooManyRequests: 429,\n ServiceUnavailable: 503,\n },\n },\n /**\n * Defines constants for use with HTTP headers.\n */\n HeaderConstants: {\n /**\n * The Authorization header.\n */\n AUTHORIZATION: \"authorization\",\n AUTHORIZATION_SCHEME: \"Bearer\",\n /**\n * The Retry-After response-header field can be used with a 503 (Service\n * Unavailable) or 349 (Too Many Requests) responses to indicate how long\n * the service is expected to be unavailable to the requesting client.\n */\n RETRY_AFTER: \"Retry-After\",\n /**\n * The UserAgent header.\n */\n USER_AGENT: \"User-Agent\",\n },\n};\n\n// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n/**\n * Default key used to access the XML attributes.\n */\nconst XML_ATTRKEY = \"$\";\n/**\n * Default key used to access the XML value content.\n */\nconst XML_CHARKEY = \"_\";\n\n// Copyright (c) Microsoft Corporation.\nconst validUuidRegex = /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/i;\n/**\n * A constant that indicates whether the environment is node.js or browser based.\n */\nconst isNode = typeof process !== \"undefined\" &&\n !!process.version &&\n !!process.versions &&\n !!process.versions.node;\n/**\n * Encodes an URI.\n *\n * @param uri - The URI to be encoded.\n * @returns The encoded URI.\n */\nfunction encodeUri(uri) {\n return encodeURIComponent(uri)\n .replace(/!/g, \"%21\")\n .replace(/\"/g, \"%27\")\n .replace(/\\(/g, \"%28\")\n .replace(/\\)/g, \"%29\")\n .replace(/\\*/g, \"%2A\");\n}\n/**\n * Returns a stripped version of the Http Response which only contains body,\n * headers and the status.\n *\n * @param response - The Http Response\n * @returns The stripped version of Http Response.\n */\nfunction stripResponse(response) {\n const strippedResponse = {};\n strippedResponse.body = response.bodyAsText;\n strippedResponse.headers = response.headers;\n strippedResponse.status = response.status;\n return strippedResponse;\n}\n/**\n * Returns a stripped version of the Http Request that does not contain the\n * Authorization header.\n *\n * @param request - The Http Request object\n * @returns The stripped version of Http Request.\n */\nfunction stripRequest(request) {\n const strippedRequest = request.clone();\n if (strippedRequest.headers) {\n strippedRequest.headers.remove(\"authorization\");\n }\n return strippedRequest;\n}\n/**\n * Validates the given uuid as a string\n *\n * @param uuid - The uuid as a string that needs to be validated\n * @returns True if the uuid is valid; false otherwise.\n */\nfunction isValidUuid(uuid) {\n return validUuidRegex.test(uuid);\n}\n/**\n * Generated UUID\n *\n * @returns RFC4122 v4 UUID.\n */\nfunction generateUuid() {\n return uuid.v4();\n}\n/**\n * Executes an array of promises sequentially. Inspiration of this method is here:\n * https://pouchdb.com/2015/05/18/we-have-a-problem-with-promises.html. An awesome blog on promises!\n *\n * @param promiseFactories - An array of promise factories(A function that return a promise)\n * @param kickstart - Input to the first promise that is used to kickstart the promise chain.\n * If not provided then the promise chain starts with undefined.\n * @returns A chain of resolved or rejected promises\n */\nfunction executePromisesSequentially(promiseFactories, kickstart) {\n let result = Promise.resolve(kickstart);\n promiseFactories.forEach((promiseFactory) => {\n result = result.then(promiseFactory);\n });\n return result;\n}\n/**\n * Converts a Promise to a callback.\n * @param promise - The Promise to be converted to a callback\n * @returns A function that takes the callback `(cb: Function) => void`\n * @deprecated generated code should instead depend on responseToBody\n */\n// eslint-disable-next-line @typescript-eslint/ban-types\nfunction promiseToCallback(promise) {\n if (typeof promise.then !== \"function\") {\n throw new Error(\"The provided input is not a Promise.\");\n }\n // eslint-disable-next-line @typescript-eslint/ban-types\n return (cb) => {\n promise\n .then((data) => {\n // eslint-disable-next-line promise/no-callback-in-promise\n return cb(undefined, data);\n })\n .catch((err) => {\n // eslint-disable-next-line promise/no-callback-in-promise\n cb(err);\n });\n };\n}\n/**\n * Converts a Promise to a service callback.\n * @param promise - The Promise of HttpOperationResponse to be converted to a service callback\n * @returns A function that takes the service callback (cb: ServiceCallback): void\n */\nfunction promiseToServiceCallback(promise) {\n if (typeof promise.then !== \"function\") {\n throw new Error(\"The provided input is not a Promise.\");\n }\n return (cb) => {\n promise\n .then((data) => {\n return process.nextTick(cb, undefined, data.parsedBody, data.request, data);\n })\n .catch((err) => {\n process.nextTick(cb, err);\n });\n };\n}\nfunction prepareXMLRootList(obj, elementName, xmlNamespaceKey, xmlNamespace) {\n if (!Array.isArray(obj)) {\n obj = [obj];\n }\n if (!xmlNamespaceKey || !xmlNamespace) {\n return { [elementName]: obj };\n }\n const result = { [elementName]: obj };\n result[XML_ATTRKEY] = { [xmlNamespaceKey]: xmlNamespace };\n return result;\n}\n/**\n * Applies the properties on the prototype of sourceCtors to the prototype of targetCtor\n * @param targetCtor - The target object on which the properties need to be applied.\n * @param sourceCtors - An array of source objects from which the properties need to be taken.\n */\nfunction applyMixins(targetCtorParam, sourceCtors) {\n const castTargetCtorParam = targetCtorParam;\n sourceCtors.forEach((sourceCtor) => {\n Object.getOwnPropertyNames(sourceCtor.prototype).forEach((name) => {\n castTargetCtorParam.prototype[name] = sourceCtor.prototype[name];\n });\n });\n}\nconst validateISODuration = /^(-|\\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;\n/**\n * Indicates whether the given string is in ISO 8601 format.\n * @param value - The value to be validated for ISO 8601 duration format.\n * @returns `true` if valid, `false` otherwise.\n */\nfunction isDuration(value) {\n return validateISODuration.test(value);\n}\n/**\n * Replace all of the instances of searchValue in value with the provided replaceValue.\n * @param value - The value to search and replace in.\n * @param searchValue - The value to search for in the value argument.\n * @param replaceValue - The value to replace searchValue with in the value argument.\n * @returns The value where each instance of searchValue was replaced with replacedValue.\n */\nfunction replaceAll(value, searchValue, replaceValue) {\n return !value || !searchValue ? value : value.split(searchValue).join(replaceValue || \"\");\n}\n/**\n * Determines whether the given entity is a basic/primitive type\n * (string, number, boolean, null, undefined).\n * @param value - Any entity\n * @returns true is it is primitive type, false otherwise.\n */\nfunction isPrimitiveType(value) {\n return (typeof value !== \"object\" && typeof value !== \"function\") || value === null;\n}\nfunction getEnvironmentValue(name) {\n if (process.env[name]) {\n return process.env[name];\n }\n else if (process.env[name.toLowerCase()]) {\n return process.env[name.toLowerCase()];\n }\n return undefined;\n}\n/**\n * @internal\n * @returns true when input is an object type that is not null, Array, RegExp, or Date.\n */\nfunction isObject(input) {\n return (typeof input === \"object\" &&\n input !== null &&\n !Array.isArray(input) &&\n !(input instanceof RegExp) &&\n !(input instanceof Date));\n}\n\n// Copyright (c) Microsoft Corporation.\n// This file contains utility code to serialize and deserialize network operations according to `OperationSpec` objects generated by AutoRest.TypeScript from OpenAPI specifications.\n/**\n * Used to map raw response objects to final shapes.\n * Helps packing and unpacking Dates and other encoded types that are not intrinsic to JSON.\n * Also allows pulling values from headers, as well as inserting default values and constants.\n */\nclass Serializer {\n constructor(\n /**\n * The provided model mapper.\n */\n modelMappers = {}, \n /**\n * Whether the contents are XML or not.\n */\n isXML) {\n this.modelMappers = modelMappers;\n this.isXML = isXML;\n }\n /**\n * Validates constraints, if any. This function will throw if the provided value does not respect those constraints.\n * @param mapper - The definition of data models.\n * @param value - The value.\n * @param objectName - Name of the object. Used in the error messages.\n * @deprecated Removing the constraints validation on client side.\n */\n validateConstraints(mapper, value, objectName) {\n const failValidation = (constraintName, constraintValue) => {\n throw new Error(`\"${objectName}\" with value \"${value}\" should satisfy the constraint \"${constraintName}\": ${constraintValue}.`);\n };\n if (mapper.constraints && value != undefined) {\n const valueAsNumber = value;\n const { ExclusiveMaximum, ExclusiveMinimum, InclusiveMaximum, InclusiveMinimum, MaxItems, MaxLength, MinItems, MinLength, MultipleOf, Pattern, UniqueItems, } = mapper.constraints;\n if (ExclusiveMaximum != undefined && valueAsNumber >= ExclusiveMaximum) {\n failValidation(\"ExclusiveMaximum\", ExclusiveMaximum);\n }\n if (ExclusiveMinimum != undefined && valueAsNumber <= ExclusiveMinimum) {\n failValidation(\"ExclusiveMinimum\", ExclusiveMinimum);\n }\n if (InclusiveMaximum != undefined && valueAsNumber > InclusiveMaximum) {\n failValidation(\"InclusiveMaximum\", InclusiveMaximum);\n }\n if (InclusiveMinimum != undefined && valueAsNumber < InclusiveMinimum) {\n failValidation(\"InclusiveMinimum\", InclusiveMinimum);\n }\n const valueAsArray = value;\n if (MaxItems != undefined && valueAsArray.length > MaxItems) {\n failValidation(\"MaxItems\", MaxItems);\n }\n if (MaxLength != undefined && valueAsArray.length > MaxLength) {\n failValidation(\"MaxLength\", MaxLength);\n }\n if (MinItems != undefined && valueAsArray.length < MinItems) {\n failValidation(\"MinItems\", MinItems);\n }\n if (MinLength != undefined && valueAsArray.length < MinLength) {\n failValidation(\"MinLength\", MinLength);\n }\n if (MultipleOf != undefined && valueAsNumber % MultipleOf !== 0) {\n failValidation(\"MultipleOf\", MultipleOf);\n }\n if (Pattern) {\n const pattern = typeof Pattern === \"string\" ? new RegExp(Pattern) : Pattern;\n if (typeof value !== \"string\" || value.match(pattern) === null) {\n failValidation(\"Pattern\", Pattern);\n }\n }\n if (UniqueItems &&\n valueAsArray.some((item, i, ar) => ar.indexOf(item) !== i)) {\n failValidation(\"UniqueItems\", UniqueItems);\n }\n }\n }\n /**\n * Serialize the given object based on its metadata defined in the mapper.\n *\n * @param mapper - The mapper which defines the metadata of the serializable object.\n * @param object - A valid Javascript object to be serialized.\n * @param objectName - Name of the serialized object.\n * @param options - additional options to deserialization.\n * @returns A valid serialized Javascript object.\n */\n serialize(mapper, object, objectName, options = {}) {\n var _a, _b, _c;\n const updatedOptions = {\n rootName: (_a = options.rootName) !== null && _a !== void 0 ? _a : \"\",\n includeRoot: (_b = options.includeRoot) !== null && _b !== void 0 ? _b : false,\n xmlCharKey: (_c = options.xmlCharKey) !== null && _c !== void 0 ? _c : XML_CHARKEY,\n };\n let payload = {};\n const mapperType = mapper.type.name;\n if (!objectName) {\n objectName = mapper.serializedName;\n }\n if (mapperType.match(/^Sequence$/i) !== null) {\n payload = [];\n }\n if (mapper.isConstant) {\n object = mapper.defaultValue;\n }\n // This table of allowed values should help explain\n // the mapper.required and mapper.nullable properties.\n // X means \"neither undefined or null are allowed\".\n // || required\n // || true | false\n // nullable || ==========================\n // true || null | undefined/null\n // false || X | undefined\n // undefined || X | undefined/null\n const { required, nullable } = mapper;\n if (required && nullable && object === undefined) {\n throw new Error(`${objectName} cannot be undefined.`);\n }\n if (required && !nullable && object == undefined) {\n throw new Error(`${objectName} cannot be null or undefined.`);\n }\n if (!required && nullable === false && object === null) {\n throw new Error(`${objectName} cannot be null.`);\n }\n if (object == undefined) {\n payload = object;\n }\n else {\n if (mapperType.match(/^any$/i) !== null) {\n payload = object;\n }\n else if (mapperType.match(/^(Number|String|Boolean|Object|Stream|Uuid)$/i) !== null) {\n payload = serializeBasicTypes(mapperType, objectName, object);\n }\n else if (mapperType.match(/^Enum$/i) !== null) {\n const enumMapper = mapper;\n payload = serializeEnumType(objectName, enumMapper.type.allowedValues, object);\n }\n else if (mapperType.match(/^(Date|DateTime|TimeSpan|DateTimeRfc1123|UnixTime)$/i) !== null) {\n payload = serializeDateTypes(mapperType, object, objectName);\n }\n else if (mapperType.match(/^ByteArray$/i) !== null) {\n payload = serializeByteArrayType(objectName, object);\n }\n else if (mapperType.match(/^Base64Url$/i) !== null) {\n payload = serializeBase64UrlType(objectName, object);\n }\n else if (mapperType.match(/^Sequence$/i) !== null) {\n payload = serializeSequenceType(this, mapper, object, objectName, Boolean(this.isXML), updatedOptions);\n }\n else if (mapperType.match(/^Dictionary$/i) !== null) {\n payload = serializeDictionaryType(this, mapper, object, objectName, Boolean(this.isXML), updatedOptions);\n }\n else if (mapperType.match(/^Composite$/i) !== null) {\n payload = serializeCompositeType(this, mapper, object, objectName, Boolean(this.isXML), updatedOptions);\n }\n }\n return payload;\n }\n /**\n * Deserialize the given object based on its metadata defined in the mapper.\n *\n * @param mapper - The mapper which defines the metadata of the serializable object.\n * @param responseBody - A valid Javascript entity to be deserialized.\n * @param objectName - Name of the deserialized object.\n * @param options - Controls behavior of XML parser and builder.\n * @returns A valid deserialized Javascript object.\n */\n deserialize(mapper, responseBody, objectName, options = {}) {\n var _a, _b, _c;\n const updatedOptions = {\n rootName: (_a = options.rootName) !== null && _a !== void 0 ? _a : \"\",\n includeRoot: (_b = options.includeRoot) !== null && _b !== void 0 ? _b : false,\n xmlCharKey: (_c = options.xmlCharKey) !== null && _c !== void 0 ? _c : XML_CHARKEY,\n };\n if (responseBody == undefined) {\n if (this.isXML && mapper.type.name === \"Sequence\" && !mapper.xmlIsWrapped) {\n // Edge case for empty XML non-wrapped lists. xml2js can't distinguish\n // between the list being empty versus being missing,\n // so let's do the more user-friendly thing and return an empty list.\n responseBody = [];\n }\n // specifically check for undefined as default value can be a falsey value `0, \"\", false, null`\n if (mapper.defaultValue !== undefined) {\n responseBody = mapper.defaultValue;\n }\n return responseBody;\n }\n let payload;\n const mapperType = mapper.type.name;\n if (!objectName) {\n objectName = mapper.serializedName;\n }\n if (mapperType.match(/^Composite$/i) !== null) {\n payload = deserializeCompositeType(this, mapper, responseBody, objectName, updatedOptions);\n }\n else {\n if (this.isXML) {\n const xmlCharKey = updatedOptions.xmlCharKey;\n const castResponseBody = responseBody;\n /**\n * If the mapper specifies this as a non-composite type value but the responseBody contains\n * both header (\"$\" i.e., XML_ATTRKEY) and body (\"#\" i.e., XML_CHARKEY) properties,\n * then just reduce the responseBody value to the body (\"#\" i.e., XML_CHARKEY) property.\n */\n if (castResponseBody[XML_ATTRKEY] != undefined &&\n castResponseBody[xmlCharKey] != undefined) {\n responseBody = castResponseBody[xmlCharKey];\n }\n }\n if (mapperType.match(/^Number$/i) !== null) {\n payload = parseFloat(responseBody);\n if (isNaN(payload)) {\n payload = responseBody;\n }\n }\n else if (mapperType.match(/^Boolean$/i) !== null) {\n if (responseBody === \"true\") {\n payload = true;\n }\n else if (responseBody === \"false\") {\n payload = false;\n }\n else {\n payload = responseBody;\n }\n }\n else if (mapperType.match(/^(String|Enum|Object|Stream|Uuid|TimeSpan|any)$/i) !== null) {\n payload = responseBody;\n }\n else if (mapperType.match(/^(Date|DateTime|DateTimeRfc1123)$/i) !== null) {\n payload = new Date(responseBody);\n }\n else if (mapperType.match(/^UnixTime$/i) !== null) {\n payload = unixTimeToDate(responseBody);\n }\n else if (mapperType.match(/^ByteArray$/i) !== null) {\n payload = decodeString(responseBody);\n }\n else if (mapperType.match(/^Base64Url$/i) !== null) {\n payload = base64UrlToByteArray(responseBody);\n }\n else if (mapperType.match(/^Sequence$/i) !== null) {\n payload = deserializeSequenceType(this, mapper, responseBody, objectName, updatedOptions);\n }\n else if (mapperType.match(/^Dictionary$/i) !== null) {\n payload = deserializeDictionaryType(this, mapper, responseBody, objectName, updatedOptions);\n }\n }\n if (mapper.isConstant) {\n payload = mapper.defaultValue;\n }\n return payload;\n }\n}\nfunction trimEnd(str, ch) {\n let len = str.length;\n while (len - 1 >= 0 && str[len - 1] === ch) {\n --len;\n }\n return str.substr(0, len);\n}\nfunction bufferToBase64Url(buffer) {\n if (!buffer) {\n return undefined;\n }\n if (!(buffer instanceof Uint8Array)) {\n throw new Error(`Please provide an input of type Uint8Array for converting to Base64Url.`);\n }\n // Uint8Array to Base64.\n const str = encodeByteArray(buffer);\n // Base64 to Base64Url.\n return trimEnd(str, \"=\").replace(/\\+/g, \"-\").replace(/\\//g, \"_\");\n}\nfunction base64UrlToByteArray(str) {\n if (!str) {\n return undefined;\n }\n if (str && typeof str.valueOf() !== \"string\") {\n throw new Error(\"Please provide an input of type string for converting to Uint8Array\");\n }\n // Base64Url to Base64.\n str = str.replace(/-/g, \"+\").replace(/_/g, \"/\");\n // Base64 to Uint8Array.\n return decodeString(str);\n}\nfunction splitSerializeName(prop) {\n const classes = [];\n let partialclass = \"\";\n if (prop) {\n const subwords = prop.split(\".\");\n for (const item of subwords) {\n if (item.charAt(item.length - 1) === \"\\\\\") {\n partialclass += item.substr(0, item.length - 1) + \".\";\n }\n else {\n partialclass += item;\n classes.push(partialclass);\n partialclass = \"\";\n }\n }\n }\n return classes;\n}\nfunction dateToUnixTime(d) {\n if (!d) {\n return undefined;\n }\n if (typeof d.valueOf() === \"string\") {\n d = new Date(d);\n }\n return Math.floor(d.getTime() / 1000);\n}\nfunction unixTimeToDate(n) {\n if (!n) {\n return undefined;\n }\n return new Date(n * 1000);\n}\nfunction serializeBasicTypes(typeName, objectName, value) {\n if (value !== null && value !== undefined) {\n if (typeName.match(/^Number$/i) !== null) {\n if (typeof value !== \"number\") {\n throw new Error(`${objectName} with value ${value} must be of type number.`);\n }\n }\n else if (typeName.match(/^String$/i) !== null) {\n if (typeof value.valueOf() !== \"string\") {\n throw new Error(`${objectName} with value \"${value}\" must be of type string.`);\n }\n }\n else if (typeName.match(/^Uuid$/i) !== null) {\n if (!(typeof value.valueOf() === \"string\" && isValidUuid(value))) {\n throw new Error(`${objectName} with value \"${value}\" must be of type string and a valid uuid.`);\n }\n }\n else if (typeName.match(/^Boolean$/i) !== null) {\n if (typeof value !== \"boolean\") {\n throw new Error(`${objectName} with value ${value} must be of type boolean.`);\n }\n }\n else if (typeName.match(/^Stream$/i) !== null) {\n const objectType = typeof value;\n if (objectType !== \"string\" &&\n objectType !== \"function\" &&\n !(value instanceof ArrayBuffer) &&\n !ArrayBuffer.isView(value) &&\n !((typeof Blob === \"function\" || typeof Blob === \"object\") && value instanceof Blob)) {\n throw new Error(`${objectName} must be a string, Blob, ArrayBuffer, ArrayBufferView, or a function returning NodeJS.ReadableStream.`);\n }\n }\n }\n return value;\n}\nfunction serializeEnumType(objectName, allowedValues, value) {\n if (!allowedValues) {\n throw new Error(`Please provide a set of allowedValues to validate ${objectName} as an Enum Type.`);\n }\n const isPresent = allowedValues.some((item) => {\n if (typeof item.valueOf() === \"string\") {\n return item.toLowerCase() === value.toLowerCase();\n }\n return item === value;\n });\n if (!isPresent) {\n throw new Error(`${value} is not a valid value for ${objectName}. The valid values are: ${JSON.stringify(allowedValues)}.`);\n }\n return value;\n}\nfunction serializeByteArrayType(objectName, value) {\n let returnValue = \"\";\n if (value != undefined) {\n if (!(value instanceof Uint8Array)) {\n throw new Error(`${objectName} must be of type Uint8Array.`);\n }\n returnValue = encodeByteArray(value);\n }\n return returnValue;\n}\nfunction serializeBase64UrlType(objectName, value) {\n let returnValue = \"\";\n if (value != undefined) {\n if (!(value instanceof Uint8Array)) {\n throw new Error(`${objectName} must be of type Uint8Array.`);\n }\n returnValue = bufferToBase64Url(value) || \"\";\n }\n return returnValue;\n}\nfunction serializeDateTypes(typeName, value, objectName) {\n if (value != undefined) {\n if (typeName.match(/^Date$/i) !== null) {\n if (!(value instanceof Date ||\n (typeof value.valueOf() === \"string\" && !isNaN(Date.parse(value))))) {\n throw new Error(`${objectName} must be an instanceof Date or a string in ISO8601 format.`);\n }\n value =\n value instanceof Date\n ? value.toISOString().substring(0, 10)\n : new Date(value).toISOString().substring(0, 10);\n }\n else if (typeName.match(/^DateTime$/i) !== null) {\n if (!(value instanceof Date ||\n (typeof value.valueOf() === \"string\" && !isNaN(Date.parse(value))))) {\n throw new Error(`${objectName} must be an instanceof Date or a string in ISO8601 format.`);\n }\n value = value instanceof Date ? value.toISOString() : new Date(value).toISOString();\n }\n else if (typeName.match(/^DateTimeRfc1123$/i) !== null) {\n if (!(value instanceof Date ||\n (typeof value.valueOf() === \"string\" && !isNaN(Date.parse(value))))) {\n throw new Error(`${objectName} must be an instanceof Date or a string in RFC-1123 format.`);\n }\n value = value instanceof Date ? value.toUTCString() : new Date(value).toUTCString();\n }\n else if (typeName.match(/^UnixTime$/i) !== null) {\n if (!(value instanceof Date ||\n (typeof value.valueOf() === \"string\" && !isNaN(Date.parse(value))))) {\n throw new Error(`${objectName} must be an instanceof Date or a string in RFC-1123/ISO8601 format ` +\n `for it to be serialized in UnixTime/Epoch format.`);\n }\n value = dateToUnixTime(value);\n }\n else if (typeName.match(/^TimeSpan$/i) !== null) {\n if (!isDuration(value)) {\n throw new Error(`${objectName} must be a string in ISO 8601 format. Instead was \"${value}\".`);\n }\n }\n }\n return value;\n}\nfunction serializeSequenceType(serializer, mapper, object, objectName, isXml, options) {\n if (!Array.isArray(object)) {\n throw new Error(`${objectName} must be of type Array.`);\n }\n const elementType = mapper.type.element;\n if (!elementType || typeof elementType !== \"object\") {\n throw new Error(`element\" metadata for an Array must be defined in the ` +\n `mapper and it must of type \"object\" in ${objectName}.`);\n }\n const tempArray = [];\n for (let i = 0; i < object.length; i++) {\n const serializedValue = serializer.serialize(elementType, object[i], objectName, options);\n if (isXml && elementType.xmlNamespace) {\n const xmlnsKey = elementType.xmlNamespacePrefix\n ? `xmlns:${elementType.xmlNamespacePrefix}`\n : \"xmlns\";\n if (elementType.type.name === \"Composite\") {\n tempArray[i] = Object.assign({}, serializedValue);\n tempArray[i][XML_ATTRKEY] = { [xmlnsKey]: elementType.xmlNamespace };\n }\n else {\n tempArray[i] = {};\n tempArray[i][options.xmlCharKey] = serializedValue;\n tempArray[i][XML_ATTRKEY] = { [xmlnsKey]: elementType.xmlNamespace };\n }\n }\n else {\n tempArray[i] = serializedValue;\n }\n }\n return tempArray;\n}\nfunction serializeDictionaryType(serializer, mapper, object, objectName, isXml, options) {\n if (typeof object !== \"object\") {\n throw new Error(`${objectName} must be of type object.`);\n }\n const valueType = mapper.type.value;\n if (!valueType || typeof valueType !== \"object\") {\n throw new Error(`\"value\" metadata for a Dictionary must be defined in the ` +\n `mapper and it must of type \"object\" in ${objectName}.`);\n }\n const tempDictionary = {};\n for (const key of Object.keys(object)) {\n const serializedValue = serializer.serialize(valueType, object[key], objectName, options);\n // If the element needs an XML namespace we need to add it within the $ property\n tempDictionary[key] = getXmlObjectValue(valueType, serializedValue, isXml, options);\n }\n // Add the namespace to the root element if needed\n if (isXml && mapper.xmlNamespace) {\n const xmlnsKey = mapper.xmlNamespacePrefix ? `xmlns:${mapper.xmlNamespacePrefix}` : \"xmlns\";\n const result = tempDictionary;\n result[XML_ATTRKEY] = { [xmlnsKey]: mapper.xmlNamespace };\n return result;\n }\n return tempDictionary;\n}\n/**\n * Resolves the additionalProperties property from a referenced mapper.\n * @param serializer - The serializer containing the entire set of mappers.\n * @param mapper - The composite mapper to resolve.\n * @param objectName - Name of the object being serialized.\n */\nfunction resolveAdditionalProperties(serializer, mapper, objectName) {\n const additionalProperties = mapper.type.additionalProperties;\n if (!additionalProperties && mapper.type.className) {\n const modelMapper = resolveReferencedMapper(serializer, mapper, objectName);\n return modelMapper === null || modelMapper === void 0 ? void 0 : modelMapper.type.additionalProperties;\n }\n return additionalProperties;\n}\n/**\n * Finds the mapper referenced by `className`.\n * @param serializer - The serializer containing the entire set of mappers\n * @param mapper - The composite mapper to resolve\n * @param objectName - Name of the object being serialized\n */\nfunction resolveReferencedMapper(serializer, mapper, objectName) {\n const className = mapper.type.className;\n if (!className) {\n throw new Error(`Class name for model \"${objectName}\" is not provided in the mapper \"${JSON.stringify(mapper, undefined, 2)}\".`);\n }\n return serializer.modelMappers[className];\n}\n/**\n * Resolves a composite mapper's modelProperties.\n * @param serializer - The serializer containing the entire set of mappers\n * @param mapper - The composite mapper to resolve\n */\nfunction resolveModelProperties(serializer, mapper, objectName) {\n let modelProps = mapper.type.modelProperties;\n if (!modelProps) {\n const modelMapper = resolveReferencedMapper(serializer, mapper, objectName);\n if (!modelMapper) {\n throw new Error(`mapper() cannot be null or undefined for model \"${mapper.type.className}\".`);\n }\n modelProps = modelMapper === null || modelMapper === void 0 ? void 0 : modelMapper.type.modelProperties;\n if (!modelProps) {\n throw new Error(`modelProperties cannot be null or undefined in the ` +\n `mapper \"${JSON.stringify(modelMapper)}\" of type \"${mapper.type.className}\" for object \"${objectName}\".`);\n }\n }\n return modelProps;\n}\nfunction serializeCompositeType(serializer, mapper, object, objectName, isXml, options) {\n if (getPolymorphicDiscriminatorRecursively(serializer, mapper)) {\n mapper = getPolymorphicMapper(serializer, mapper, object, \"clientName\");\n }\n if (object != undefined) {\n const payload = {};\n const modelProps = resolveModelProperties(serializer, mapper, objectName);\n for (const key of Object.keys(modelProps)) {\n const propertyMapper = modelProps[key];\n if (propertyMapper.readOnly) {\n continue;\n }\n let propName;\n let parentObject = payload;\n if (serializer.isXML) {\n if (propertyMapper.xmlIsWrapped) {\n propName = propertyMapper.xmlName;\n }\n else {\n propName = propertyMapper.xmlElementName || propertyMapper.xmlName;\n }\n }\n else {\n const paths = splitSerializeName(propertyMapper.serializedName);\n propName = paths.pop();\n for (const pathName of paths) {\n const childObject = parentObject[pathName];\n if (childObject == undefined &&\n (object[key] != undefined || propertyMapper.defaultValue !== undefined)) {\n parentObject[pathName] = {};\n }\n parentObject = parentObject[pathName];\n }\n }\n if (parentObject != undefined) {\n if (isXml && mapper.xmlNamespace) {\n const xmlnsKey = mapper.xmlNamespacePrefix\n ? `xmlns:${mapper.xmlNamespacePrefix}`\n : \"xmlns\";\n parentObject[XML_ATTRKEY] = Object.assign(Object.assign({}, parentObject[XML_ATTRKEY]), { [xmlnsKey]: mapper.xmlNamespace });\n }\n const propertyObjectName = propertyMapper.serializedName !== \"\"\n ? objectName + \".\" + propertyMapper.serializedName\n : objectName;\n let toSerialize = object[key];\n const polymorphicDiscriminator = getPolymorphicDiscriminatorRecursively(serializer, mapper);\n if (polymorphicDiscriminator &&\n polymorphicDiscriminator.clientName === key &&\n toSerialize == undefined) {\n toSerialize = mapper.serializedName;\n }\n const serializedValue = serializer.serialize(propertyMapper, toSerialize, propertyObjectName, options);\n if (serializedValue !== undefined && propName != undefined) {\n const value = getXmlObjectValue(propertyMapper, serializedValue, isXml, options);\n if (isXml && propertyMapper.xmlIsAttribute) {\n // XML_ATTRKEY, i.e., $ is the key attributes are kept under in xml2js.\n // This keeps things simple while preventing name collision\n // with names in user documents.\n parentObject[XML_ATTRKEY] = parentObject[XML_ATTRKEY] || {};\n parentObject[XML_ATTRKEY][propName] = serializedValue;\n }\n else if (isXml && propertyMapper.xmlIsWrapped) {\n parentObject[propName] = { [propertyMapper.xmlElementName]: value };\n }\n else {\n parentObject[propName] = value;\n }\n }\n }\n }\n const additionalPropertiesMapper = resolveAdditionalProperties(serializer, mapper, objectName);\n if (additionalPropertiesMapper) {\n const propNames = Object.keys(modelProps);\n for (const clientPropName in object) {\n const isAdditionalProperty = propNames.every((pn) => pn !== clientPropName);\n if (isAdditionalProperty) {\n payload[clientPropName] = serializer.serialize(additionalPropertiesMapper, object[clientPropName], objectName + '[\"' + clientPropName + '\"]', options);\n }\n }\n }\n return payload;\n }\n return object;\n}\nfunction getXmlObjectValue(propertyMapper, serializedValue, isXml, options) {\n if (!isXml || !propertyMapper.xmlNamespace) {\n return serializedValue;\n }\n const xmlnsKey = propertyMapper.xmlNamespacePrefix\n ? `xmlns:${propertyMapper.xmlNamespacePrefix}`\n : \"xmlns\";\n const xmlNamespace = { [xmlnsKey]: propertyMapper.xmlNamespace };\n if ([\"Composite\"].includes(propertyMapper.type.name)) {\n if (serializedValue[XML_ATTRKEY]) {\n return serializedValue;\n }\n else {\n const result = Object.assign({}, serializedValue);\n result[XML_ATTRKEY] = xmlNamespace;\n return result;\n }\n }\n const result = {};\n result[options.xmlCharKey] = serializedValue;\n result[XML_ATTRKEY] = xmlNamespace;\n return result;\n}\nfunction isSpecialXmlProperty(propertyName, options) {\n return [XML_ATTRKEY, options.xmlCharKey].includes(propertyName);\n}\nfunction deserializeCompositeType(serializer, mapper, responseBody, objectName, options) {\n var _a, _b;\n const xmlCharKey = (_a = options.xmlCharKey) !== null && _a !== void 0 ? _a : XML_CHARKEY;\n if (getPolymorphicDiscriminatorRecursively(serializer, mapper)) {\n mapper = getPolymorphicMapper(serializer, mapper, responseBody, \"serializedName\");\n }\n const modelProps = resolveModelProperties(serializer, mapper, objectName);\n let instance = {};\n const handledPropertyNames = [];\n for (const key of Object.keys(modelProps)) {\n const propertyMapper = modelProps[key];\n const paths = splitSerializeName(modelProps[key].serializedName);\n handledPropertyNames.push(paths[0]);\n const { serializedName, xmlName, xmlElementName } = propertyMapper;\n let propertyObjectName = objectName;\n if (serializedName !== \"\" && serializedName !== undefined) {\n propertyObjectName = objectName + \".\" + serializedName;\n }\n const headerCollectionPrefix = propertyMapper.headerCollectionPrefix;\n if (headerCollectionPrefix) {\n const dictionary = {};\n for (const headerKey of Object.keys(responseBody)) {\n if (headerKey.startsWith(headerCollectionPrefix)) {\n dictionary[headerKey.substring(headerCollectionPrefix.length)] = serializer.deserialize(propertyMapper.type.value, responseBody[headerKey], propertyObjectName, options);\n }\n handledPropertyNames.push(headerKey);\n }\n instance[key] = dictionary;\n }\n else if (serializer.isXML) {\n if (propertyMapper.xmlIsAttribute && responseBody[XML_ATTRKEY]) {\n instance[key] = serializer.deserialize(propertyMapper, responseBody[XML_ATTRKEY][xmlName], propertyObjectName, options);\n }\n else if (propertyMapper.xmlIsMsText) {\n if (responseBody[xmlCharKey] !== undefined) {\n instance[key] = responseBody[xmlCharKey];\n }\n else if (typeof responseBody === \"string\") {\n // The special case where xml parser parses \"content\" into JSON of\n // `{ name: \"content\"}` instead of `{ name: { \"_\": \"content\" }}`\n instance[key] = responseBody;\n }\n }\n else {\n const propertyName = xmlElementName || xmlName || serializedName;\n if (propertyMapper.xmlIsWrapped) {\n /* a list of wrapped by \n For the xml example below\n \n ...\n ...\n \n the responseBody has\n {\n Cors: {\n CorsRule: [{...}, {...}]\n }\n }\n xmlName is \"Cors\" and xmlElementName is\"CorsRule\".\n */\n const wrapped = responseBody[xmlName];\n const elementList = (_b = wrapped === null || wrapped === void 0 ? void 0 : wrapped[xmlElementName]) !== null && _b !== void 0 ? _b : [];\n instance[key] = serializer.deserialize(propertyMapper, elementList, propertyObjectName, options);\n }\n else {\n const property = responseBody[propertyName];\n instance[key] = serializer.deserialize(propertyMapper, property, propertyObjectName, options);\n }\n }\n }\n else {\n // deserialize the property if it is present in the provided responseBody instance\n let propertyInstance;\n let res = responseBody;\n // traversing the object step by step.\n for (const item of paths) {\n if (!res)\n break;\n res = res[item];\n }\n propertyInstance = res;\n const polymorphicDiscriminator = mapper.type.polymorphicDiscriminator;\n // checking that the model property name (key)(ex: \"fishtype\") and the\n // clientName of the polymorphicDiscriminator {metadata} (ex: \"fishtype\")\n // instead of the serializedName of the polymorphicDiscriminator (ex: \"fish.type\")\n // is a better approach. The generator is not consistent with escaping '\\.' in the\n // serializedName of the property (ex: \"fish\\.type\") that is marked as polymorphic discriminator\n // and the serializedName of the metadata polymorphicDiscriminator (ex: \"fish.type\"). However,\n // the clientName transformation of the polymorphicDiscriminator (ex: \"fishtype\") and\n // the transformation of model property name (ex: \"fishtype\") is done consistently.\n // Hence, it is a safer bet to rely on the clientName of the polymorphicDiscriminator.\n if (polymorphicDiscriminator &&\n key === polymorphicDiscriminator.clientName &&\n propertyInstance == undefined) {\n propertyInstance = mapper.serializedName;\n }\n let serializedValue;\n // paging\n if (Array.isArray(responseBody[key]) && modelProps[key].serializedName === \"\") {\n propertyInstance = responseBody[key];\n const arrayInstance = serializer.deserialize(propertyMapper, propertyInstance, propertyObjectName, options);\n // Copy over any properties that have already been added into the instance, where they do\n // not exist on the newly de-serialized array\n for (const [k, v] of Object.entries(instance)) {\n if (!Object.prototype.hasOwnProperty.call(arrayInstance, k)) {\n arrayInstance[k] = v;\n }\n }\n instance = arrayInstance;\n }\n else if (propertyInstance !== undefined || propertyMapper.defaultValue !== undefined) {\n serializedValue = serializer.deserialize(propertyMapper, propertyInstance, propertyObjectName, options);\n instance[key] = serializedValue;\n }\n }\n }\n const additionalPropertiesMapper = mapper.type.additionalProperties;\n if (additionalPropertiesMapper) {\n const isAdditionalProperty = (responsePropName) => {\n for (const clientPropName in modelProps) {\n const paths = splitSerializeName(modelProps[clientPropName].serializedName);\n if (paths[0] === responsePropName) {\n return false;\n }\n }\n return true;\n };\n for (const responsePropName in responseBody) {\n if (isAdditionalProperty(responsePropName)) {\n instance[responsePropName] = serializer.deserialize(additionalPropertiesMapper, responseBody[responsePropName], objectName + '[\"' + responsePropName + '\"]', options);\n }\n }\n }\n else if (responseBody) {\n for (const key of Object.keys(responseBody)) {\n if (instance[key] === undefined &&\n !handledPropertyNames.includes(key) &&\n !isSpecialXmlProperty(key, options)) {\n instance[key] = responseBody[key];\n }\n }\n }\n return instance;\n}\nfunction deserializeDictionaryType(serializer, mapper, responseBody, objectName, options) {\n const value = mapper.type.value;\n if (!value || typeof value !== \"object\") {\n throw new Error(`\"value\" metadata for a Dictionary must be defined in the ` +\n `mapper and it must of type \"object\" in ${objectName}`);\n }\n if (responseBody) {\n const tempDictionary = {};\n for (const key of Object.keys(responseBody)) {\n tempDictionary[key] = serializer.deserialize(value, responseBody[key], objectName, options);\n }\n return tempDictionary;\n }\n return responseBody;\n}\nfunction deserializeSequenceType(serializer, mapper, responseBody, objectName, options) {\n const element = mapper.type.element;\n if (!element || typeof element !== \"object\") {\n throw new Error(`element\" metadata for an Array must be defined in the ` +\n `mapper and it must of type \"object\" in ${objectName}`);\n }\n if (responseBody) {\n if (!Array.isArray(responseBody)) {\n // xml2js will interpret a single element array as just the element, so force it to be an array\n responseBody = [responseBody];\n }\n const tempArray = [];\n for (let i = 0; i < responseBody.length; i++) {\n tempArray[i] = serializer.deserialize(element, responseBody[i], `${objectName}[${i}]`, options);\n }\n return tempArray;\n }\n return responseBody;\n}\nfunction getPolymorphicMapper(serializer, mapper, object, polymorphicPropertyName) {\n const polymorphicDiscriminator = getPolymorphicDiscriminatorRecursively(serializer, mapper);\n if (polymorphicDiscriminator) {\n const discriminatorName = polymorphicDiscriminator[polymorphicPropertyName];\n if (discriminatorName != undefined) {\n const discriminatorValue = object[discriminatorName];\n if (discriminatorValue != undefined) {\n const typeName = mapper.type.uberParent || mapper.type.className;\n const indexDiscriminator = discriminatorValue === typeName\n ? discriminatorValue\n : typeName + \".\" + discriminatorValue;\n const polymorphicMapper = serializer.modelMappers.discriminators[indexDiscriminator];\n if (polymorphicMapper) {\n mapper = polymorphicMapper;\n }\n }\n }\n }\n return mapper;\n}\nfunction getPolymorphicDiscriminatorRecursively(serializer, mapper) {\n return (mapper.type.polymorphicDiscriminator ||\n getPolymorphicDiscriminatorSafely(serializer, mapper.type.uberParent) ||\n getPolymorphicDiscriminatorSafely(serializer, mapper.type.className));\n}\nfunction getPolymorphicDiscriminatorSafely(serializer, typeName) {\n return (typeName &&\n serializer.modelMappers[typeName] &&\n serializer.modelMappers[typeName].type.polymorphicDiscriminator);\n}\n/**\n * Utility function that serializes an object that might contain binary information into a plain object, array or a string.\n */\nfunction serializeObject(toSerialize) {\n const castToSerialize = toSerialize;\n if (toSerialize == undefined)\n return undefined;\n if (toSerialize instanceof Uint8Array) {\n toSerialize = encodeByteArray(toSerialize);\n return toSerialize;\n }\n else if (toSerialize instanceof Date) {\n return toSerialize.toISOString();\n }\n else if (Array.isArray(toSerialize)) {\n const array = [];\n for (let i = 0; i < toSerialize.length; i++) {\n array.push(serializeObject(toSerialize[i]));\n }\n return array;\n }\n else if (typeof toSerialize === \"object\") {\n const dictionary = {};\n for (const property in toSerialize) {\n dictionary[property] = serializeObject(castToSerialize[property]);\n }\n return dictionary;\n }\n return toSerialize;\n}\n/**\n * Utility function to create a K:V from a list of strings\n */\nfunction strEnum(o) {\n const result = {};\n for (const key of o) {\n result[key] = key;\n }\n return result;\n}\n/**\n * String enum containing the string types of property mappers.\n */\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nconst MapperType = strEnum([\n \"Base64Url\",\n \"Boolean\",\n \"ByteArray\",\n \"Composite\",\n \"Date\",\n \"DateTime\",\n \"DateTimeRfc1123\",\n \"Dictionary\",\n \"Enum\",\n \"Number\",\n \"Object\",\n \"Sequence\",\n \"String\",\n \"Stream\",\n \"TimeSpan\",\n \"UnixTime\",\n]);\n\n// Copyright (c) Microsoft Corporation.\nfunction isWebResourceLike(object) {\n if (object && typeof object === \"object\") {\n const castObject = object;\n if (typeof castObject.url === \"string\" &&\n typeof castObject.method === \"string\" &&\n typeof castObject.headers === \"object\" &&\n isHttpHeadersLike(castObject.headers) &&\n typeof castObject.validateRequestProperties === \"function\" &&\n typeof castObject.prepare === \"function\" &&\n typeof castObject.clone === \"function\") {\n return true;\n }\n }\n return false;\n}\n/**\n * Creates a new WebResource object.\n *\n * This class provides an abstraction over a REST call by being library / implementation agnostic and wrapping the necessary\n * properties to initiate a request.\n */\nclass WebResource {\n constructor(url, method, body, query, headers, streamResponseBody, withCredentials, abortSignal, timeout, onUploadProgress, onDownloadProgress, proxySettings, keepAlive, decompressResponse, streamResponseStatusCodes) {\n this.streamResponseBody = streamResponseBody;\n this.streamResponseStatusCodes = streamResponseStatusCodes;\n this.url = url || \"\";\n this.method = method || \"GET\";\n this.headers = isHttpHeadersLike(headers) ? headers : new HttpHeaders(headers);\n this.body = body;\n this.query = query;\n this.formData = undefined;\n this.withCredentials = withCredentials || false;\n this.abortSignal = abortSignal;\n this.timeout = timeout || 0;\n this.onUploadProgress = onUploadProgress;\n this.onDownloadProgress = onDownloadProgress;\n this.proxySettings = proxySettings;\n this.keepAlive = keepAlive;\n this.decompressResponse = decompressResponse;\n this.requestId = this.headers.get(\"x-ms-client-request-id\") || generateUuid();\n }\n /**\n * Validates that the required properties such as method, url, headers[\"Content-Type\"],\n * headers[\"accept-language\"] are defined. It will throw an error if one of the above\n * mentioned properties are not defined.\n */\n validateRequestProperties() {\n if (!this.method) {\n throw new Error(\"WebResource.method is required.\");\n }\n if (!this.url) {\n throw new Error(\"WebResource.url is required.\");\n }\n }\n /**\n * Prepares the request.\n * @param options - Options to provide for preparing the request.\n * @returns Returns the prepared WebResource (HTTP Request) object that needs to be given to the request pipeline.\n */\n prepare(options) {\n if (!options) {\n throw new Error(\"options object is required\");\n }\n if (options.method === undefined ||\n options.method === null ||\n typeof options.method.valueOf() !== \"string\") {\n throw new Error(\"options.method must be a string.\");\n }\n if (options.url && options.pathTemplate) {\n throw new Error(\"options.url and options.pathTemplate are mutually exclusive. Please provide exactly one of them.\");\n }\n if ((options.pathTemplate === undefined ||\n options.pathTemplate === null ||\n typeof options.pathTemplate.valueOf() !== \"string\") &&\n (options.url === undefined ||\n options.url === null ||\n typeof options.url.valueOf() !== \"string\")) {\n throw new Error(\"Please provide exactly one of options.pathTemplate or options.url.\");\n }\n // set the url if it is provided.\n if (options.url) {\n if (typeof options.url !== \"string\") {\n throw new Error('options.url must be of type \"string\".');\n }\n this.url = options.url;\n }\n // set the method\n if (options.method) {\n const validMethods = [\"GET\", \"PUT\", \"HEAD\", \"DELETE\", \"OPTIONS\", \"POST\", \"PATCH\", \"TRACE\"];\n if (validMethods.indexOf(options.method.toUpperCase()) === -1) {\n throw new Error('The provided method \"' +\n options.method +\n '\" is invalid. Supported HTTP methods are: ' +\n JSON.stringify(validMethods));\n }\n }\n this.method = options.method.toUpperCase();\n // construct the url if path template is provided\n if (options.pathTemplate) {\n const { pathTemplate, pathParameters } = options;\n if (typeof pathTemplate !== \"string\") {\n throw new Error('options.pathTemplate must be of type \"string\".');\n }\n if (!options.baseUrl) {\n options.baseUrl = \"https://management.azure.com\";\n }\n const baseUrl = options.baseUrl;\n let url = baseUrl +\n (baseUrl.endsWith(\"/\") ? \"\" : \"/\") +\n (pathTemplate.startsWith(\"/\") ? pathTemplate.slice(1) : pathTemplate);\n const segments = url.match(/({[\\w-]*\\s*[\\w-]*})/gi);\n if (segments && segments.length) {\n if (!pathParameters) {\n throw new Error(`pathTemplate: ${pathTemplate} has been provided. Hence, options.pathParameters must also be provided.`);\n }\n segments.forEach(function (item) {\n const pathParamName = item.slice(1, -1);\n const pathParam = pathParameters[pathParamName];\n if (pathParam === null ||\n pathParam === undefined ||\n !(typeof pathParam === \"string\" || typeof pathParam === \"object\")) {\n const stringifiedPathParameters = JSON.stringify(pathParameters, undefined, 2);\n throw new Error(`pathTemplate: ${pathTemplate} contains the path parameter ${pathParamName}` +\n ` however, it is not present in parameters: ${stringifiedPathParameters}.` +\n `The value of the path parameter can either be a \"string\" of the form { ${pathParamName}: \"some sample value\" } or ` +\n `it can be an \"object\" of the form { \"${pathParamName}\": { value: \"some sample value\", skipUrlEncoding: true } }.`);\n }\n if (typeof pathParam.valueOf() === \"string\") {\n url = url.replace(item, encodeURIComponent(pathParam));\n }\n if (typeof pathParam.valueOf() === \"object\") {\n if (!pathParam.value) {\n throw new Error(`options.pathParameters[${pathParamName}] is of type \"object\" but it does not contain a \"value\" property.`);\n }\n if (pathParam.skipUrlEncoding) {\n url = url.replace(item, pathParam.value);\n }\n else {\n url = url.replace(item, encodeURIComponent(pathParam.value));\n }\n }\n });\n }\n this.url = url;\n }\n // append query parameters to the url if they are provided. They can be provided with pathTemplate or url option.\n if (options.queryParameters) {\n const queryParameters = options.queryParameters;\n if (typeof queryParameters !== \"object\") {\n throw new Error(`options.queryParameters must be of type object. It should be a JSON object ` +\n `of \"query-parameter-name\" as the key and the \"query-parameter-value\" as the value. ` +\n `The \"query-parameter-value\" may be fo type \"string\" or an \"object\" of the form { value: \"query-parameter-value\", skipUrlEncoding: true }.`);\n }\n // append question mark if it is not present in the url\n if (this.url && this.url.indexOf(\"?\") === -1) {\n this.url += \"?\";\n }\n // construct queryString\n const queryParams = [];\n // We need to populate this.query as a dictionary if the request is being used for Sway's validateRequest().\n this.query = {};\n for (const queryParamName in queryParameters) {\n const queryParam = queryParameters[queryParamName];\n if (queryParam) {\n if (typeof queryParam === \"string\") {\n queryParams.push(queryParamName + \"=\" + encodeURIComponent(queryParam));\n this.query[queryParamName] = encodeURIComponent(queryParam);\n }\n else if (typeof queryParam === \"object\") {\n if (!queryParam.value) {\n throw new Error(`options.queryParameters[${queryParamName}] is of type \"object\" but it does not contain a \"value\" property.`);\n }\n if (queryParam.skipUrlEncoding) {\n queryParams.push(queryParamName + \"=\" + queryParam.value);\n this.query[queryParamName] = queryParam.value;\n }\n else {\n queryParams.push(queryParamName + \"=\" + encodeURIComponent(queryParam.value));\n this.query[queryParamName] = encodeURIComponent(queryParam.value);\n }\n }\n }\n } // end-of-for\n // append the queryString\n this.url += queryParams.join(\"&\");\n }\n // add headers to the request if they are provided\n if (options.headers) {\n const headers = options.headers;\n for (const headerName of Object.keys(options.headers)) {\n this.headers.set(headerName, headers[headerName]);\n }\n }\n // ensure accept-language is set correctly\n if (!this.headers.get(\"accept-language\")) {\n this.headers.set(\"accept-language\", \"en-US\");\n }\n // ensure the request-id is set correctly\n if (!this.headers.get(\"x-ms-client-request-id\") && !options.disableClientRequestId) {\n this.headers.set(\"x-ms-client-request-id\", this.requestId);\n }\n // default\n if (!this.headers.get(\"Content-Type\")) {\n this.headers.set(\"Content-Type\", \"application/json; charset=utf-8\");\n }\n // set the request body. request.js automatically sets the Content-Length request header, so we need not set it explicitly\n this.body = options.body;\n if (options.body !== undefined && options.body !== null) {\n // body as a stream special case. set the body as-is and check for some special request headers specific to sending a stream.\n if (options.bodyIsStream) {\n if (!this.headers.get(\"Transfer-Encoding\")) {\n this.headers.set(\"Transfer-Encoding\", \"chunked\");\n }\n if (this.headers.get(\"Content-Type\") !== \"application/octet-stream\") {\n this.headers.set(\"Content-Type\", \"application/octet-stream\");\n }\n }\n else {\n if (options.serializationMapper) {\n this.body = new Serializer(options.mappers).serialize(options.serializationMapper, options.body, \"requestBody\");\n }\n if (!options.disableJsonStringifyOnBody) {\n this.body = JSON.stringify(options.body);\n }\n }\n }\n if (options.spanOptions) {\n this.spanOptions = options.spanOptions;\n }\n if (options.tracingContext) {\n this.tracingContext = options.tracingContext;\n }\n this.abortSignal = options.abortSignal;\n this.onDownloadProgress = options.onDownloadProgress;\n this.onUploadProgress = options.onUploadProgress;\n return this;\n }\n /**\n * Clone this WebResource HTTP request object.\n * @returns The clone of this WebResource HTTP request object.\n */\n clone() {\n const result = new WebResource(this.url, this.method, this.body, this.query, this.headers && this.headers.clone(), this.streamResponseBody, this.withCredentials, this.abortSignal, this.timeout, this.onUploadProgress, this.onDownloadProgress, this.proxySettings, this.keepAlive, this.decompressResponse, this.streamResponseStatusCodes);\n if (this.formData) {\n result.formData = this.formData;\n }\n if (this.operationSpec) {\n result.operationSpec = this.operationSpec;\n }\n if (this.shouldDeserialize) {\n result.shouldDeserialize = this.shouldDeserialize;\n }\n if (this.operationResponseGetter) {\n result.operationResponseGetter = this.operationResponseGetter;\n }\n return result;\n }\n}\n\n// Copyright (c) Microsoft Corporation.\n/**\n * A class that handles the query portion of a URLBuilder.\n */\nclass URLQuery {\n constructor() {\n this._rawQuery = {};\n }\n /**\n * Get whether or not there any query parameters in this URLQuery.\n */\n any() {\n return Object.keys(this._rawQuery).length > 0;\n }\n /**\n * Get the keys of the query string.\n */\n keys() {\n return Object.keys(this._rawQuery);\n }\n /**\n * Set a query parameter with the provided name and value. If the parameterValue is undefined or\n * empty, then this will attempt to remove an existing query parameter with the provided\n * parameterName.\n */\n set(parameterName, parameterValue) {\n const caseParameterValue = parameterValue;\n if (parameterName) {\n if (caseParameterValue !== undefined && caseParameterValue !== null) {\n const newValue = Array.isArray(caseParameterValue)\n ? caseParameterValue\n : caseParameterValue.toString();\n this._rawQuery[parameterName] = newValue;\n }\n else {\n delete this._rawQuery[parameterName];\n }\n }\n }\n /**\n * Get the value of the query parameter with the provided name. If no parameter exists with the\n * provided parameter name, then undefined will be returned.\n */\n get(parameterName) {\n return parameterName ? this._rawQuery[parameterName] : undefined;\n }\n /**\n * Get the string representation of this query. The return value will not start with a \"?\".\n */\n toString() {\n let result = \"\";\n for (const parameterName in this._rawQuery) {\n if (result) {\n result += \"&\";\n }\n const parameterValue = this._rawQuery[parameterName];\n if (Array.isArray(parameterValue)) {\n const parameterStrings = [];\n for (const parameterValueElement of parameterValue) {\n parameterStrings.push(`${parameterName}=${parameterValueElement}`);\n }\n result += parameterStrings.join(\"&\");\n }\n else {\n result += `${parameterName}=${parameterValue}`;\n }\n }\n return result;\n }\n /**\n * Parse a URLQuery from the provided text.\n */\n static parse(text) {\n const result = new URLQuery();\n if (text) {\n if (text.startsWith(\"?\")) {\n text = text.substring(1);\n }\n let currentState = \"ParameterName\";\n let parameterName = \"\";\n let parameterValue = \"\";\n for (let i = 0; i < text.length; ++i) {\n const currentCharacter = text[i];\n switch (currentState) {\n case \"ParameterName\":\n switch (currentCharacter) {\n case \"=\":\n currentState = \"ParameterValue\";\n break;\n case \"&\":\n parameterName = \"\";\n parameterValue = \"\";\n break;\n default:\n parameterName += currentCharacter;\n break;\n }\n break;\n case \"ParameterValue\":\n switch (currentCharacter) {\n case \"&\":\n result.set(parameterName, parameterValue);\n parameterName = \"\";\n parameterValue = \"\";\n currentState = \"ParameterName\";\n break;\n default:\n parameterValue += currentCharacter;\n break;\n }\n break;\n default:\n throw new Error(\"Unrecognized URLQuery parse state: \" + currentState);\n }\n }\n if (currentState === \"ParameterValue\") {\n result.set(parameterName, parameterValue);\n }\n }\n return result;\n }\n}\n/**\n * A class that handles creating, modifying, and parsing URLs.\n */\nclass URLBuilder {\n /**\n * Set the scheme/protocol for this URL. If the provided scheme contains other parts of a URL\n * (such as a host, port, path, or query), those parts will be added to this URL as well.\n */\n setScheme(scheme) {\n if (!scheme) {\n this._scheme = undefined;\n }\n else {\n this.set(scheme, \"SCHEME\");\n }\n }\n /**\n * Get the scheme that has been set in this URL.\n */\n getScheme() {\n return this._scheme;\n }\n /**\n * Set the host for this URL. If the provided host contains other parts of a URL (such as a\n * port, path, or query), those parts will be added to this URL as well.\n */\n setHost(host) {\n if (!host) {\n this._host = undefined;\n }\n else {\n this.set(host, \"SCHEME_OR_HOST\");\n }\n }\n /**\n * Get the host that has been set in this URL.\n */\n getHost() {\n return this._host;\n }\n /**\n * Set the port for this URL. If the provided port contains other parts of a URL (such as a\n * path or query), those parts will be added to this URL as well.\n */\n setPort(port) {\n if (port === undefined || port === null || port === \"\") {\n this._port = undefined;\n }\n else {\n this.set(port.toString(), \"PORT\");\n }\n }\n /**\n * Get the port that has been set in this URL.\n */\n getPort() {\n return this._port;\n }\n /**\n * Set the path for this URL. If the provided path contains a query, then it will be added to\n * this URL as well.\n */\n setPath(path) {\n if (!path) {\n this._path = undefined;\n }\n else {\n const schemeIndex = path.indexOf(\"://\");\n if (schemeIndex !== -1) {\n const schemeStart = path.lastIndexOf(\"/\", schemeIndex);\n // Make sure to only grab the URL part of the path before setting the state back to SCHEME\n // this will handle cases such as \"/a/b/c/https://microsoft.com\" => \"https://microsoft.com\"\n this.set(schemeStart === -1 ? path : path.substr(schemeStart + 1), \"SCHEME\");\n }\n else {\n this.set(path, \"PATH\");\n }\n }\n }\n /**\n * Append the provided path to this URL's existing path. If the provided path contains a query,\n * then it will be added to this URL as well.\n */\n appendPath(path) {\n if (path) {\n let currentPath = this.getPath();\n if (currentPath) {\n if (!currentPath.endsWith(\"/\")) {\n currentPath += \"/\";\n }\n if (path.startsWith(\"/\")) {\n path = path.substring(1);\n }\n path = currentPath + path;\n }\n this.set(path, \"PATH\");\n }\n }\n /**\n * Get the path that has been set in this URL.\n */\n getPath() {\n return this._path;\n }\n /**\n * Set the query in this URL.\n */\n setQuery(query) {\n if (!query) {\n this._query = undefined;\n }\n else {\n this._query = URLQuery.parse(query);\n }\n }\n /**\n * Set a query parameter with the provided name and value in this URL's query. If the provided\n * query parameter value is undefined or empty, then the query parameter will be removed if it\n * existed.\n */\n setQueryParameter(queryParameterName, queryParameterValue) {\n if (queryParameterName) {\n if (!this._query) {\n this._query = new URLQuery();\n }\n this._query.set(queryParameterName, queryParameterValue);\n }\n }\n /**\n * Get the value of the query parameter with the provided query parameter name. If no query\n * parameter exists with the provided name, then undefined will be returned.\n */\n getQueryParameterValue(queryParameterName) {\n return this._query ? this._query.get(queryParameterName) : undefined;\n }\n /**\n * Get the query in this URL.\n */\n getQuery() {\n return this._query ? this._query.toString() : undefined;\n }\n /**\n * Set the parts of this URL by parsing the provided text using the provided startState.\n */\n set(text, startState) {\n const tokenizer = new URLTokenizer(text, startState);\n while (tokenizer.next()) {\n const token = tokenizer.current();\n let tokenPath;\n if (token) {\n switch (token.type) {\n case \"SCHEME\":\n this._scheme = token.text || undefined;\n break;\n case \"HOST\":\n this._host = token.text || undefined;\n break;\n case \"PORT\":\n this._port = token.text || undefined;\n break;\n case \"PATH\":\n tokenPath = token.text || undefined;\n if (!this._path || this._path === \"/\" || tokenPath !== \"/\") {\n this._path = tokenPath;\n }\n break;\n case \"QUERY\":\n this._query = URLQuery.parse(token.text);\n break;\n default:\n throw new Error(`Unrecognized URLTokenType: ${token.type}`);\n }\n }\n }\n }\n /**\n * Serializes the URL as a string.\n * @returns the URL as a string.\n */\n toString() {\n let result = \"\";\n if (this._scheme) {\n result += `${this._scheme}://`;\n }\n if (this._host) {\n result += this._host;\n }\n if (this._port) {\n result += `:${this._port}`;\n }\n if (this._path) {\n if (!this._path.startsWith(\"/\")) {\n result += \"/\";\n }\n result += this._path;\n }\n if (this._query && this._query.any()) {\n result += `?${this._query.toString()}`;\n }\n return result;\n }\n /**\n * If the provided searchValue is found in this URLBuilder, then replace it with the provided\n * replaceValue.\n */\n replaceAll(searchValue, replaceValue) {\n if (searchValue) {\n this.setScheme(replaceAll(this.getScheme(), searchValue, replaceValue));\n this.setHost(replaceAll(this.getHost(), searchValue, replaceValue));\n this.setPort(replaceAll(this.getPort(), searchValue, replaceValue));\n this.setPath(replaceAll(this.getPath(), searchValue, replaceValue));\n this.setQuery(replaceAll(this.getQuery(), searchValue, replaceValue));\n }\n }\n /**\n * Parses a given string URL into a new {@link URLBuilder}.\n */\n static parse(text) {\n const result = new URLBuilder();\n result.set(text, \"SCHEME_OR_HOST\");\n return result;\n }\n}\nclass URLToken {\n constructor(text, type) {\n this.text = text;\n this.type = type;\n }\n static scheme(text) {\n return new URLToken(text, \"SCHEME\");\n }\n static host(text) {\n return new URLToken(text, \"HOST\");\n }\n static port(text) {\n return new URLToken(text, \"PORT\");\n }\n static path(text) {\n return new URLToken(text, \"PATH\");\n }\n static query(text) {\n return new URLToken(text, \"QUERY\");\n }\n}\n/**\n * Get whether or not the provided character (single character string) is an alphanumeric (letter or\n * digit) character.\n */\nfunction isAlphaNumericCharacter(character) {\n const characterCode = character.charCodeAt(0);\n return ((48 /* '0' */ <= characterCode && characterCode <= 57) /* '9' */ ||\n (65 /* 'A' */ <= characterCode && characterCode <= 90) /* 'Z' */ ||\n (97 /* 'a' */ <= characterCode && characterCode <= 122) /* 'z' */);\n}\n/**\n * A class that tokenizes URL strings.\n */\nclass URLTokenizer {\n constructor(_text, state) {\n this._text = _text;\n this._textLength = _text ? _text.length : 0;\n this._currentState = state !== undefined && state !== null ? state : \"SCHEME_OR_HOST\";\n this._currentIndex = 0;\n }\n /**\n * Get the current URLToken this URLTokenizer is pointing at, or undefined if the URLTokenizer\n * hasn't started or has finished tokenizing.\n */\n current() {\n return this._currentToken;\n }\n /**\n * Advance to the next URLToken and return whether or not a URLToken was found.\n */\n next() {\n if (!hasCurrentCharacter(this)) {\n this._currentToken = undefined;\n }\n else {\n switch (this._currentState) {\n case \"SCHEME\":\n nextScheme(this);\n break;\n case \"SCHEME_OR_HOST\":\n nextSchemeOrHost(this);\n break;\n case \"HOST\":\n nextHost(this);\n break;\n case \"PORT\":\n nextPort(this);\n break;\n case \"PATH\":\n nextPath(this);\n break;\n case \"QUERY\":\n nextQuery(this);\n break;\n default:\n throw new Error(`Unrecognized URLTokenizerState: ${this._currentState}`);\n }\n }\n return !!this._currentToken;\n }\n}\n/**\n * Read the remaining characters from this Tokenizer's character stream.\n */\nfunction readRemaining(tokenizer) {\n let result = \"\";\n if (tokenizer._currentIndex < tokenizer._textLength) {\n result = tokenizer._text.substring(tokenizer._currentIndex);\n tokenizer._currentIndex = tokenizer._textLength;\n }\n return result;\n}\n/**\n * Whether or not this URLTokenizer has a current character.\n */\nfunction hasCurrentCharacter(tokenizer) {\n return tokenizer._currentIndex < tokenizer._textLength;\n}\n/**\n * Get the character in the text string at the current index.\n */\nfunction getCurrentCharacter(tokenizer) {\n return tokenizer._text[tokenizer._currentIndex];\n}\n/**\n * Advance to the character in text that is \"step\" characters ahead. If no step value is provided,\n * then step will default to 1.\n */\nfunction nextCharacter(tokenizer, step) {\n if (hasCurrentCharacter(tokenizer)) {\n if (!step) {\n step = 1;\n }\n tokenizer._currentIndex += step;\n }\n}\n/**\n * Starting with the current character, peek \"charactersToPeek\" number of characters ahead in this\n * Tokenizer's stream of characters.\n */\nfunction peekCharacters(tokenizer, charactersToPeek) {\n let endIndex = tokenizer._currentIndex + charactersToPeek;\n if (tokenizer._textLength < endIndex) {\n endIndex = tokenizer._textLength;\n }\n return tokenizer._text.substring(tokenizer._currentIndex, endIndex);\n}\n/**\n * Read characters from this Tokenizer until the end of the stream or until the provided condition\n * is false when provided the current character.\n */\nfunction readWhile(tokenizer, condition) {\n let result = \"\";\n while (hasCurrentCharacter(tokenizer)) {\n const currentCharacter = getCurrentCharacter(tokenizer);\n if (!condition(currentCharacter)) {\n break;\n }\n else {\n result += currentCharacter;\n nextCharacter(tokenizer);\n }\n }\n return result;\n}\n/**\n * Read characters from this Tokenizer until a non-alphanumeric character or the end of the\n * character stream is reached.\n */\nfunction readWhileLetterOrDigit(tokenizer) {\n return readWhile(tokenizer, (character) => isAlphaNumericCharacter(character));\n}\n/**\n * Read characters from this Tokenizer until one of the provided terminating characters is read or\n * the end of the character stream is reached.\n */\nfunction readUntilCharacter(tokenizer, ...terminatingCharacters) {\n return readWhile(tokenizer, (character) => terminatingCharacters.indexOf(character) === -1);\n}\nfunction nextScheme(tokenizer) {\n const scheme = readWhileLetterOrDigit(tokenizer);\n tokenizer._currentToken = URLToken.scheme(scheme);\n if (!hasCurrentCharacter(tokenizer)) {\n tokenizer._currentState = \"DONE\";\n }\n else {\n tokenizer._currentState = \"HOST\";\n }\n}\nfunction nextSchemeOrHost(tokenizer) {\n const schemeOrHost = readUntilCharacter(tokenizer, \":\", \"/\", \"?\");\n if (!hasCurrentCharacter(tokenizer)) {\n tokenizer._currentToken = URLToken.host(schemeOrHost);\n tokenizer._currentState = \"DONE\";\n }\n else if (getCurrentCharacter(tokenizer) === \":\") {\n if (peekCharacters(tokenizer, 3) === \"://\") {\n tokenizer._currentToken = URLToken.scheme(schemeOrHost);\n tokenizer._currentState = \"HOST\";\n }\n else {\n tokenizer._currentToken = URLToken.host(schemeOrHost);\n tokenizer._currentState = \"PORT\";\n }\n }\n else {\n tokenizer._currentToken = URLToken.host(schemeOrHost);\n if (getCurrentCharacter(tokenizer) === \"/\") {\n tokenizer._currentState = \"PATH\";\n }\n else {\n tokenizer._currentState = \"QUERY\";\n }\n }\n}\nfunction nextHost(tokenizer) {\n if (peekCharacters(tokenizer, 3) === \"://\") {\n nextCharacter(tokenizer, 3);\n }\n const host = readUntilCharacter(tokenizer, \":\", \"/\", \"?\");\n tokenizer._currentToken = URLToken.host(host);\n if (!hasCurrentCharacter(tokenizer)) {\n tokenizer._currentState = \"DONE\";\n }\n else if (getCurrentCharacter(tokenizer) === \":\") {\n tokenizer._currentState = \"PORT\";\n }\n else if (getCurrentCharacter(tokenizer) === \"/\") {\n tokenizer._currentState = \"PATH\";\n }\n else {\n tokenizer._currentState = \"QUERY\";\n }\n}\nfunction nextPort(tokenizer) {\n if (getCurrentCharacter(tokenizer) === \":\") {\n nextCharacter(tokenizer);\n }\n const port = readUntilCharacter(tokenizer, \"/\", \"?\");\n tokenizer._currentToken = URLToken.port(port);\n if (!hasCurrentCharacter(tokenizer)) {\n tokenizer._currentState = \"DONE\";\n }\n else if (getCurrentCharacter(tokenizer) === \"/\") {\n tokenizer._currentState = \"PATH\";\n }\n else {\n tokenizer._currentState = \"QUERY\";\n }\n}\nfunction nextPath(tokenizer) {\n const path = readUntilCharacter(tokenizer, \"?\");\n tokenizer._currentToken = URLToken.path(path);\n if (!hasCurrentCharacter(tokenizer)) {\n tokenizer._currentState = \"DONE\";\n }\n else {\n tokenizer._currentState = \"QUERY\";\n }\n}\nfunction nextQuery(tokenizer) {\n if (getCurrentCharacter(tokenizer) === \"?\") {\n nextCharacter(tokenizer);\n }\n const query = readRemaining(tokenizer);\n tokenizer._currentToken = URLToken.query(query);\n tokenizer._currentState = \"DONE\";\n}\n\n// Copyright (c) Microsoft Corporation.\nfunction createProxyAgent(requestUrl, proxySettings, headers) {\n const host = URLBuilder.parse(proxySettings.host).getHost();\n if (!host) {\n throw new Error(\"Expecting a non-empty host in proxy settings.\");\n }\n if (!isValidPort(proxySettings.port)) {\n throw new Error(\"Expecting a valid port number in the range of [0, 65535] in proxy settings.\");\n }\n const tunnelOptions = {\n proxy: {\n host: host,\n port: proxySettings.port,\n headers: (headers && headers.rawHeaders()) || {},\n },\n };\n if (proxySettings.username && proxySettings.password) {\n tunnelOptions.proxy.proxyAuth = `${proxySettings.username}:${proxySettings.password}`;\n }\n else if (proxySettings.username) {\n tunnelOptions.proxy.proxyAuth = `${proxySettings.username}`;\n }\n const isRequestHttps = isUrlHttps(requestUrl);\n const isProxyHttps = isUrlHttps(proxySettings.host);\n const proxyAgent = {\n isHttps: isRequestHttps,\n agent: createTunnel(isRequestHttps, isProxyHttps, tunnelOptions),\n };\n return proxyAgent;\n}\nfunction isUrlHttps(url) {\n const urlScheme = URLBuilder.parse(url).getScheme() || \"\";\n return urlScheme.toLowerCase() === \"https\";\n}\nfunction createTunnel(isRequestHttps, isProxyHttps, tunnelOptions) {\n if (isRequestHttps && isProxyHttps) {\n return tunnel__namespace.httpsOverHttps(tunnelOptions);\n }\n else if (isRequestHttps && !isProxyHttps) {\n return tunnel__namespace.httpsOverHttp(tunnelOptions);\n }\n else if (!isRequestHttps && isProxyHttps) {\n return tunnel__namespace.httpOverHttps(tunnelOptions);\n }\n else {\n return tunnel__namespace.httpOverHttp(tunnelOptions);\n }\n}\nfunction isValidPort(port) {\n // any port in 0-65535 range is valid (RFC 793) even though almost all implementations\n // will reserve 0 for a specific purpose, and a range of numbers for ephemeral ports\n return 0 <= port && port <= 65535;\n}\n\n// Copyright (c) Microsoft Corporation.\nconst RedactedString = \"REDACTED\";\nconst defaultAllowedHeaderNames = [\n \"x-ms-client-request-id\",\n \"x-ms-return-client-request-id\",\n \"x-ms-useragent\",\n \"x-ms-correlation-request-id\",\n \"x-ms-request-id\",\n \"client-request-id\",\n \"ms-cv\",\n \"return-client-request-id\",\n \"traceparent\",\n \"Access-Control-Allow-Credentials\",\n \"Access-Control-Allow-Headers\",\n \"Access-Control-Allow-Methods\",\n \"Access-Control-Allow-Origin\",\n \"Access-Control-Expose-Headers\",\n \"Access-Control-Max-Age\",\n \"Access-Control-Request-Headers\",\n \"Access-Control-Request-Method\",\n \"Origin\",\n \"Accept\",\n \"Accept-Encoding\",\n \"Cache-Control\",\n \"Connection\",\n \"Content-Length\",\n \"Content-Type\",\n \"Date\",\n \"ETag\",\n \"Expires\",\n \"If-Match\",\n \"If-Modified-Since\",\n \"If-None-Match\",\n \"If-Unmodified-Since\",\n \"Last-Modified\",\n \"Pragma\",\n \"Request-Id\",\n \"Retry-After\",\n \"Server\",\n \"Transfer-Encoding\",\n \"User-Agent\",\n \"WWW-Authenticate\",\n];\nconst defaultAllowedQueryParameters = [\"api-version\"];\nclass Sanitizer {\n constructor({ allowedHeaderNames = [], allowedQueryParameters = [] } = {}) {\n allowedHeaderNames = Array.isArray(allowedHeaderNames)\n ? defaultAllowedHeaderNames.concat(allowedHeaderNames)\n : defaultAllowedHeaderNames;\n allowedQueryParameters = Array.isArray(allowedQueryParameters)\n ? defaultAllowedQueryParameters.concat(allowedQueryParameters)\n : defaultAllowedQueryParameters;\n this.allowedHeaderNames = new Set(allowedHeaderNames.map((n) => n.toLowerCase()));\n this.allowedQueryParameters = new Set(allowedQueryParameters.map((p) => p.toLowerCase()));\n }\n sanitize(obj) {\n const seen = new Set();\n return JSON.stringify(obj, (key, value) => {\n // Ensure Errors include their interesting non-enumerable members\n if (value instanceof Error) {\n return Object.assign(Object.assign({}, value), { name: value.name, message: value.message });\n }\n if (key === \"_headersMap\") {\n return this.sanitizeHeaders(value);\n }\n else if (key === \"url\") {\n return this.sanitizeUrl(value);\n }\n else if (key === \"query\") {\n return this.sanitizeQuery(value);\n }\n else if (key === \"body\") {\n // Don't log the request body\n return undefined;\n }\n else if (key === \"response\") {\n // Don't log response again\n return undefined;\n }\n else if (key === \"operationSpec\") {\n // When using sendOperationRequest, the request carries a massive\n // field with the autorest spec. No need to log it.\n return undefined;\n }\n else if (Array.isArray(value) || isObject(value)) {\n if (seen.has(value)) {\n return \"[Circular]\";\n }\n seen.add(value);\n }\n return value;\n }, 2);\n }\n sanitizeHeaders(value) {\n return this.sanitizeObject(value, this.allowedHeaderNames, (v, k) => v[k].value);\n }\n sanitizeQuery(value) {\n return this.sanitizeObject(value, this.allowedQueryParameters, (v, k) => v[k]);\n }\n sanitizeObject(value, allowedKeys, accessor) {\n if (typeof value !== \"object\" || value === null) {\n return value;\n }\n const sanitized = {};\n for (const k of Object.keys(value)) {\n if (allowedKeys.has(k.toLowerCase())) {\n sanitized[k] = accessor(value, k);\n }\n else {\n sanitized[k] = RedactedString;\n }\n }\n return sanitized;\n }\n sanitizeUrl(value) {\n if (typeof value !== \"string\" || value === null) {\n return value;\n }\n const urlBuilder = URLBuilder.parse(value);\n const queryString = urlBuilder.getQuery();\n if (!queryString) {\n return value;\n }\n const query = URLQuery.parse(queryString);\n for (const k of query.keys()) {\n if (!this.allowedQueryParameters.has(k.toLowerCase())) {\n query.set(k, RedactedString);\n }\n }\n urlBuilder.setQuery(query.toString());\n return urlBuilder.toString();\n }\n}\n\n// Copyright (c) Microsoft Corporation.\nconst custom = util.inspect.custom;\n\n// Copyright (c) Microsoft Corporation.\nconst errorSanitizer = new Sanitizer();\n/**\n * An error resulting from an HTTP request to a service endpoint.\n */\nclass RestError extends Error {\n constructor(message, code, statusCode, request, response) {\n super(message);\n this.name = \"RestError\";\n this.code = code;\n this.statusCode = statusCode;\n this.request = request;\n this.response = response;\n Object.setPrototypeOf(this, RestError.prototype);\n }\n /**\n * Logging method for util.inspect in Node\n */\n [custom]() {\n return `RestError: ${this.message} \\n ${errorSanitizer.sanitize(this)}`;\n }\n}\n/**\n * A constant string to identify errors that may arise when making an HTTP request that indicates an issue with the transport layer (e.g. the hostname of the URL cannot be resolved via DNS.)\n */\nRestError.REQUEST_SEND_ERROR = \"REQUEST_SEND_ERROR\";\n/**\n * A constant string to identify errors that may arise from parsing an incoming HTTP response. Usually indicates a malformed HTTP body, such as an encoded JSON payload that is incomplete.\n */\nRestError.PARSE_ERROR = \"PARSE_ERROR\";\n\n// Copyright (c) Microsoft Corporation.\nconst logger = logger$1.createClientLogger(\"core-http\");\n\n// Copyright (c) Microsoft Corporation.\nfunction getCachedAgent(isHttps, agentCache) {\n return isHttps ? agentCache.httpsAgent : agentCache.httpAgent;\n}\nclass ReportTransform extends stream.Transform {\n constructor(progressCallback) {\n super();\n this.progressCallback = progressCallback;\n this.loadedBytes = 0;\n }\n _transform(chunk, _encoding, callback) {\n this.push(chunk);\n this.loadedBytes += chunk.length;\n this.progressCallback({ loadedBytes: this.loadedBytes });\n callback(undefined);\n }\n}\nfunction isReadableStream(body) {\n return body && typeof body.pipe === \"function\";\n}\nfunction isStreamComplete(stream, aborter) {\n return new Promise((resolve) => {\n stream.once(\"close\", () => {\n aborter === null || aborter === void 0 ? void 0 : aborter.abort();\n resolve();\n });\n stream.once(\"end\", resolve);\n stream.once(\"error\", resolve);\n });\n}\n/**\n * Transforms a set of headers into the key/value pair defined by {@link HttpHeadersLike}\n */\nfunction parseHeaders(headers) {\n const httpHeaders = new HttpHeaders();\n headers.forEach((value, key) => {\n httpHeaders.set(key, value);\n });\n return httpHeaders;\n}\n/**\n * An HTTP client that uses `node-fetch`.\n */\nclass NodeFetchHttpClient {\n constructor() {\n // a mapping of proxy settings string `${host}:${port}:${username}:${password}` to agent\n this.proxyAgentMap = new Map();\n this.keepAliveAgents = {};\n this.cookieJar = new tough__namespace.CookieJar(undefined, { looseMode: true });\n }\n /**\n * Provides minimum viable error handling and the logic that executes the abstract methods.\n * @param httpRequest - Object representing the outgoing HTTP request.\n * @returns An object representing the incoming HTTP response.\n */\n async sendRequest(httpRequest) {\n var _a;\n if (!httpRequest && typeof httpRequest !== \"object\") {\n throw new Error(\"'httpRequest' (WebResourceLike) cannot be null or undefined and must be of type object.\");\n }\n const abortController$1 = new abortController.AbortController();\n let abortListener;\n if (httpRequest.abortSignal) {\n if (httpRequest.abortSignal.aborted) {\n throw new abortController.AbortError(\"The operation was aborted.\");\n }\n abortListener = (event) => {\n if (event.type === \"abort\") {\n abortController$1.abort();\n }\n };\n httpRequest.abortSignal.addEventListener(\"abort\", abortListener);\n }\n if (httpRequest.timeout) {\n setTimeout(() => {\n abortController$1.abort();\n }, httpRequest.timeout);\n }\n if (httpRequest.formData) {\n const formData = httpRequest.formData;\n const requestForm = new FormData__default[\"default\"]();\n const appendFormValue = (key, value) => {\n // value function probably returns a stream so we can provide a fresh stream on each retry\n if (typeof value === \"function\") {\n value = value();\n }\n if (value &&\n Object.prototype.hasOwnProperty.call(value, \"value\") &&\n Object.prototype.hasOwnProperty.call(value, \"options\")) {\n requestForm.append(key, value.value, value.options);\n }\n else {\n requestForm.append(key, value);\n }\n };\n for (const formKey of Object.keys(formData)) {\n const formValue = formData[formKey];\n if (Array.isArray(formValue)) {\n for (let j = 0; j < formValue.length; j++) {\n appendFormValue(formKey, formValue[j]);\n }\n }\n else {\n appendFormValue(formKey, formValue);\n }\n }\n httpRequest.body = requestForm;\n httpRequest.formData = undefined;\n const contentType = httpRequest.headers.get(\"Content-Type\");\n if (contentType && contentType.indexOf(\"multipart/form-data\") !== -1) {\n if (typeof requestForm.getBoundary === \"function\") {\n httpRequest.headers.set(\"Content-Type\", `multipart/form-data; boundary=${requestForm.getBoundary()}`);\n }\n else {\n // browser will automatically apply a suitable content-type header\n httpRequest.headers.remove(\"Content-Type\");\n }\n }\n }\n let body = httpRequest.body\n ? typeof httpRequest.body === \"function\"\n ? httpRequest.body()\n : httpRequest.body\n : undefined;\n if (httpRequest.onUploadProgress && httpRequest.body) {\n const onUploadProgress = httpRequest.onUploadProgress;\n const uploadReportStream = new ReportTransform(onUploadProgress);\n if (isReadableStream(body)) {\n body.pipe(uploadReportStream);\n }\n else {\n uploadReportStream.end(body);\n }\n body = uploadReportStream;\n }\n const platformSpecificRequestInit = await this.prepareRequest(httpRequest);\n const requestInit = Object.assign({ body: body, headers: httpRequest.headers.rawHeaders(), method: httpRequest.method, \n // the types for RequestInit are from the browser, which expects AbortSignal to\n // have `reason` and `throwIfAborted`, but these don't exist on our polyfill\n // for Node.\n signal: abortController$1.signal, redirect: \"manual\" }, platformSpecificRequestInit);\n let operationResponse;\n try {\n const response = await this.fetch(httpRequest.url, requestInit);\n const headers = parseHeaders(response.headers);\n const streaming = ((_a = httpRequest.streamResponseStatusCodes) === null || _a === void 0 ? void 0 : _a.has(response.status)) ||\n httpRequest.streamResponseBody;\n operationResponse = {\n headers: headers,\n request: httpRequest,\n status: response.status,\n readableStreamBody: streaming\n ? response.body\n : undefined,\n bodyAsText: !streaming ? await response.text() : undefined,\n };\n const onDownloadProgress = httpRequest.onDownloadProgress;\n if (onDownloadProgress) {\n const responseBody = response.body || undefined;\n if (isReadableStream(responseBody)) {\n const downloadReportStream = new ReportTransform(onDownloadProgress);\n responseBody.pipe(downloadReportStream);\n operationResponse.readableStreamBody = downloadReportStream;\n }\n else {\n const length = parseInt(headers.get(\"Content-Length\")) || undefined;\n if (length) {\n // Calling callback for non-stream response for consistency with browser\n onDownloadProgress({ loadedBytes: length });\n }\n }\n }\n await this.processRequest(operationResponse);\n return operationResponse;\n }\n catch (error) {\n const fetchError = error;\n if (fetchError.code === \"ENOTFOUND\") {\n throw new RestError(fetchError.message, RestError.REQUEST_SEND_ERROR, undefined, httpRequest);\n }\n else if (fetchError.type === \"aborted\") {\n throw new abortController.AbortError(\"The operation was aborted.\");\n }\n throw fetchError;\n }\n finally {\n // clean up event listener\n if (httpRequest.abortSignal && abortListener) {\n let uploadStreamDone = Promise.resolve();\n if (isReadableStream(body)) {\n uploadStreamDone = isStreamComplete(body);\n }\n let downloadStreamDone = Promise.resolve();\n if (isReadableStream(operationResponse === null || operationResponse === void 0 ? void 0 : operationResponse.readableStreamBody)) {\n downloadStreamDone = isStreamComplete(operationResponse.readableStreamBody, abortController$1);\n }\n Promise.all([uploadStreamDone, downloadStreamDone])\n .then(() => {\n var _a;\n (_a = httpRequest.abortSignal) === null || _a === void 0 ? void 0 : _a.removeEventListener(\"abort\", abortListener);\n return;\n })\n .catch((e) => {\n logger.warning(\"Error when cleaning up abortListener on httpRequest\", e);\n });\n }\n }\n }\n getOrCreateAgent(httpRequest) {\n var _a;\n const isHttps = isUrlHttps(httpRequest.url);\n // At the moment, proxy settings and keepAlive are mutually\n // exclusive because the 'tunnel' library currently lacks the\n // ability to create a proxy with keepAlive turned on.\n if (httpRequest.proxySettings) {\n const { host, port, username, password } = httpRequest.proxySettings;\n const key = `${host}:${port}:${username}:${password}`;\n const proxyAgents = (_a = this.proxyAgentMap.get(key)) !== null && _a !== void 0 ? _a : {};\n let agent = getCachedAgent(isHttps, proxyAgents);\n if (agent) {\n return agent;\n }\n const tunnel = createProxyAgent(httpRequest.url, httpRequest.proxySettings, httpRequest.headers);\n agent = tunnel.agent;\n if (tunnel.isHttps) {\n proxyAgents.httpsAgent = tunnel.agent;\n }\n else {\n proxyAgents.httpAgent = tunnel.agent;\n }\n this.proxyAgentMap.set(key, proxyAgents);\n return agent;\n }\n else if (httpRequest.keepAlive) {\n let agent = getCachedAgent(isHttps, this.keepAliveAgents);\n if (agent) {\n return agent;\n }\n const agentOptions = {\n keepAlive: httpRequest.keepAlive,\n };\n if (isHttps) {\n agent = this.keepAliveAgents.httpsAgent = new https__namespace.Agent(agentOptions);\n }\n else {\n agent = this.keepAliveAgents.httpAgent = new http__namespace.Agent(agentOptions);\n }\n return agent;\n }\n else {\n return isHttps ? https__namespace.globalAgent : http__namespace.globalAgent;\n }\n }\n /**\n * Uses `node-fetch` to perform the request.\n */\n // eslint-disable-next-line @azure/azure-sdk/ts-apisurface-standardized-verbs\n async fetch(input, init) {\n return node_fetch__default[\"default\"](input, init);\n }\n /**\n * Prepares a request based on the provided web resource.\n */\n async prepareRequest(httpRequest) {\n const requestInit = {};\n if (this.cookieJar && !httpRequest.headers.get(\"Cookie\")) {\n const cookieString = await new Promise((resolve, reject) => {\n this.cookieJar.getCookieString(httpRequest.url, (err, cookie) => {\n if (err) {\n reject(err);\n }\n else {\n resolve(cookie);\n }\n });\n });\n httpRequest.headers.set(\"Cookie\", cookieString);\n }\n // Set the http(s) agent\n requestInit.agent = this.getOrCreateAgent(httpRequest);\n requestInit.compress = httpRequest.decompressResponse;\n return requestInit;\n }\n /**\n * Process an HTTP response. Handles persisting a cookie for subsequent requests if the response has a \"Set-Cookie\" header.\n */\n async processRequest(operationResponse) {\n if (this.cookieJar) {\n const setCookieHeader = operationResponse.headers.get(\"Set-Cookie\");\n if (setCookieHeader !== undefined) {\n await new Promise((resolve, reject) => {\n this.cookieJar.setCookie(setCookieHeader, operationResponse.request.url, { ignoreError: true }, (err) => {\n if (err) {\n reject(err);\n }\n else {\n resolve();\n }\n });\n });\n }\n }\n }\n}\n\n// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n/**\n * The different levels of logs that can be used with the HttpPipelineLogger.\n */\nexports.HttpPipelineLogLevel = void 0;\n(function (HttpPipelineLogLevel) {\n /**\n * A log level that indicates that no logs will be logged.\n */\n HttpPipelineLogLevel[HttpPipelineLogLevel[\"OFF\"] = 0] = \"OFF\";\n /**\n * An error log.\n */\n HttpPipelineLogLevel[HttpPipelineLogLevel[\"ERROR\"] = 1] = \"ERROR\";\n /**\n * A warning log.\n */\n HttpPipelineLogLevel[HttpPipelineLogLevel[\"WARNING\"] = 2] = \"WARNING\";\n /**\n * An information log.\n */\n HttpPipelineLogLevel[HttpPipelineLogLevel[\"INFO\"] = 3] = \"INFO\";\n})(exports.HttpPipelineLogLevel || (exports.HttpPipelineLogLevel = {}));\n\n// Copyright (c) Microsoft Corporation.\n/**\n * Converts an OperationOptions to a RequestOptionsBase\n *\n * @param opts - OperationOptions object to convert to RequestOptionsBase\n */\nfunction operationOptionsToRequestOptionsBase(opts) {\n const { requestOptions, tracingOptions } = opts, additionalOptions = tslib.__rest(opts, [\"requestOptions\", \"tracingOptions\"]);\n let result = additionalOptions;\n if (requestOptions) {\n result = Object.assign(Object.assign({}, result), requestOptions);\n }\n if (tracingOptions) {\n result.tracingContext = tracingOptions.tracingContext;\n // By passing spanOptions if they exist at runtime, we're backwards compatible with @azure/core-tracing@preview.13 and earlier.\n result.spanOptions = tracingOptions === null || tracingOptions === void 0 ? void 0 : tracingOptions.spanOptions;\n }\n return result;\n}\n\n// Copyright (c) Microsoft Corporation.\n/**\n * The base class from which all request policies derive.\n */\nclass BaseRequestPolicy {\n /**\n * The main method to implement that manipulates a request/response.\n */\n constructor(\n /**\n * The next policy in the pipeline. Each policy is responsible for executing the next one if the request is to continue through the pipeline.\n */\n _nextPolicy, \n /**\n * The options that can be passed to a given request policy.\n */\n _options) {\n this._nextPolicy = _nextPolicy;\n this._options = _options;\n }\n /**\n * Get whether or not a log with the provided log level should be logged.\n * @param logLevel - The log level of the log that will be logged.\n * @returns Whether or not a log with the provided log level should be logged.\n */\n shouldLog(logLevel) {\n return this._options.shouldLog(logLevel);\n }\n /**\n * Attempt to log the provided message to the provided logger. If no logger was provided or if\n * the log level does not meat the logger's threshold, then nothing will be logged.\n * @param logLevel - The log level of this log.\n * @param message - The message of this log.\n */\n log(logLevel, message) {\n this._options.log(logLevel, message);\n }\n}\n/**\n * Optional properties that can be used when creating a RequestPolicy.\n */\nclass RequestPolicyOptions {\n constructor(_logger) {\n this._logger = _logger;\n }\n /**\n * Get whether or not a log with the provided log level should be logged.\n * @param logLevel - The log level of the log that will be logged.\n * @returns Whether or not a log with the provided log level should be logged.\n */\n shouldLog(logLevel) {\n return (!!this._logger &&\n logLevel !== exports.HttpPipelineLogLevel.OFF &&\n logLevel <= this._logger.minimumLogLevel);\n }\n /**\n * Attempt to log the provided message to the provided logger. If no logger was provided or if\n * the log level does not meet the logger's threshold, then nothing will be logged.\n * @param logLevel - The log level of this log.\n * @param message - The message of this log.\n */\n log(logLevel, message) {\n if (this._logger && this.shouldLog(logLevel)) {\n this._logger.log(logLevel, message);\n }\n }\n}\n\n// Copyright (c) Microsoft Corporation.\n// Note: The reason we re-define all of the xml2js default settings (version 2.0) here is because the default settings object exposed\n// by the xm2js library is mutable. See https://github.com/Leonidas-from-XIV/node-xml2js/issues/536\n// By creating a new copy of the settings each time we instantiate the parser,\n// we are safeguarding against the possibility of the default settings being mutated elsewhere unintentionally.\nconst xml2jsDefaultOptionsV2 = {\n explicitCharkey: false,\n trim: false,\n normalize: false,\n normalizeTags: false,\n attrkey: XML_ATTRKEY,\n explicitArray: true,\n ignoreAttrs: false,\n mergeAttrs: false,\n explicitRoot: true,\n validator: undefined,\n xmlns: false,\n explicitChildren: false,\n preserveChildrenOrder: false,\n childkey: \"$$\",\n charsAsChildren: false,\n includeWhiteChars: false,\n async: false,\n strict: true,\n attrNameProcessors: undefined,\n attrValueProcessors: undefined,\n tagNameProcessors: undefined,\n valueProcessors: undefined,\n rootName: \"root\",\n xmldec: {\n version: \"1.0\",\n encoding: \"UTF-8\",\n standalone: true,\n },\n doctype: undefined,\n renderOpts: {\n pretty: true,\n indent: \" \",\n newline: \"\\n\",\n },\n headless: false,\n chunkSize: 10000,\n emptyTag: \"\",\n cdata: false,\n};\n// The xml2js settings for general XML parsing operations.\nconst xml2jsParserSettings = Object.assign({}, xml2jsDefaultOptionsV2);\nxml2jsParserSettings.explicitArray = false;\n// The xml2js settings for general XML building operations.\nconst xml2jsBuilderSettings = Object.assign({}, xml2jsDefaultOptionsV2);\nxml2jsBuilderSettings.explicitArray = false;\nxml2jsBuilderSettings.renderOpts = {\n pretty: false,\n};\n/**\n * Converts given JSON object to XML string\n * @param obj - JSON object to be converted into XML string\n * @param opts - Options that govern the parsing of given JSON object\n */\nfunction stringifyXML(obj, opts = {}) {\n var _a;\n xml2jsBuilderSettings.rootName = opts.rootName;\n xml2jsBuilderSettings.charkey = (_a = opts.xmlCharKey) !== null && _a !== void 0 ? _a : XML_CHARKEY;\n const builder = new xml2js__namespace.Builder(xml2jsBuilderSettings);\n return builder.buildObject(obj);\n}\n/**\n * Converts given XML string into JSON\n * @param str - String containing the XML content to be parsed into JSON\n * @param opts - Options that govern the parsing of given xml string\n */\nfunction parseXML(str, opts = {}) {\n var _a;\n xml2jsParserSettings.explicitRoot = !!opts.includeRoot;\n xml2jsParserSettings.charkey = (_a = opts.xmlCharKey) !== null && _a !== void 0 ? _a : XML_CHARKEY;\n const xmlParser = new xml2js__namespace.Parser(xml2jsParserSettings);\n return new Promise((resolve, reject) => {\n if (!str) {\n reject(new Error(\"Document is empty\"));\n }\n else {\n xmlParser.parseString(str, (err, res) => {\n if (err) {\n reject(err);\n }\n else {\n resolve(res);\n }\n });\n }\n });\n}\n\n// Copyright (c) Microsoft Corporation.\n/**\n * Create a new serialization RequestPolicyCreator that will serialized HTTP request bodies as they\n * pass through the HTTP pipeline.\n */\nfunction deserializationPolicy(deserializationContentTypes, parsingOptions) {\n return {\n create: (nextPolicy, options) => {\n return new DeserializationPolicy(nextPolicy, options, deserializationContentTypes, parsingOptions);\n },\n };\n}\nconst defaultJsonContentTypes = [\"application/json\", \"text/json\"];\nconst defaultXmlContentTypes = [\"application/xml\", \"application/atom+xml\"];\nconst DefaultDeserializationOptions = {\n expectedContentTypes: {\n json: defaultJsonContentTypes,\n xml: defaultXmlContentTypes,\n },\n};\n/**\n * A RequestPolicy that will deserialize HTTP response bodies and headers as they pass through the\n * HTTP pipeline.\n */\nclass DeserializationPolicy extends BaseRequestPolicy {\n constructor(nextPolicy, requestPolicyOptions, deserializationContentTypes, parsingOptions = {}) {\n var _a;\n super(nextPolicy, requestPolicyOptions);\n this.jsonContentTypes =\n (deserializationContentTypes && deserializationContentTypes.json) || defaultJsonContentTypes;\n this.xmlContentTypes =\n (deserializationContentTypes && deserializationContentTypes.xml) || defaultXmlContentTypes;\n this.xmlCharKey = (_a = parsingOptions.xmlCharKey) !== null && _a !== void 0 ? _a : XML_CHARKEY;\n }\n async sendRequest(request) {\n return this._nextPolicy.sendRequest(request).then((response) => deserializeResponseBody(this.jsonContentTypes, this.xmlContentTypes, response, {\n xmlCharKey: this.xmlCharKey,\n }));\n }\n}\nfunction getOperationResponse(parsedResponse) {\n let result;\n const request = parsedResponse.request;\n const operationSpec = request.operationSpec;\n if (operationSpec) {\n const operationResponseGetter = request.operationResponseGetter;\n if (!operationResponseGetter) {\n result = operationSpec.responses[parsedResponse.status];\n }\n else {\n result = operationResponseGetter(operationSpec, parsedResponse);\n }\n }\n return result;\n}\nfunction shouldDeserializeResponse(parsedResponse) {\n const shouldDeserialize = parsedResponse.request.shouldDeserialize;\n let result;\n if (shouldDeserialize === undefined) {\n result = true;\n }\n else if (typeof shouldDeserialize === \"boolean\") {\n result = shouldDeserialize;\n }\n else {\n result = shouldDeserialize(parsedResponse);\n }\n return result;\n}\n/**\n * Given a particular set of content types to parse as either JSON or XML, consumes the HTTP response to produce the result object defined by the request's {@link OperationSpec}.\n * @param jsonContentTypes - Response content types to parse the body as JSON.\n * @param xmlContentTypes - Response content types to parse the body as XML.\n * @param response - HTTP Response from the pipeline.\n * @param options - Options to the serializer, mostly for configuring the XML parser if needed.\n * @returns A parsed {@link HttpOperationResponse} object that can be returned by the {@link ServiceClient}.\n */\nfunction deserializeResponseBody(jsonContentTypes, xmlContentTypes, response, options = {}) {\n var _a, _b, _c;\n const updatedOptions = {\n rootName: (_a = options.rootName) !== null && _a !== void 0 ? _a : \"\",\n includeRoot: (_b = options.includeRoot) !== null && _b !== void 0 ? _b : false,\n xmlCharKey: (_c = options.xmlCharKey) !== null && _c !== void 0 ? _c : XML_CHARKEY,\n };\n return parse(jsonContentTypes, xmlContentTypes, response, updatedOptions).then((parsedResponse) => {\n if (!shouldDeserializeResponse(parsedResponse)) {\n return parsedResponse;\n }\n const operationSpec = parsedResponse.request.operationSpec;\n if (!operationSpec || !operationSpec.responses) {\n return parsedResponse;\n }\n const responseSpec = getOperationResponse(parsedResponse);\n const { error, shouldReturnResponse } = handleErrorResponse(parsedResponse, operationSpec, responseSpec);\n if (error) {\n throw error;\n }\n else if (shouldReturnResponse) {\n return parsedResponse;\n }\n // An operation response spec does exist for current status code, so\n // use it to deserialize the response.\n if (responseSpec) {\n if (responseSpec.bodyMapper) {\n let valueToDeserialize = parsedResponse.parsedBody;\n if (operationSpec.isXML && responseSpec.bodyMapper.type.name === MapperType.Sequence) {\n valueToDeserialize =\n typeof valueToDeserialize === \"object\"\n ? valueToDeserialize[responseSpec.bodyMapper.xmlElementName]\n : [];\n }\n try {\n parsedResponse.parsedBody = operationSpec.serializer.deserialize(responseSpec.bodyMapper, valueToDeserialize, \"operationRes.parsedBody\", options);\n }\n catch (innerError) {\n const restError = new RestError(`Error ${innerError} occurred in deserializing the responseBody - ${parsedResponse.bodyAsText}`, undefined, parsedResponse.status, parsedResponse.request, parsedResponse);\n throw restError;\n }\n }\n else if (operationSpec.httpMethod === \"HEAD\") {\n // head methods never have a body, but we return a boolean to indicate presence/absence of the resource\n parsedResponse.parsedBody = response.status >= 200 && response.status < 300;\n }\n if (responseSpec.headersMapper) {\n parsedResponse.parsedHeaders = operationSpec.serializer.deserialize(responseSpec.headersMapper, parsedResponse.headers.toJson(), \"operationRes.parsedHeaders\", options);\n }\n }\n return parsedResponse;\n });\n}\nfunction isOperationSpecEmpty(operationSpec) {\n const expectedStatusCodes = Object.keys(operationSpec.responses);\n return (expectedStatusCodes.length === 0 ||\n (expectedStatusCodes.length === 1 && expectedStatusCodes[0] === \"default\"));\n}\nfunction handleErrorResponse(parsedResponse, operationSpec, responseSpec) {\n var _a;\n const isSuccessByStatus = 200 <= parsedResponse.status && parsedResponse.status < 300;\n const isExpectedStatusCode = isOperationSpecEmpty(operationSpec)\n ? isSuccessByStatus\n : !!responseSpec;\n if (isExpectedStatusCode) {\n if (responseSpec) {\n if (!responseSpec.isError) {\n return { error: null, shouldReturnResponse: false };\n }\n }\n else {\n return { error: null, shouldReturnResponse: false };\n }\n }\n const errorResponseSpec = responseSpec !== null && responseSpec !== void 0 ? responseSpec : operationSpec.responses.default;\n const streaming = ((_a = parsedResponse.request.streamResponseStatusCodes) === null || _a === void 0 ? void 0 : _a.has(parsedResponse.status)) ||\n parsedResponse.request.streamResponseBody;\n const initialErrorMessage = streaming\n ? `Unexpected status code: ${parsedResponse.status}`\n : parsedResponse.bodyAsText;\n const error = new RestError(initialErrorMessage, undefined, parsedResponse.status, parsedResponse.request, parsedResponse);\n // If the item failed but there's no error spec or default spec to deserialize the error,\n // we should fail so we just throw the parsed response\n if (!errorResponseSpec) {\n throw error;\n }\n const defaultBodyMapper = errorResponseSpec.bodyMapper;\n const defaultHeadersMapper = errorResponseSpec.headersMapper;\n try {\n // If error response has a body, try to deserialize it using default body mapper.\n // Then try to extract error code & message from it\n if (parsedResponse.parsedBody) {\n const parsedBody = parsedResponse.parsedBody;\n let parsedError;\n if (defaultBodyMapper) {\n let valueToDeserialize = parsedBody;\n if (operationSpec.isXML && defaultBodyMapper.type.name === MapperType.Sequence) {\n valueToDeserialize =\n typeof parsedBody === \"object\" ? parsedBody[defaultBodyMapper.xmlElementName] : [];\n }\n parsedError = operationSpec.serializer.deserialize(defaultBodyMapper, valueToDeserialize, \"error.response.parsedBody\");\n }\n const internalError = parsedBody.error || parsedError || parsedBody;\n error.code = internalError.code;\n if (internalError.message) {\n error.message = internalError.message;\n }\n if (defaultBodyMapper) {\n error.response.parsedBody = parsedError;\n }\n }\n // If error response has headers, try to deserialize it using default header mapper\n if (parsedResponse.headers && defaultHeadersMapper) {\n error.response.parsedHeaders = operationSpec.serializer.deserialize(defaultHeadersMapper, parsedResponse.headers.toJson(), \"operationRes.parsedHeaders\");\n }\n }\n catch (defaultError) {\n error.message = `Error \"${defaultError.message}\" occurred in deserializing the responseBody - \"${parsedResponse.bodyAsText}\" for the default response.`;\n }\n return { error, shouldReturnResponse: false };\n}\nfunction parse(jsonContentTypes, xmlContentTypes, operationResponse, opts) {\n var _a;\n const errorHandler = (err) => {\n const msg = `Error \"${err}\" occurred while parsing the response body - ${operationResponse.bodyAsText}.`;\n const errCode = err.code || RestError.PARSE_ERROR;\n const e = new RestError(msg, errCode, operationResponse.status, operationResponse.request, operationResponse);\n return Promise.reject(e);\n };\n const streaming = ((_a = operationResponse.request.streamResponseStatusCodes) === null || _a === void 0 ? void 0 : _a.has(operationResponse.status)) ||\n operationResponse.request.streamResponseBody;\n if (!streaming && operationResponse.bodyAsText) {\n const text = operationResponse.bodyAsText;\n const contentType = operationResponse.headers.get(\"Content-Type\") || \"\";\n const contentComponents = !contentType\n ? []\n : contentType.split(\";\").map((component) => component.toLowerCase());\n if (contentComponents.length === 0 ||\n contentComponents.some((component) => jsonContentTypes.indexOf(component) !== -1)) {\n return new Promise((resolve) => {\n operationResponse.parsedBody = JSON.parse(text);\n resolve(operationResponse);\n }).catch(errorHandler);\n }\n else if (contentComponents.some((component) => xmlContentTypes.indexOf(component) !== -1)) {\n return parseXML(text, opts)\n .then((body) => {\n operationResponse.parsedBody = body;\n return operationResponse;\n })\n .catch(errorHandler);\n }\n }\n return Promise.resolve(operationResponse);\n}\n\n// Copyright (c) Microsoft Corporation.\n/**\n * By default, HTTP connections are maintained for future requests.\n */\nconst DefaultKeepAliveOptions = {\n enable: true,\n};\n/**\n * Creates a policy that controls whether HTTP connections are maintained on future requests.\n * @param keepAliveOptions - Keep alive options. By default, HTTP connections are maintained for future requests.\n * @returns An instance of the {@link KeepAlivePolicy}\n */\nfunction keepAlivePolicy(keepAliveOptions) {\n return {\n create: (nextPolicy, options) => {\n return new KeepAlivePolicy(nextPolicy, options, keepAliveOptions || DefaultKeepAliveOptions);\n },\n };\n}\n/**\n * KeepAlivePolicy is a policy used to control keep alive settings for every request.\n */\nclass KeepAlivePolicy extends BaseRequestPolicy {\n /**\n * Creates an instance of KeepAlivePolicy.\n *\n * @param nextPolicy -\n * @param options -\n * @param keepAliveOptions -\n */\n constructor(nextPolicy, options, keepAliveOptions) {\n super(nextPolicy, options);\n this.keepAliveOptions = keepAliveOptions;\n }\n /**\n * Sends out request.\n *\n * @param request -\n * @returns\n */\n async sendRequest(request) {\n request.keepAlive = this.keepAliveOptions.enable;\n return this._nextPolicy.sendRequest(request);\n }\n}\n\n// Copyright (c) Microsoft Corporation.\n/**\n * Methods that are allowed to follow redirects 301 and 302\n */\nconst allowedRedirect = [\"GET\", \"HEAD\"];\nconst DefaultRedirectOptions = {\n handleRedirects: true,\n maxRetries: 20,\n};\n/**\n * Creates a redirect policy, which sends a repeats the request to a new destination if a response arrives with a \"location\" header, and a status code between 300 and 307.\n * @param maximumRetries - Maximum number of redirects to follow.\n * @returns An instance of the {@link RedirectPolicy}\n */\nfunction redirectPolicy(maximumRetries = 20) {\n return {\n create: (nextPolicy, options) => {\n return new RedirectPolicy(nextPolicy, options, maximumRetries);\n },\n };\n}\n/**\n * Resends the request to a new destination if a response arrives with a \"location\" header, and a status code between 300 and 307.\n */\nclass RedirectPolicy extends BaseRequestPolicy {\n constructor(nextPolicy, options, maxRetries = 20) {\n super(nextPolicy, options);\n this.maxRetries = maxRetries;\n }\n sendRequest(request) {\n return this._nextPolicy\n .sendRequest(request)\n .then((response) => handleRedirect(this, response, 0));\n }\n}\nfunction handleRedirect(policy, response, currentRetries) {\n const { request, status } = response;\n const locationHeader = response.headers.get(\"location\");\n if (locationHeader &&\n (status === 300 ||\n (status === 301 && allowedRedirect.includes(request.method)) ||\n (status === 302 && allowedRedirect.includes(request.method)) ||\n (status === 303 && request.method === \"POST\") ||\n status === 307) &&\n (!policy.maxRetries || currentRetries < policy.maxRetries)) {\n const builder = URLBuilder.parse(request.url);\n builder.setPath(locationHeader);\n request.url = builder.toString();\n // POST request with Status code 303 should be converted into a\n // redirected GET request if the redirect url is present in the location header\n if (status === 303) {\n request.method = \"GET\";\n delete request.body;\n }\n return policy._nextPolicy\n .sendRequest(request)\n .then((res) => handleRedirect(policy, res, currentRetries + 1));\n }\n return Promise.resolve(response);\n}\n\n// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nconst DEFAULT_CLIENT_RETRY_COUNT = 3;\n// intervals are in ms\nconst DEFAULT_CLIENT_RETRY_INTERVAL = 1000 * 30;\nconst DEFAULT_CLIENT_MAX_RETRY_INTERVAL = 1000 * 90;\nconst DEFAULT_CLIENT_MIN_RETRY_INTERVAL = 1000 * 3;\nfunction isNumber(n) {\n return typeof n === \"number\";\n}\n/**\n * @internal\n * Determines if the operation should be retried.\n *\n * @param retryLimit - Specifies the max number of retries.\n * @param predicate - Initial chekck on whether to retry based on given responses or errors\n * @param retryData - The retry data.\n * @returns True if the operation qualifies for a retry; false otherwise.\n */\nfunction shouldRetry(retryLimit, predicate, retryData, response, error) {\n if (!predicate(response, error)) {\n return false;\n }\n return retryData.retryCount < retryLimit;\n}\n/**\n * @internal\n * Updates the retry data for the next attempt.\n *\n * @param retryOptions - specifies retry interval, and its lower bound and upper bound.\n * @param retryData - The retry data.\n * @param err - The operation\"s error, if any.\n */\nfunction updateRetryData(retryOptions, retryData = { retryCount: 0, retryInterval: 0 }, err) {\n if (err) {\n if (retryData.error) {\n err.innerError = retryData.error;\n }\n retryData.error = err;\n }\n // Adjust retry count\n retryData.retryCount++;\n // Adjust retry interval\n let incrementDelta = Math.pow(2, retryData.retryCount - 1) - 1;\n const boundedRandDelta = retryOptions.retryInterval * 0.8 +\n Math.floor(Math.random() * (retryOptions.retryInterval * 0.4));\n incrementDelta *= boundedRandDelta;\n retryData.retryInterval = Math.min(retryOptions.minRetryInterval + incrementDelta, retryOptions.maxRetryInterval);\n return retryData;\n}\n\n// Copyright (c) Microsoft Corporation.\n/**\n * Policy that retries the request as many times as configured for as long as the max retry time interval specified, each retry waiting longer to begin than the last time.\n * @param retryCount - Maximum number of retries.\n * @param retryInterval - Base time between retries.\n * @param maxRetryInterval - Maximum time to wait between retries.\n */\nfunction exponentialRetryPolicy(retryCount, retryInterval, maxRetryInterval) {\n return {\n create: (nextPolicy, options) => {\n return new ExponentialRetryPolicy(nextPolicy, options, retryCount, retryInterval, maxRetryInterval);\n },\n };\n}\n/**\n * Describes the Retry Mode type. Currently supporting only Exponential.\n */\nexports.RetryMode = void 0;\n(function (RetryMode) {\n /**\n * Currently supported retry mode.\n * Each time a retry happens, it will take exponentially more time than the last time.\n */\n RetryMode[RetryMode[\"Exponential\"] = 0] = \"Exponential\";\n})(exports.RetryMode || (exports.RetryMode = {}));\nconst DefaultRetryOptions = {\n maxRetries: DEFAULT_CLIENT_RETRY_COUNT,\n retryDelayInMs: DEFAULT_CLIENT_RETRY_INTERVAL,\n maxRetryDelayInMs: DEFAULT_CLIENT_MAX_RETRY_INTERVAL,\n};\n/**\n * Instantiates a new \"ExponentialRetryPolicyFilter\" instance.\n */\nclass ExponentialRetryPolicy extends BaseRequestPolicy {\n /**\n * @param nextPolicy - The next RequestPolicy in the pipeline chain.\n * @param options - The options for this RequestPolicy.\n * @param retryCount - The client retry count.\n * @param retryInterval - The client retry interval, in milliseconds.\n * @param minRetryInterval - The minimum retry interval, in milliseconds.\n * @param maxRetryInterval - The maximum retry interval, in milliseconds.\n */\n constructor(nextPolicy, options, retryCount, retryInterval, maxRetryInterval) {\n super(nextPolicy, options);\n this.retryCount = isNumber(retryCount) ? retryCount : DEFAULT_CLIENT_RETRY_COUNT;\n this.retryInterval = isNumber(retryInterval) ? retryInterval : DEFAULT_CLIENT_RETRY_INTERVAL;\n this.maxRetryInterval = isNumber(maxRetryInterval)\n ? maxRetryInterval\n : DEFAULT_CLIENT_MAX_RETRY_INTERVAL;\n }\n sendRequest(request) {\n return this._nextPolicy\n .sendRequest(request.clone())\n .then((response) => retry$1(this, request, response))\n .catch((error) => retry$1(this, request, error.response, undefined, error));\n }\n}\nasync function retry$1(policy, request, response, retryData, requestError) {\n function shouldPolicyRetry(responseParam) {\n const statusCode = responseParam === null || responseParam === void 0 ? void 0 : responseParam.status;\n if (statusCode === 503 && (response === null || response === void 0 ? void 0 : response.headers.get(Constants.HeaderConstants.RETRY_AFTER))) {\n return false;\n }\n if (statusCode === undefined ||\n (statusCode < 500 && statusCode !== 408) ||\n statusCode === 501 ||\n statusCode === 505) {\n return false;\n }\n return true;\n }\n retryData = updateRetryData({\n retryInterval: policy.retryInterval,\n minRetryInterval: 0,\n maxRetryInterval: policy.maxRetryInterval,\n }, retryData, requestError);\n const isAborted = request.abortSignal && request.abortSignal.aborted;\n if (!isAborted && shouldRetry(policy.retryCount, shouldPolicyRetry, retryData, response)) {\n logger.info(`Retrying request in ${retryData.retryInterval}`);\n try {\n await coreUtil.delay(retryData.retryInterval);\n const res = await policy._nextPolicy.sendRequest(request.clone());\n return retry$1(policy, request, res, retryData);\n }\n catch (err) {\n return retry$1(policy, request, response, retryData, err);\n }\n }\n else if (isAborted || requestError || !response) {\n // If the operation failed in the end, return all errors instead of just the last one\n const err = retryData.error ||\n new RestError(\"Failed to send the request.\", RestError.REQUEST_SEND_ERROR, response && response.status, response && response.request, response);\n throw err;\n }\n else {\n return response;\n }\n}\n\n// Copyright (c) Microsoft Corporation.\n/**\n * Creates a policy that logs information about the outgoing request and the incoming responses.\n * @param loggingOptions - Logging options.\n * @returns An instance of the {@link LogPolicy}\n */\nfunction logPolicy(loggingOptions = {}) {\n return {\n create: (nextPolicy, options) => {\n return new LogPolicy(nextPolicy, options, loggingOptions);\n },\n };\n}\n/**\n * A policy that logs information about the outgoing request and the incoming responses.\n */\nclass LogPolicy extends BaseRequestPolicy {\n constructor(nextPolicy, options, { logger: logger$1 = logger.info, allowedHeaderNames = [], allowedQueryParameters = [], } = {}) {\n super(nextPolicy, options);\n this.logger = logger$1;\n this.sanitizer = new Sanitizer({ allowedHeaderNames, allowedQueryParameters });\n }\n /**\n * Header names whose values will be logged when logging is enabled. Defaults to\n * Date, traceparent, x-ms-client-request-id, and x-ms-request id. Any headers\n * specified in this field will be added to that list. Any other values will\n * be written to logs as \"REDACTED\".\n * @deprecated Pass these into the constructor instead.\n */\n get allowedHeaderNames() {\n return this.sanitizer.allowedHeaderNames;\n }\n /**\n * Header names whose values will be logged when logging is enabled. Defaults to\n * Date, traceparent, x-ms-client-request-id, and x-ms-request id. Any headers\n * specified in this field will be added to that list. Any other values will\n * be written to logs as \"REDACTED\".\n * @deprecated Pass these into the constructor instead.\n */\n set allowedHeaderNames(allowedHeaderNames) {\n this.sanitizer.allowedHeaderNames = allowedHeaderNames;\n }\n /**\n * Query string names whose values will be logged when logging is enabled. By default no\n * query string values are logged.\n * @deprecated Pass these into the constructor instead.\n */\n get allowedQueryParameters() {\n return this.sanitizer.allowedQueryParameters;\n }\n /**\n * Query string names whose values will be logged when logging is enabled. By default no\n * query string values are logged.\n * @deprecated Pass these into the constructor instead.\n */\n set allowedQueryParameters(allowedQueryParameters) {\n this.sanitizer.allowedQueryParameters = allowedQueryParameters;\n }\n sendRequest(request) {\n if (!this.logger.enabled)\n return this._nextPolicy.sendRequest(request);\n this.logRequest(request);\n return this._nextPolicy.sendRequest(request).then((response) => this.logResponse(response));\n }\n logRequest(request) {\n this.logger(`Request: ${this.sanitizer.sanitize(request)}`);\n }\n logResponse(response) {\n this.logger(`Response status code: ${response.status}`);\n this.logger(`Headers: ${this.sanitizer.sanitize(response.headers)}`);\n return response;\n }\n}\n\n// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n/**\n * Get the path to this parameter's value as a dotted string (a.b.c).\n * @param parameter - The parameter to get the path string for.\n * @returns The path to this parameter's value as a dotted string.\n */\nfunction getPathStringFromParameter(parameter) {\n return getPathStringFromParameterPath(parameter.parameterPath, parameter.mapper);\n}\nfunction getPathStringFromParameterPath(parameterPath, mapper) {\n let result;\n if (typeof parameterPath === \"string\") {\n result = parameterPath;\n }\n else if (Array.isArray(parameterPath)) {\n result = parameterPath.join(\".\");\n }\n else {\n result = mapper.serializedName;\n }\n return result;\n}\n\n// Copyright (c) Microsoft Corporation.\n/**\n * Gets the list of status codes for streaming responses.\n * @internal\n */\nfunction getStreamResponseStatusCodes(operationSpec) {\n const result = new Set();\n for (const statusCode in operationSpec.responses) {\n const operationResponse = operationSpec.responses[statusCode];\n if (operationResponse.bodyMapper &&\n operationResponse.bodyMapper.type.name === MapperType.Stream) {\n result.add(Number(statusCode));\n }\n }\n return result;\n}\n\n// Copyright (c) Microsoft Corporation.\nfunction getDefaultUserAgentKey() {\n return Constants.HeaderConstants.USER_AGENT;\n}\nfunction getPlatformSpecificData() {\n const runtimeInfo = {\n key: \"Node\",\n value: process.version,\n };\n const osInfo = {\n key: \"OS\",\n value: `(${os__namespace.arch()}-${os__namespace.type()}-${os__namespace.release()})`,\n };\n return [runtimeInfo, osInfo];\n}\n\n// Copyright (c) Microsoft Corporation.\nfunction getRuntimeInfo() {\n const msRestRuntime = {\n key: \"core-http\",\n value: Constants.coreHttpVersion,\n };\n return [msRestRuntime];\n}\nfunction getUserAgentString(telemetryInfo, keySeparator = \" \", valueSeparator = \"/\") {\n return telemetryInfo\n .map((info) => {\n const value = info.value ? `${valueSeparator}${info.value}` : \"\";\n return `${info.key}${value}`;\n })\n .join(keySeparator);\n}\nconst getDefaultUserAgentHeaderName = getDefaultUserAgentKey;\n/**\n * The default approach to generate user agents.\n * Uses static information from this package, plus system information available from the runtime.\n */\nfunction getDefaultUserAgentValue() {\n const runtimeInfo = getRuntimeInfo();\n const platformSpecificData = getPlatformSpecificData();\n const userAgent = getUserAgentString(runtimeInfo.concat(platformSpecificData));\n return userAgent;\n}\n/**\n * Returns a policy that adds the user agent header to outgoing requests based on the given {@link TelemetryInfo}.\n * @param userAgentData - Telemetry information.\n * @returns A new {@link UserAgentPolicy}.\n */\nfunction userAgentPolicy(userAgentData) {\n const key = !userAgentData || userAgentData.key === undefined || userAgentData.key === null\n ? getDefaultUserAgentKey()\n : userAgentData.key;\n const value = !userAgentData || userAgentData.value === undefined || userAgentData.value === null\n ? getDefaultUserAgentValue()\n : userAgentData.value;\n return {\n create: (nextPolicy, options) => {\n return new UserAgentPolicy(nextPolicy, options, key, value);\n },\n };\n}\n/**\n * A policy that adds the user agent header to outgoing requests based on the given {@link TelemetryInfo}.\n */\nclass UserAgentPolicy extends BaseRequestPolicy {\n constructor(_nextPolicy, _options, headerKey, headerValue) {\n super(_nextPolicy, _options);\n this._nextPolicy = _nextPolicy;\n this._options = _options;\n this.headerKey = headerKey;\n this.headerValue = headerValue;\n }\n sendRequest(request) {\n this.addUserAgentHeader(request);\n return this._nextPolicy.sendRequest(request);\n }\n /**\n * Adds the user agent header to the outgoing request.\n */\n addUserAgentHeader(request) {\n if (!request.headers) {\n request.headers = new HttpHeaders();\n }\n if (!request.headers.get(this.headerKey) && this.headerValue) {\n request.headers.set(this.headerKey, this.headerValue);\n }\n }\n}\n\n// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n/**\n * The format that will be used to join an array of values together for a query parameter value.\n */\nexports.QueryCollectionFormat = void 0;\n(function (QueryCollectionFormat) {\n /**\n * CSV: Each pair of segments joined by a single comma.\n */\n QueryCollectionFormat[\"Csv\"] = \",\";\n /**\n * SSV: Each pair of segments joined by a single space character.\n */\n QueryCollectionFormat[\"Ssv\"] = \" \";\n /**\n * TSV: Each pair of segments joined by a single tab character.\n */\n QueryCollectionFormat[\"Tsv\"] = \"\\t\";\n /**\n * Pipes: Each pair of segments joined by a single pipe character.\n */\n QueryCollectionFormat[\"Pipes\"] = \"|\";\n /**\n * Denotes this is an array of values that should be passed to the server in multiple key/value pairs, e.g. `?queryParam=value1&queryParam=value2`\n */\n QueryCollectionFormat[\"Multi\"] = \"Multi\";\n})(exports.QueryCollectionFormat || (exports.QueryCollectionFormat = {}));\n\n// Copyright (c) Microsoft Corporation.\n// Default options for the cycler if none are provided\nconst DEFAULT_CYCLER_OPTIONS = {\n forcedRefreshWindowInMs: 1000,\n retryIntervalInMs: 3000,\n refreshWindowInMs: 1000 * 60 * 2, // Start refreshing 2m before expiry\n};\n/**\n * Converts an an unreliable access token getter (which may resolve with null)\n * into an AccessTokenGetter by retrying the unreliable getter in a regular\n * interval.\n *\n * @param getAccessToken - a function that produces a promise of an access\n * token that may fail by returning null\n * @param retryIntervalInMs - the time (in milliseconds) to wait between retry\n * attempts\n * @param timeoutInMs - the timestamp after which the refresh attempt will fail,\n * throwing an exception\n * @returns - a promise that, if it resolves, will resolve with an access token\n */\nasync function beginRefresh(getAccessToken, retryIntervalInMs, timeoutInMs) {\n // This wrapper handles exceptions gracefully as long as we haven't exceeded\n // the timeout.\n async function tryGetAccessToken() {\n if (Date.now() < timeoutInMs) {\n try {\n return await getAccessToken();\n }\n catch (_a) {\n return null;\n }\n }\n else {\n const finalToken = await getAccessToken();\n // Timeout is up, so throw if it's still null\n if (finalToken === null) {\n throw new Error(\"Failed to refresh access token.\");\n }\n return finalToken;\n }\n }\n let token = await tryGetAccessToken();\n while (token === null) {\n await coreUtil.delay(retryIntervalInMs);\n token = await tryGetAccessToken();\n }\n return token;\n}\n/**\n * Creates a token cycler from a credential, scopes, and optional settings.\n *\n * A token cycler represents a way to reliably retrieve a valid access token\n * from a TokenCredential. It will handle initializing the token, refreshing it\n * when it nears expiration, and synchronizes refresh attempts to avoid\n * concurrency hazards.\n *\n * @param credential - the underlying TokenCredential that provides the access\n * token\n * @param scopes - the scopes to request authorization for\n * @param tokenCyclerOptions - optionally override default settings for the cycler\n *\n * @returns - a function that reliably produces a valid access token\n */\nfunction createTokenCycler(credential, scopes, tokenCyclerOptions) {\n let refreshWorker = null;\n let token = null;\n const options = Object.assign(Object.assign({}, DEFAULT_CYCLER_OPTIONS), tokenCyclerOptions);\n /**\n * This little holder defines several predicates that we use to construct\n * the rules of refreshing the token.\n */\n const cycler = {\n /**\n * Produces true if a refresh job is currently in progress.\n */\n get isRefreshing() {\n return refreshWorker !== null;\n },\n /**\n * Produces true if the cycler SHOULD refresh (we are within the refresh\n * window and not already refreshing)\n */\n get shouldRefresh() {\n var _a;\n return (!cycler.isRefreshing &&\n ((_a = token === null || token === void 0 ? void 0 : token.expiresOnTimestamp) !== null && _a !== void 0 ? _a : 0) - options.refreshWindowInMs < Date.now());\n },\n /**\n * Produces true if the cycler MUST refresh (null or nearly-expired\n * token).\n */\n get mustRefresh() {\n return (token === null || token.expiresOnTimestamp - options.forcedRefreshWindowInMs < Date.now());\n },\n };\n /**\n * Starts a refresh job or returns the existing job if one is already\n * running.\n */\n function refresh(getTokenOptions) {\n var _a;\n if (!cycler.isRefreshing) {\n // We bind `scopes` here to avoid passing it around a lot\n const tryGetAccessToken = () => credential.getToken(scopes, getTokenOptions);\n // Take advantage of promise chaining to insert an assignment to `token`\n // before the refresh can be considered done.\n refreshWorker = beginRefresh(tryGetAccessToken, options.retryIntervalInMs, \n // If we don't have a token, then we should timeout immediately\n (_a = token === null || token === void 0 ? void 0 : token.expiresOnTimestamp) !== null && _a !== void 0 ? _a : Date.now())\n .then((_token) => {\n refreshWorker = null;\n token = _token;\n return token;\n })\n .catch((reason) => {\n // We also should reset the refresher if we enter a failed state. All\n // existing awaiters will throw, but subsequent requests will start a\n // new retry chain.\n refreshWorker = null;\n token = null;\n throw reason;\n });\n }\n return refreshWorker;\n }\n return async (tokenOptions) => {\n //\n // Simple rules:\n // - If we MUST refresh, then return the refresh task, blocking\n // the pipeline until a token is available.\n // - If we SHOULD refresh, then run refresh but don't return it\n // (we can still use the cached token).\n // - Return the token, since it's fine if we didn't return in\n // step 1.\n //\n if (cycler.mustRefresh)\n return refresh(tokenOptions);\n if (cycler.shouldRefresh) {\n refresh(tokenOptions);\n }\n return token;\n };\n}\n// #endregion\n/**\n * Creates a new factory for a RequestPolicy that applies a bearer token to\n * the requests' `Authorization` headers.\n *\n * @param credential - The TokenCredential implementation that can supply the bearer token.\n * @param scopes - The scopes for which the bearer token applies.\n */\nfunction bearerTokenAuthenticationPolicy(credential, scopes) {\n // This simple function encapsulates the entire process of reliably retrieving the token\n const getToken = createTokenCycler(credential, scopes /* , options */);\n class BearerTokenAuthenticationPolicy extends BaseRequestPolicy {\n constructor(nextPolicy, options) {\n super(nextPolicy, options);\n }\n async sendRequest(webResource) {\n if (!webResource.url.toLowerCase().startsWith(\"https://\")) {\n throw new Error(\"Bearer token authentication is not permitted for non-TLS protected (non-https) URLs.\");\n }\n const { token } = await getToken({\n abortSignal: webResource.abortSignal,\n tracingOptions: {\n tracingContext: webResource.tracingContext,\n },\n });\n webResource.headers.set(Constants.HeaderConstants.AUTHORIZATION, `Bearer ${token}`);\n return this._nextPolicy.sendRequest(webResource);\n }\n }\n return {\n create: (nextPolicy, options) => {\n return new BearerTokenAuthenticationPolicy(nextPolicy, options);\n },\n };\n}\n\n// Copyright (c) Microsoft Corporation.\n/**\n * Returns a request policy factory that can be used to create an instance of\n * {@link DisableResponseDecompressionPolicy}.\n */\nfunction disableResponseDecompressionPolicy() {\n return {\n create: (nextPolicy, options) => {\n return new DisableResponseDecompressionPolicy(nextPolicy, options);\n },\n };\n}\n/**\n * A policy to disable response decompression according to Accept-Encoding header\n * https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Accept-Encoding\n */\nclass DisableResponseDecompressionPolicy extends BaseRequestPolicy {\n /**\n * Creates an instance of DisableResponseDecompressionPolicy.\n *\n * @param nextPolicy -\n * @param options -\n */\n // The parent constructor is protected.\n /* eslint-disable-next-line @typescript-eslint/no-useless-constructor */\n constructor(nextPolicy, options) {\n super(nextPolicy, options);\n }\n /**\n * Sends out request.\n *\n * @param request -\n * @returns\n */\n async sendRequest(request) {\n request.decompressResponse = false;\n return this._nextPolicy.sendRequest(request);\n }\n}\n\n// Copyright (c) Microsoft Corporation.\n/**\n * Creates a policy that assigns a unique request id to outgoing requests.\n * @param requestIdHeaderName - The name of the header to use when assigning the unique id to the request.\n */\nfunction generateClientRequestIdPolicy(requestIdHeaderName = \"x-ms-client-request-id\") {\n return {\n create: (nextPolicy, options) => {\n return new GenerateClientRequestIdPolicy(nextPolicy, options, requestIdHeaderName);\n },\n };\n}\nclass GenerateClientRequestIdPolicy extends BaseRequestPolicy {\n constructor(nextPolicy, options, _requestIdHeaderName) {\n super(nextPolicy, options);\n this._requestIdHeaderName = _requestIdHeaderName;\n }\n sendRequest(request) {\n if (!request.headers.contains(this._requestIdHeaderName)) {\n request.headers.set(this._requestIdHeaderName, request.requestId);\n }\n return this._nextPolicy.sendRequest(request);\n }\n}\n\n// Copyright (c) Microsoft Corporation.\nlet cachedHttpClient;\nfunction getCachedDefaultHttpClient() {\n if (!cachedHttpClient) {\n cachedHttpClient = new NodeFetchHttpClient();\n }\n return cachedHttpClient;\n}\n\n// Copyright (c) Microsoft Corporation.\nfunction ndJsonPolicy() {\n return {\n create: (nextPolicy, options) => {\n return new NdJsonPolicy(nextPolicy, options);\n },\n };\n}\n/**\n * NdJsonPolicy that formats a JSON array as newline-delimited JSON\n */\nclass NdJsonPolicy extends BaseRequestPolicy {\n /**\n * Creates an instance of KeepAlivePolicy.\n */\n constructor(nextPolicy, options) {\n super(nextPolicy, options);\n }\n /**\n * Sends a request.\n */\n async sendRequest(request) {\n // There currently isn't a good way to bypass the serializer\n if (typeof request.body === \"string\" && request.body.startsWith(\"[\")) {\n const body = JSON.parse(request.body);\n if (Array.isArray(body)) {\n request.body = body.map((item) => JSON.stringify(item) + \"\\n\").join(\"\");\n }\n }\n return this._nextPolicy.sendRequest(request);\n }\n}\n\n// Copyright (c) Microsoft Corporation.\n/**\n * Stores the patterns specified in NO_PROXY environment variable.\n * @internal\n */\nconst globalNoProxyList = [];\nlet noProxyListLoaded = false;\n/** A cache of whether a host should bypass the proxy. */\nconst globalBypassedMap = new Map();\nfunction loadEnvironmentProxyValue() {\n if (!process) {\n return undefined;\n }\n const httpsProxy = getEnvironmentValue(Constants.HTTPS_PROXY);\n const allProxy = getEnvironmentValue(Constants.ALL_PROXY);\n const httpProxy = getEnvironmentValue(Constants.HTTP_PROXY);\n return httpsProxy || allProxy || httpProxy;\n}\n/**\n * Check whether the host of a given `uri` matches any pattern in the no proxy list.\n * If there's a match, any request sent to the same host shouldn't have the proxy settings set.\n * This implementation is a port of https://github.com/Azure/azure-sdk-for-net/blob/8cca811371159e527159c7eb65602477898683e2/sdk/core/Azure.Core/src/Pipeline/Internal/HttpEnvironmentProxy.cs#L210\n */\nfunction isBypassed(uri, noProxyList, bypassedMap) {\n if (noProxyList.length === 0) {\n return false;\n }\n const host = URLBuilder.parse(uri).getHost();\n if (bypassedMap === null || bypassedMap === void 0 ? void 0 : bypassedMap.has(host)) {\n return bypassedMap.get(host);\n }\n let isBypassedFlag = false;\n for (const pattern of noProxyList) {\n if (pattern[0] === \".\") {\n // This should match either domain it self or any subdomain or host\n // .foo.com will match foo.com it self or *.foo.com\n if (host.endsWith(pattern)) {\n isBypassedFlag = true;\n }\n else {\n if (host.length === pattern.length - 1 && host === pattern.slice(1)) {\n isBypassedFlag = true;\n }\n }\n }\n else {\n if (host === pattern) {\n isBypassedFlag = true;\n }\n }\n }\n bypassedMap === null || bypassedMap === void 0 ? void 0 : bypassedMap.set(host, isBypassedFlag);\n return isBypassedFlag;\n}\n/**\n * @internal\n */\nfunction loadNoProxy() {\n const noProxy = getEnvironmentValue(Constants.NO_PROXY);\n noProxyListLoaded = true;\n if (noProxy) {\n return noProxy\n .split(\",\")\n .map((item) => item.trim())\n .filter((item) => item.length);\n }\n return [];\n}\n/**\n * Converts a given URL of a proxy server into `ProxySettings` or attempts to retrieve `ProxySettings` from the current environment if one is not passed.\n * @param proxyUrl - URL of the proxy\n * @returns The default proxy settings, or undefined.\n */\nfunction getDefaultProxySettings(proxyUrl) {\n if (!proxyUrl) {\n proxyUrl = loadEnvironmentProxyValue();\n if (!proxyUrl) {\n return undefined;\n }\n }\n const { username, password, urlWithoutAuth } = extractAuthFromUrl(proxyUrl);\n const parsedUrl = URLBuilder.parse(urlWithoutAuth);\n const schema = parsedUrl.getScheme() ? parsedUrl.getScheme() + \"://\" : \"\";\n return {\n host: schema + parsedUrl.getHost(),\n port: Number.parseInt(parsedUrl.getPort() || \"80\"),\n username,\n password,\n };\n}\n/**\n * A policy that allows one to apply proxy settings to all requests.\n * If not passed static settings, they will be retrieved from the HTTPS_PROXY\n * or HTTP_PROXY environment variables.\n * @param proxySettings - ProxySettings to use on each request.\n * @param options - additional settings, for example, custom NO_PROXY patterns\n */\nfunction proxyPolicy(proxySettings, options) {\n if (!proxySettings) {\n proxySettings = getDefaultProxySettings();\n }\n if (!noProxyListLoaded) {\n globalNoProxyList.push(...loadNoProxy());\n }\n return {\n create: (nextPolicy, requestPolicyOptions) => {\n return new ProxyPolicy(nextPolicy, requestPolicyOptions, proxySettings, options === null || options === void 0 ? void 0 : options.customNoProxyList);\n },\n };\n}\nfunction extractAuthFromUrl(url) {\n const atIndex = url.indexOf(\"@\");\n if (atIndex === -1) {\n return { urlWithoutAuth: url };\n }\n const schemeIndex = url.indexOf(\"://\");\n const authStart = schemeIndex !== -1 ? schemeIndex + 3 : 0;\n const auth = url.substring(authStart, atIndex);\n const colonIndex = auth.indexOf(\":\");\n const hasPassword = colonIndex !== -1;\n const username = hasPassword ? auth.substring(0, colonIndex) : auth;\n const password = hasPassword ? auth.substring(colonIndex + 1) : undefined;\n const urlWithoutAuth = url.substring(0, authStart) + url.substring(atIndex + 1);\n return {\n username,\n password,\n urlWithoutAuth,\n };\n}\nclass ProxyPolicy extends BaseRequestPolicy {\n constructor(nextPolicy, options, proxySettings, customNoProxyList) {\n super(nextPolicy, options);\n this.proxySettings = proxySettings;\n this.customNoProxyList = customNoProxyList;\n }\n sendRequest(request) {\n var _a;\n if (!request.proxySettings &&\n !isBypassed(request.url, (_a = this.customNoProxyList) !== null && _a !== void 0 ? _a : globalNoProxyList, this.customNoProxyList ? undefined : globalBypassedMap)) {\n request.proxySettings = this.proxySettings;\n }\n return this._nextPolicy.sendRequest(request);\n }\n}\n\n// Copyright (c) Microsoft Corporation.\nfunction rpRegistrationPolicy(retryTimeout = 30) {\n return {\n create: (nextPolicy, options) => {\n return new RPRegistrationPolicy(nextPolicy, options, retryTimeout);\n },\n };\n}\nclass RPRegistrationPolicy extends BaseRequestPolicy {\n constructor(nextPolicy, options, _retryTimeout = 30) {\n super(nextPolicy, options);\n this._retryTimeout = _retryTimeout;\n }\n sendRequest(request) {\n return this._nextPolicy\n .sendRequest(request.clone())\n .then((response) => registerIfNeeded(this, request, response));\n }\n}\nfunction registerIfNeeded(policy, request, response) {\n if (response.status === 409) {\n const rpName = checkRPNotRegisteredError(response.bodyAsText);\n if (rpName) {\n const urlPrefix = extractSubscriptionUrl(request.url);\n return (registerRP(policy, urlPrefix, rpName, request)\n // Autoregistration of ${provider} failed for some reason. We will not return this error\n // instead will return the initial response with 409 status code back to the user.\n // do nothing here as we are returning the original response at the end of this method.\n .catch(() => false)\n .then((registrationStatus) => {\n if (registrationStatus) {\n // Retry the original request. We have to change the x-ms-client-request-id\n // otherwise Azure endpoint will return the initial 409 (cached) response.\n request.headers.set(\"x-ms-client-request-id\", generateUuid());\n return policy._nextPolicy.sendRequest(request.clone());\n }\n return response;\n }));\n }\n }\n return Promise.resolve(response);\n}\n/**\n * Reuses the headers of the original request and url (if specified).\n * @param originalRequest - The original request\n * @param reuseUrlToo - Should the url from the original request be reused as well. Default false.\n * @returns A new request object with desired headers.\n */\nfunction getRequestEssentials(originalRequest, reuseUrlToo = false) {\n const reqOptions = originalRequest.clone();\n if (reuseUrlToo) {\n reqOptions.url = originalRequest.url;\n }\n // We have to change the x-ms-client-request-id otherwise Azure endpoint\n // will return the initial 409 (cached) response.\n reqOptions.headers.set(\"x-ms-client-request-id\", generateUuid());\n // Set content-type to application/json\n reqOptions.headers.set(\"Content-Type\", \"application/json; charset=utf-8\");\n return reqOptions;\n}\n/**\n * Validates the error code and message associated with 409 response status code. If it matches to that of\n * RP not registered then it returns the name of the RP else returns undefined.\n * @param body - The response body received after making the original request.\n * @returns The name of the RP if condition is satisfied else undefined.\n */\nfunction checkRPNotRegisteredError(body) {\n let result, responseBody;\n if (body) {\n try {\n responseBody = JSON.parse(body);\n }\n catch (err) {\n // do nothing;\n }\n if (responseBody &&\n responseBody.error &&\n responseBody.error.message &&\n responseBody.error.code &&\n responseBody.error.code === \"MissingSubscriptionRegistration\") {\n const matchRes = responseBody.error.message.match(/.*'(.*)'/i);\n if (matchRes) {\n result = matchRes.pop();\n }\n }\n }\n return result;\n}\n/**\n * Extracts the first part of the URL, just after subscription:\n * https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/\n * @param url - The original request url\n * @returns The url prefix as explained above.\n */\nfunction extractSubscriptionUrl(url) {\n let result;\n const matchRes = url.match(/.*\\/subscriptions\\/[a-f0-9-]+\\//gi);\n if (matchRes && matchRes[0]) {\n result = matchRes[0];\n }\n else {\n throw new Error(`Unable to extract subscriptionId from the given url - ${url}.`);\n }\n return result;\n}\n/**\n * Registers the given provider.\n * @param policy - The RPRegistrationPolicy this function is being called against.\n * @param urlPrefix - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/\n * @param provider - The provider name to be registered.\n * @param originalRequest - The original request sent by the user that returned a 409 response\n * with a message that the provider is not registered.\n */\nasync function registerRP(policy, urlPrefix, provider, originalRequest) {\n const postUrl = `${urlPrefix}providers/${provider}/register?api-version=2016-02-01`;\n const getUrl = `${urlPrefix}providers/${provider}?api-version=2016-02-01`;\n const reqOptions = getRequestEssentials(originalRequest);\n reqOptions.method = \"POST\";\n reqOptions.url = postUrl;\n const response = await policy._nextPolicy.sendRequest(reqOptions);\n if (response.status !== 200) {\n throw new Error(`Autoregistration of ${provider} failed. Please try registering manually.`);\n }\n return getRegistrationStatus(policy, getUrl, originalRequest);\n}\n/**\n * Polls the registration status of the provider that was registered. Polling happens at an interval of 30 seconds.\n * Polling will happen till the registrationState property of the response body is \"Registered\".\n * @param policy - The RPRegistrationPolicy this function is being called against.\n * @param url - The request url for polling\n * @param originalRequest - The original request sent by the user that returned a 409 response\n * with a message that the provider is not registered.\n * @returns True if RP Registration is successful.\n */\nasync function getRegistrationStatus(policy, url, originalRequest) {\n const reqOptions = getRequestEssentials(originalRequest);\n reqOptions.url = url;\n reqOptions.method = \"GET\";\n const res = await policy._nextPolicy.sendRequest(reqOptions);\n const obj = res.parsedBody;\n if (res.parsedBody && obj.registrationState && obj.registrationState === \"Registered\") {\n return true;\n }\n else {\n await coreUtil.delay(policy._retryTimeout * 1000);\n return getRegistrationStatus(policy, url, originalRequest);\n }\n}\n\n// Copyright (c) Microsoft Corporation.\n/**\n * Creates a policy that signs outgoing requests by calling to the provided `authenticationProvider`'s `signRequest` method.\n * @param authenticationProvider - The authentication provider.\n * @returns An instance of the {@link SigningPolicy}.\n */\nfunction signingPolicy(authenticationProvider) {\n return {\n create: (nextPolicy, options) => {\n return new SigningPolicy(nextPolicy, options, authenticationProvider);\n },\n };\n}\n/**\n * A policy that signs outgoing requests by calling to the provided `authenticationProvider`'s `signRequest` method.\n */\nclass SigningPolicy extends BaseRequestPolicy {\n constructor(nextPolicy, options, authenticationProvider) {\n super(nextPolicy, options);\n this.authenticationProvider = authenticationProvider;\n }\n signRequest(request) {\n return this.authenticationProvider.signRequest(request);\n }\n sendRequest(request) {\n return this.signRequest(request).then((nextRequest) => this._nextPolicy.sendRequest(nextRequest));\n }\n}\n\n// Copyright (c) Microsoft Corporation.\n/**\n * A policy that retries when there's a system error, identified by the codes \"ETIMEDOUT\", \"ESOCKETTIMEDOUT\", \"ECONNREFUSED\", \"ECONNRESET\" or \"ENOENT\".\n * @param retryCount - Maximum number of retries.\n * @param retryInterval - The client retry interval, in milliseconds.\n * @param minRetryInterval - The minimum retry interval, in milliseconds.\n * @param maxRetryInterval - The maximum retry interval, in milliseconds.\n * @returns An instance of the {@link SystemErrorRetryPolicy}\n */\nfunction systemErrorRetryPolicy(retryCount, retryInterval, minRetryInterval, maxRetryInterval) {\n return {\n create: (nextPolicy, options) => {\n return new SystemErrorRetryPolicy(nextPolicy, options, retryCount, retryInterval, minRetryInterval, maxRetryInterval);\n },\n };\n}\n/**\n * A policy that retries when there's a system error, identified by the codes \"ETIMEDOUT\", \"ESOCKETTIMEDOUT\", \"ECONNREFUSED\", \"ECONNRESET\" or \"ENOENT\".\n * @param retryCount - The client retry count.\n * @param retryInterval - The client retry interval, in milliseconds.\n * @param minRetryInterval - The minimum retry interval, in milliseconds.\n * @param maxRetryInterval - The maximum retry interval, in milliseconds.\n */\nclass SystemErrorRetryPolicy extends BaseRequestPolicy {\n constructor(nextPolicy, options, retryCount, retryInterval, minRetryInterval, maxRetryInterval) {\n super(nextPolicy, options);\n this.retryCount = isNumber(retryCount) ? retryCount : DEFAULT_CLIENT_RETRY_COUNT;\n this.retryInterval = isNumber(retryInterval) ? retryInterval : DEFAULT_CLIENT_RETRY_INTERVAL;\n this.minRetryInterval = isNumber(minRetryInterval)\n ? minRetryInterval\n : DEFAULT_CLIENT_MIN_RETRY_INTERVAL;\n this.maxRetryInterval = isNumber(maxRetryInterval)\n ? maxRetryInterval\n : DEFAULT_CLIENT_MAX_RETRY_INTERVAL;\n }\n sendRequest(request) {\n return this._nextPolicy\n .sendRequest(request.clone())\n .catch((error) => retry(this, request, error.response, error));\n }\n}\nasync function retry(policy, request, operationResponse, err, retryData) {\n retryData = updateRetryData(policy, retryData, err);\n function shouldPolicyRetry(_response, error) {\n if (error &&\n error.code &&\n (error.code === \"ETIMEDOUT\" ||\n error.code === \"ESOCKETTIMEDOUT\" ||\n error.code === \"ECONNREFUSED\" ||\n error.code === \"ECONNRESET\" ||\n error.code === \"ENOENT\")) {\n return true;\n }\n return false;\n }\n if (shouldRetry(policy.retryCount, shouldPolicyRetry, retryData, operationResponse, err)) {\n // If previous operation ended with an error and the policy allows a retry, do that\n try {\n await coreUtil.delay(retryData.retryInterval);\n return policy._nextPolicy.sendRequest(request.clone());\n }\n catch (nestedErr) {\n return retry(policy, request, operationResponse, nestedErr, retryData);\n }\n }\n else {\n if (err) {\n // If the operation failed in the end, return all errors instead of just the last one\n return Promise.reject(retryData.error);\n }\n return operationResponse;\n }\n}\n\n// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n/**\n * Maximum number of retries for the throttling retry policy\n */\nconst DEFAULT_CLIENT_MAX_RETRY_COUNT = 3;\n\n// Copyright (c) Microsoft Corporation.\nconst StatusCodes = Constants.HttpConstants.StatusCodes;\n/**\n * Creates a policy that re-sends the request if the response indicates the request failed because of throttling reasons.\n * For example, if the response contains a `Retry-After` header, it will retry sending the request based on the value of that header.\n *\n * To learn more, please refer to\n * https://docs.microsoft.com/en-us/azure/azure-resource-manager/resource-manager-request-limits,\n * https://docs.microsoft.com/en-us/azure/azure-subscription-service-limits and\n * https://docs.microsoft.com/en-us/azure/virtual-machines/troubleshooting/troubleshooting-throttling-errors\n * @returns\n */\nfunction throttlingRetryPolicy() {\n return {\n create: (nextPolicy, options) => {\n return new ThrottlingRetryPolicy(nextPolicy, options);\n },\n };\n}\nconst StandardAbortMessage = \"The operation was aborted.\";\n/**\n * Creates a policy that re-sends the request if the response indicates the request failed because of throttling reasons.\n * For example, if the response contains a `Retry-After` header, it will retry sending the request based on the value of that header.\n *\n * To learn more, please refer to\n * https://docs.microsoft.com/en-us/azure/azure-resource-manager/resource-manager-request-limits,\n * https://docs.microsoft.com/en-us/azure/azure-subscription-service-limits and\n * https://docs.microsoft.com/en-us/azure/virtual-machines/troubleshooting/troubleshooting-throttling-errors\n */\nclass ThrottlingRetryPolicy extends BaseRequestPolicy {\n constructor(nextPolicy, options, _handleResponse) {\n super(nextPolicy, options);\n this.numberOfRetries = 0;\n this._handleResponse = _handleResponse || this._defaultResponseHandler;\n }\n async sendRequest(httpRequest) {\n const response = await this._nextPolicy.sendRequest(httpRequest.clone());\n if (response.status !== StatusCodes.TooManyRequests &&\n response.status !== StatusCodes.ServiceUnavailable) {\n return response;\n }\n else {\n return this._handleResponse(httpRequest, response);\n }\n }\n async _defaultResponseHandler(httpRequest, httpResponse) {\n var _a;\n const retryAfterHeader = httpResponse.headers.get(Constants.HeaderConstants.RETRY_AFTER);\n if (retryAfterHeader) {\n const delayInMs = ThrottlingRetryPolicy.parseRetryAfterHeader(retryAfterHeader);\n if (delayInMs) {\n this.numberOfRetries += 1;\n await coreUtil.delay(delayInMs, {\n abortSignal: httpRequest.abortSignal,\n abortErrorMsg: StandardAbortMessage,\n });\n if ((_a = httpRequest.abortSignal) === null || _a === void 0 ? void 0 : _a.aborted) {\n throw new abortController.AbortError(StandardAbortMessage);\n }\n if (this.numberOfRetries < DEFAULT_CLIENT_MAX_RETRY_COUNT) {\n return this.sendRequest(httpRequest);\n }\n else {\n return this._nextPolicy.sendRequest(httpRequest);\n }\n }\n }\n return httpResponse;\n }\n static parseRetryAfterHeader(headerValue) {\n const retryAfterInSeconds = Number(headerValue);\n if (Number.isNaN(retryAfterInSeconds)) {\n return ThrottlingRetryPolicy.parseDateRetryAfterHeader(headerValue);\n }\n else {\n return retryAfterInSeconds * 1000;\n }\n }\n static parseDateRetryAfterHeader(headerValue) {\n try {\n const now = Date.now();\n const date = Date.parse(headerValue);\n const diff = date - now;\n return Number.isNaN(diff) ? undefined : diff;\n }\n catch (error) {\n return undefined;\n }\n }\n}\n\n// Copyright (c) Microsoft Corporation.\nconst createSpan = coreTracing.createSpanFunction({\n packagePrefix: \"\",\n namespace: \"\",\n});\n/**\n * Creates a policy that wraps outgoing requests with a tracing span.\n * @param tracingOptions - Tracing options.\n * @returns An instance of the {@link TracingPolicy} class.\n */\nfunction tracingPolicy(tracingOptions = {}) {\n return {\n create(nextPolicy, options) {\n return new TracingPolicy(nextPolicy, options, tracingOptions);\n },\n };\n}\n/**\n * A policy that wraps outgoing requests with a tracing span.\n */\nclass TracingPolicy extends BaseRequestPolicy {\n constructor(nextPolicy, options, tracingOptions) {\n super(nextPolicy, options);\n this.userAgent = tracingOptions.userAgent;\n }\n async sendRequest(request) {\n if (!request.tracingContext) {\n return this._nextPolicy.sendRequest(request);\n }\n const span = this.tryCreateSpan(request);\n if (!span) {\n return this._nextPolicy.sendRequest(request);\n }\n try {\n const response = await this._nextPolicy.sendRequest(request);\n this.tryProcessResponse(span, response);\n return response;\n }\n catch (err) {\n this.tryProcessError(span, err);\n throw err;\n }\n }\n tryCreateSpan(request) {\n var _a;\n try {\n // Passing spanOptions as part of tracingOptions to maintain compatibility @azure/core-tracing@preview.13 and earlier.\n // We can pass this as a separate parameter once we upgrade to the latest core-tracing.\n const { span } = createSpan(`HTTP ${request.method}`, {\n tracingOptions: {\n spanOptions: Object.assign(Object.assign({}, request.spanOptions), { kind: coreTracing.SpanKind.CLIENT }),\n tracingContext: request.tracingContext,\n },\n });\n // If the span is not recording, don't do any more work.\n if (!span.isRecording()) {\n span.end();\n return undefined;\n }\n const namespaceFromContext = (_a = request.tracingContext) === null || _a === void 0 ? void 0 : _a.getValue(Symbol.for(\"az.namespace\"));\n if (typeof namespaceFromContext === \"string\") {\n span.setAttribute(\"az.namespace\", namespaceFromContext);\n }\n span.setAttributes({\n \"http.method\": request.method,\n \"http.url\": request.url,\n requestId: request.requestId,\n });\n if (this.userAgent) {\n span.setAttribute(\"http.user_agent\", this.userAgent);\n }\n // set headers\n const spanContext = span.spanContext();\n const traceParentHeader = coreTracing.getTraceParentHeader(spanContext);\n if (traceParentHeader && coreTracing.isSpanContextValid(spanContext)) {\n request.headers.set(\"traceparent\", traceParentHeader);\n const traceState = spanContext.traceState && spanContext.traceState.serialize();\n // if tracestate is set, traceparent MUST be set, so only set tracestate after traceparent\n if (traceState) {\n request.headers.set(\"tracestate\", traceState);\n }\n }\n return span;\n }\n catch (error) {\n logger.warning(`Skipping creating a tracing span due to an error: ${error.message}`);\n return undefined;\n }\n }\n tryProcessError(span, err) {\n try {\n span.setStatus({\n code: coreTracing.SpanStatusCode.ERROR,\n message: err.message,\n });\n if (err.statusCode) {\n span.setAttribute(\"http.status_code\", err.statusCode);\n }\n span.end();\n }\n catch (error) {\n logger.warning(`Skipping tracing span processing due to an error: ${error.message}`);\n }\n }\n tryProcessResponse(span, response) {\n try {\n span.setAttribute(\"http.status_code\", response.status);\n const serviceRequestId = response.headers.get(\"x-ms-request-id\");\n if (serviceRequestId) {\n span.setAttribute(\"serviceRequestId\", serviceRequestId);\n }\n span.setStatus({\n code: coreTracing.SpanStatusCode.OK,\n });\n span.end();\n }\n catch (error) {\n logger.warning(`Skipping tracing span processing due to an error: ${error.message}`);\n }\n }\n}\n\n// Copyright (c) Microsoft Corporation.\n/**\n * ServiceClient sends service requests and receives responses.\n */\nclass ServiceClient {\n /**\n * The ServiceClient constructor\n * @param credentials - The credentials used for authentication with the service.\n * @param options - The service client options that govern the behavior of the client.\n */\n constructor(credentials, \n /* eslint-disable-next-line @azure/azure-sdk/ts-naming-options */\n options) {\n if (!options) {\n options = {};\n }\n this._withCredentials = options.withCredentials || false;\n this._httpClient = options.httpClient || getCachedDefaultHttpClient();\n this._requestPolicyOptions = new RequestPolicyOptions(options.httpPipelineLogger);\n let requestPolicyFactories;\n if (Array.isArray(options.requestPolicyFactories)) {\n logger.info(\"ServiceClient: using custom request policies\");\n requestPolicyFactories = options.requestPolicyFactories;\n }\n else {\n let authPolicyFactory = undefined;\n if (coreAuth.isTokenCredential(credentials)) {\n logger.info(\"ServiceClient: creating bearer token authentication policy from provided credentials\");\n // Create a wrapped RequestPolicyFactory here so that we can provide the\n // correct scope to the BearerTokenAuthenticationPolicy at the first time\n // one is requested. This is needed because generated ServiceClient\n // implementations do not set baseUri until after ServiceClient's constructor\n // is finished, leaving baseUri empty at the time when it is needed to\n // build the correct scope name.\n const wrappedPolicyFactory = () => {\n let bearerTokenPolicyFactory = undefined;\n // eslint-disable-next-line @typescript-eslint/no-this-alias\n const serviceClient = this;\n const serviceClientOptions = options;\n return {\n create(nextPolicy, createOptions) {\n const credentialScopes = getCredentialScopes(serviceClientOptions, serviceClient.baseUri);\n if (!credentialScopes) {\n throw new Error(`When using credential, the ServiceClient must contain a baseUri or a credentialScopes in ServiceClientOptions. Unable to create a bearerTokenAuthenticationPolicy`);\n }\n if (bearerTokenPolicyFactory === undefined || bearerTokenPolicyFactory === null) {\n bearerTokenPolicyFactory = bearerTokenAuthenticationPolicy(credentials, credentialScopes);\n }\n return bearerTokenPolicyFactory.create(nextPolicy, createOptions);\n },\n };\n };\n authPolicyFactory = wrappedPolicyFactory();\n }\n else if (credentials && typeof credentials.signRequest === \"function\") {\n logger.info(\"ServiceClient: creating signing policy from provided credentials\");\n authPolicyFactory = signingPolicy(credentials);\n }\n else if (credentials !== undefined && credentials !== null) {\n throw new Error(\"The credentials argument must implement the TokenCredential interface\");\n }\n logger.info(\"ServiceClient: using default request policies\");\n requestPolicyFactories = createDefaultRequestPolicyFactories(authPolicyFactory, options);\n if (options.requestPolicyFactories) {\n // options.requestPolicyFactories can also be a function that manipulates\n // the default requestPolicyFactories array\n const newRequestPolicyFactories = options.requestPolicyFactories(requestPolicyFactories);\n if (newRequestPolicyFactories) {\n requestPolicyFactories = newRequestPolicyFactories;\n }\n }\n }\n this._requestPolicyFactories = requestPolicyFactories;\n }\n /**\n * Send the provided httpRequest.\n */\n sendRequest(options) {\n if (options === null || options === undefined || typeof options !== \"object\") {\n throw new Error(\"options cannot be null or undefined and it must be of type object.\");\n }\n let httpRequest;\n try {\n if (isWebResourceLike(options)) {\n options.validateRequestProperties();\n httpRequest = options;\n }\n else {\n httpRequest = new WebResource();\n httpRequest = httpRequest.prepare(options);\n }\n }\n catch (error) {\n return Promise.reject(error);\n }\n let httpPipeline = this._httpClient;\n if (this._requestPolicyFactories && this._requestPolicyFactories.length > 0) {\n for (let i = this._requestPolicyFactories.length - 1; i >= 0; --i) {\n httpPipeline = this._requestPolicyFactories[i].create(httpPipeline, this._requestPolicyOptions);\n }\n }\n return httpPipeline.sendRequest(httpRequest);\n }\n /**\n * Send an HTTP request that is populated using the provided OperationSpec.\n * @param operationArguments - The arguments that the HTTP request's templated values will be populated from.\n * @param operationSpec - The OperationSpec to use to populate the httpRequest.\n * @param callback - The callback to call when the response is received.\n */\n async sendOperationRequest(operationArguments, operationSpec, callback) {\n var _a;\n if (typeof operationArguments.options === \"function\") {\n callback = operationArguments.options;\n operationArguments.options = undefined;\n }\n const serializerOptions = (_a = operationArguments.options) === null || _a === void 0 ? void 0 : _a.serializerOptions;\n const httpRequest = new WebResource();\n let result;\n try {\n const baseUri = operationSpec.baseUrl || this.baseUri;\n if (!baseUri) {\n throw new Error(\"If operationSpec.baseUrl is not specified, then the ServiceClient must have a baseUri string property that contains the base URL to use.\");\n }\n httpRequest.method = operationSpec.httpMethod;\n httpRequest.operationSpec = operationSpec;\n const requestUrl = URLBuilder.parse(baseUri);\n if (operationSpec.path) {\n requestUrl.appendPath(operationSpec.path);\n }\n if (operationSpec.urlParameters && operationSpec.urlParameters.length > 0) {\n for (const urlParameter of operationSpec.urlParameters) {\n let urlParameterValue = getOperationArgumentValueFromParameter(this, operationArguments, urlParameter, operationSpec.serializer);\n urlParameterValue = operationSpec.serializer.serialize(urlParameter.mapper, urlParameterValue, getPathStringFromParameter(urlParameter), serializerOptions);\n if (!urlParameter.skipEncoding) {\n urlParameterValue = encodeURIComponent(urlParameterValue);\n }\n requestUrl.replaceAll(`{${urlParameter.mapper.serializedName || getPathStringFromParameter(urlParameter)}}`, urlParameterValue);\n }\n }\n if (operationSpec.queryParameters && operationSpec.queryParameters.length > 0) {\n for (const queryParameter of operationSpec.queryParameters) {\n let queryParameterValue = getOperationArgumentValueFromParameter(this, operationArguments, queryParameter, operationSpec.serializer);\n if (queryParameterValue !== undefined && queryParameterValue !== null) {\n queryParameterValue = operationSpec.serializer.serialize(queryParameter.mapper, queryParameterValue, getPathStringFromParameter(queryParameter), serializerOptions);\n if (queryParameter.collectionFormat !== undefined &&\n queryParameter.collectionFormat !== null) {\n if (queryParameter.collectionFormat === exports.QueryCollectionFormat.Multi) {\n if (queryParameterValue.length === 0) {\n // The collection is empty, no need to try serializing the current queryParam\n continue;\n }\n else {\n for (const index in queryParameterValue) {\n const item = queryParameterValue[index];\n queryParameterValue[index] =\n item === undefined || item === null ? \"\" : item.toString();\n }\n }\n }\n else if (queryParameter.collectionFormat === exports.QueryCollectionFormat.Ssv ||\n queryParameter.collectionFormat === exports.QueryCollectionFormat.Tsv) {\n queryParameterValue = queryParameterValue.join(queryParameter.collectionFormat);\n }\n }\n if (!queryParameter.skipEncoding) {\n if (Array.isArray(queryParameterValue)) {\n for (const index in queryParameterValue) {\n if (queryParameterValue[index] !== undefined &&\n queryParameterValue[index] !== null) {\n queryParameterValue[index] = encodeURIComponent(queryParameterValue[index]);\n }\n }\n }\n else {\n queryParameterValue = encodeURIComponent(queryParameterValue);\n }\n }\n if (queryParameter.collectionFormat !== undefined &&\n queryParameter.collectionFormat !== null &&\n queryParameter.collectionFormat !== exports.QueryCollectionFormat.Multi &&\n queryParameter.collectionFormat !== exports.QueryCollectionFormat.Ssv &&\n queryParameter.collectionFormat !== exports.QueryCollectionFormat.Tsv) {\n queryParameterValue = queryParameterValue.join(queryParameter.collectionFormat);\n }\n requestUrl.setQueryParameter(queryParameter.mapper.serializedName || getPathStringFromParameter(queryParameter), queryParameterValue);\n }\n }\n }\n httpRequest.url = requestUrl.toString();\n const contentType = operationSpec.contentType || this.requestContentType;\n if (contentType && operationSpec.requestBody) {\n httpRequest.headers.set(\"Content-Type\", contentType);\n }\n if (operationSpec.headerParameters) {\n for (const headerParameter of operationSpec.headerParameters) {\n let headerValue = getOperationArgumentValueFromParameter(this, operationArguments, headerParameter, operationSpec.serializer);\n if (headerValue !== undefined && headerValue !== null) {\n headerValue = operationSpec.serializer.serialize(headerParameter.mapper, headerValue, getPathStringFromParameter(headerParameter), serializerOptions);\n const headerCollectionPrefix = headerParameter.mapper\n .headerCollectionPrefix;\n if (headerCollectionPrefix) {\n for (const key of Object.keys(headerValue)) {\n httpRequest.headers.set(headerCollectionPrefix + key, headerValue[key]);\n }\n }\n else {\n httpRequest.headers.set(headerParameter.mapper.serializedName ||\n getPathStringFromParameter(headerParameter), headerValue);\n }\n }\n }\n }\n const options = operationArguments.options;\n if (options) {\n if (options.customHeaders) {\n for (const customHeaderName in options.customHeaders) {\n httpRequest.headers.set(customHeaderName, options.customHeaders[customHeaderName]);\n }\n }\n if (options.abortSignal) {\n httpRequest.abortSignal = options.abortSignal;\n }\n if (options.timeout) {\n httpRequest.timeout = options.timeout;\n }\n if (options.onUploadProgress) {\n httpRequest.onUploadProgress = options.onUploadProgress;\n }\n if (options.onDownloadProgress) {\n httpRequest.onDownloadProgress = options.onDownloadProgress;\n }\n if (options.spanOptions) {\n // By passing spanOptions if they exist at runtime, we're backwards compatible with @azure/core-tracing@preview.13 and earlier.\n httpRequest.spanOptions = options.spanOptions;\n }\n if (options.tracingContext) {\n httpRequest.tracingContext = options.tracingContext;\n }\n if (options.shouldDeserialize !== undefined && options.shouldDeserialize !== null) {\n httpRequest.shouldDeserialize = options.shouldDeserialize;\n }\n }\n httpRequest.withCredentials = this._withCredentials;\n serializeRequestBody(this, httpRequest, operationArguments, operationSpec);\n if (httpRequest.streamResponseStatusCodes === undefined) {\n httpRequest.streamResponseStatusCodes = getStreamResponseStatusCodes(operationSpec);\n }\n let rawResponse;\n let sendRequestError;\n try {\n rawResponse = await this.sendRequest(httpRequest);\n }\n catch (error) {\n sendRequestError = error;\n }\n if (sendRequestError) {\n if (sendRequestError.response) {\n sendRequestError.details = flattenResponse(sendRequestError.response, operationSpec.responses[sendRequestError.statusCode] ||\n operationSpec.responses[\"default\"]);\n }\n result = Promise.reject(sendRequestError);\n }\n else {\n result = Promise.resolve(flattenResponse(rawResponse, operationSpec.responses[rawResponse.status]));\n }\n }\n catch (error) {\n result = Promise.reject(error);\n }\n const cb = callback;\n if (cb) {\n result\n .then((res) => cb(null, res._response.parsedBody, res._response.request, res._response))\n .catch((err) => cb(err));\n }\n return result;\n }\n}\nfunction serializeRequestBody(serviceClient, httpRequest, operationArguments, operationSpec) {\n var _a, _b, _c, _d, _e, _f;\n const serializerOptions = (_b = (_a = operationArguments.options) === null || _a === void 0 ? void 0 : _a.serializerOptions) !== null && _b !== void 0 ? _b : {};\n const updatedOptions = {\n rootName: (_c = serializerOptions.rootName) !== null && _c !== void 0 ? _c : \"\",\n includeRoot: (_d = serializerOptions.includeRoot) !== null && _d !== void 0 ? _d : false,\n xmlCharKey: (_e = serializerOptions.xmlCharKey) !== null && _e !== void 0 ? _e : XML_CHARKEY,\n };\n const xmlCharKey = serializerOptions.xmlCharKey;\n if (operationSpec.requestBody && operationSpec.requestBody.mapper) {\n httpRequest.body = getOperationArgumentValueFromParameter(serviceClient, operationArguments, operationSpec.requestBody, operationSpec.serializer);\n const bodyMapper = operationSpec.requestBody.mapper;\n const { required, xmlName, xmlElementName, serializedName, xmlNamespace, xmlNamespacePrefix } = bodyMapper;\n const typeName = bodyMapper.type.name;\n try {\n if ((httpRequest.body !== undefined && httpRequest.body !== null) || required) {\n const requestBodyParameterPathString = getPathStringFromParameter(operationSpec.requestBody);\n httpRequest.body = operationSpec.serializer.serialize(bodyMapper, httpRequest.body, requestBodyParameterPathString, updatedOptions);\n const isStream = typeName === MapperType.Stream;\n if (operationSpec.isXML) {\n const xmlnsKey = xmlNamespacePrefix ? `xmlns:${xmlNamespacePrefix}` : \"xmlns\";\n const value = getXmlValueWithNamespace(xmlNamespace, xmlnsKey, typeName, httpRequest.body, updatedOptions);\n if (typeName === MapperType.Sequence) {\n httpRequest.body = stringifyXML(prepareXMLRootList(value, xmlElementName || xmlName || serializedName, xmlnsKey, xmlNamespace), {\n rootName: xmlName || serializedName,\n xmlCharKey,\n });\n }\n else if (!isStream) {\n httpRequest.body = stringifyXML(value, {\n rootName: xmlName || serializedName,\n xmlCharKey,\n });\n }\n }\n else if (typeName === MapperType.String &&\n (((_f = operationSpec.contentType) === null || _f === void 0 ? void 0 : _f.match(\"text/plain\")) || operationSpec.mediaType === \"text\")) {\n // the String serializer has validated that request body is a string\n // so just send the string.\n return;\n }\n else if (!isStream) {\n httpRequest.body = JSON.stringify(httpRequest.body);\n }\n }\n }\n catch (error) {\n throw new Error(`Error \"${error.message}\" occurred in serializing the payload - ${JSON.stringify(serializedName, undefined, \" \")}.`);\n }\n }\n else if (operationSpec.formDataParameters && operationSpec.formDataParameters.length > 0) {\n httpRequest.formData = {};\n for (const formDataParameter of operationSpec.formDataParameters) {\n const formDataParameterValue = getOperationArgumentValueFromParameter(serviceClient, operationArguments, formDataParameter, operationSpec.serializer);\n if (formDataParameterValue !== undefined && formDataParameterValue !== null) {\n const formDataParameterPropertyName = formDataParameter.mapper.serializedName || getPathStringFromParameter(formDataParameter);\n httpRequest.formData[formDataParameterPropertyName] = operationSpec.serializer.serialize(formDataParameter.mapper, formDataParameterValue, getPathStringFromParameter(formDataParameter), updatedOptions);\n }\n }\n }\n}\n/**\n * Adds an xml namespace to the xml serialized object if needed, otherwise it just returns the value itself\n */\nfunction getXmlValueWithNamespace(xmlNamespace, xmlnsKey, typeName, serializedValue, options) {\n // Composite and Sequence schemas already got their root namespace set during serialization\n // We just need to add xmlns to the other schema types\n if (xmlNamespace && ![\"Composite\", \"Sequence\", \"Dictionary\"].includes(typeName)) {\n const result = {};\n result[options.xmlCharKey] = serializedValue;\n result[XML_ATTRKEY] = { [xmlnsKey]: xmlNamespace };\n return result;\n }\n return serializedValue;\n}\nfunction getValueOrFunctionResult(value, defaultValueCreator) {\n let result;\n if (typeof value === \"string\") {\n result = value;\n }\n else {\n result = defaultValueCreator();\n if (typeof value === \"function\") {\n result = value(result);\n }\n }\n return result;\n}\nfunction createDefaultRequestPolicyFactories(authPolicyFactory, options) {\n const factories = [];\n if (options.generateClientRequestIdHeader) {\n factories.push(generateClientRequestIdPolicy(options.clientRequestIdHeaderName));\n }\n if (authPolicyFactory) {\n factories.push(authPolicyFactory);\n }\n const userAgentHeaderName = getValueOrFunctionResult(options.userAgentHeaderName, getDefaultUserAgentHeaderName);\n const userAgentHeaderValue = getValueOrFunctionResult(options.userAgent, getDefaultUserAgentValue);\n if (userAgentHeaderName && userAgentHeaderValue) {\n factories.push(userAgentPolicy({ key: userAgentHeaderName, value: userAgentHeaderValue }));\n }\n factories.push(redirectPolicy());\n factories.push(rpRegistrationPolicy(options.rpRegistrationRetryTimeout));\n if (!options.noRetryPolicy) {\n factories.push(exponentialRetryPolicy());\n factories.push(systemErrorRetryPolicy());\n factories.push(throttlingRetryPolicy());\n }\n factories.push(deserializationPolicy(options.deserializationContentTypes));\n if (isNode) {\n factories.push(proxyPolicy(options.proxySettings));\n }\n factories.push(logPolicy({ logger: logger.info }));\n return factories;\n}\n/**\n * Creates an HTTP pipeline based on the given options.\n * @param pipelineOptions - Defines options that are used to configure policies in the HTTP pipeline for an SDK client.\n * @param authPolicyFactory - An optional authentication policy factory to use for signing requests.\n * @returns A set of options that can be passed to create a new {@link ServiceClient}.\n */\nfunction createPipelineFromOptions(pipelineOptions, authPolicyFactory) {\n const requestPolicyFactories = [];\n if (pipelineOptions.sendStreamingJson) {\n requestPolicyFactories.push(ndJsonPolicy());\n }\n let userAgentValue = undefined;\n if (pipelineOptions.userAgentOptions && pipelineOptions.userAgentOptions.userAgentPrefix) {\n const userAgentInfo = [];\n userAgentInfo.push(pipelineOptions.userAgentOptions.userAgentPrefix);\n // Add the default user agent value if it isn't already specified\n // by the userAgentPrefix option.\n const defaultUserAgentInfo = getDefaultUserAgentValue();\n if (userAgentInfo.indexOf(defaultUserAgentInfo) === -1) {\n userAgentInfo.push(defaultUserAgentInfo);\n }\n userAgentValue = userAgentInfo.join(\" \");\n }\n const keepAliveOptions = Object.assign(Object.assign({}, DefaultKeepAliveOptions), pipelineOptions.keepAliveOptions);\n const retryOptions = Object.assign(Object.assign({}, DefaultRetryOptions), pipelineOptions.retryOptions);\n const redirectOptions = Object.assign(Object.assign({}, DefaultRedirectOptions), pipelineOptions.redirectOptions);\n if (isNode) {\n requestPolicyFactories.push(proxyPolicy(pipelineOptions.proxyOptions));\n }\n const deserializationOptions = Object.assign(Object.assign({}, DefaultDeserializationOptions), pipelineOptions.deserializationOptions);\n const loggingOptions = Object.assign({}, pipelineOptions.loggingOptions);\n requestPolicyFactories.push(tracingPolicy({ userAgent: userAgentValue }), keepAlivePolicy(keepAliveOptions), userAgentPolicy({ value: userAgentValue }), generateClientRequestIdPolicy(), deserializationPolicy(deserializationOptions.expectedContentTypes), throttlingRetryPolicy(), systemErrorRetryPolicy(), exponentialRetryPolicy(retryOptions.maxRetries, retryOptions.retryDelayInMs, retryOptions.maxRetryDelayInMs));\n if (redirectOptions.handleRedirects) {\n requestPolicyFactories.push(redirectPolicy(redirectOptions.maxRetries));\n }\n if (authPolicyFactory) {\n requestPolicyFactories.push(authPolicyFactory);\n }\n requestPolicyFactories.push(logPolicy(loggingOptions));\n if (isNode && pipelineOptions.decompressResponse === false) {\n requestPolicyFactories.push(disableResponseDecompressionPolicy());\n }\n return {\n httpClient: pipelineOptions.httpClient,\n requestPolicyFactories,\n };\n}\nfunction getOperationArgumentValueFromParameter(serviceClient, operationArguments, parameter, serializer) {\n return getOperationArgumentValueFromParameterPath(serviceClient, operationArguments, parameter.parameterPath, parameter.mapper, serializer);\n}\nfunction getOperationArgumentValueFromParameterPath(serviceClient, operationArguments, parameterPath, parameterMapper, serializer) {\n var _a;\n let value;\n if (typeof parameterPath === \"string\") {\n parameterPath = [parameterPath];\n }\n const serializerOptions = (_a = operationArguments.options) === null || _a === void 0 ? void 0 : _a.serializerOptions;\n if (Array.isArray(parameterPath)) {\n if (parameterPath.length > 0) {\n if (parameterMapper.isConstant) {\n value = parameterMapper.defaultValue;\n }\n else {\n let propertySearchResult = getPropertyFromParameterPath(operationArguments, parameterPath);\n if (!propertySearchResult.propertyFound) {\n propertySearchResult = getPropertyFromParameterPath(serviceClient, parameterPath);\n }\n let useDefaultValue = false;\n if (!propertySearchResult.propertyFound) {\n useDefaultValue =\n parameterMapper.required ||\n (parameterPath[0] === \"options\" && parameterPath.length === 2);\n }\n value = useDefaultValue ? parameterMapper.defaultValue : propertySearchResult.propertyValue;\n }\n // Serialize just for validation purposes.\n const parameterPathString = getPathStringFromParameterPath(parameterPath, parameterMapper);\n serializer.serialize(parameterMapper, value, parameterPathString, serializerOptions);\n }\n }\n else {\n if (parameterMapper.required) {\n value = {};\n }\n for (const propertyName in parameterPath) {\n const propertyMapper = parameterMapper.type.modelProperties[propertyName];\n const propertyPath = parameterPath[propertyName];\n const propertyValue = getOperationArgumentValueFromParameterPath(serviceClient, operationArguments, propertyPath, propertyMapper, serializer);\n // Serialize just for validation purposes.\n const propertyPathString = getPathStringFromParameterPath(propertyPath, propertyMapper);\n serializer.serialize(propertyMapper, propertyValue, propertyPathString, serializerOptions);\n if (propertyValue !== undefined && propertyValue !== null) {\n if (!value) {\n value = {};\n }\n value[propertyName] = propertyValue;\n }\n }\n }\n return value;\n}\nfunction getPropertyFromParameterPath(parent, parameterPath) {\n const result = { propertyFound: false };\n let i = 0;\n for (; i < parameterPath.length; ++i) {\n const parameterPathPart = parameterPath[i];\n // Make sure to check inherited properties too, so don't use hasOwnProperty().\n if (parent !== undefined && parent !== null && parameterPathPart in parent) {\n parent = parent[parameterPathPart];\n }\n else {\n break;\n }\n }\n if (i === parameterPath.length) {\n result.propertyValue = parent;\n result.propertyFound = true;\n }\n return result;\n}\n/**\n * Parses an {@link HttpOperationResponse} into a normalized HTTP response object ({@link RestResponse}).\n * @param _response - Wrapper object for http response.\n * @param responseSpec - Mappers for how to parse the response properties.\n * @returns - A normalized response object.\n */\nfunction flattenResponse(_response, responseSpec) {\n const parsedHeaders = _response.parsedHeaders;\n const bodyMapper = responseSpec && responseSpec.bodyMapper;\n const addOperationResponse = (obj) => {\n return Object.defineProperty(obj, \"_response\", {\n value: _response,\n });\n };\n if (bodyMapper) {\n const typeName = bodyMapper.type.name;\n if (typeName === \"Stream\") {\n return addOperationResponse(Object.assign(Object.assign({}, parsedHeaders), { blobBody: _response.blobBody, readableStreamBody: _response.readableStreamBody }));\n }\n const modelProperties = (typeName === \"Composite\" && bodyMapper.type.modelProperties) || {};\n const isPageableResponse = Object.keys(modelProperties).some((k) => modelProperties[k].serializedName === \"\");\n if (typeName === \"Sequence\" || isPageableResponse) {\n const arrayResponse = [...(_response.parsedBody || [])];\n for (const key of Object.keys(modelProperties)) {\n if (modelProperties[key].serializedName) {\n arrayResponse[key] = _response.parsedBody[key];\n }\n }\n if (parsedHeaders) {\n for (const key of Object.keys(parsedHeaders)) {\n arrayResponse[key] = parsedHeaders[key];\n }\n }\n addOperationResponse(arrayResponse);\n return arrayResponse;\n }\n if (typeName === \"Composite\" || typeName === \"Dictionary\") {\n return addOperationResponse(Object.assign(Object.assign({}, parsedHeaders), _response.parsedBody));\n }\n }\n if (bodyMapper ||\n _response.request.method === \"HEAD\" ||\n isPrimitiveType(_response.parsedBody)) {\n // primitive body types and HEAD booleans\n return addOperationResponse(Object.assign(Object.assign({}, parsedHeaders), { body: _response.parsedBody }));\n }\n return addOperationResponse(Object.assign(Object.assign({}, parsedHeaders), _response.parsedBody));\n}\nfunction getCredentialScopes(options, baseUri) {\n if (options === null || options === void 0 ? void 0 : options.credentialScopes) {\n const scopes = options.credentialScopes;\n return Array.isArray(scopes)\n ? scopes.map((scope) => new URL(scope).toString())\n : new URL(scopes).toString();\n }\n if (baseUri) {\n return `${baseUri}/.default`;\n }\n return undefined;\n}\n\n// Copyright (c) Microsoft Corporation.\n/**\n * This function is only here for compatibility. Use createSpanFunction in core-tracing.\n *\n * @deprecated This function is only here for compatibility. Use createSpanFunction in core-tracing.\n * @hidden\n\n * @param spanConfig - The name of the operation being performed.\n * @param tracingOptions - The options for the underlying http request.\n */\nfunction createSpanFunction(args) {\n return coreTracing.createSpanFunction(args);\n}\n\n// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n/**\n * Defines the default token refresh buffer duration.\n */\nconst TokenRefreshBufferMs = 2 * 60 * 1000; // 2 Minutes\n/**\n * Provides an {@link AccessTokenCache} implementation which clears\n * the cached {@link AccessToken}'s after the expiresOnTimestamp has\n * passed.\n *\n * @deprecated No longer used in the bearer authorization policy.\n */\nclass ExpiringAccessTokenCache {\n /**\n * Constructs an instance of {@link ExpiringAccessTokenCache} with\n * an optional expiration buffer time.\n */\n constructor(tokenRefreshBufferMs = TokenRefreshBufferMs) {\n this.cachedToken = undefined;\n this.tokenRefreshBufferMs = tokenRefreshBufferMs;\n }\n /**\n * Saves an access token into the internal in-memory cache.\n * @param accessToken - Access token or undefined to clear the cache.\n */\n setCachedToken(accessToken) {\n this.cachedToken = accessToken;\n }\n /**\n * Returns the cached access token, or `undefined` if one is not cached or the cached one is expiring soon.\n */\n getCachedToken() {\n if (this.cachedToken &&\n Date.now() + this.tokenRefreshBufferMs >= this.cachedToken.expiresOnTimestamp) {\n this.cachedToken = undefined;\n }\n return this.cachedToken;\n }\n}\n\n// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n/**\n * Helps the core-http token authentication policies with requesting a new token if we're not currently waiting for a new token.\n *\n * @deprecated No longer used in the bearer authorization policy.\n */\nclass AccessTokenRefresher {\n constructor(credential, scopes, requiredMillisecondsBeforeNewRefresh = 30000) {\n this.credential = credential;\n this.scopes = scopes;\n this.requiredMillisecondsBeforeNewRefresh = requiredMillisecondsBeforeNewRefresh;\n this.lastCalled = 0;\n }\n /**\n * Returns true if the required milliseconds(defaulted to 30000) have been passed signifying\n * that we are ready for a new refresh.\n */\n isReady() {\n // We're only ready for a new refresh if the required milliseconds have passed.\n return (!this.lastCalled || Date.now() - this.lastCalled > this.requiredMillisecondsBeforeNewRefresh);\n }\n /**\n * Stores the time in which it is called,\n * then requests a new token,\n * then sets this.promise to undefined,\n * then returns the token.\n */\n async getToken(options) {\n this.lastCalled = Date.now();\n const token = await this.credential.getToken(this.scopes, options);\n this.promise = undefined;\n return token || undefined;\n }\n /**\n * Requests a new token if we're not currently waiting for a new token.\n * Returns null if the required time between each call hasn't been reached.\n */\n refresh(options) {\n if (!this.promise) {\n this.promise = this.getToken(options);\n }\n return this.promise;\n }\n}\n\n// Copyright (c) Microsoft Corporation.\nconst HeaderConstants = Constants.HeaderConstants;\nconst DEFAULT_AUTHORIZATION_SCHEME = \"Basic\";\n/**\n * A simple {@link ServiceClientCredential} that authenticates with a username and a password.\n */\nclass BasicAuthenticationCredentials {\n /**\n * Creates a new BasicAuthenticationCredentials object.\n *\n * @param userName - User name.\n * @param password - Password.\n * @param authorizationScheme - The authorization scheme.\n */\n constructor(userName, password, authorizationScheme = DEFAULT_AUTHORIZATION_SCHEME) {\n /**\n * Authorization scheme. Defaults to \"Basic\".\n * More information about authorization schemes is available here: https://developer.mozilla.org/docs/Web/HTTP/Authentication#authentication_schemes\n */\n this.authorizationScheme = DEFAULT_AUTHORIZATION_SCHEME;\n if (userName === null || userName === undefined || typeof userName.valueOf() !== \"string\") {\n throw new Error(\"userName cannot be null or undefined and must be of type string.\");\n }\n if (password === null || password === undefined || typeof password.valueOf() !== \"string\") {\n throw new Error(\"password cannot be null or undefined and must be of type string.\");\n }\n this.userName = userName;\n this.password = password;\n this.authorizationScheme = authorizationScheme;\n }\n /**\n * Signs a request with the Authentication header.\n *\n * @param webResource - The WebResourceLike to be signed.\n * @returns The signed request object.\n */\n signRequest(webResource) {\n const credentials = `${this.userName}:${this.password}`;\n const encodedCredentials = `${this.authorizationScheme} ${encodeString(credentials)}`;\n if (!webResource.headers)\n webResource.headers = new HttpHeaders();\n webResource.headers.set(HeaderConstants.AUTHORIZATION, encodedCredentials);\n return Promise.resolve(webResource);\n }\n}\n\n// Copyright (c) Microsoft Corporation.\n/**\n * Authenticates to a service using an API key.\n */\nclass ApiKeyCredentials {\n /**\n * @param options - Specifies the options to be provided for auth. Either header or query needs to be provided.\n */\n constructor(options) {\n if (!options || (options && !options.inHeader && !options.inQuery)) {\n throw new Error(`options cannot be null or undefined. Either \"inHeader\" or \"inQuery\" property of the options object needs to be provided.`);\n }\n this.inHeader = options.inHeader;\n this.inQuery = options.inQuery;\n }\n /**\n * Signs a request with the values provided in the inHeader and inQuery parameter.\n *\n * @param webResource - The WebResourceLike to be signed.\n * @returns The signed request object.\n */\n signRequest(webResource) {\n if (!webResource) {\n return Promise.reject(new Error(`webResource cannot be null or undefined and must be of type \"object\".`));\n }\n if (this.inHeader) {\n if (!webResource.headers) {\n webResource.headers = new HttpHeaders();\n }\n for (const headerName in this.inHeader) {\n webResource.headers.set(headerName, this.inHeader[headerName]);\n }\n }\n if (this.inQuery) {\n if (!webResource.url) {\n return Promise.reject(new Error(`url cannot be null in the request object.`));\n }\n if (webResource.url.indexOf(\"?\") < 0) {\n webResource.url += \"?\";\n }\n for (const key in this.inQuery) {\n if (!webResource.url.endsWith(\"?\")) {\n webResource.url += \"&\";\n }\n webResource.url += `${key}=${this.inQuery[key]}`;\n }\n }\n return Promise.resolve(webResource);\n }\n}\n\n// Copyright (c) Microsoft Corporation.\n/**\n * A {@link TopicCredentials} object used for Azure Event Grid.\n */\nclass TopicCredentials extends ApiKeyCredentials {\n /**\n * Creates a new EventGrid TopicCredentials object.\n *\n * @param topicKey - The EventGrid topic key\n */\n constructor(topicKey) {\n if (!topicKey || (topicKey && typeof topicKey !== \"string\")) {\n throw new Error(\"topicKey cannot be null or undefined and must be of type string.\");\n }\n const options = {\n inHeader: {\n \"aeg-sas-key\": topicKey,\n },\n };\n super(options);\n }\n}\n\nObject.defineProperty(exports, 'delay', {\n enumerable: true,\n get: function () { return coreUtil.delay; }\n});\nObject.defineProperty(exports, 'isTokenCredential', {\n enumerable: true,\n get: function () { return coreAuth.isTokenCredential; }\n});\nexports.AccessTokenRefresher = AccessTokenRefresher;\nexports.ApiKeyCredentials = ApiKeyCredentials;\nexports.BaseRequestPolicy = BaseRequestPolicy;\nexports.BasicAuthenticationCredentials = BasicAuthenticationCredentials;\nexports.Constants = Constants;\nexports.DefaultHttpClient = NodeFetchHttpClient;\nexports.ExpiringAccessTokenCache = ExpiringAccessTokenCache;\nexports.HttpHeaders = HttpHeaders;\nexports.MapperType = MapperType;\nexports.RequestPolicyOptions = RequestPolicyOptions;\nexports.RestError = RestError;\nexports.Serializer = Serializer;\nexports.ServiceClient = ServiceClient;\nexports.TopicCredentials = TopicCredentials;\nexports.URLBuilder = URLBuilder;\nexports.URLQuery = URLQuery;\nexports.WebResource = WebResource;\nexports.XML_ATTRKEY = XML_ATTRKEY;\nexports.XML_CHARKEY = XML_CHARKEY;\nexports.applyMixins = applyMixins;\nexports.bearerTokenAuthenticationPolicy = bearerTokenAuthenticationPolicy;\nexports.createPipelineFromOptions = createPipelineFromOptions;\nexports.createSpanFunction = createSpanFunction;\nexports.deserializationPolicy = deserializationPolicy;\nexports.deserializeResponseBody = deserializeResponseBody;\nexports.disableResponseDecompressionPolicy = disableResponseDecompressionPolicy;\nexports.encodeUri = encodeUri;\nexports.executePromisesSequentially = executePromisesSequentially;\nexports.exponentialRetryPolicy = exponentialRetryPolicy;\nexports.flattenResponse = flattenResponse;\nexports.generateClientRequestIdPolicy = generateClientRequestIdPolicy;\nexports.generateUuid = generateUuid;\nexports.getDefaultProxySettings = getDefaultProxySettings;\nexports.getDefaultUserAgentValue = getDefaultUserAgentValue;\nexports.isDuration = isDuration;\nexports.isNode = isNode;\nexports.isValidUuid = isValidUuid;\nexports.keepAlivePolicy = keepAlivePolicy;\nexports.logPolicy = logPolicy;\nexports.operationOptionsToRequestOptionsBase = operationOptionsToRequestOptionsBase;\nexports.parseXML = parseXML;\nexports.promiseToCallback = promiseToCallback;\nexports.promiseToServiceCallback = promiseToServiceCallback;\nexports.proxyPolicy = proxyPolicy;\nexports.redirectPolicy = redirectPolicy;\nexports.serializeObject = serializeObject;\nexports.signingPolicy = signingPolicy;\nexports.stringifyXML = stringifyXML;\nexports.stripRequest = stripRequest;\nexports.stripResponse = stripResponse;\nexports.systemErrorRetryPolicy = systemErrorRetryPolicy;\nexports.throttlingRetryPolicy = throttlingRetryPolicy;\nexports.tracingPolicy = tracingPolicy;\nexports.userAgentPolicy = userAgentPolicy;\n//# sourceMappingURL=index.js.map\n","var CombinedStream = require('combined-stream');\nvar util = require('util');\nvar path = require('path');\nvar http = require('http');\nvar https = require('https');\nvar parseUrl = require('url').parse;\nvar fs = require('fs');\nvar Stream = require('stream').Stream;\nvar mime = require('mime-types');\nvar asynckit = require('asynckit');\nvar populate = require('./populate.js');\n\n// Public API\nmodule.exports = FormData;\n\n// make it a Stream\nutil.inherits(FormData, CombinedStream);\n\n/**\n * Create readable \"multipart/form-data\" streams.\n * Can be used to submit forms\n * and file uploads to other web applications.\n *\n * @constructor\n * @param {Object} options - Properties to be added/overriden for FormData and CombinedStream\n */\nfunction FormData(options) {\n if (!(this instanceof FormData)) {\n return new FormData(options);\n }\n\n this._overheadLength = 0;\n this._valueLength = 0;\n this._valuesToMeasure = [];\n\n CombinedStream.call(this);\n\n options = options || {};\n for (var option in options) {\n this[option] = options[option];\n }\n}\n\nFormData.LINE_BREAK = '\\r\\n';\nFormData.DEFAULT_CONTENT_TYPE = 'application/octet-stream';\n\nFormData.prototype.append = function(field, value, options) {\n\n options = options || {};\n\n // allow filename as single option\n if (typeof options == 'string') {\n options = {filename: options};\n }\n\n var append = CombinedStream.prototype.append.bind(this);\n\n // all that streamy business can't handle numbers\n if (typeof value == 'number') {\n value = '' + value;\n }\n\n // https://github.com/felixge/node-form-data/issues/38\n if (util.isArray(value)) {\n // Please convert your array into string\n // the way web server expects it\n this._error(new Error('Arrays are not supported.'));\n return;\n }\n\n var header = this._multiPartHeader(field, value, options);\n var footer = this._multiPartFooter();\n\n append(header);\n append(value);\n append(footer);\n\n // pass along options.knownLength\n this._trackLength(header, value, options);\n};\n\nFormData.prototype._trackLength = function(header, value, options) {\n var valueLength = 0;\n\n // used w/ getLengthSync(), when length is known.\n // e.g. for streaming directly from a remote server,\n // w/ a known file a size, and not wanting to wait for\n // incoming file to finish to get its size.\n if (options.knownLength != null) {\n valueLength += +options.knownLength;\n } else if (Buffer.isBuffer(value)) {\n valueLength = value.length;\n } else if (typeof value === 'string') {\n valueLength = Buffer.byteLength(value);\n }\n\n this._valueLength += valueLength;\n\n // @check why add CRLF? does this account for custom/multiple CRLFs?\n this._overheadLength +=\n Buffer.byteLength(header) +\n FormData.LINE_BREAK.length;\n\n // empty or either doesn't have path or not an http response or not a stream\n if (!value || ( !value.path && !(value.readable && value.hasOwnProperty('httpVersion')) && !(value instanceof Stream))) {\n return;\n }\n\n // no need to bother with the length\n if (!options.knownLength) {\n this._valuesToMeasure.push(value);\n }\n};\n\nFormData.prototype._lengthRetriever = function(value, callback) {\n\n if (value.hasOwnProperty('fd')) {\n\n // take read range into a account\n // `end` = Infinity –> read file till the end\n //\n // TODO: Looks like there is bug in Node fs.createReadStream\n // it doesn't respect `end` options without `start` options\n // Fix it when node fixes it.\n // https://github.com/joyent/node/issues/7819\n if (value.end != undefined && value.end != Infinity && value.start != undefined) {\n\n // when end specified\n // no need to calculate range\n // inclusive, starts with 0\n callback(null, value.end + 1 - (value.start ? value.start : 0));\n\n // not that fast snoopy\n } else {\n // still need to fetch file size from fs\n fs.stat(value.path, function(err, stat) {\n\n var fileSize;\n\n if (err) {\n callback(err);\n return;\n }\n\n // update final size based on the range options\n fileSize = stat.size - (value.start ? value.start : 0);\n callback(null, fileSize);\n });\n }\n\n // or http response\n } else if (value.hasOwnProperty('httpVersion')) {\n callback(null, +value.headers['content-length']);\n\n // or request stream http://github.com/mikeal/request\n } else if (value.hasOwnProperty('httpModule')) {\n // wait till response come back\n value.on('response', function(response) {\n value.pause();\n callback(null, +response.headers['content-length']);\n });\n value.resume();\n\n // something else\n } else {\n callback('Unknown stream');\n }\n};\n\nFormData.prototype._multiPartHeader = function(field, value, options) {\n // custom header specified (as string)?\n // it becomes responsible for boundary\n // (e.g. to handle extra CRLFs on .NET servers)\n if (typeof options.header == 'string') {\n return options.header;\n }\n\n var contentDisposition = this._getContentDisposition(value, options);\n var contentType = this._getContentType(value, options);\n\n var contents = '';\n var headers = {\n // add custom disposition as third element or keep it two elements if not\n 'Content-Disposition': ['form-data', 'name=\"' + field + '\"'].concat(contentDisposition || []),\n // if no content type. allow it to be empty array\n 'Content-Type': [].concat(contentType || [])\n };\n\n // allow custom headers.\n if (typeof options.header == 'object') {\n populate(headers, options.header);\n }\n\n var header;\n for (var prop in headers) {\n if (!headers.hasOwnProperty(prop)) continue;\n header = headers[prop];\n\n // skip nullish headers.\n if (header == null) {\n continue;\n }\n\n // convert all headers to arrays.\n if (!Array.isArray(header)) {\n header = [header];\n }\n\n // add non-empty headers.\n if (header.length) {\n contents += prop + ': ' + header.join('; ') + FormData.LINE_BREAK;\n }\n }\n\n return '--' + this.getBoundary() + FormData.LINE_BREAK + contents + FormData.LINE_BREAK;\n};\n\nFormData.prototype._getContentDisposition = function(value, options) {\n\n var filename\n , contentDisposition\n ;\n\n if (typeof options.filepath === 'string') {\n // custom filepath for relative paths\n filename = path.normalize(options.filepath).replace(/\\\\/g, '/');\n } else if (options.filename || value.name || value.path) {\n // custom filename take precedence\n // formidable and the browser add a name property\n // fs- and request- streams have path property\n filename = path.basename(options.filename || value.name || value.path);\n } else if (value.readable && value.hasOwnProperty('httpVersion')) {\n // or try http response\n filename = path.basename(value.client._httpMessage.path || '');\n }\n\n if (filename) {\n contentDisposition = 'filename=\"' + filename + '\"';\n }\n\n return contentDisposition;\n};\n\nFormData.prototype._getContentType = function(value, options) {\n\n // use custom content-type above all\n var contentType = options.contentType;\n\n // or try `name` from formidable, browser\n if (!contentType && value.name) {\n contentType = mime.lookup(value.name);\n }\n\n // or try `path` from fs-, request- streams\n if (!contentType && value.path) {\n contentType = mime.lookup(value.path);\n }\n\n // or if it's http-reponse\n if (!contentType && value.readable && value.hasOwnProperty('httpVersion')) {\n contentType = value.headers['content-type'];\n }\n\n // or guess it from the filepath or filename\n if (!contentType && (options.filepath || options.filename)) {\n contentType = mime.lookup(options.filepath || options.filename);\n }\n\n // fallback to the default content type if `value` is not simple value\n if (!contentType && typeof value == 'object') {\n contentType = FormData.DEFAULT_CONTENT_TYPE;\n }\n\n return contentType;\n};\n\nFormData.prototype._multiPartFooter = function() {\n return function(next) {\n var footer = FormData.LINE_BREAK;\n\n var lastPart = (this._streams.length === 0);\n if (lastPart) {\n footer += this._lastBoundary();\n }\n\n next(footer);\n }.bind(this);\n};\n\nFormData.prototype._lastBoundary = function() {\n return '--' + this.getBoundary() + '--' + FormData.LINE_BREAK;\n};\n\nFormData.prototype.getHeaders = function(userHeaders) {\n var header;\n var formHeaders = {\n 'content-type': 'multipart/form-data; boundary=' + this.getBoundary()\n };\n\n for (header in userHeaders) {\n if (userHeaders.hasOwnProperty(header)) {\n formHeaders[header.toLowerCase()] = userHeaders[header];\n }\n }\n\n return formHeaders;\n};\n\nFormData.prototype.setBoundary = function(boundary) {\n this._boundary = boundary;\n};\n\nFormData.prototype.getBoundary = function() {\n if (!this._boundary) {\n this._generateBoundary();\n }\n\n return this._boundary;\n};\n\nFormData.prototype.getBuffer = function() {\n var dataBuffer = new Buffer.alloc( 0 );\n var boundary = this.getBoundary();\n\n // Create the form content. Add Line breaks to the end of data.\n for (var i = 0, len = this._streams.length; i < len; i++) {\n if (typeof this._streams[i] !== 'function') {\n\n // Add content to the buffer.\n if(Buffer.isBuffer(this._streams[i])) {\n dataBuffer = Buffer.concat( [dataBuffer, this._streams[i]]);\n }else {\n dataBuffer = Buffer.concat( [dataBuffer, Buffer.from(this._streams[i])]);\n }\n\n // Add break after content.\n if (typeof this._streams[i] !== 'string' || this._streams[i].substring( 2, boundary.length + 2 ) !== boundary) {\n dataBuffer = Buffer.concat( [dataBuffer, Buffer.from(FormData.LINE_BREAK)] );\n }\n }\n }\n\n // Add the footer and return the Buffer object.\n return Buffer.concat( [dataBuffer, Buffer.from(this._lastBoundary())] );\n};\n\nFormData.prototype._generateBoundary = function() {\n // This generates a 50 character boundary similar to those used by Firefox.\n // They are optimized for boyer-moore parsing.\n var boundary = '--------------------------';\n for (var i = 0; i < 24; i++) {\n boundary += Math.floor(Math.random() * 10).toString(16);\n }\n\n this._boundary = boundary;\n};\n\n// Note: getLengthSync DOESN'T calculate streams length\n// As workaround one can calculate file size manually\n// and add it as knownLength option\nFormData.prototype.getLengthSync = function() {\n var knownLength = this._overheadLength + this._valueLength;\n\n // Don't get confused, there are 3 \"internal\" streams for each keyval pair\n // so it basically checks if there is any value added to the form\n if (this._streams.length) {\n knownLength += this._lastBoundary().length;\n }\n\n // https://github.com/form-data/form-data/issues/40\n if (!this.hasKnownLength()) {\n // Some async length retrievers are present\n // therefore synchronous length calculation is false.\n // Please use getLength(callback) to get proper length\n this._error(new Error('Cannot calculate proper length in synchronous way.'));\n }\n\n return knownLength;\n};\n\n// Public API to check if length of added values is known\n// https://github.com/form-data/form-data/issues/196\n// https://github.com/form-data/form-data/issues/262\nFormData.prototype.hasKnownLength = function() {\n var hasKnownLength = true;\n\n if (this._valuesToMeasure.length) {\n hasKnownLength = false;\n }\n\n return hasKnownLength;\n};\n\nFormData.prototype.getLength = function(cb) {\n var knownLength = this._overheadLength + this._valueLength;\n\n if (this._streams.length) {\n knownLength += this._lastBoundary().length;\n }\n\n if (!this._valuesToMeasure.length) {\n process.nextTick(cb.bind(this, null, knownLength));\n return;\n }\n\n asynckit.parallel(this._valuesToMeasure, this._lengthRetriever, function(err, values) {\n if (err) {\n cb(err);\n return;\n }\n\n values.forEach(function(length) {\n knownLength += length;\n });\n\n cb(null, knownLength);\n });\n};\n\nFormData.prototype.submit = function(params, cb) {\n var request\n , options\n , defaults = {method: 'post'}\n ;\n\n // parse provided url if it's string\n // or treat it as options object\n if (typeof params == 'string') {\n\n params = parseUrl(params);\n options = populate({\n port: params.port,\n path: params.pathname,\n host: params.hostname,\n protocol: params.protocol\n }, defaults);\n\n // use custom params\n } else {\n\n options = populate(params, defaults);\n // if no port provided use default one\n if (!options.port) {\n options.port = options.protocol == 'https:' ? 443 : 80;\n }\n }\n\n // put that good code in getHeaders to some use\n options.headers = this.getHeaders(params.headers);\n\n // https if specified, fallback to http in any other case\n if (options.protocol == 'https:') {\n request = https.request(options);\n } else {\n request = http.request(options);\n }\n\n // get content length and fire away\n this.getLength(function(err, length) {\n if (err && err !== 'Unknown stream') {\n this._error(err);\n return;\n }\n\n // add content length\n if (length) {\n request.setHeader('Content-Length', length);\n }\n\n this.pipe(request);\n if (cb) {\n var onResponse;\n\n var callback = function (error, responce) {\n request.removeListener('error', callback);\n request.removeListener('response', onResponse);\n\n return cb.call(this, error, responce);\n };\n\n onResponse = callback.bind(this, null);\n\n request.on('error', callback);\n request.on('response', onResponse);\n }\n }.bind(this));\n\n return request;\n};\n\nFormData.prototype._error = function(err) {\n if (!this.error) {\n this.error = err;\n this.pause();\n this.emit('error', err);\n }\n};\n\nFormData.prototype.toString = function () {\n return '[object FormData]';\n};\n","// populates missing values\nmodule.exports = function(dst, src) {\n\n Object.keys(src).forEach(function(prop)\n {\n dst[prop] = dst[prop] || src[prop];\n });\n\n return dst;\n};\n","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nObject.defineProperty(exports, \"v1\", {\n enumerable: true,\n get: function () {\n return _v.default;\n }\n});\nObject.defineProperty(exports, \"v3\", {\n enumerable: true,\n get: function () {\n return _v2.default;\n }\n});\nObject.defineProperty(exports, \"v4\", {\n enumerable: true,\n get: function () {\n return _v3.default;\n }\n});\nObject.defineProperty(exports, \"v5\", {\n enumerable: true,\n get: function () {\n return _v4.default;\n }\n});\nObject.defineProperty(exports, \"NIL\", {\n enumerable: true,\n get: function () {\n return _nil.default;\n }\n});\nObject.defineProperty(exports, \"version\", {\n enumerable: true,\n get: function () {\n return _version.default;\n }\n});\nObject.defineProperty(exports, \"validate\", {\n enumerable: true,\n get: function () {\n return _validate.default;\n }\n});\nObject.defineProperty(exports, \"stringify\", {\n enumerable: true,\n get: function () {\n return _stringify.default;\n }\n});\nObject.defineProperty(exports, \"parse\", {\n enumerable: true,\n get: function () {\n return _parse.default;\n }\n});\n\nvar _v = _interopRequireDefault(require(\"./v1.js\"));\n\nvar _v2 = _interopRequireDefault(require(\"./v3.js\"));\n\nvar _v3 = _interopRequireDefault(require(\"./v4.js\"));\n\nvar _v4 = _interopRequireDefault(require(\"./v5.js\"));\n\nvar _nil = _interopRequireDefault(require(\"./nil.js\"));\n\nvar _version = _interopRequireDefault(require(\"./version.js\"));\n\nvar _validate = _interopRequireDefault(require(\"./validate.js\"));\n\nvar _stringify = _interopRequireDefault(require(\"./stringify.js\"));\n\nvar _parse = _interopRequireDefault(require(\"./parse.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _crypto = _interopRequireDefault(require(\"crypto\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction md5(bytes) {\n if (Array.isArray(bytes)) {\n bytes = Buffer.from(bytes);\n } else if (typeof bytes === 'string') {\n bytes = Buffer.from(bytes, 'utf8');\n }\n\n return _crypto.default.createHash('md5').update(bytes).digest();\n}\n\nvar _default = md5;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _default = '00000000-0000-0000-0000-000000000000';\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _validate = _interopRequireDefault(require(\"./validate.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction parse(uuid) {\n if (!(0, _validate.default)(uuid)) {\n throw TypeError('Invalid UUID');\n }\n\n let v;\n const arr = new Uint8Array(16); // Parse ########-....-....-....-............\n\n arr[0] = (v = parseInt(uuid.slice(0, 8), 16)) >>> 24;\n arr[1] = v >>> 16 & 0xff;\n arr[2] = v >>> 8 & 0xff;\n arr[3] = v & 0xff; // Parse ........-####-....-....-............\n\n arr[4] = (v = parseInt(uuid.slice(9, 13), 16)) >>> 8;\n arr[5] = v & 0xff; // Parse ........-....-####-....-............\n\n arr[6] = (v = parseInt(uuid.slice(14, 18), 16)) >>> 8;\n arr[7] = v & 0xff; // Parse ........-....-....-####-............\n\n arr[8] = (v = parseInt(uuid.slice(19, 23), 16)) >>> 8;\n arr[9] = v & 0xff; // Parse ........-....-....-....-############\n // (Use \"/\" to avoid 32-bit truncation when bit-shifting high-order bytes)\n\n arr[10] = (v = parseInt(uuid.slice(24, 36), 16)) / 0x10000000000 & 0xff;\n arr[11] = v / 0x100000000 & 0xff;\n arr[12] = v >>> 24 & 0xff;\n arr[13] = v >>> 16 & 0xff;\n arr[14] = v >>> 8 & 0xff;\n arr[15] = v & 0xff;\n return arr;\n}\n\nvar _default = parse;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _default = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = rng;\n\nvar _crypto = _interopRequireDefault(require(\"crypto\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nconst rnds8Pool = new Uint8Array(256); // # of random values to pre-allocate\n\nlet poolPtr = rnds8Pool.length;\n\nfunction rng() {\n if (poolPtr > rnds8Pool.length - 16) {\n _crypto.default.randomFillSync(rnds8Pool);\n\n poolPtr = 0;\n }\n\n return rnds8Pool.slice(poolPtr, poolPtr += 16);\n}","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _crypto = _interopRequireDefault(require(\"crypto\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction sha1(bytes) {\n if (Array.isArray(bytes)) {\n bytes = Buffer.from(bytes);\n } else if (typeof bytes === 'string') {\n bytes = Buffer.from(bytes, 'utf8');\n }\n\n return _crypto.default.createHash('sha1').update(bytes).digest();\n}\n\nvar _default = sha1;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _validate = _interopRequireDefault(require(\"./validate.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/**\n * Convert array of 16 byte values to UUID string format of the form:\n * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX\n */\nconst byteToHex = [];\n\nfor (let i = 0; i < 256; ++i) {\n byteToHex.push((i + 0x100).toString(16).substr(1));\n}\n\nfunction stringify(arr, offset = 0) {\n // Note: Be careful editing this code! It's been tuned for performance\n // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434\n const uuid = (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase(); // Consistency check for valid UUID. If this throws, it's likely due to one\n // of the following:\n // - One or more input array values don't map to a hex octet (leading to\n // \"undefined\" in the uuid)\n // - Invalid input values for the RFC `version` or `variant` fields\n\n if (!(0, _validate.default)(uuid)) {\n throw TypeError('Stringified UUID is invalid');\n }\n\n return uuid;\n}\n\nvar _default = stringify;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _rng = _interopRequireDefault(require(\"./rng.js\"));\n\nvar _stringify = _interopRequireDefault(require(\"./stringify.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n// **`v1()` - Generate time-based UUID**\n//\n// Inspired by https://github.com/LiosK/UUID.js\n// and http://docs.python.org/library/uuid.html\nlet _nodeId;\n\nlet _clockseq; // Previous uuid creation time\n\n\nlet _lastMSecs = 0;\nlet _lastNSecs = 0; // See https://github.com/uuidjs/uuid for API details\n\nfunction v1(options, buf, offset) {\n let i = buf && offset || 0;\n const b = buf || new Array(16);\n options = options || {};\n let node = options.node || _nodeId;\n let clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq; // node and clockseq need to be initialized to random values if they're not\n // specified. We do this lazily to minimize issues related to insufficient\n // system entropy. See #189\n\n if (node == null || clockseq == null) {\n const seedBytes = options.random || (options.rng || _rng.default)();\n\n if (node == null) {\n // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1)\n node = _nodeId = [seedBytes[0] | 0x01, seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]];\n }\n\n if (clockseq == null) {\n // Per 4.2.2, randomize (14 bit) clockseq\n clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff;\n }\n } // UUID timestamps are 100 nano-second units since the Gregorian epoch,\n // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so\n // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs'\n // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00.\n\n\n let msecs = options.msecs !== undefined ? options.msecs : Date.now(); // Per 4.2.1.2, use count of uuid's generated during the current clock\n // cycle to simulate higher resolution clock\n\n let nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1; // Time since last uuid creation (in msecs)\n\n const dt = msecs - _lastMSecs + (nsecs - _lastNSecs) / 10000; // Per 4.2.1.2, Bump clockseq on clock regression\n\n if (dt < 0 && options.clockseq === undefined) {\n clockseq = clockseq + 1 & 0x3fff;\n } // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new\n // time interval\n\n\n if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) {\n nsecs = 0;\n } // Per 4.2.1.2 Throw error if too many uuids are requested\n\n\n if (nsecs >= 10000) {\n throw new Error(\"uuid.v1(): Can't create more than 10M uuids/sec\");\n }\n\n _lastMSecs = msecs;\n _lastNSecs = nsecs;\n _clockseq = clockseq; // Per 4.1.4 - Convert from unix epoch to Gregorian epoch\n\n msecs += 12219292800000; // `time_low`\n\n const tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000;\n b[i++] = tl >>> 24 & 0xff;\n b[i++] = tl >>> 16 & 0xff;\n b[i++] = tl >>> 8 & 0xff;\n b[i++] = tl & 0xff; // `time_mid`\n\n const tmh = msecs / 0x100000000 * 10000 & 0xfffffff;\n b[i++] = tmh >>> 8 & 0xff;\n b[i++] = tmh & 0xff; // `time_high_and_version`\n\n b[i++] = tmh >>> 24 & 0xf | 0x10; // include version\n\n b[i++] = tmh >>> 16 & 0xff; // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant)\n\n b[i++] = clockseq >>> 8 | 0x80; // `clock_seq_low`\n\n b[i++] = clockseq & 0xff; // `node`\n\n for (let n = 0; n < 6; ++n) {\n b[i + n] = node[n];\n }\n\n return buf || (0, _stringify.default)(b);\n}\n\nvar _default = v1;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _v = _interopRequireDefault(require(\"./v35.js\"));\n\nvar _md = _interopRequireDefault(require(\"./md5.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nconst v3 = (0, _v.default)('v3', 0x30, _md.default);\nvar _default = v3;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = _default;\nexports.URL = exports.DNS = void 0;\n\nvar _stringify = _interopRequireDefault(require(\"./stringify.js\"));\n\nvar _parse = _interopRequireDefault(require(\"./parse.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction stringToBytes(str) {\n str = unescape(encodeURIComponent(str)); // UTF8 escape\n\n const bytes = [];\n\n for (let i = 0; i < str.length; ++i) {\n bytes.push(str.charCodeAt(i));\n }\n\n return bytes;\n}\n\nconst DNS = '6ba7b810-9dad-11d1-80b4-00c04fd430c8';\nexports.DNS = DNS;\nconst URL = '6ba7b811-9dad-11d1-80b4-00c04fd430c8';\nexports.URL = URL;\n\nfunction _default(name, version, hashfunc) {\n function generateUUID(value, namespace, buf, offset) {\n if (typeof value === 'string') {\n value = stringToBytes(value);\n }\n\n if (typeof namespace === 'string') {\n namespace = (0, _parse.default)(namespace);\n }\n\n if (namespace.length !== 16) {\n throw TypeError('Namespace must be array-like (16 iterable integer values, 0-255)');\n } // Compute hash of namespace and value, Per 4.3\n // Future: Use spread syntax when supported on all platforms, e.g. `bytes =\n // hashfunc([...namespace, ... value])`\n\n\n let bytes = new Uint8Array(16 + value.length);\n bytes.set(namespace);\n bytes.set(value, namespace.length);\n bytes = hashfunc(bytes);\n bytes[6] = bytes[6] & 0x0f | version;\n bytes[8] = bytes[8] & 0x3f | 0x80;\n\n if (buf) {\n offset = offset || 0;\n\n for (let i = 0; i < 16; ++i) {\n buf[offset + i] = bytes[i];\n }\n\n return buf;\n }\n\n return (0, _stringify.default)(bytes);\n } // Function#name is not settable on some platforms (#270)\n\n\n try {\n generateUUID.name = name; // eslint-disable-next-line no-empty\n } catch (err) {} // For CommonJS default export support\n\n\n generateUUID.DNS = DNS;\n generateUUID.URL = URL;\n return generateUUID;\n}","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _rng = _interopRequireDefault(require(\"./rng.js\"));\n\nvar _stringify = _interopRequireDefault(require(\"./stringify.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction v4(options, buf, offset) {\n options = options || {};\n\n const rnds = options.random || (options.rng || _rng.default)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`\n\n\n rnds[6] = rnds[6] & 0x0f | 0x40;\n rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided\n\n if (buf) {\n offset = offset || 0;\n\n for (let i = 0; i < 16; ++i) {\n buf[offset + i] = rnds[i];\n }\n\n return buf;\n }\n\n return (0, _stringify.default)(rnds);\n}\n\nvar _default = v4;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _v = _interopRequireDefault(require(\"./v35.js\"));\n\nvar _sha = _interopRequireDefault(require(\"./sha1.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nconst v5 = (0, _v.default)('v5', 0x50, _sha.default);\nvar _default = v5;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _regex = _interopRequireDefault(require(\"./regex.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction validate(uuid) {\n return typeof uuid === 'string' && _regex.default.test(uuid);\n}\n\nvar _default = validate;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _validate = _interopRequireDefault(require(\"./validate.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction version(uuid) {\n if (!(0, _validate.default)(uuid)) {\n throw TypeError('Invalid UUID');\n }\n\n return parseInt(uuid.substr(14, 1), 16);\n}\n\nvar _default = version;\nexports.default = _default;","'use strict';\n\nObject.defineProperty(exports, '__esModule', { value: true });\n\nvar logger$1 = require('@azure/logger');\nvar abortController = require('@azure/abort-controller');\n\n// Copyright (c) Microsoft Corporation.\n/**\n * The `@azure/logger` configuration for this package.\n * @internal\n */\nconst logger = logger$1.createClientLogger(\"core-lro\");\n\n// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n/**\n * The default time interval to wait before sending the next polling request.\n */\nconst POLL_INTERVAL_IN_MS = 2000;\n/**\n * The closed set of terminal states.\n */\nconst terminalStates = [\"succeeded\", \"canceled\", \"failed\"];\n\n// Copyright (c) Microsoft Corporation.\n/**\n * Deserializes the state\n */\nfunction deserializeState(serializedState) {\n try {\n return JSON.parse(serializedState).state;\n }\n catch (e) {\n throw new Error(`Unable to deserialize input state: ${serializedState}`);\n }\n}\nfunction setStateError(inputs) {\n const { state, stateProxy, isOperationError } = inputs;\n return (error) => {\n if (isOperationError(error)) {\n stateProxy.setError(state, error);\n stateProxy.setFailed(state);\n }\n throw error;\n };\n}\nfunction processOperationStatus(result) {\n const { state, stateProxy, status, isDone, processResult, response, setErrorAsResult } = result;\n switch (status) {\n case \"succeeded\": {\n stateProxy.setSucceeded(state);\n break;\n }\n case \"failed\": {\n stateProxy.setError(state, new Error(`The long-running operation has failed`));\n stateProxy.setFailed(state);\n break;\n }\n case \"canceled\": {\n stateProxy.setCanceled(state);\n break;\n }\n }\n if ((isDone === null || isDone === void 0 ? void 0 : isDone(response, state)) ||\n (isDone === undefined &&\n [\"succeeded\", \"canceled\"].concat(setErrorAsResult ? [] : [\"failed\"]).includes(status))) {\n stateProxy.setResult(state, buildResult({\n response,\n state,\n processResult,\n }));\n }\n}\nfunction buildResult(inputs) {\n const { processResult, response, state } = inputs;\n return processResult ? processResult(response, state) : response;\n}\n/**\n * Initiates the long-running operation.\n */\nasync function initOperation(inputs) {\n const { init, stateProxy, processResult, getOperationStatus, withOperationLocation, setErrorAsResult, } = inputs;\n const { operationLocation, resourceLocation, metadata, response } = await init();\n if (operationLocation)\n withOperationLocation === null || withOperationLocation === void 0 ? void 0 : withOperationLocation(operationLocation, false);\n const config = {\n metadata,\n operationLocation,\n resourceLocation,\n };\n logger.verbose(`LRO: Operation description:`, config);\n const state = stateProxy.initState(config);\n const status = getOperationStatus({ response, state, operationLocation });\n processOperationStatus({ state, status, stateProxy, response, setErrorAsResult, processResult });\n return state;\n}\nasync function pollOperationHelper(inputs) {\n const { poll, state, stateProxy, operationLocation, getOperationStatus, getResourceLocation, isOperationError, options, } = inputs;\n const response = await poll(operationLocation, options).catch(setStateError({\n state,\n stateProxy,\n isOperationError,\n }));\n const status = getOperationStatus(response, state);\n logger.verbose(`LRO: Status:\\n\\tPolling from: ${state.config.operationLocation}\\n\\tOperation status: ${status}\\n\\tPolling status: ${terminalStates.includes(status) ? \"Stopped\" : \"Running\"}`);\n if (status === \"succeeded\") {\n const resourceLocation = getResourceLocation(response, state);\n if (resourceLocation !== undefined) {\n return {\n response: await poll(resourceLocation).catch(setStateError({ state, stateProxy, isOperationError })),\n status,\n };\n }\n }\n return { response, status };\n}\n/** Polls the long-running operation. */\nasync function pollOperation(inputs) {\n const { poll, state, stateProxy, options, getOperationStatus, getResourceLocation, getOperationLocation, isOperationError, withOperationLocation, getPollingInterval, processResult, updateState, setDelay, isDone, setErrorAsResult, } = inputs;\n const { operationLocation } = state.config;\n if (operationLocation !== undefined) {\n const { response, status } = await pollOperationHelper({\n poll,\n getOperationStatus,\n state,\n stateProxy,\n operationLocation,\n getResourceLocation,\n isOperationError,\n options,\n });\n processOperationStatus({\n status,\n response,\n state,\n stateProxy,\n isDone,\n processResult,\n setErrorAsResult,\n });\n if (!terminalStates.includes(status)) {\n const intervalInMs = getPollingInterval === null || getPollingInterval === void 0 ? void 0 : getPollingInterval(response);\n if (intervalInMs)\n setDelay(intervalInMs);\n const location = getOperationLocation === null || getOperationLocation === void 0 ? void 0 : getOperationLocation(response, state);\n if (location !== undefined) {\n const isUpdated = operationLocation !== location;\n state.config.operationLocation = location;\n withOperationLocation === null || withOperationLocation === void 0 ? void 0 : withOperationLocation(location, isUpdated);\n }\n else\n withOperationLocation === null || withOperationLocation === void 0 ? void 0 : withOperationLocation(operationLocation, false);\n }\n updateState === null || updateState === void 0 ? void 0 : updateState(state, response);\n }\n}\n\n// Copyright (c) Microsoft Corporation.\nfunction getOperationLocationPollingUrl(inputs) {\n const { azureAsyncOperation, operationLocation } = inputs;\n return operationLocation !== null && operationLocation !== void 0 ? operationLocation : azureAsyncOperation;\n}\nfunction getLocationHeader(rawResponse) {\n return rawResponse.headers[\"location\"];\n}\nfunction getOperationLocationHeader(rawResponse) {\n return rawResponse.headers[\"operation-location\"];\n}\nfunction getAzureAsyncOperationHeader(rawResponse) {\n return rawResponse.headers[\"azure-asyncoperation\"];\n}\nfunction findResourceLocation(inputs) {\n const { location, requestMethod, requestPath, resourceLocationConfig } = inputs;\n switch (requestMethod) {\n case \"PUT\": {\n return requestPath;\n }\n case \"DELETE\": {\n return undefined;\n }\n default: {\n switch (resourceLocationConfig) {\n case \"azure-async-operation\": {\n return undefined;\n }\n case \"original-uri\": {\n return requestPath;\n }\n case \"location\":\n default: {\n return location;\n }\n }\n }\n }\n}\nfunction inferLroMode(inputs) {\n const { rawResponse, requestMethod, requestPath, resourceLocationConfig } = inputs;\n const operationLocation = getOperationLocationHeader(rawResponse);\n const azureAsyncOperation = getAzureAsyncOperationHeader(rawResponse);\n const pollingUrl = getOperationLocationPollingUrl({ operationLocation, azureAsyncOperation });\n const location = getLocationHeader(rawResponse);\n const normalizedRequestMethod = requestMethod === null || requestMethod === void 0 ? void 0 : requestMethod.toLocaleUpperCase();\n if (pollingUrl !== undefined) {\n return {\n mode: \"OperationLocation\",\n operationLocation: pollingUrl,\n resourceLocation: findResourceLocation({\n requestMethod: normalizedRequestMethod,\n location,\n requestPath,\n resourceLocationConfig,\n }),\n };\n }\n else if (location !== undefined) {\n return {\n mode: \"ResourceLocation\",\n operationLocation: location,\n };\n }\n else if (normalizedRequestMethod === \"PUT\" && requestPath) {\n return {\n mode: \"Body\",\n operationLocation: requestPath,\n };\n }\n else {\n return undefined;\n }\n}\nfunction transformStatus(inputs) {\n const { status, statusCode } = inputs;\n if (typeof status !== \"string\" && status !== undefined) {\n throw new Error(`Polling was unsuccessful. Expected status to have a string value or no value but it has instead: ${status}. This doesn't necessarily indicate the operation has failed. Check your Azure subscription or resource status for more information.`);\n }\n switch (status === null || status === void 0 ? void 0 : status.toLocaleLowerCase()) {\n case undefined:\n return toOperationStatus(statusCode);\n case \"succeeded\":\n return \"succeeded\";\n case \"failed\":\n return \"failed\";\n case \"running\":\n case \"accepted\":\n case \"started\":\n case \"canceling\":\n case \"cancelling\":\n return \"running\";\n case \"canceled\":\n case \"cancelled\":\n return \"canceled\";\n default: {\n logger.warning(`LRO: unrecognized operation status: ${status}`);\n return status;\n }\n }\n}\nfunction getStatus(rawResponse) {\n var _a;\n const { status } = (_a = rawResponse.body) !== null && _a !== void 0 ? _a : {};\n return transformStatus({ status, statusCode: rawResponse.statusCode });\n}\nfunction getProvisioningState(rawResponse) {\n var _a, _b;\n const { properties, provisioningState } = (_a = rawResponse.body) !== null && _a !== void 0 ? _a : {};\n const status = (_b = properties === null || properties === void 0 ? void 0 : properties.provisioningState) !== null && _b !== void 0 ? _b : provisioningState;\n return transformStatus({ status, statusCode: rawResponse.statusCode });\n}\nfunction toOperationStatus(statusCode) {\n if (statusCode === 202) {\n return \"running\";\n }\n else if (statusCode < 300) {\n return \"succeeded\";\n }\n else {\n return \"failed\";\n }\n}\nfunction parseRetryAfter({ rawResponse }) {\n const retryAfter = rawResponse.headers[\"retry-after\"];\n if (retryAfter !== undefined) {\n // Retry-After header value is either in HTTP date format, or in seconds\n const retryAfterInSeconds = parseInt(retryAfter);\n return isNaN(retryAfterInSeconds)\n ? calculatePollingIntervalFromDate(new Date(retryAfter))\n : retryAfterInSeconds * 1000;\n }\n return undefined;\n}\nfunction calculatePollingIntervalFromDate(retryAfterDate) {\n const timeNow = Math.floor(new Date().getTime());\n const retryAfterTime = retryAfterDate.getTime();\n if (timeNow < retryAfterTime) {\n return retryAfterTime - timeNow;\n }\n return undefined;\n}\nfunction getStatusFromInitialResponse(inputs) {\n const { response, state, operationLocation } = inputs;\n function helper() {\n var _a;\n const mode = (_a = state.config.metadata) === null || _a === void 0 ? void 0 : _a[\"mode\"];\n switch (mode) {\n case undefined:\n return toOperationStatus(response.rawResponse.statusCode);\n case \"Body\":\n return getOperationStatus(response, state);\n default:\n return \"running\";\n }\n }\n const status = helper();\n return status === \"running\" && operationLocation === undefined ? \"succeeded\" : status;\n}\n/**\n * Initiates the long-running operation.\n */\nasync function initHttpOperation(inputs) {\n const { stateProxy, resourceLocationConfig, processResult, lro, setErrorAsResult } = inputs;\n return initOperation({\n init: async () => {\n const response = await lro.sendInitialRequest();\n const config = inferLroMode({\n rawResponse: response.rawResponse,\n requestPath: lro.requestPath,\n requestMethod: lro.requestMethod,\n resourceLocationConfig,\n });\n return Object.assign({ response, operationLocation: config === null || config === void 0 ? void 0 : config.operationLocation, resourceLocation: config === null || config === void 0 ? void 0 : config.resourceLocation }, ((config === null || config === void 0 ? void 0 : config.mode) ? { metadata: { mode: config.mode } } : {}));\n },\n stateProxy,\n processResult: processResult\n ? ({ flatResponse }, state) => processResult(flatResponse, state)\n : ({ flatResponse }) => flatResponse,\n getOperationStatus: getStatusFromInitialResponse,\n setErrorAsResult,\n });\n}\nfunction getOperationLocation({ rawResponse }, state) {\n var _a;\n const mode = (_a = state.config.metadata) === null || _a === void 0 ? void 0 : _a[\"mode\"];\n switch (mode) {\n case \"OperationLocation\": {\n return getOperationLocationPollingUrl({\n operationLocation: getOperationLocationHeader(rawResponse),\n azureAsyncOperation: getAzureAsyncOperationHeader(rawResponse),\n });\n }\n case \"ResourceLocation\": {\n return getLocationHeader(rawResponse);\n }\n case \"Body\":\n default: {\n return undefined;\n }\n }\n}\nfunction getOperationStatus({ rawResponse }, state) {\n var _a;\n const mode = (_a = state.config.metadata) === null || _a === void 0 ? void 0 : _a[\"mode\"];\n switch (mode) {\n case \"OperationLocation\": {\n return getStatus(rawResponse);\n }\n case \"ResourceLocation\": {\n return toOperationStatus(rawResponse.statusCode);\n }\n case \"Body\": {\n return getProvisioningState(rawResponse);\n }\n default:\n throw new Error(`Internal error: Unexpected operation mode: ${mode}`);\n }\n}\nfunction getResourceLocation({ flatResponse }, state) {\n if (typeof flatResponse === \"object\") {\n const resourceLocation = flatResponse.resourceLocation;\n if (resourceLocation !== undefined) {\n state.config.resourceLocation = resourceLocation;\n }\n }\n return state.config.resourceLocation;\n}\nfunction isOperationError(e) {\n return e.name === \"RestError\";\n}\n/** Polls the long-running operation. */\nasync function pollHttpOperation(inputs) {\n const { lro, stateProxy, options, processResult, updateState, setDelay, state, setErrorAsResult, } = inputs;\n return pollOperation({\n state,\n stateProxy,\n setDelay,\n processResult: processResult\n ? ({ flatResponse }, inputState) => processResult(flatResponse, inputState)\n : ({ flatResponse }) => flatResponse,\n updateState,\n getPollingInterval: parseRetryAfter,\n getOperationLocation,\n getOperationStatus,\n isOperationError,\n getResourceLocation,\n options,\n /**\n * The expansion here is intentional because `lro` could be an object that\n * references an inner this, so we need to preserve a reference to it.\n */\n poll: async (location, inputOptions) => lro.sendPollRequest(location, inputOptions),\n setErrorAsResult,\n });\n}\n\n// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n/**\n * Map an optional value through a function\n * @internal\n */\nconst maybemap = (value, f) => value === undefined ? undefined : f(value);\nconst INTERRUPTED = new Error(\"The poller is already stopped\");\n/**\n * A promise that delays resolution until a certain amount of time (in milliseconds) has passed, with facilities for\n * robust cancellation.\n *\n * ### Example:\n *\n * ```javascript\n * let toCancel;\n *\n * // Wait 20 seconds, and optionally allow the function to be cancelled.\n * await delayMs(20000, (cancel) => { toCancel = cancel });\n *\n * // ... if `toCancel` is called before the 20 second timer expires, then the delayMs promise will reject.\n * ```\n *\n * @internal\n * @param ms - the number of milliseconds to wait before resolving\n * @param cb - a callback that can provide the caller with a cancellation function\n */\nfunction delayMs(ms) {\n let aborted = false;\n let toReject;\n return Object.assign(new Promise((resolve, reject) => {\n let token;\n toReject = () => {\n maybemap(token, clearTimeout);\n reject(INTERRUPTED);\n };\n // In the rare case that the operation is _already_ aborted, we will reject instantly. This could happen, for\n // example, if the user calls the cancellation function immediately without yielding execution.\n if (aborted) {\n toReject();\n }\n else {\n token = setTimeout(resolve, ms);\n }\n }), {\n cancel: () => {\n aborted = true;\n toReject === null || toReject === void 0 ? void 0 : toReject();\n },\n });\n}\n\n// Copyright (c) Microsoft Corporation.\nconst createStateProxy$1 = () => ({\n /**\n * The state at this point is created to be of type OperationState.\n * It will be updated later to be of type TState when the\n * customer-provided callback, `updateState`, is called during polling.\n */\n initState: (config) => ({ status: \"running\", config }),\n setCanceled: (state) => (state.status = \"canceled\"),\n setError: (state, error) => (state.error = error),\n setResult: (state, result) => (state.result = result),\n setRunning: (state) => (state.status = \"running\"),\n setSucceeded: (state) => (state.status = \"succeeded\"),\n setFailed: (state) => (state.status = \"failed\"),\n getError: (state) => state.error,\n getResult: (state) => state.result,\n isCanceled: (state) => state.status === \"canceled\",\n isFailed: (state) => state.status === \"failed\",\n isRunning: (state) => state.status === \"running\",\n isSucceeded: (state) => state.status === \"succeeded\",\n});\n/**\n * Returns a poller factory.\n */\nfunction buildCreatePoller(inputs) {\n const { getOperationLocation, getStatusFromInitialResponse, getStatusFromPollResponse, isOperationError, getResourceLocation, getPollingInterval, resolveOnUnsuccessful, } = inputs;\n return async ({ init, poll }, options) => {\n const { processResult, updateState, withOperationLocation: withOperationLocationCallback, intervalInMs = POLL_INTERVAL_IN_MS, restoreFrom, } = options || {};\n const stateProxy = createStateProxy$1();\n const withOperationLocation = withOperationLocationCallback\n ? (() => {\n let called = false;\n return (operationLocation, isUpdated) => {\n if (isUpdated)\n withOperationLocationCallback(operationLocation);\n else if (!called)\n withOperationLocationCallback(operationLocation);\n called = true;\n };\n })()\n : undefined;\n const state = restoreFrom\n ? deserializeState(restoreFrom)\n : await initOperation({\n init,\n stateProxy,\n processResult,\n getOperationStatus: getStatusFromInitialResponse,\n withOperationLocation,\n setErrorAsResult: !resolveOnUnsuccessful,\n });\n let resultPromise;\n let cancelJob;\n const abortController$1 = new abortController.AbortController();\n const handlers = new Map();\n const handleProgressEvents = async () => handlers.forEach((h) => h(state));\n const cancelErrMsg = \"Operation was canceled\";\n let currentPollIntervalInMs = intervalInMs;\n const poller = {\n getOperationState: () => state,\n getResult: () => state.result,\n isDone: () => [\"succeeded\", \"failed\", \"canceled\"].includes(state.status),\n isStopped: () => resultPromise === undefined,\n stopPolling: () => {\n abortController$1.abort();\n cancelJob === null || cancelJob === void 0 ? void 0 : cancelJob();\n },\n toString: () => JSON.stringify({\n state,\n }),\n onProgress: (callback) => {\n const s = Symbol();\n handlers.set(s, callback);\n return () => handlers.delete(s);\n },\n pollUntilDone: (pollOptions) => (resultPromise !== null && resultPromise !== void 0 ? resultPromise : (resultPromise = (async () => {\n const { abortSignal: inputAbortSignal } = pollOptions || {};\n const { signal: abortSignal } = inputAbortSignal\n ? new abortController.AbortController([inputAbortSignal, abortController$1.signal])\n : abortController$1;\n if (!poller.isDone()) {\n await poller.poll({ abortSignal });\n while (!poller.isDone()) {\n const delay = delayMs(currentPollIntervalInMs);\n cancelJob = delay.cancel;\n await delay;\n await poller.poll({ abortSignal });\n }\n }\n if (resolveOnUnsuccessful) {\n return poller.getResult();\n }\n else {\n switch (state.status) {\n case \"succeeded\":\n return poller.getResult();\n case \"canceled\":\n throw new Error(cancelErrMsg);\n case \"failed\":\n throw state.error;\n case \"notStarted\":\n case \"running\":\n throw new Error(`Polling completed without succeeding or failing`);\n }\n }\n })().finally(() => {\n resultPromise = undefined;\n }))),\n async poll(pollOptions) {\n if (resolveOnUnsuccessful) {\n if (poller.isDone())\n return;\n }\n else {\n switch (state.status) {\n case \"succeeded\":\n return;\n case \"canceled\":\n throw new Error(cancelErrMsg);\n case \"failed\":\n throw state.error;\n }\n }\n await pollOperation({\n poll,\n state,\n stateProxy,\n getOperationLocation,\n isOperationError,\n withOperationLocation,\n getPollingInterval,\n getOperationStatus: getStatusFromPollResponse,\n getResourceLocation,\n processResult,\n updateState,\n options: pollOptions,\n setDelay: (pollIntervalInMs) => {\n currentPollIntervalInMs = pollIntervalInMs;\n },\n setErrorAsResult: !resolveOnUnsuccessful,\n });\n await handleProgressEvents();\n if (!resolveOnUnsuccessful) {\n switch (state.status) {\n case \"canceled\":\n throw new Error(cancelErrMsg);\n case \"failed\":\n throw state.error;\n }\n }\n },\n };\n return poller;\n };\n}\n\n// Copyright (c) Microsoft Corporation.\n/**\n * Creates a poller that can be used to poll a long-running operation.\n * @param lro - Description of the long-running operation\n * @param options - options to configure the poller\n * @returns an initialized poller\n */\nasync function createHttpPoller(lro, options) {\n const { resourceLocationConfig, intervalInMs, processResult, restoreFrom, updateState, withOperationLocation, resolveOnUnsuccessful = false, } = options || {};\n return buildCreatePoller({\n getStatusFromInitialResponse,\n getStatusFromPollResponse: getOperationStatus,\n isOperationError,\n getOperationLocation,\n getResourceLocation,\n getPollingInterval: parseRetryAfter,\n resolveOnUnsuccessful,\n })({\n init: async () => {\n const response = await lro.sendInitialRequest();\n const config = inferLroMode({\n rawResponse: response.rawResponse,\n requestPath: lro.requestPath,\n requestMethod: lro.requestMethod,\n resourceLocationConfig,\n });\n return Object.assign({ response, operationLocation: config === null || config === void 0 ? void 0 : config.operationLocation, resourceLocation: config === null || config === void 0 ? void 0 : config.resourceLocation }, ((config === null || config === void 0 ? void 0 : config.mode) ? { metadata: { mode: config.mode } } : {}));\n },\n poll: lro.sendPollRequest,\n }, {\n intervalInMs,\n withOperationLocation,\n restoreFrom,\n updateState,\n processResult: processResult\n ? ({ flatResponse }, state) => processResult(flatResponse, state)\n : ({ flatResponse }) => flatResponse,\n });\n}\n\n// Copyright (c) Microsoft Corporation.\nconst createStateProxy = () => ({\n initState: (config) => ({ config, isStarted: true }),\n setCanceled: (state) => (state.isCancelled = true),\n setError: (state, error) => (state.error = error),\n setResult: (state, result) => (state.result = result),\n setRunning: (state) => (state.isStarted = true),\n setSucceeded: (state) => (state.isCompleted = true),\n setFailed: () => {\n /** empty body */\n },\n getError: (state) => state.error,\n getResult: (state) => state.result,\n isCanceled: (state) => !!state.isCancelled,\n isFailed: (state) => !!state.error,\n isRunning: (state) => !!state.isStarted,\n isSucceeded: (state) => Boolean(state.isCompleted && !state.isCancelled && !state.error),\n});\nclass GenericPollOperation {\n constructor(state, lro, setErrorAsResult, lroResourceLocationConfig, processResult, updateState, isDone) {\n this.state = state;\n this.lro = lro;\n this.setErrorAsResult = setErrorAsResult;\n this.lroResourceLocationConfig = lroResourceLocationConfig;\n this.processResult = processResult;\n this.updateState = updateState;\n this.isDone = isDone;\n }\n setPollerConfig(pollerConfig) {\n this.pollerConfig = pollerConfig;\n }\n async update(options) {\n var _a;\n const stateProxy = createStateProxy();\n if (!this.state.isStarted) {\n this.state = Object.assign(Object.assign({}, this.state), (await initHttpOperation({\n lro: this.lro,\n stateProxy,\n resourceLocationConfig: this.lroResourceLocationConfig,\n processResult: this.processResult,\n setErrorAsResult: this.setErrorAsResult,\n })));\n }\n const updateState = this.updateState;\n const isDone = this.isDone;\n if (!this.state.isCompleted && this.state.error === undefined) {\n await pollHttpOperation({\n lro: this.lro,\n state: this.state,\n stateProxy,\n processResult: this.processResult,\n updateState: updateState\n ? (state, { rawResponse }) => updateState(state, rawResponse)\n : undefined,\n isDone: isDone\n ? ({ flatResponse }, state) => isDone(flatResponse, state)\n : undefined,\n options,\n setDelay: (intervalInMs) => {\n this.pollerConfig.intervalInMs = intervalInMs;\n },\n setErrorAsResult: this.setErrorAsResult,\n });\n }\n (_a = options === null || options === void 0 ? void 0 : options.fireProgress) === null || _a === void 0 ? void 0 : _a.call(options, this.state);\n return this;\n }\n async cancel() {\n logger.error(\"`cancelOperation` is deprecated because it wasn't implemented\");\n return this;\n }\n /**\n * Serializes the Poller operation.\n */\n toString() {\n return JSON.stringify({\n state: this.state,\n });\n }\n}\n\n// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n/**\n * When a poller is manually stopped through the `stopPolling` method,\n * the poller will be rejected with an instance of the PollerStoppedError.\n */\nclass PollerStoppedError extends Error {\n constructor(message) {\n super(message);\n this.name = \"PollerStoppedError\";\n Object.setPrototypeOf(this, PollerStoppedError.prototype);\n }\n}\n/**\n * When the operation is cancelled, the poller will be rejected with an instance\n * of the PollerCancelledError.\n */\nclass PollerCancelledError extends Error {\n constructor(message) {\n super(message);\n this.name = \"PollerCancelledError\";\n Object.setPrototypeOf(this, PollerCancelledError.prototype);\n }\n}\n/**\n * A class that represents the definition of a program that polls through consecutive requests\n * until it reaches a state of completion.\n *\n * A poller can be executed manually, by polling request by request by calling to the `poll()` method repeatedly, until its operation is completed.\n * It also provides a way to wait until the operation completes, by calling `pollUntilDone()` and waiting until the operation finishes.\n * Pollers can also request the cancellation of the ongoing process to whom is providing the underlying long running operation.\n *\n * ```ts\n * const poller = new MyPoller();\n *\n * // Polling just once:\n * await poller.poll();\n *\n * // We can try to cancel the request here, by calling:\n * //\n * // await poller.cancelOperation();\n * //\n *\n * // Getting the final result:\n * const result = await poller.pollUntilDone();\n * ```\n *\n * The Poller is defined by two types, a type representing the state of the poller, which\n * must include a basic set of properties from `PollOperationState`,\n * and a return type defined by `TResult`, which can be anything.\n *\n * The Poller class implements the `PollerLike` interface, which allows poller implementations to avoid having\n * to export the Poller's class directly, and instead only export the already instantiated poller with the PollerLike type.\n *\n * ```ts\n * class Client {\n * public async makePoller: PollerLike {\n * const poller = new MyPoller({});\n * // It might be preferred to return the poller after the first request is made,\n * // so that some information can be obtained right away.\n * await poller.poll();\n * return poller;\n * }\n * }\n *\n * const poller: PollerLike = myClient.makePoller();\n * ```\n *\n * A poller can be created through its constructor, then it can be polled until it's completed.\n * At any point in time, the state of the poller can be obtained without delay through the getOperationState method.\n * At any point in time, the intermediate forms of the result type can be requested without delay.\n * Once the underlying operation is marked as completed, the poller will stop and the final value will be returned.\n *\n * ```ts\n * const poller = myClient.makePoller();\n * const state: MyOperationState = poller.getOperationState();\n *\n * // The intermediate result can be obtained at any time.\n * const result: MyResult | undefined = poller.getResult();\n *\n * // The final result can only be obtained after the poller finishes.\n * const result: MyResult = await poller.pollUntilDone();\n * ```\n *\n */\n// eslint-disable-next-line no-use-before-define\nclass Poller {\n /**\n * A poller needs to be initialized by passing in at least the basic properties of the `PollOperation`.\n *\n * When writing an implementation of a Poller, this implementation needs to deal with the initialization\n * of any custom state beyond the basic definition of the poller. The basic poller assumes that the poller's\n * operation has already been defined, at least its basic properties. The code below shows how to approach\n * the definition of the constructor of a new custom poller.\n *\n * ```ts\n * export class MyPoller extends Poller {\n * constructor({\n * // Anything you might need outside of the basics\n * }) {\n * let state: MyOperationState = {\n * privateProperty: private,\n * publicProperty: public,\n * };\n *\n * const operation = {\n * state,\n * update,\n * cancel,\n * toString\n * }\n *\n * // Sending the operation to the parent's constructor.\n * super(operation);\n *\n * // You can assign more local properties here.\n * }\n * }\n * ```\n *\n * Inside of this constructor, a new promise is created. This will be used to\n * tell the user when the poller finishes (see `pollUntilDone()`). The promise's\n * resolve and reject methods are also used internally to control when to resolve\n * or reject anyone waiting for the poller to finish.\n *\n * The constructor of a custom implementation of a poller is where any serialized version of\n * a previous poller's operation should be deserialized into the operation sent to the\n * base constructor. For example:\n *\n * ```ts\n * export class MyPoller extends Poller {\n * constructor(\n * baseOperation: string | undefined\n * ) {\n * let state: MyOperationState = {};\n * if (baseOperation) {\n * state = {\n * ...JSON.parse(baseOperation).state,\n * ...state\n * };\n * }\n * const operation = {\n * state,\n * // ...\n * }\n * super(operation);\n * }\n * }\n * ```\n *\n * @param operation - Must contain the basic properties of `PollOperation`.\n */\n constructor(operation) {\n /** controls whether to throw an error if the operation failed or was canceled. */\n this.resolveOnUnsuccessful = false;\n this.stopped = true;\n this.pollProgressCallbacks = [];\n this.operation = operation;\n this.promise = new Promise((resolve, reject) => {\n this.resolve = resolve;\n this.reject = reject;\n });\n // This prevents the UnhandledPromiseRejectionWarning in node.js from being thrown.\n // The above warning would get thrown if `poller.poll` is called, it returns an error,\n // and pullUntilDone did not have a .catch or await try/catch on it's return value.\n this.promise.catch(() => {\n /* intentionally blank */\n });\n }\n /**\n * Starts a loop that will break only if the poller is done\n * or if the poller is stopped.\n */\n async startPolling(pollOptions = {}) {\n if (this.stopped) {\n this.stopped = false;\n }\n while (!this.isStopped() && !this.isDone()) {\n await this.poll(pollOptions);\n await this.delay();\n }\n }\n /**\n * pollOnce does one polling, by calling to the update method of the underlying\n * poll operation to make any relevant change effective.\n *\n * It only optionally receives an object with an abortSignal property, from \\@azure/abort-controller's AbortSignalLike.\n *\n * @param options - Optional properties passed to the operation's update method.\n */\n async pollOnce(options = {}) {\n if (!this.isDone()) {\n this.operation = await this.operation.update({\n abortSignal: options.abortSignal,\n fireProgress: this.fireProgress.bind(this),\n });\n }\n this.processUpdatedState();\n }\n /**\n * fireProgress calls the functions passed in via onProgress the method of the poller.\n *\n * It loops over all of the callbacks received from onProgress, and executes them, sending them\n * the current operation state.\n *\n * @param state - The current operation state.\n */\n fireProgress(state) {\n for (const callback of this.pollProgressCallbacks) {\n callback(state);\n }\n }\n /**\n * Invokes the underlying operation's cancel method.\n */\n async cancelOnce(options = {}) {\n this.operation = await this.operation.cancel(options);\n }\n /**\n * Returns a promise that will resolve once a single polling request finishes.\n * It does this by calling the update method of the Poller's operation.\n *\n * It only optionally receives an object with an abortSignal property, from \\@azure/abort-controller's AbortSignalLike.\n *\n * @param options - Optional properties passed to the operation's update method.\n */\n poll(options = {}) {\n if (!this.pollOncePromise) {\n this.pollOncePromise = this.pollOnce(options);\n const clearPollOncePromise = () => {\n this.pollOncePromise = undefined;\n };\n this.pollOncePromise.then(clearPollOncePromise, clearPollOncePromise).catch(this.reject);\n }\n return this.pollOncePromise;\n }\n processUpdatedState() {\n if (this.operation.state.error) {\n this.stopped = true;\n if (!this.resolveOnUnsuccessful) {\n this.reject(this.operation.state.error);\n throw this.operation.state.error;\n }\n }\n if (this.operation.state.isCancelled) {\n this.stopped = true;\n if (!this.resolveOnUnsuccessful) {\n const error = new PollerCancelledError(\"Operation was canceled\");\n this.reject(error);\n throw error;\n }\n }\n if (this.isDone() && this.resolve) {\n // If the poller has finished polling, this means we now have a result.\n // However, it can be the case that TResult is instantiated to void, so\n // we are not expecting a result anyway. To assert that we might not\n // have a result eventually after finishing polling, we cast the result\n // to TResult.\n this.resolve(this.getResult());\n }\n }\n /**\n * Returns a promise that will resolve once the underlying operation is completed.\n */\n async pollUntilDone(pollOptions = {}) {\n if (this.stopped) {\n this.startPolling(pollOptions).catch(this.reject);\n }\n // This is needed because the state could have been updated by\n // `cancelOperation`, e.g. the operation is canceled or an error occurred.\n this.processUpdatedState();\n return this.promise;\n }\n /**\n * Invokes the provided callback after each polling is completed,\n * sending the current state of the poller's operation.\n *\n * It returns a method that can be used to stop receiving updates on the given callback function.\n */\n onProgress(callback) {\n this.pollProgressCallbacks.push(callback);\n return () => {\n this.pollProgressCallbacks = this.pollProgressCallbacks.filter((c) => c !== callback);\n };\n }\n /**\n * Returns true if the poller has finished polling.\n */\n isDone() {\n const state = this.operation.state;\n return Boolean(state.isCompleted || state.isCancelled || state.error);\n }\n /**\n * Stops the poller from continuing to poll.\n */\n stopPolling() {\n if (!this.stopped) {\n this.stopped = true;\n if (this.reject) {\n this.reject(new PollerStoppedError(\"This poller is already stopped\"));\n }\n }\n }\n /**\n * Returns true if the poller is stopped.\n */\n isStopped() {\n return this.stopped;\n }\n /**\n * Attempts to cancel the underlying operation.\n *\n * It only optionally receives an object with an abortSignal property, from \\@azure/abort-controller's AbortSignalLike.\n *\n * If it's called again before it finishes, it will throw an error.\n *\n * @param options - Optional properties passed to the operation's update method.\n */\n cancelOperation(options = {}) {\n if (!this.cancelPromise) {\n this.cancelPromise = this.cancelOnce(options);\n }\n else if (options.abortSignal) {\n throw new Error(\"A cancel request is currently pending\");\n }\n return this.cancelPromise;\n }\n /**\n * Returns the state of the operation.\n *\n * Even though TState will be the same type inside any of the methods of any extension of the Poller class,\n * implementations of the pollers can customize what's shared with the public by writing their own\n * version of the `getOperationState` method, and by defining two types, one representing the internal state of the poller\n * and a public type representing a safe to share subset of the properties of the internal state.\n * Their definition of getOperationState can then return their public type.\n *\n * Example:\n *\n * ```ts\n * // Let's say we have our poller's operation state defined as:\n * interface MyOperationState extends PollOperationState {\n * privateProperty?: string;\n * publicProperty?: string;\n * }\n *\n * // To allow us to have a true separation of public and private state, we have to define another interface:\n * interface PublicState extends PollOperationState {\n * publicProperty?: string;\n * }\n *\n * // Then, we define our Poller as follows:\n * export class MyPoller extends Poller {\n * // ... More content is needed here ...\n *\n * public getOperationState(): PublicState {\n * const state: PublicState = this.operation.state;\n * return {\n * // Properties from PollOperationState\n * isStarted: state.isStarted,\n * isCompleted: state.isCompleted,\n * isCancelled: state.isCancelled,\n * error: state.error,\n * result: state.result,\n *\n * // The only other property needed by PublicState.\n * publicProperty: state.publicProperty\n * }\n * }\n * }\n * ```\n *\n * You can see this in the tests of this repository, go to the file:\n * `../test/utils/testPoller.ts`\n * and look for the getOperationState implementation.\n */\n getOperationState() {\n return this.operation.state;\n }\n /**\n * Returns the result value of the operation,\n * regardless of the state of the poller.\n * It can return undefined or an incomplete form of the final TResult value\n * depending on the implementation.\n */\n getResult() {\n const state = this.operation.state;\n return state.result;\n }\n /**\n * Returns a serialized version of the poller's operation\n * by invoking the operation's toString method.\n */\n toString() {\n return this.operation.toString();\n }\n}\n\n// Copyright (c) Microsoft Corporation.\n/**\n * The LRO Engine, a class that performs polling.\n */\nclass LroEngine extends Poller {\n constructor(lro, options) {\n const { intervalInMs = POLL_INTERVAL_IN_MS, resumeFrom, resolveOnUnsuccessful = false, isDone, lroResourceLocationConfig, processResult, updateState, } = options || {};\n const state = resumeFrom\n ? deserializeState(resumeFrom)\n : {};\n const operation = new GenericPollOperation(state, lro, !resolveOnUnsuccessful, lroResourceLocationConfig, processResult, updateState, isDone);\n super(operation);\n this.resolveOnUnsuccessful = resolveOnUnsuccessful;\n this.config = { intervalInMs: intervalInMs };\n operation.setPollerConfig(this.config);\n }\n /**\n * The method used by the poller to wait before attempting to update its operation.\n */\n delay() {\n return new Promise((resolve) => setTimeout(() => resolve(), this.config.intervalInMs));\n }\n}\n\nexports.LroEngine = LroEngine;\nexports.Poller = Poller;\nexports.PollerCancelledError = PollerCancelledError;\nexports.PollerStoppedError = PollerStoppedError;\nexports.createHttpPoller = createHttpPoller;\n//# sourceMappingURL=index.js.map\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', { value: true });\n\nvar tslib = require('tslib');\n\n// Copyright (c) Microsoft Corporation.\n/**\n * returns an async iterator that iterates over results. It also has a `byPage`\n * method that returns pages of items at once.\n *\n * @param pagedResult - an object that specifies how to get pages.\n * @returns a paged async iterator that iterates over results.\n */\nfunction getPagedAsyncIterator(pagedResult) {\n var _a;\n const iter = getItemAsyncIterator(pagedResult);\n return {\n next() {\n return iter.next();\n },\n [Symbol.asyncIterator]() {\n return this;\n },\n byPage: (_a = pagedResult === null || pagedResult === void 0 ? void 0 : pagedResult.byPage) !== null && _a !== void 0 ? _a : ((settings) => {\n const { continuationToken, maxPageSize } = settings !== null && settings !== void 0 ? settings : {};\n return getPageAsyncIterator(pagedResult, {\n pageLink: continuationToken,\n maxPageSize,\n });\n }),\n };\n}\nfunction getItemAsyncIterator(pagedResult) {\n return tslib.__asyncGenerator(this, arguments, function* getItemAsyncIterator_1() {\n var e_1, _a, e_2, _b;\n const pages = getPageAsyncIterator(pagedResult);\n const firstVal = yield tslib.__await(pages.next());\n // if the result does not have an array shape, i.e. TPage = TElement, then we return it as is\n if (!Array.isArray(firstVal.value)) {\n // can extract elements from this page\n const { toElements } = pagedResult;\n if (toElements) {\n yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(toElements(firstVal.value))));\n try {\n for (var pages_1 = tslib.__asyncValues(pages), pages_1_1; pages_1_1 = yield tslib.__await(pages_1.next()), !pages_1_1.done;) {\n const page = pages_1_1.value;\n yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(toElements(page))));\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (pages_1_1 && !pages_1_1.done && (_a = pages_1.return)) yield tslib.__await(_a.call(pages_1));\n }\n finally { if (e_1) throw e_1.error; }\n }\n }\n else {\n yield yield tslib.__await(firstVal.value);\n // `pages` is of type `AsyncIterableIterator` but TPage = TElement in this case\n yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(pages)));\n }\n }\n else {\n yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(firstVal.value)));\n try {\n for (var pages_2 = tslib.__asyncValues(pages), pages_2_1; pages_2_1 = yield tslib.__await(pages_2.next()), !pages_2_1.done;) {\n const page = pages_2_1.value;\n // pages is of type `AsyncIterableIterator` so `page` is of type `TPage`. In this branch,\n // it must be the case that `TPage = TElement[]`\n yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(page)));\n }\n }\n catch (e_2_1) { e_2 = { error: e_2_1 }; }\n finally {\n try {\n if (pages_2_1 && !pages_2_1.done && (_b = pages_2.return)) yield tslib.__await(_b.call(pages_2));\n }\n finally { if (e_2) throw e_2.error; }\n }\n }\n });\n}\nfunction getPageAsyncIterator(pagedResult, options = {}) {\n return tslib.__asyncGenerator(this, arguments, function* getPageAsyncIterator_1() {\n const { pageLink, maxPageSize } = options;\n let response = yield tslib.__await(pagedResult.getPage(pageLink !== null && pageLink !== void 0 ? pageLink : pagedResult.firstPageLink, maxPageSize));\n if (!response) {\n return yield tslib.__await(void 0);\n }\n yield yield tslib.__await(response.page);\n while (response.nextPageLink) {\n response = yield tslib.__await(pagedResult.getPage(response.nextPageLink, maxPageSize));\n if (!response) {\n return yield tslib.__await(void 0);\n }\n yield yield tslib.__await(response.page);\n }\n });\n}\n\nexports.getPagedAsyncIterator = getPagedAsyncIterator;\n//# sourceMappingURL=index.js.map\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', { value: true });\n\nvar api = require('@opentelemetry/api');\n\n// Copyright (c) Microsoft Corporation.\n(function (SpanKind) {\n /** Default value. Indicates that the span is used internally. */\n SpanKind[SpanKind[\"INTERNAL\"] = 0] = \"INTERNAL\";\n /**\n * Indicates that the span covers server-side handling of an RPC or other\n * remote request.\n */\n SpanKind[SpanKind[\"SERVER\"] = 1] = \"SERVER\";\n /**\n * Indicates that the span covers the client-side wrapper around an RPC or\n * other remote request.\n */\n SpanKind[SpanKind[\"CLIENT\"] = 2] = \"CLIENT\";\n /**\n * Indicates that the span describes producer sending a message to a\n * broker. Unlike client and server, there is no direct critical path latency\n * relationship between producer and consumer spans.\n */\n SpanKind[SpanKind[\"PRODUCER\"] = 3] = \"PRODUCER\";\n /**\n * Indicates that the span describes consumer receiving a message from a\n * broker. Unlike client and server, there is no direct critical path latency\n * relationship between producer and consumer spans.\n */\n SpanKind[SpanKind[\"CONSUMER\"] = 4] = \"CONSUMER\";\n})(exports.SpanKind || (exports.SpanKind = {}));\n/**\n * Return the span if one exists\n *\n * @param context - context to get span from\n */\nfunction getSpan(context) {\n return api.trace.getSpan(context);\n}\n/**\n * Set the span on a context\n *\n * @param context - context to use as parent\n * @param span - span to set active\n */\nfunction setSpan(context, span) {\n return api.trace.setSpan(context, span);\n}\n/**\n * Wrap span context in a NoopSpan and set as span in a new\n * context\n *\n * @param context - context to set active span on\n * @param spanContext - span context to be wrapped\n */\nfunction setSpanContext(context, spanContext) {\n return api.trace.setSpanContext(context, spanContext);\n}\n/**\n * Get the span context of the span if it exists.\n *\n * @param context - context to get values from\n */\nfunction getSpanContext(context) {\n return api.trace.getSpanContext(context);\n}\n/**\n * Returns true of the given {@link SpanContext} is valid.\n * A valid {@link SpanContext} is one which has a valid trace ID and span ID as per the spec.\n *\n * @param context - the {@link SpanContext} to validate.\n *\n * @returns true if the {@link SpanContext} is valid, false otherwise.\n */\nfunction isSpanContextValid(context) {\n return api.trace.isSpanContextValid(context);\n}\nfunction getTracer(name, version) {\n return api.trace.getTracer(name || \"azure/core-tracing\", version);\n}\n/** Entrypoint for context API */\nconst context = api.context;\n(function (SpanStatusCode) {\n /**\n * The default status.\n */\n SpanStatusCode[SpanStatusCode[\"UNSET\"] = 0] = \"UNSET\";\n /**\n * The operation has been validated by an Application developer or\n * Operator to have completed successfully.\n */\n SpanStatusCode[SpanStatusCode[\"OK\"] = 1] = \"OK\";\n /**\n * The operation contains an error.\n */\n SpanStatusCode[SpanStatusCode[\"ERROR\"] = 2] = \"ERROR\";\n})(exports.SpanStatusCode || (exports.SpanStatusCode = {}));\n\n// Copyright (c) Microsoft Corporation.\nfunction isTracingDisabled() {\n var _a;\n if (typeof process === \"undefined\") {\n // not supported in browser for now without polyfills\n return false;\n }\n const azureTracingDisabledValue = (_a = process.env.AZURE_TRACING_DISABLED) === null || _a === void 0 ? void 0 : _a.toLowerCase();\n if (azureTracingDisabledValue === \"false\" || azureTracingDisabledValue === \"0\") {\n return false;\n }\n return Boolean(azureTracingDisabledValue);\n}\n/**\n * Creates a function that can be used to create spans using the global tracer.\n *\n * Usage:\n *\n * ```typescript\n * // once\n * const createSpan = createSpanFunction({ packagePrefix: \"Azure.Data.AppConfiguration\", namespace: \"Microsoft.AppConfiguration\" });\n *\n * // in each operation\n * const span = createSpan(\"deleteConfigurationSetting\", operationOptions);\n * // code...\n * span.end();\n * ```\n *\n * @hidden\n * @param args - allows configuration of the prefix for each span as well as the az.namespace field.\n */\nfunction createSpanFunction(args) {\n return function (operationName, operationOptions) {\n const tracer = getTracer();\n const tracingOptions = (operationOptions === null || operationOptions === void 0 ? void 0 : operationOptions.tracingOptions) || {};\n const spanOptions = Object.assign({ kind: exports.SpanKind.INTERNAL }, tracingOptions.spanOptions);\n const spanName = args.packagePrefix ? `${args.packagePrefix}.${operationName}` : operationName;\n let span;\n if (isTracingDisabled()) {\n span = api.trace.wrapSpanContext(api.INVALID_SPAN_CONTEXT);\n }\n else {\n span = tracer.startSpan(spanName, spanOptions, tracingOptions.tracingContext);\n }\n if (args.namespace) {\n span.setAttribute(\"az.namespace\", args.namespace);\n }\n let newSpanOptions = tracingOptions.spanOptions || {};\n if (span.isRecording() && args.namespace) {\n newSpanOptions = Object.assign(Object.assign({}, tracingOptions.spanOptions), { attributes: Object.assign(Object.assign({}, spanOptions.attributes), { \"az.namespace\": args.namespace }) });\n }\n const newTracingOptions = Object.assign(Object.assign({}, tracingOptions), { spanOptions: newSpanOptions, tracingContext: setSpan(tracingOptions.tracingContext || context.active(), span) });\n const newOperationOptions = Object.assign(Object.assign({}, operationOptions), { tracingOptions: newTracingOptions });\n return {\n span,\n updatedOptions: newOperationOptions\n };\n };\n}\n\n// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nconst VERSION = \"00\";\n/**\n * Generates a `SpanContext` given a `traceparent` header value.\n * @param traceParent - Serialized span context data as a `traceparent` header value.\n * @returns The `SpanContext` generated from the `traceparent` value.\n */\nfunction extractSpanContextFromTraceParentHeader(traceParentHeader) {\n const parts = traceParentHeader.split(\"-\");\n if (parts.length !== 4) {\n return;\n }\n const [version, traceId, spanId, traceOptions] = parts;\n if (version !== VERSION) {\n return;\n }\n const traceFlags = parseInt(traceOptions, 16);\n const spanContext = {\n spanId,\n traceId,\n traceFlags\n };\n return spanContext;\n}\n/**\n * Generates a `traceparent` value given a span context.\n * @param spanContext - Contains context for a specific span.\n * @returns The `spanContext` represented as a `traceparent` value.\n */\nfunction getTraceParentHeader(spanContext) {\n const missingFields = [];\n if (!spanContext.traceId) {\n missingFields.push(\"traceId\");\n }\n if (!spanContext.spanId) {\n missingFields.push(\"spanId\");\n }\n if (missingFields.length) {\n return;\n }\n const flags = spanContext.traceFlags || 0 /* NONE */;\n const hexFlags = flags.toString(16);\n const traceFlags = hexFlags.length === 1 ? `0${hexFlags}` : hexFlags;\n // https://www.w3.org/TR/trace-context/#traceparent-header-field-values\n return `${VERSION}-${spanContext.traceId}-${spanContext.spanId}-${traceFlags}`;\n}\n\nexports.context = context;\nexports.createSpanFunction = createSpanFunction;\nexports.extractSpanContextFromTraceParentHeader = extractSpanContextFromTraceParentHeader;\nexports.getSpan = getSpan;\nexports.getSpanContext = getSpanContext;\nexports.getTraceParentHeader = getTraceParentHeader;\nexports.getTracer = getTracer;\nexports.isSpanContextValid = isSpanContextValid;\nexports.setSpan = setSpan;\nexports.setSpanContext = setSpanContext;\n//# sourceMappingURL=index.js.map\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', { value: true });\n\nvar abortController = require('@azure/abort-controller');\nvar crypto = require('crypto');\n\n// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nvar _a;\n/**\n * A constant that indicates whether the environment the code is running is Node.JS.\n */\nconst isNode = typeof process !== \"undefined\" && Boolean(process.version) && Boolean((_a = process.versions) === null || _a === void 0 ? void 0 : _a.node);\n\n// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n/**\n * Helper TypeGuard that checks if something is defined or not.\n * @param thing - Anything\n */\nfunction isDefined(thing) {\n return typeof thing !== \"undefined\" && thing !== null;\n}\n/**\n * Helper TypeGuard that checks if the input is an object with the specified properties.\n * @param thing - Anything.\n * @param properties - The name of the properties that should appear in the object.\n */\nfunction isObjectWithProperties(thing, properties) {\n if (!isDefined(thing) || typeof thing !== \"object\") {\n return false;\n }\n for (const property of properties) {\n if (!objectHasProperty(thing, property)) {\n return false;\n }\n }\n return true;\n}\n/**\n * Helper TypeGuard that checks if the input is an object with the specified property.\n * @param thing - Any object.\n * @param property - The name of the property that should appear in the object.\n */\nfunction objectHasProperty(thing, property) {\n return (isDefined(thing) && typeof thing === \"object\" && property in thing);\n}\n\n// Copyright (c) Microsoft Corporation.\nconst StandardAbortMessage = \"The operation was aborted.\";\n/**\n * A wrapper for setTimeout that resolves a promise after timeInMs milliseconds.\n * @param timeInMs - The number of milliseconds to be delayed.\n * @param options - The options for delay - currently abort options\n * @returns Promise that is resolved after timeInMs\n */\nfunction delay(timeInMs, options) {\n return new Promise((resolve, reject) => {\n let timer = undefined;\n let onAborted = undefined;\n const rejectOnAbort = () => {\n var _a;\n return reject(new abortController.AbortError((_a = options === null || options === void 0 ? void 0 : options.abortErrorMsg) !== null && _a !== void 0 ? _a : StandardAbortMessage));\n };\n const removeListeners = () => {\n if ((options === null || options === void 0 ? void 0 : options.abortSignal) && onAborted) {\n options.abortSignal.removeEventListener(\"abort\", onAborted);\n }\n };\n onAborted = () => {\n if (isDefined(timer)) {\n clearTimeout(timer);\n }\n removeListeners();\n return rejectOnAbort();\n };\n if ((options === null || options === void 0 ? void 0 : options.abortSignal) && options.abortSignal.aborted) {\n return rejectOnAbort();\n }\n timer = setTimeout(() => {\n removeListeners();\n resolve();\n }, timeInMs);\n if (options === null || options === void 0 ? void 0 : options.abortSignal) {\n options.abortSignal.addEventListener(\"abort\", onAborted);\n }\n });\n}\n\n// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n/**\n * Returns a random integer value between a lower and upper bound,\n * inclusive of both bounds.\n * Note that this uses Math.random and isn't secure. If you need to use\n * this for any kind of security purpose, find a better source of random.\n * @param min - The smallest integer value allowed.\n * @param max - The largest integer value allowed.\n */\nfunction getRandomIntegerInclusive(min, max) {\n // Make sure inputs are integers.\n min = Math.ceil(min);\n max = Math.floor(max);\n // Pick a random offset from zero to the size of the range.\n // Since Math.random() can never return 1, we have to make the range one larger\n // in order to be inclusive of the maximum value after we take the floor.\n const offset = Math.floor(Math.random() * (max - min + 1));\n return offset + min;\n}\n\n// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n/**\n * Helper to determine when an input is a generic JS object.\n * @returns true when input is an object type that is not null, Array, RegExp, or Date.\n */\nfunction isObject(input) {\n return (typeof input === \"object\" &&\n input !== null &&\n !Array.isArray(input) &&\n !(input instanceof RegExp) &&\n !(input instanceof Date));\n}\n\n// Copyright (c) Microsoft Corporation.\n/**\n * Typeguard for an error object shape (has name and message)\n * @param e - Something caught by a catch clause.\n */\nfunction isError(e) {\n if (isObject(e)) {\n const hasName = typeof e.name === \"string\";\n const hasMessage = typeof e.message === \"string\";\n return hasName && hasMessage;\n }\n return false;\n}\n/**\n * Given what is thought to be an error object, return the message if possible.\n * If the message is missing, returns a stringified version of the input.\n * @param e - Something thrown from a try block\n * @returns The error message or a string of the input\n */\nfunction getErrorMessage(e) {\n if (isError(e)) {\n return e.message;\n }\n else {\n let stringified;\n try {\n if (typeof e === \"object\" && e) {\n stringified = JSON.stringify(e);\n }\n else {\n stringified = String(e);\n }\n }\n catch (err) {\n stringified = \"[unable to stringify input]\";\n }\n return `Unknown error ${stringified}`;\n }\n}\n\n// Copyright (c) Microsoft Corporation.\n/**\n * Generates a SHA-256 HMAC signature.\n * @param key - The HMAC key represented as a base64 string, used to generate the cryptographic HMAC hash.\n * @param stringToSign - The data to be signed.\n * @param encoding - The textual encoding to use for the returned HMAC digest.\n */\nasync function computeSha256Hmac(key, stringToSign, encoding) {\n const decodedKey = Buffer.from(key, \"base64\");\n return crypto.createHmac(\"sha256\", decodedKey).update(stringToSign).digest(encoding);\n}\n/**\n * Generates a SHA-256 hash.\n * @param content - The data to be included in the hash.\n * @param encoding - The textual encoding to use for the returned hash.\n */\nasync function computeSha256Hash(content, encoding) {\n return crypto.createHash(\"sha256\").update(content).digest(encoding);\n}\n\nexports.computeSha256Hash = computeSha256Hash;\nexports.computeSha256Hmac = computeSha256Hmac;\nexports.delay = delay;\nexports.getErrorMessage = getErrorMessage;\nexports.getRandomIntegerInclusive = getRandomIntegerInclusive;\nexports.isDefined = isDefined;\nexports.isError = isError;\nexports.isNode = isNode;\nexports.isObject = isObject;\nexports.isObjectWithProperties = isObjectWithProperties;\nexports.objectHasProperty = objectHasProperty;\n//# sourceMappingURL=index.js.map\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', { value: true });\n\nfunction _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }\n\nvar util = _interopDefault(require('util'));\nvar os = require('os');\n\n// Copyright (c) Microsoft Corporation.\nfunction log(message, ...args) {\n process.stderr.write(`${util.format(message, ...args)}${os.EOL}`);\n}\n\n// Copyright (c) Microsoft Corporation.\nconst debugEnvVariable = (typeof process !== \"undefined\" && process.env && process.env.DEBUG) || undefined;\nlet enabledString;\nlet enabledNamespaces = [];\nlet skippedNamespaces = [];\nconst debuggers = [];\nif (debugEnvVariable) {\n enable(debugEnvVariable);\n}\nconst debugObj = Object.assign((namespace) => {\n return createDebugger(namespace);\n}, {\n enable,\n enabled,\n disable,\n log\n});\nfunction enable(namespaces) {\n enabledString = namespaces;\n enabledNamespaces = [];\n skippedNamespaces = [];\n const wildcard = /\\*/g;\n const namespaceList = namespaces.split(\",\").map((ns) => ns.trim().replace(wildcard, \".*?\"));\n for (const ns of namespaceList) {\n if (ns.startsWith(\"-\")) {\n skippedNamespaces.push(new RegExp(`^${ns.substr(1)}$`));\n }\n else {\n enabledNamespaces.push(new RegExp(`^${ns}$`));\n }\n }\n for (const instance of debuggers) {\n instance.enabled = enabled(instance.namespace);\n }\n}\nfunction enabled(namespace) {\n if (namespace.endsWith(\"*\")) {\n return true;\n }\n for (const skipped of skippedNamespaces) {\n if (skipped.test(namespace)) {\n return false;\n }\n }\n for (const enabledNamespace of enabledNamespaces) {\n if (enabledNamespace.test(namespace)) {\n return true;\n }\n }\n return false;\n}\nfunction disable() {\n const result = enabledString || \"\";\n enable(\"\");\n return result;\n}\nfunction createDebugger(namespace) {\n const newDebugger = Object.assign(debug, {\n enabled: enabled(namespace),\n destroy,\n log: debugObj.log,\n namespace,\n extend\n });\n function debug(...args) {\n if (!newDebugger.enabled) {\n return;\n }\n if (args.length > 0) {\n args[0] = `${namespace} ${args[0]}`;\n }\n newDebugger.log(...args);\n }\n debuggers.push(newDebugger);\n return newDebugger;\n}\nfunction destroy() {\n const index = debuggers.indexOf(this);\n if (index >= 0) {\n debuggers.splice(index, 1);\n return true;\n }\n return false;\n}\nfunction extend(namespace) {\n const newDebugger = createDebugger(`${this.namespace}:${namespace}`);\n newDebugger.log = this.log;\n return newDebugger;\n}\n\n// Copyright (c) Microsoft Corporation.\nconst registeredLoggers = new Set();\nconst logLevelFromEnv = (typeof process !== \"undefined\" && process.env && process.env.AZURE_LOG_LEVEL) || undefined;\nlet azureLogLevel;\n/**\n * The AzureLogger provides a mechanism for overriding where logs are output to.\n * By default, logs are sent to stderr.\n * Override the `log` method to redirect logs to another location.\n */\nconst AzureLogger = debugObj(\"azure\");\nAzureLogger.log = (...args) => {\n debugObj.log(...args);\n};\nconst AZURE_LOG_LEVELS = [\"verbose\", \"info\", \"warning\", \"error\"];\nif (logLevelFromEnv) {\n // avoid calling setLogLevel because we don't want a mis-set environment variable to crash\n if (isAzureLogLevel(logLevelFromEnv)) {\n setLogLevel(logLevelFromEnv);\n }\n else {\n console.error(`AZURE_LOG_LEVEL set to unknown log level '${logLevelFromEnv}'; logging is not enabled. Acceptable values: ${AZURE_LOG_LEVELS.join(\", \")}.`);\n }\n}\n/**\n * Immediately enables logging at the specified log level.\n * @param level - The log level to enable for logging.\n * Options from most verbose to least verbose are:\n * - verbose\n * - info\n * - warning\n * - error\n */\nfunction setLogLevel(level) {\n if (level && !isAzureLogLevel(level)) {\n throw new Error(`Unknown log level '${level}'. Acceptable values: ${AZURE_LOG_LEVELS.join(\",\")}`);\n }\n azureLogLevel = level;\n const enabledNamespaces = [];\n for (const logger of registeredLoggers) {\n if (shouldEnable(logger)) {\n enabledNamespaces.push(logger.namespace);\n }\n }\n debugObj.enable(enabledNamespaces.join(\",\"));\n}\n/**\n * Retrieves the currently specified log level.\n */\nfunction getLogLevel() {\n return azureLogLevel;\n}\nconst levelMap = {\n verbose: 400,\n info: 300,\n warning: 200,\n error: 100\n};\n/**\n * Creates a logger for use by the Azure SDKs that inherits from `AzureLogger`.\n * @param namespace - The name of the SDK package.\n * @hidden\n */\nfunction createClientLogger(namespace) {\n const clientRootLogger = AzureLogger.extend(namespace);\n patchLogMethod(AzureLogger, clientRootLogger);\n return {\n error: createLogger(clientRootLogger, \"error\"),\n warning: createLogger(clientRootLogger, \"warning\"),\n info: createLogger(clientRootLogger, \"info\"),\n verbose: createLogger(clientRootLogger, \"verbose\")\n };\n}\nfunction patchLogMethod(parent, child) {\n child.log = (...args) => {\n parent.log(...args);\n };\n}\nfunction createLogger(parent, level) {\n const logger = Object.assign(parent.extend(level), {\n level\n });\n patchLogMethod(parent, logger);\n if (shouldEnable(logger)) {\n const enabledNamespaces = debugObj.disable();\n debugObj.enable(enabledNamespaces + \",\" + logger.namespace);\n }\n registeredLoggers.add(logger);\n return logger;\n}\nfunction shouldEnable(logger) {\n if (azureLogLevel && levelMap[logger.level] <= levelMap[azureLogLevel]) {\n return true;\n }\n else {\n return false;\n }\n}\nfunction isAzureLogLevel(logLevel) {\n return AZURE_LOG_LEVELS.includes(logLevel);\n}\n\nexports.AzureLogger = AzureLogger;\nexports.createClientLogger = createClientLogger;\nexports.getLogLevel = getLogLevel;\nexports.setLogLevel = setLogLevel;\n//# sourceMappingURL=index.js.map\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', { value: true });\n\nvar coreHttp = require('@azure/core-http');\nvar tslib = require('tslib');\nvar coreTracing = require('@azure/core-tracing');\nvar logger$1 = require('@azure/logger');\nvar abortController = require('@azure/abort-controller');\nvar os = require('os');\nvar crypto = require('crypto');\nvar stream = require('stream');\nrequire('@azure/core-paging');\nvar coreLro = require('@azure/core-lro');\nvar events = require('events');\nvar fs = require('fs');\nvar util = require('util');\n\nfunction _interopNamespace(e) {\n if (e && e.__esModule) return e;\n var n = Object.create(null);\n if (e) {\n Object.keys(e).forEach(function (k) {\n if (k !== 'default') {\n var d = Object.getOwnPropertyDescriptor(e, k);\n Object.defineProperty(n, k, d.get ? d : {\n enumerable: true,\n get: function () { return e[k]; }\n });\n }\n });\n }\n n[\"default\"] = e;\n return Object.freeze(n);\n}\n\nvar coreHttp__namespace = /*#__PURE__*/_interopNamespace(coreHttp);\nvar os__namespace = /*#__PURE__*/_interopNamespace(os);\nvar fs__namespace = /*#__PURE__*/_interopNamespace(fs);\nvar util__namespace = /*#__PURE__*/_interopNamespace(util);\n\n/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\nconst BlobServiceProperties = {\n serializedName: \"BlobServiceProperties\",\n xmlName: \"StorageServiceProperties\",\n type: {\n name: \"Composite\",\n className: \"BlobServiceProperties\",\n modelProperties: {\n blobAnalyticsLogging: {\n serializedName: \"Logging\",\n xmlName: \"Logging\",\n type: {\n name: \"Composite\",\n className: \"Logging\"\n }\n },\n hourMetrics: {\n serializedName: \"HourMetrics\",\n xmlName: \"HourMetrics\",\n type: {\n name: \"Composite\",\n className: \"Metrics\"\n }\n },\n minuteMetrics: {\n serializedName: \"MinuteMetrics\",\n xmlName: \"MinuteMetrics\",\n type: {\n name: \"Composite\",\n className: \"Metrics\"\n }\n },\n cors: {\n serializedName: \"Cors\",\n xmlName: \"Cors\",\n xmlIsWrapped: true,\n xmlElementName: \"CorsRule\",\n type: {\n name: \"Sequence\",\n element: {\n type: {\n name: \"Composite\",\n className: \"CorsRule\"\n }\n }\n }\n },\n defaultServiceVersion: {\n serializedName: \"DefaultServiceVersion\",\n xmlName: \"DefaultServiceVersion\",\n type: {\n name: \"String\"\n }\n },\n deleteRetentionPolicy: {\n serializedName: \"DeleteRetentionPolicy\",\n xmlName: \"DeleteRetentionPolicy\",\n type: {\n name: \"Composite\",\n className: \"RetentionPolicy\"\n }\n },\n staticWebsite: {\n serializedName: \"StaticWebsite\",\n xmlName: \"StaticWebsite\",\n type: {\n name: \"Composite\",\n className: \"StaticWebsite\"\n }\n }\n }\n }\n};\nconst Logging = {\n serializedName: \"Logging\",\n type: {\n name: \"Composite\",\n className: \"Logging\",\n modelProperties: {\n version: {\n serializedName: \"Version\",\n required: true,\n xmlName: \"Version\",\n type: {\n name: \"String\"\n }\n },\n deleteProperty: {\n serializedName: \"Delete\",\n required: true,\n xmlName: \"Delete\",\n type: {\n name: \"Boolean\"\n }\n },\n read: {\n serializedName: \"Read\",\n required: true,\n xmlName: \"Read\",\n type: {\n name: \"Boolean\"\n }\n },\n write: {\n serializedName: \"Write\",\n required: true,\n xmlName: \"Write\",\n type: {\n name: \"Boolean\"\n }\n },\n retentionPolicy: {\n serializedName: \"RetentionPolicy\",\n xmlName: \"RetentionPolicy\",\n type: {\n name: \"Composite\",\n className: \"RetentionPolicy\"\n }\n }\n }\n }\n};\nconst RetentionPolicy = {\n serializedName: \"RetentionPolicy\",\n type: {\n name: \"Composite\",\n className: \"RetentionPolicy\",\n modelProperties: {\n enabled: {\n serializedName: \"Enabled\",\n required: true,\n xmlName: \"Enabled\",\n type: {\n name: \"Boolean\"\n }\n },\n days: {\n constraints: {\n InclusiveMinimum: 1\n },\n serializedName: \"Days\",\n xmlName: \"Days\",\n type: {\n name: \"Number\"\n }\n }\n }\n }\n};\nconst Metrics = {\n serializedName: \"Metrics\",\n type: {\n name: \"Composite\",\n className: \"Metrics\",\n modelProperties: {\n version: {\n serializedName: \"Version\",\n xmlName: \"Version\",\n type: {\n name: \"String\"\n }\n },\n enabled: {\n serializedName: \"Enabled\",\n required: true,\n xmlName: \"Enabled\",\n type: {\n name: \"Boolean\"\n }\n },\n includeAPIs: {\n serializedName: \"IncludeAPIs\",\n xmlName: \"IncludeAPIs\",\n type: {\n name: \"Boolean\"\n }\n },\n retentionPolicy: {\n serializedName: \"RetentionPolicy\",\n xmlName: \"RetentionPolicy\",\n type: {\n name: \"Composite\",\n className: \"RetentionPolicy\"\n }\n }\n }\n }\n};\nconst CorsRule = {\n serializedName: \"CorsRule\",\n type: {\n name: \"Composite\",\n className: \"CorsRule\",\n modelProperties: {\n allowedOrigins: {\n serializedName: \"AllowedOrigins\",\n required: true,\n xmlName: \"AllowedOrigins\",\n type: {\n name: \"String\"\n }\n },\n allowedMethods: {\n serializedName: \"AllowedMethods\",\n required: true,\n xmlName: \"AllowedMethods\",\n type: {\n name: \"String\"\n }\n },\n allowedHeaders: {\n serializedName: \"AllowedHeaders\",\n required: true,\n xmlName: \"AllowedHeaders\",\n type: {\n name: \"String\"\n }\n },\n exposedHeaders: {\n serializedName: \"ExposedHeaders\",\n required: true,\n xmlName: \"ExposedHeaders\",\n type: {\n name: \"String\"\n }\n },\n maxAgeInSeconds: {\n constraints: {\n InclusiveMinimum: 0\n },\n serializedName: \"MaxAgeInSeconds\",\n required: true,\n xmlName: \"MaxAgeInSeconds\",\n type: {\n name: \"Number\"\n }\n }\n }\n }\n};\nconst StaticWebsite = {\n serializedName: \"StaticWebsite\",\n type: {\n name: \"Composite\",\n className: \"StaticWebsite\",\n modelProperties: {\n enabled: {\n serializedName: \"Enabled\",\n required: true,\n xmlName: \"Enabled\",\n type: {\n name: \"Boolean\"\n }\n },\n indexDocument: {\n serializedName: \"IndexDocument\",\n xmlName: \"IndexDocument\",\n type: {\n name: \"String\"\n }\n },\n errorDocument404Path: {\n serializedName: \"ErrorDocument404Path\",\n xmlName: \"ErrorDocument404Path\",\n type: {\n name: \"String\"\n }\n },\n defaultIndexDocumentPath: {\n serializedName: \"DefaultIndexDocumentPath\",\n xmlName: \"DefaultIndexDocumentPath\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst StorageError = {\n serializedName: \"StorageError\",\n type: {\n name: \"Composite\",\n className: \"StorageError\",\n modelProperties: {\n message: {\n serializedName: \"Message\",\n xmlName: \"Message\",\n type: {\n name: \"String\"\n }\n },\n code: {\n serializedName: \"Code\",\n xmlName: \"Code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst BlobServiceStatistics = {\n serializedName: \"BlobServiceStatistics\",\n xmlName: \"StorageServiceStats\",\n type: {\n name: \"Composite\",\n className: \"BlobServiceStatistics\",\n modelProperties: {\n geoReplication: {\n serializedName: \"GeoReplication\",\n xmlName: \"GeoReplication\",\n type: {\n name: \"Composite\",\n className: \"GeoReplication\"\n }\n }\n }\n }\n};\nconst GeoReplication = {\n serializedName: \"GeoReplication\",\n type: {\n name: \"Composite\",\n className: \"GeoReplication\",\n modelProperties: {\n status: {\n serializedName: \"Status\",\n required: true,\n xmlName: \"Status\",\n type: {\n name: \"Enum\",\n allowedValues: [\"live\", \"bootstrap\", \"unavailable\"]\n }\n },\n lastSyncOn: {\n serializedName: \"LastSyncTime\",\n required: true,\n xmlName: \"LastSyncTime\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n }\n }\n }\n};\nconst ListContainersSegmentResponse = {\n serializedName: \"ListContainersSegmentResponse\",\n xmlName: \"EnumerationResults\",\n type: {\n name: \"Composite\",\n className: \"ListContainersSegmentResponse\",\n modelProperties: {\n serviceEndpoint: {\n serializedName: \"ServiceEndpoint\",\n required: true,\n xmlName: \"ServiceEndpoint\",\n xmlIsAttribute: true,\n type: {\n name: \"String\"\n }\n },\n prefix: {\n serializedName: \"Prefix\",\n xmlName: \"Prefix\",\n type: {\n name: \"String\"\n }\n },\n marker: {\n serializedName: \"Marker\",\n xmlName: \"Marker\",\n type: {\n name: \"String\"\n }\n },\n maxPageSize: {\n serializedName: \"MaxResults\",\n xmlName: \"MaxResults\",\n type: {\n name: \"Number\"\n }\n },\n containerItems: {\n serializedName: \"ContainerItems\",\n required: true,\n xmlName: \"Containers\",\n xmlIsWrapped: true,\n xmlElementName: \"Container\",\n type: {\n name: \"Sequence\",\n element: {\n type: {\n name: \"Composite\",\n className: \"ContainerItem\"\n }\n }\n }\n },\n continuationToken: {\n serializedName: \"NextMarker\",\n xmlName: \"NextMarker\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst ContainerItem = {\n serializedName: \"ContainerItem\",\n xmlName: \"Container\",\n type: {\n name: \"Composite\",\n className: \"ContainerItem\",\n modelProperties: {\n name: {\n serializedName: \"Name\",\n required: true,\n xmlName: \"Name\",\n type: {\n name: \"String\"\n }\n },\n deleted: {\n serializedName: \"Deleted\",\n xmlName: \"Deleted\",\n type: {\n name: \"Boolean\"\n }\n },\n version: {\n serializedName: \"Version\",\n xmlName: \"Version\",\n type: {\n name: \"String\"\n }\n },\n properties: {\n serializedName: \"Properties\",\n xmlName: \"Properties\",\n type: {\n name: \"Composite\",\n className: \"ContainerProperties\"\n }\n },\n metadata: {\n serializedName: \"Metadata\",\n xmlName: \"Metadata\",\n type: {\n name: \"Dictionary\",\n value: { type: { name: \"String\" } }\n }\n }\n }\n }\n};\nconst ContainerProperties = {\n serializedName: \"ContainerProperties\",\n type: {\n name: \"Composite\",\n className: \"ContainerProperties\",\n modelProperties: {\n lastModified: {\n serializedName: \"Last-Modified\",\n required: true,\n xmlName: \"Last-Modified\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n etag: {\n serializedName: \"Etag\",\n required: true,\n xmlName: \"Etag\",\n type: {\n name: \"String\"\n }\n },\n leaseStatus: {\n serializedName: \"LeaseStatus\",\n xmlName: \"LeaseStatus\",\n type: {\n name: \"Enum\",\n allowedValues: [\"locked\", \"unlocked\"]\n }\n },\n leaseState: {\n serializedName: \"LeaseState\",\n xmlName: \"LeaseState\",\n type: {\n name: \"Enum\",\n allowedValues: [\n \"available\",\n \"leased\",\n \"expired\",\n \"breaking\",\n \"broken\"\n ]\n }\n },\n leaseDuration: {\n serializedName: \"LeaseDuration\",\n xmlName: \"LeaseDuration\",\n type: {\n name: \"Enum\",\n allowedValues: [\"infinite\", \"fixed\"]\n }\n },\n publicAccess: {\n serializedName: \"PublicAccess\",\n xmlName: \"PublicAccess\",\n type: {\n name: \"Enum\",\n allowedValues: [\"container\", \"blob\"]\n }\n },\n hasImmutabilityPolicy: {\n serializedName: \"HasImmutabilityPolicy\",\n xmlName: \"HasImmutabilityPolicy\",\n type: {\n name: \"Boolean\"\n }\n },\n hasLegalHold: {\n serializedName: \"HasLegalHold\",\n xmlName: \"HasLegalHold\",\n type: {\n name: \"Boolean\"\n }\n },\n defaultEncryptionScope: {\n serializedName: \"DefaultEncryptionScope\",\n xmlName: \"DefaultEncryptionScope\",\n type: {\n name: \"String\"\n }\n },\n preventEncryptionScopeOverride: {\n serializedName: \"DenyEncryptionScopeOverride\",\n xmlName: \"DenyEncryptionScopeOverride\",\n type: {\n name: \"Boolean\"\n }\n },\n deletedOn: {\n serializedName: \"DeletedTime\",\n xmlName: \"DeletedTime\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n remainingRetentionDays: {\n serializedName: \"RemainingRetentionDays\",\n xmlName: \"RemainingRetentionDays\",\n type: {\n name: \"Number\"\n }\n },\n isImmutableStorageWithVersioningEnabled: {\n serializedName: \"ImmutableStorageWithVersioningEnabled\",\n xmlName: \"ImmutableStorageWithVersioningEnabled\",\n type: {\n name: \"Boolean\"\n }\n }\n }\n }\n};\nconst KeyInfo = {\n serializedName: \"KeyInfo\",\n type: {\n name: \"Composite\",\n className: \"KeyInfo\",\n modelProperties: {\n startsOn: {\n serializedName: \"Start\",\n required: true,\n xmlName: \"Start\",\n type: {\n name: \"String\"\n }\n },\n expiresOn: {\n serializedName: \"Expiry\",\n required: true,\n xmlName: \"Expiry\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst UserDelegationKey = {\n serializedName: \"UserDelegationKey\",\n type: {\n name: \"Composite\",\n className: \"UserDelegationKey\",\n modelProperties: {\n signedObjectId: {\n serializedName: \"SignedOid\",\n required: true,\n xmlName: \"SignedOid\",\n type: {\n name: \"String\"\n }\n },\n signedTenantId: {\n serializedName: \"SignedTid\",\n required: true,\n xmlName: \"SignedTid\",\n type: {\n name: \"String\"\n }\n },\n signedStartsOn: {\n serializedName: \"SignedStart\",\n required: true,\n xmlName: \"SignedStart\",\n type: {\n name: \"String\"\n }\n },\n signedExpiresOn: {\n serializedName: \"SignedExpiry\",\n required: true,\n xmlName: \"SignedExpiry\",\n type: {\n name: \"String\"\n }\n },\n signedService: {\n serializedName: \"SignedService\",\n required: true,\n xmlName: \"SignedService\",\n type: {\n name: \"String\"\n }\n },\n signedVersion: {\n serializedName: \"SignedVersion\",\n required: true,\n xmlName: \"SignedVersion\",\n type: {\n name: \"String\"\n }\n },\n value: {\n serializedName: \"Value\",\n required: true,\n xmlName: \"Value\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst FilterBlobSegment = {\n serializedName: \"FilterBlobSegment\",\n xmlName: \"EnumerationResults\",\n type: {\n name: \"Composite\",\n className: \"FilterBlobSegment\",\n modelProperties: {\n serviceEndpoint: {\n serializedName: \"ServiceEndpoint\",\n required: true,\n xmlName: \"ServiceEndpoint\",\n xmlIsAttribute: true,\n type: {\n name: \"String\"\n }\n },\n where: {\n serializedName: \"Where\",\n required: true,\n xmlName: \"Where\",\n type: {\n name: \"String\"\n }\n },\n blobs: {\n serializedName: \"Blobs\",\n required: true,\n xmlName: \"Blobs\",\n xmlIsWrapped: true,\n xmlElementName: \"Blob\",\n type: {\n name: \"Sequence\",\n element: {\n type: {\n name: \"Composite\",\n className: \"FilterBlobItem\"\n }\n }\n }\n },\n continuationToken: {\n serializedName: \"NextMarker\",\n xmlName: \"NextMarker\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst FilterBlobItem = {\n serializedName: \"FilterBlobItem\",\n xmlName: \"Blob\",\n type: {\n name: \"Composite\",\n className: \"FilterBlobItem\",\n modelProperties: {\n name: {\n serializedName: \"Name\",\n required: true,\n xmlName: \"Name\",\n type: {\n name: \"String\"\n }\n },\n containerName: {\n serializedName: \"ContainerName\",\n required: true,\n xmlName: \"ContainerName\",\n type: {\n name: \"String\"\n }\n },\n tags: {\n serializedName: \"Tags\",\n xmlName: \"Tags\",\n type: {\n name: \"Composite\",\n className: \"BlobTags\"\n }\n }\n }\n }\n};\nconst BlobTags = {\n serializedName: \"BlobTags\",\n xmlName: \"Tags\",\n type: {\n name: \"Composite\",\n className: \"BlobTags\",\n modelProperties: {\n blobTagSet: {\n serializedName: \"BlobTagSet\",\n required: true,\n xmlName: \"TagSet\",\n xmlIsWrapped: true,\n xmlElementName: \"Tag\",\n type: {\n name: \"Sequence\",\n element: {\n type: {\n name: \"Composite\",\n className: \"BlobTag\"\n }\n }\n }\n }\n }\n }\n};\nconst BlobTag = {\n serializedName: \"BlobTag\",\n xmlName: \"Tag\",\n type: {\n name: \"Composite\",\n className: \"BlobTag\",\n modelProperties: {\n key: {\n serializedName: \"Key\",\n required: true,\n xmlName: \"Key\",\n type: {\n name: \"String\"\n }\n },\n value: {\n serializedName: \"Value\",\n required: true,\n xmlName: \"Value\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst SignedIdentifier = {\n serializedName: \"SignedIdentifier\",\n xmlName: \"SignedIdentifier\",\n type: {\n name: \"Composite\",\n className: \"SignedIdentifier\",\n modelProperties: {\n id: {\n serializedName: \"Id\",\n required: true,\n xmlName: \"Id\",\n type: {\n name: \"String\"\n }\n },\n accessPolicy: {\n serializedName: \"AccessPolicy\",\n xmlName: \"AccessPolicy\",\n type: {\n name: \"Composite\",\n className: \"AccessPolicy\"\n }\n }\n }\n }\n};\nconst AccessPolicy = {\n serializedName: \"AccessPolicy\",\n type: {\n name: \"Composite\",\n className: \"AccessPolicy\",\n modelProperties: {\n startsOn: {\n serializedName: \"Start\",\n xmlName: \"Start\",\n type: {\n name: \"String\"\n }\n },\n expiresOn: {\n serializedName: \"Expiry\",\n xmlName: \"Expiry\",\n type: {\n name: \"String\"\n }\n },\n permissions: {\n serializedName: \"Permission\",\n xmlName: \"Permission\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst ListBlobsFlatSegmentResponse = {\n serializedName: \"ListBlobsFlatSegmentResponse\",\n xmlName: \"EnumerationResults\",\n type: {\n name: \"Composite\",\n className: \"ListBlobsFlatSegmentResponse\",\n modelProperties: {\n serviceEndpoint: {\n serializedName: \"ServiceEndpoint\",\n required: true,\n xmlName: \"ServiceEndpoint\",\n xmlIsAttribute: true,\n type: {\n name: \"String\"\n }\n },\n containerName: {\n serializedName: \"ContainerName\",\n required: true,\n xmlName: \"ContainerName\",\n xmlIsAttribute: true,\n type: {\n name: \"String\"\n }\n },\n prefix: {\n serializedName: \"Prefix\",\n xmlName: \"Prefix\",\n type: {\n name: \"String\"\n }\n },\n marker: {\n serializedName: \"Marker\",\n xmlName: \"Marker\",\n type: {\n name: \"String\"\n }\n },\n maxPageSize: {\n serializedName: \"MaxResults\",\n xmlName: \"MaxResults\",\n type: {\n name: \"Number\"\n }\n },\n segment: {\n serializedName: \"Segment\",\n xmlName: \"Blobs\",\n type: {\n name: \"Composite\",\n className: \"BlobFlatListSegment\"\n }\n },\n continuationToken: {\n serializedName: \"NextMarker\",\n xmlName: \"NextMarker\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst BlobFlatListSegment = {\n serializedName: \"BlobFlatListSegment\",\n xmlName: \"Blobs\",\n type: {\n name: \"Composite\",\n className: \"BlobFlatListSegment\",\n modelProperties: {\n blobItems: {\n serializedName: \"BlobItems\",\n required: true,\n xmlName: \"BlobItems\",\n xmlElementName: \"Blob\",\n type: {\n name: \"Sequence\",\n element: {\n type: {\n name: \"Composite\",\n className: \"BlobItemInternal\"\n }\n }\n }\n }\n }\n }\n};\nconst BlobItemInternal = {\n serializedName: \"BlobItemInternal\",\n xmlName: \"Blob\",\n type: {\n name: \"Composite\",\n className: \"BlobItemInternal\",\n modelProperties: {\n name: {\n serializedName: \"Name\",\n xmlName: \"Name\",\n type: {\n name: \"Composite\",\n className: \"BlobName\"\n }\n },\n deleted: {\n serializedName: \"Deleted\",\n required: true,\n xmlName: \"Deleted\",\n type: {\n name: \"Boolean\"\n }\n },\n snapshot: {\n serializedName: \"Snapshot\",\n required: true,\n xmlName: \"Snapshot\",\n type: {\n name: \"String\"\n }\n },\n versionId: {\n serializedName: \"VersionId\",\n xmlName: \"VersionId\",\n type: {\n name: \"String\"\n }\n },\n isCurrentVersion: {\n serializedName: \"IsCurrentVersion\",\n xmlName: \"IsCurrentVersion\",\n type: {\n name: \"Boolean\"\n }\n },\n properties: {\n serializedName: \"Properties\",\n xmlName: \"Properties\",\n type: {\n name: \"Composite\",\n className: \"BlobPropertiesInternal\"\n }\n },\n metadata: {\n serializedName: \"Metadata\",\n xmlName: \"Metadata\",\n type: {\n name: \"Dictionary\",\n value: { type: { name: \"String\" } }\n }\n },\n blobTags: {\n serializedName: \"BlobTags\",\n xmlName: \"Tags\",\n type: {\n name: \"Composite\",\n className: \"BlobTags\"\n }\n },\n objectReplicationMetadata: {\n serializedName: \"ObjectReplicationMetadata\",\n xmlName: \"OrMetadata\",\n type: {\n name: \"Dictionary\",\n value: { type: { name: \"String\" } }\n }\n },\n hasVersionsOnly: {\n serializedName: \"HasVersionsOnly\",\n xmlName: \"HasVersionsOnly\",\n type: {\n name: \"Boolean\"\n }\n }\n }\n }\n};\nconst BlobName = {\n serializedName: \"BlobName\",\n type: {\n name: \"Composite\",\n className: \"BlobName\",\n modelProperties: {\n encoded: {\n serializedName: \"Encoded\",\n xmlName: \"Encoded\",\n xmlIsAttribute: true,\n type: {\n name: \"Boolean\"\n }\n },\n content: {\n serializedName: \"content\",\n xmlName: \"content\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst BlobPropertiesInternal = {\n serializedName: \"BlobPropertiesInternal\",\n xmlName: \"Properties\",\n type: {\n name: \"Composite\",\n className: \"BlobPropertiesInternal\",\n modelProperties: {\n createdOn: {\n serializedName: \"Creation-Time\",\n xmlName: \"Creation-Time\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n lastModified: {\n serializedName: \"Last-Modified\",\n required: true,\n xmlName: \"Last-Modified\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n etag: {\n serializedName: \"Etag\",\n required: true,\n xmlName: \"Etag\",\n type: {\n name: \"String\"\n }\n },\n contentLength: {\n serializedName: \"Content-Length\",\n xmlName: \"Content-Length\",\n type: {\n name: \"Number\"\n }\n },\n contentType: {\n serializedName: \"Content-Type\",\n xmlName: \"Content-Type\",\n type: {\n name: \"String\"\n }\n },\n contentEncoding: {\n serializedName: \"Content-Encoding\",\n xmlName: \"Content-Encoding\",\n type: {\n name: \"String\"\n }\n },\n contentLanguage: {\n serializedName: \"Content-Language\",\n xmlName: \"Content-Language\",\n type: {\n name: \"String\"\n }\n },\n contentMD5: {\n serializedName: \"Content-MD5\",\n xmlName: \"Content-MD5\",\n type: {\n name: \"ByteArray\"\n }\n },\n contentDisposition: {\n serializedName: \"Content-Disposition\",\n xmlName: \"Content-Disposition\",\n type: {\n name: \"String\"\n }\n },\n cacheControl: {\n serializedName: \"Cache-Control\",\n xmlName: \"Cache-Control\",\n type: {\n name: \"String\"\n }\n },\n blobSequenceNumber: {\n serializedName: \"x-ms-blob-sequence-number\",\n xmlName: \"x-ms-blob-sequence-number\",\n type: {\n name: \"Number\"\n }\n },\n blobType: {\n serializedName: \"BlobType\",\n xmlName: \"BlobType\",\n type: {\n name: \"Enum\",\n allowedValues: [\"BlockBlob\", \"PageBlob\", \"AppendBlob\"]\n }\n },\n leaseStatus: {\n serializedName: \"LeaseStatus\",\n xmlName: \"LeaseStatus\",\n type: {\n name: \"Enum\",\n allowedValues: [\"locked\", \"unlocked\"]\n }\n },\n leaseState: {\n serializedName: \"LeaseState\",\n xmlName: \"LeaseState\",\n type: {\n name: \"Enum\",\n allowedValues: [\n \"available\",\n \"leased\",\n \"expired\",\n \"breaking\",\n \"broken\"\n ]\n }\n },\n leaseDuration: {\n serializedName: \"LeaseDuration\",\n xmlName: \"LeaseDuration\",\n type: {\n name: \"Enum\",\n allowedValues: [\"infinite\", \"fixed\"]\n }\n },\n copyId: {\n serializedName: \"CopyId\",\n xmlName: \"CopyId\",\n type: {\n name: \"String\"\n }\n },\n copyStatus: {\n serializedName: \"CopyStatus\",\n xmlName: \"CopyStatus\",\n type: {\n name: \"Enum\",\n allowedValues: [\"pending\", \"success\", \"aborted\", \"failed\"]\n }\n },\n copySource: {\n serializedName: \"CopySource\",\n xmlName: \"CopySource\",\n type: {\n name: \"String\"\n }\n },\n copyProgress: {\n serializedName: \"CopyProgress\",\n xmlName: \"CopyProgress\",\n type: {\n name: \"String\"\n }\n },\n copyCompletedOn: {\n serializedName: \"CopyCompletionTime\",\n xmlName: \"CopyCompletionTime\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n copyStatusDescription: {\n serializedName: \"CopyStatusDescription\",\n xmlName: \"CopyStatusDescription\",\n type: {\n name: \"String\"\n }\n },\n serverEncrypted: {\n serializedName: \"ServerEncrypted\",\n xmlName: \"ServerEncrypted\",\n type: {\n name: \"Boolean\"\n }\n },\n incrementalCopy: {\n serializedName: \"IncrementalCopy\",\n xmlName: \"IncrementalCopy\",\n type: {\n name: \"Boolean\"\n }\n },\n destinationSnapshot: {\n serializedName: \"DestinationSnapshot\",\n xmlName: \"DestinationSnapshot\",\n type: {\n name: \"String\"\n }\n },\n deletedOn: {\n serializedName: \"DeletedTime\",\n xmlName: \"DeletedTime\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n remainingRetentionDays: {\n serializedName: \"RemainingRetentionDays\",\n xmlName: \"RemainingRetentionDays\",\n type: {\n name: \"Number\"\n }\n },\n accessTier: {\n serializedName: \"AccessTier\",\n xmlName: \"AccessTier\",\n type: {\n name: \"Enum\",\n allowedValues: [\n \"P4\",\n \"P6\",\n \"P10\",\n \"P15\",\n \"P20\",\n \"P30\",\n \"P40\",\n \"P50\",\n \"P60\",\n \"P70\",\n \"P80\",\n \"Hot\",\n \"Cool\",\n \"Archive\"\n ]\n }\n },\n accessTierInferred: {\n serializedName: \"AccessTierInferred\",\n xmlName: \"AccessTierInferred\",\n type: {\n name: \"Boolean\"\n }\n },\n archiveStatus: {\n serializedName: \"ArchiveStatus\",\n xmlName: \"ArchiveStatus\",\n type: {\n name: \"Enum\",\n allowedValues: [\n \"rehydrate-pending-to-hot\",\n \"rehydrate-pending-to-cool\"\n ]\n }\n },\n customerProvidedKeySha256: {\n serializedName: \"CustomerProvidedKeySha256\",\n xmlName: \"CustomerProvidedKeySha256\",\n type: {\n name: \"String\"\n }\n },\n encryptionScope: {\n serializedName: \"EncryptionScope\",\n xmlName: \"EncryptionScope\",\n type: {\n name: \"String\"\n }\n },\n accessTierChangedOn: {\n serializedName: \"AccessTierChangeTime\",\n xmlName: \"AccessTierChangeTime\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n tagCount: {\n serializedName: \"TagCount\",\n xmlName: \"TagCount\",\n type: {\n name: \"Number\"\n }\n },\n expiresOn: {\n serializedName: \"Expiry-Time\",\n xmlName: \"Expiry-Time\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n isSealed: {\n serializedName: \"Sealed\",\n xmlName: \"Sealed\",\n type: {\n name: \"Boolean\"\n }\n },\n rehydratePriority: {\n serializedName: \"RehydratePriority\",\n xmlName: \"RehydratePriority\",\n type: {\n name: \"Enum\",\n allowedValues: [\"High\", \"Standard\"]\n }\n },\n lastAccessedOn: {\n serializedName: \"LastAccessTime\",\n xmlName: \"LastAccessTime\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n immutabilityPolicyExpiresOn: {\n serializedName: \"ImmutabilityPolicyUntilDate\",\n xmlName: \"ImmutabilityPolicyUntilDate\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n immutabilityPolicyMode: {\n serializedName: \"ImmutabilityPolicyMode\",\n xmlName: \"ImmutabilityPolicyMode\",\n type: {\n name: \"Enum\",\n allowedValues: [\"Mutable\", \"Unlocked\", \"Locked\"]\n }\n },\n legalHold: {\n serializedName: \"LegalHold\",\n xmlName: \"LegalHold\",\n type: {\n name: \"Boolean\"\n }\n }\n }\n }\n};\nconst ListBlobsHierarchySegmentResponse = {\n serializedName: \"ListBlobsHierarchySegmentResponse\",\n xmlName: \"EnumerationResults\",\n type: {\n name: \"Composite\",\n className: \"ListBlobsHierarchySegmentResponse\",\n modelProperties: {\n serviceEndpoint: {\n serializedName: \"ServiceEndpoint\",\n required: true,\n xmlName: \"ServiceEndpoint\",\n xmlIsAttribute: true,\n type: {\n name: \"String\"\n }\n },\n containerName: {\n serializedName: \"ContainerName\",\n required: true,\n xmlName: \"ContainerName\",\n xmlIsAttribute: true,\n type: {\n name: \"String\"\n }\n },\n prefix: {\n serializedName: \"Prefix\",\n xmlName: \"Prefix\",\n type: {\n name: \"String\"\n }\n },\n marker: {\n serializedName: \"Marker\",\n xmlName: \"Marker\",\n type: {\n name: \"String\"\n }\n },\n maxPageSize: {\n serializedName: \"MaxResults\",\n xmlName: \"MaxResults\",\n type: {\n name: \"Number\"\n }\n },\n delimiter: {\n serializedName: \"Delimiter\",\n xmlName: \"Delimiter\",\n type: {\n name: \"String\"\n }\n },\n segment: {\n serializedName: \"Segment\",\n xmlName: \"Blobs\",\n type: {\n name: \"Composite\",\n className: \"BlobHierarchyListSegment\"\n }\n },\n continuationToken: {\n serializedName: \"NextMarker\",\n xmlName: \"NextMarker\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst BlobHierarchyListSegment = {\n serializedName: \"BlobHierarchyListSegment\",\n xmlName: \"Blobs\",\n type: {\n name: \"Composite\",\n className: \"BlobHierarchyListSegment\",\n modelProperties: {\n blobPrefixes: {\n serializedName: \"BlobPrefixes\",\n xmlName: \"BlobPrefixes\",\n xmlElementName: \"BlobPrefix\",\n type: {\n name: \"Sequence\",\n element: {\n type: {\n name: \"Composite\",\n className: \"BlobPrefix\"\n }\n }\n }\n },\n blobItems: {\n serializedName: \"BlobItems\",\n required: true,\n xmlName: \"BlobItems\",\n xmlElementName: \"Blob\",\n type: {\n name: \"Sequence\",\n element: {\n type: {\n name: \"Composite\",\n className: \"BlobItemInternal\"\n }\n }\n }\n }\n }\n }\n};\nconst BlobPrefix = {\n serializedName: \"BlobPrefix\",\n type: {\n name: \"Composite\",\n className: \"BlobPrefix\",\n modelProperties: {\n name: {\n serializedName: \"Name\",\n xmlName: \"Name\",\n type: {\n name: \"Composite\",\n className: \"BlobName\"\n }\n }\n }\n }\n};\nconst BlockLookupList = {\n serializedName: \"BlockLookupList\",\n xmlName: \"BlockList\",\n type: {\n name: \"Composite\",\n className: \"BlockLookupList\",\n modelProperties: {\n committed: {\n serializedName: \"Committed\",\n xmlName: \"Committed\",\n xmlElementName: \"Committed\",\n type: {\n name: \"Sequence\",\n element: {\n type: {\n name: \"String\"\n }\n }\n }\n },\n uncommitted: {\n serializedName: \"Uncommitted\",\n xmlName: \"Uncommitted\",\n xmlElementName: \"Uncommitted\",\n type: {\n name: \"Sequence\",\n element: {\n type: {\n name: \"String\"\n }\n }\n }\n },\n latest: {\n serializedName: \"Latest\",\n xmlName: \"Latest\",\n xmlElementName: \"Latest\",\n type: {\n name: \"Sequence\",\n element: {\n type: {\n name: \"String\"\n }\n }\n }\n }\n }\n }\n};\nconst BlockList = {\n serializedName: \"BlockList\",\n type: {\n name: \"Composite\",\n className: \"BlockList\",\n modelProperties: {\n committedBlocks: {\n serializedName: \"CommittedBlocks\",\n xmlName: \"CommittedBlocks\",\n xmlIsWrapped: true,\n xmlElementName: \"Block\",\n type: {\n name: \"Sequence\",\n element: {\n type: {\n name: \"Composite\",\n className: \"Block\"\n }\n }\n }\n },\n uncommittedBlocks: {\n serializedName: \"UncommittedBlocks\",\n xmlName: \"UncommittedBlocks\",\n xmlIsWrapped: true,\n xmlElementName: \"Block\",\n type: {\n name: \"Sequence\",\n element: {\n type: {\n name: \"Composite\",\n className: \"Block\"\n }\n }\n }\n }\n }\n }\n};\nconst Block = {\n serializedName: \"Block\",\n type: {\n name: \"Composite\",\n className: \"Block\",\n modelProperties: {\n name: {\n serializedName: \"Name\",\n required: true,\n xmlName: \"Name\",\n type: {\n name: \"String\"\n }\n },\n size: {\n serializedName: \"Size\",\n required: true,\n xmlName: \"Size\",\n type: {\n name: \"Number\"\n }\n }\n }\n }\n};\nconst PageList = {\n serializedName: \"PageList\",\n type: {\n name: \"Composite\",\n className: \"PageList\",\n modelProperties: {\n pageRange: {\n serializedName: \"PageRange\",\n xmlName: \"PageRange\",\n xmlElementName: \"PageRange\",\n type: {\n name: \"Sequence\",\n element: {\n type: {\n name: \"Composite\",\n className: \"PageRange\"\n }\n }\n }\n },\n clearRange: {\n serializedName: \"ClearRange\",\n xmlName: \"ClearRange\",\n xmlElementName: \"ClearRange\",\n type: {\n name: \"Sequence\",\n element: {\n type: {\n name: \"Composite\",\n className: \"ClearRange\"\n }\n }\n }\n },\n continuationToken: {\n serializedName: \"NextMarker\",\n xmlName: \"NextMarker\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst PageRange = {\n serializedName: \"PageRange\",\n xmlName: \"PageRange\",\n type: {\n name: \"Composite\",\n className: \"PageRange\",\n modelProperties: {\n start: {\n serializedName: \"Start\",\n required: true,\n xmlName: \"Start\",\n type: {\n name: \"Number\"\n }\n },\n end: {\n serializedName: \"End\",\n required: true,\n xmlName: \"End\",\n type: {\n name: \"Number\"\n }\n }\n }\n }\n};\nconst ClearRange = {\n serializedName: \"ClearRange\",\n xmlName: \"ClearRange\",\n type: {\n name: \"Composite\",\n className: \"ClearRange\",\n modelProperties: {\n start: {\n serializedName: \"Start\",\n required: true,\n xmlName: \"Start\",\n type: {\n name: \"Number\"\n }\n },\n end: {\n serializedName: \"End\",\n required: true,\n xmlName: \"End\",\n type: {\n name: \"Number\"\n }\n }\n }\n }\n};\nconst QueryRequest = {\n serializedName: \"QueryRequest\",\n xmlName: \"QueryRequest\",\n type: {\n name: \"Composite\",\n className: \"QueryRequest\",\n modelProperties: {\n queryType: {\n serializedName: \"QueryType\",\n required: true,\n xmlName: \"QueryType\",\n type: {\n name: \"String\"\n }\n },\n expression: {\n serializedName: \"Expression\",\n required: true,\n xmlName: \"Expression\",\n type: {\n name: \"String\"\n }\n },\n inputSerialization: {\n serializedName: \"InputSerialization\",\n xmlName: \"InputSerialization\",\n type: {\n name: \"Composite\",\n className: \"QuerySerialization\"\n }\n },\n outputSerialization: {\n serializedName: \"OutputSerialization\",\n xmlName: \"OutputSerialization\",\n type: {\n name: \"Composite\",\n className: \"QuerySerialization\"\n }\n }\n }\n }\n};\nconst QuerySerialization = {\n serializedName: \"QuerySerialization\",\n type: {\n name: \"Composite\",\n className: \"QuerySerialization\",\n modelProperties: {\n format: {\n serializedName: \"Format\",\n xmlName: \"Format\",\n type: {\n name: \"Composite\",\n className: \"QueryFormat\"\n }\n }\n }\n }\n};\nconst QueryFormat = {\n serializedName: \"QueryFormat\",\n type: {\n name: \"Composite\",\n className: \"QueryFormat\",\n modelProperties: {\n type: {\n serializedName: \"Type\",\n required: true,\n xmlName: \"Type\",\n type: {\n name: \"Enum\",\n allowedValues: [\"delimited\", \"json\", \"arrow\", \"parquet\"]\n }\n },\n delimitedTextConfiguration: {\n serializedName: \"DelimitedTextConfiguration\",\n xmlName: \"DelimitedTextConfiguration\",\n type: {\n name: \"Composite\",\n className: \"DelimitedTextConfiguration\"\n }\n },\n jsonTextConfiguration: {\n serializedName: \"JsonTextConfiguration\",\n xmlName: \"JsonTextConfiguration\",\n type: {\n name: \"Composite\",\n className: \"JsonTextConfiguration\"\n }\n },\n arrowConfiguration: {\n serializedName: \"ArrowConfiguration\",\n xmlName: \"ArrowConfiguration\",\n type: {\n name: \"Composite\",\n className: \"ArrowConfiguration\"\n }\n },\n parquetTextConfiguration: {\n serializedName: \"ParquetTextConfiguration\",\n xmlName: \"ParquetTextConfiguration\",\n type: {\n name: \"any\"\n }\n }\n }\n }\n};\nconst DelimitedTextConfiguration = {\n serializedName: \"DelimitedTextConfiguration\",\n xmlName: \"DelimitedTextConfiguration\",\n type: {\n name: \"Composite\",\n className: \"DelimitedTextConfiguration\",\n modelProperties: {\n columnSeparator: {\n serializedName: \"ColumnSeparator\",\n xmlName: \"ColumnSeparator\",\n type: {\n name: \"String\"\n }\n },\n fieldQuote: {\n serializedName: \"FieldQuote\",\n xmlName: \"FieldQuote\",\n type: {\n name: \"String\"\n }\n },\n recordSeparator: {\n serializedName: \"RecordSeparator\",\n xmlName: \"RecordSeparator\",\n type: {\n name: \"String\"\n }\n },\n escapeChar: {\n serializedName: \"EscapeChar\",\n xmlName: \"EscapeChar\",\n type: {\n name: \"String\"\n }\n },\n headersPresent: {\n serializedName: \"HeadersPresent\",\n xmlName: \"HasHeaders\",\n type: {\n name: \"Boolean\"\n }\n }\n }\n }\n};\nconst JsonTextConfiguration = {\n serializedName: \"JsonTextConfiguration\",\n xmlName: \"JsonTextConfiguration\",\n type: {\n name: \"Composite\",\n className: \"JsonTextConfiguration\",\n modelProperties: {\n recordSeparator: {\n serializedName: \"RecordSeparator\",\n xmlName: \"RecordSeparator\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst ArrowConfiguration = {\n serializedName: \"ArrowConfiguration\",\n xmlName: \"ArrowConfiguration\",\n type: {\n name: \"Composite\",\n className: \"ArrowConfiguration\",\n modelProperties: {\n schema: {\n serializedName: \"Schema\",\n required: true,\n xmlName: \"Schema\",\n xmlIsWrapped: true,\n xmlElementName: \"Field\",\n type: {\n name: \"Sequence\",\n element: {\n type: {\n name: \"Composite\",\n className: \"ArrowField\"\n }\n }\n }\n }\n }\n }\n};\nconst ArrowField = {\n serializedName: \"ArrowField\",\n xmlName: \"Field\",\n type: {\n name: \"Composite\",\n className: \"ArrowField\",\n modelProperties: {\n type: {\n serializedName: \"Type\",\n required: true,\n xmlName: \"Type\",\n type: {\n name: \"String\"\n }\n },\n name: {\n serializedName: \"Name\",\n xmlName: \"Name\",\n type: {\n name: \"String\"\n }\n },\n precision: {\n serializedName: \"Precision\",\n xmlName: \"Precision\",\n type: {\n name: \"Number\"\n }\n },\n scale: {\n serializedName: \"Scale\",\n xmlName: \"Scale\",\n type: {\n name: \"Number\"\n }\n }\n }\n }\n};\nconst ServiceSetPropertiesHeaders = {\n serializedName: \"Service_setPropertiesHeaders\",\n type: {\n name: \"Composite\",\n className: \"ServiceSetPropertiesHeaders\",\n modelProperties: {\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n xmlName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n xmlName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n xmlName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n errorCode: {\n serializedName: \"x-ms-error-code\",\n xmlName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst ServiceSetPropertiesExceptionHeaders = {\n serializedName: \"Service_setPropertiesExceptionHeaders\",\n type: {\n name: \"Composite\",\n className: \"ServiceSetPropertiesExceptionHeaders\",\n modelProperties: {\n errorCode: {\n serializedName: \"x-ms-error-code\",\n xmlName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst ServiceGetPropertiesHeaders = {\n serializedName: \"Service_getPropertiesHeaders\",\n type: {\n name: \"Composite\",\n className: \"ServiceGetPropertiesHeaders\",\n modelProperties: {\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n xmlName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n xmlName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n xmlName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n errorCode: {\n serializedName: \"x-ms-error-code\",\n xmlName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst ServiceGetPropertiesExceptionHeaders = {\n serializedName: \"Service_getPropertiesExceptionHeaders\",\n type: {\n name: \"Composite\",\n className: \"ServiceGetPropertiesExceptionHeaders\",\n modelProperties: {\n errorCode: {\n serializedName: \"x-ms-error-code\",\n xmlName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst ServiceGetStatisticsHeaders = {\n serializedName: \"Service_getStatisticsHeaders\",\n type: {\n name: \"Composite\",\n className: \"ServiceGetStatisticsHeaders\",\n modelProperties: {\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n xmlName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n xmlName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n xmlName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n xmlName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n errorCode: {\n serializedName: \"x-ms-error-code\",\n xmlName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst ServiceGetStatisticsExceptionHeaders = {\n serializedName: \"Service_getStatisticsExceptionHeaders\",\n type: {\n name: \"Composite\",\n className: \"ServiceGetStatisticsExceptionHeaders\",\n modelProperties: {\n errorCode: {\n serializedName: \"x-ms-error-code\",\n xmlName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst ServiceListContainersSegmentHeaders = {\n serializedName: \"Service_listContainersSegmentHeaders\",\n type: {\n name: \"Composite\",\n className: \"ServiceListContainersSegmentHeaders\",\n modelProperties: {\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n xmlName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n xmlName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n xmlName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n errorCode: {\n serializedName: \"x-ms-error-code\",\n xmlName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst ServiceListContainersSegmentExceptionHeaders = {\n serializedName: \"Service_listContainersSegmentExceptionHeaders\",\n type: {\n name: \"Composite\",\n className: \"ServiceListContainersSegmentExceptionHeaders\",\n modelProperties: {\n errorCode: {\n serializedName: \"x-ms-error-code\",\n xmlName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst ServiceGetUserDelegationKeyHeaders = {\n serializedName: \"Service_getUserDelegationKeyHeaders\",\n type: {\n name: \"Composite\",\n className: \"ServiceGetUserDelegationKeyHeaders\",\n modelProperties: {\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n xmlName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n xmlName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n xmlName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n xmlName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n errorCode: {\n serializedName: \"x-ms-error-code\",\n xmlName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst ServiceGetUserDelegationKeyExceptionHeaders = {\n serializedName: \"Service_getUserDelegationKeyExceptionHeaders\",\n type: {\n name: \"Composite\",\n className: \"ServiceGetUserDelegationKeyExceptionHeaders\",\n modelProperties: {\n errorCode: {\n serializedName: \"x-ms-error-code\",\n xmlName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst ServiceGetAccountInfoHeaders = {\n serializedName: \"Service_getAccountInfoHeaders\",\n type: {\n name: \"Composite\",\n className: \"ServiceGetAccountInfoHeaders\",\n modelProperties: {\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n xmlName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n xmlName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n xmlName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n xmlName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n skuName: {\n serializedName: \"x-ms-sku-name\",\n xmlName: \"x-ms-sku-name\",\n type: {\n name: \"Enum\",\n allowedValues: [\n \"Standard_LRS\",\n \"Standard_GRS\",\n \"Standard_RAGRS\",\n \"Standard_ZRS\",\n \"Premium_LRS\"\n ]\n }\n },\n accountKind: {\n serializedName: \"x-ms-account-kind\",\n xmlName: \"x-ms-account-kind\",\n type: {\n name: \"Enum\",\n allowedValues: [\n \"Storage\",\n \"BlobStorage\",\n \"StorageV2\",\n \"FileStorage\",\n \"BlockBlobStorage\"\n ]\n }\n },\n isHierarchicalNamespaceEnabled: {\n serializedName: \"x-ms-is-hns-enabled\",\n xmlName: \"x-ms-is-hns-enabled\",\n type: {\n name: \"Boolean\"\n }\n },\n errorCode: {\n serializedName: \"x-ms-error-code\",\n xmlName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst ServiceGetAccountInfoExceptionHeaders = {\n serializedName: \"Service_getAccountInfoExceptionHeaders\",\n type: {\n name: \"Composite\",\n className: \"ServiceGetAccountInfoExceptionHeaders\",\n modelProperties: {\n errorCode: {\n serializedName: \"x-ms-error-code\",\n xmlName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst ServiceSubmitBatchHeaders = {\n serializedName: \"Service_submitBatchHeaders\",\n type: {\n name: \"Composite\",\n className: \"ServiceSubmitBatchHeaders\",\n modelProperties: {\n contentType: {\n serializedName: \"content-type\",\n xmlName: \"content-type\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n xmlName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n xmlName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n xmlName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n errorCode: {\n serializedName: \"x-ms-error-code\",\n xmlName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst ServiceSubmitBatchExceptionHeaders = {\n serializedName: \"Service_submitBatchExceptionHeaders\",\n type: {\n name: \"Composite\",\n className: \"ServiceSubmitBatchExceptionHeaders\",\n modelProperties: {\n errorCode: {\n serializedName: \"x-ms-error-code\",\n xmlName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst ServiceFilterBlobsHeaders = {\n serializedName: \"Service_filterBlobsHeaders\",\n type: {\n name: \"Composite\",\n className: \"ServiceFilterBlobsHeaders\",\n modelProperties: {\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n xmlName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n xmlName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n xmlName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n xmlName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n errorCode: {\n serializedName: \"x-ms-error-code\",\n xmlName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst ServiceFilterBlobsExceptionHeaders = {\n serializedName: \"Service_filterBlobsExceptionHeaders\",\n type: {\n name: \"Composite\",\n className: \"ServiceFilterBlobsExceptionHeaders\",\n modelProperties: {\n errorCode: {\n serializedName: \"x-ms-error-code\",\n xmlName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst ContainerCreateHeaders = {\n serializedName: \"Container_createHeaders\",\n type: {\n name: \"Composite\",\n className: \"ContainerCreateHeaders\",\n modelProperties: {\n etag: {\n serializedName: \"etag\",\n xmlName: \"etag\",\n type: {\n name: \"String\"\n }\n },\n lastModified: {\n serializedName: \"last-modified\",\n xmlName: \"last-modified\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n xmlName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n xmlName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n xmlName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n xmlName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n errorCode: {\n serializedName: \"x-ms-error-code\",\n xmlName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst ContainerCreateExceptionHeaders = {\n serializedName: \"Container_createExceptionHeaders\",\n type: {\n name: \"Composite\",\n className: \"ContainerCreateExceptionHeaders\",\n modelProperties: {\n errorCode: {\n serializedName: \"x-ms-error-code\",\n xmlName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst ContainerGetPropertiesHeaders = {\n serializedName: \"Container_getPropertiesHeaders\",\n type: {\n name: \"Composite\",\n className: \"ContainerGetPropertiesHeaders\",\n modelProperties: {\n metadata: {\n serializedName: \"x-ms-meta\",\n xmlName: \"x-ms-meta\",\n type: {\n name: \"Dictionary\",\n value: { type: { name: \"String\" } }\n },\n headerCollectionPrefix: \"x-ms-meta-\"\n },\n etag: {\n serializedName: \"etag\",\n xmlName: \"etag\",\n type: {\n name: \"String\"\n }\n },\n lastModified: {\n serializedName: \"last-modified\",\n xmlName: \"last-modified\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n leaseDuration: {\n serializedName: \"x-ms-lease-duration\",\n xmlName: \"x-ms-lease-duration\",\n type: {\n name: \"Enum\",\n allowedValues: [\"infinite\", \"fixed\"]\n }\n },\n leaseState: {\n serializedName: \"x-ms-lease-state\",\n xmlName: \"x-ms-lease-state\",\n type: {\n name: \"Enum\",\n allowedValues: [\n \"available\",\n \"leased\",\n \"expired\",\n \"breaking\",\n \"broken\"\n ]\n }\n },\n leaseStatus: {\n serializedName: \"x-ms-lease-status\",\n xmlName: \"x-ms-lease-status\",\n type: {\n name: \"Enum\",\n allowedValues: [\"locked\", \"unlocked\"]\n }\n },\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n xmlName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n xmlName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n xmlName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n xmlName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n blobPublicAccess: {\n serializedName: \"x-ms-blob-public-access\",\n xmlName: \"x-ms-blob-public-access\",\n type: {\n name: \"Enum\",\n allowedValues: [\"container\", \"blob\"]\n }\n },\n hasImmutabilityPolicy: {\n serializedName: \"x-ms-has-immutability-policy\",\n xmlName: \"x-ms-has-immutability-policy\",\n type: {\n name: \"Boolean\"\n }\n },\n hasLegalHold: {\n serializedName: \"x-ms-has-legal-hold\",\n xmlName: \"x-ms-has-legal-hold\",\n type: {\n name: \"Boolean\"\n }\n },\n defaultEncryptionScope: {\n serializedName: \"x-ms-default-encryption-scope\",\n xmlName: \"x-ms-default-encryption-scope\",\n type: {\n name: \"String\"\n }\n },\n denyEncryptionScopeOverride: {\n serializedName: \"x-ms-deny-encryption-scope-override\",\n xmlName: \"x-ms-deny-encryption-scope-override\",\n type: {\n name: \"Boolean\"\n }\n },\n isImmutableStorageWithVersioningEnabled: {\n serializedName: \"x-ms-immutable-storage-with-versioning-enabled\",\n xmlName: \"x-ms-immutable-storage-with-versioning-enabled\",\n type: {\n name: \"Boolean\"\n }\n },\n errorCode: {\n serializedName: \"x-ms-error-code\",\n xmlName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst ContainerGetPropertiesExceptionHeaders = {\n serializedName: \"Container_getPropertiesExceptionHeaders\",\n type: {\n name: \"Composite\",\n className: \"ContainerGetPropertiesExceptionHeaders\",\n modelProperties: {\n errorCode: {\n serializedName: \"x-ms-error-code\",\n xmlName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst ContainerDeleteHeaders = {\n serializedName: \"Container_deleteHeaders\",\n type: {\n name: \"Composite\",\n className: \"ContainerDeleteHeaders\",\n modelProperties: {\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n xmlName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n xmlName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n xmlName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n xmlName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n errorCode: {\n serializedName: \"x-ms-error-code\",\n xmlName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst ContainerDeleteExceptionHeaders = {\n serializedName: \"Container_deleteExceptionHeaders\",\n type: {\n name: \"Composite\",\n className: \"ContainerDeleteExceptionHeaders\",\n modelProperties: {\n errorCode: {\n serializedName: \"x-ms-error-code\",\n xmlName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst ContainerSetMetadataHeaders = {\n serializedName: \"Container_setMetadataHeaders\",\n type: {\n name: \"Composite\",\n className: \"ContainerSetMetadataHeaders\",\n modelProperties: {\n etag: {\n serializedName: \"etag\",\n xmlName: \"etag\",\n type: {\n name: \"String\"\n }\n },\n lastModified: {\n serializedName: \"last-modified\",\n xmlName: \"last-modified\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n xmlName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n xmlName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n xmlName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n xmlName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n errorCode: {\n serializedName: \"x-ms-error-code\",\n xmlName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst ContainerSetMetadataExceptionHeaders = {\n serializedName: \"Container_setMetadataExceptionHeaders\",\n type: {\n name: \"Composite\",\n className: \"ContainerSetMetadataExceptionHeaders\",\n modelProperties: {\n errorCode: {\n serializedName: \"x-ms-error-code\",\n xmlName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst ContainerGetAccessPolicyHeaders = {\n serializedName: \"Container_getAccessPolicyHeaders\",\n type: {\n name: \"Composite\",\n className: \"ContainerGetAccessPolicyHeaders\",\n modelProperties: {\n blobPublicAccess: {\n serializedName: \"x-ms-blob-public-access\",\n xmlName: \"x-ms-blob-public-access\",\n type: {\n name: \"Enum\",\n allowedValues: [\"container\", \"blob\"]\n }\n },\n etag: {\n serializedName: \"etag\",\n xmlName: \"etag\",\n type: {\n name: \"String\"\n }\n },\n lastModified: {\n serializedName: \"last-modified\",\n xmlName: \"last-modified\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n xmlName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n xmlName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n xmlName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n xmlName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n errorCode: {\n serializedName: \"x-ms-error-code\",\n xmlName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst ContainerGetAccessPolicyExceptionHeaders = {\n serializedName: \"Container_getAccessPolicyExceptionHeaders\",\n type: {\n name: \"Composite\",\n className: \"ContainerGetAccessPolicyExceptionHeaders\",\n modelProperties: {\n errorCode: {\n serializedName: \"x-ms-error-code\",\n xmlName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst ContainerSetAccessPolicyHeaders = {\n serializedName: \"Container_setAccessPolicyHeaders\",\n type: {\n name: \"Composite\",\n className: \"ContainerSetAccessPolicyHeaders\",\n modelProperties: {\n etag: {\n serializedName: \"etag\",\n xmlName: \"etag\",\n type: {\n name: \"String\"\n }\n },\n lastModified: {\n serializedName: \"last-modified\",\n xmlName: \"last-modified\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n xmlName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n xmlName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n xmlName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n xmlName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n errorCode: {\n serializedName: \"x-ms-error-code\",\n xmlName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst ContainerSetAccessPolicyExceptionHeaders = {\n serializedName: \"Container_setAccessPolicyExceptionHeaders\",\n type: {\n name: \"Composite\",\n className: \"ContainerSetAccessPolicyExceptionHeaders\",\n modelProperties: {\n errorCode: {\n serializedName: \"x-ms-error-code\",\n xmlName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst ContainerRestoreHeaders = {\n serializedName: \"Container_restoreHeaders\",\n type: {\n name: \"Composite\",\n className: \"ContainerRestoreHeaders\",\n modelProperties: {\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n xmlName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n xmlName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n xmlName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n xmlName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n errorCode: {\n serializedName: \"x-ms-error-code\",\n xmlName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst ContainerRestoreExceptionHeaders = {\n serializedName: \"Container_restoreExceptionHeaders\",\n type: {\n name: \"Composite\",\n className: \"ContainerRestoreExceptionHeaders\",\n modelProperties: {\n errorCode: {\n serializedName: \"x-ms-error-code\",\n xmlName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst ContainerRenameHeaders = {\n serializedName: \"Container_renameHeaders\",\n type: {\n name: \"Composite\",\n className: \"ContainerRenameHeaders\",\n modelProperties: {\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n xmlName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n xmlName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n xmlName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n xmlName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n errorCode: {\n serializedName: \"x-ms-error-code\",\n xmlName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst ContainerRenameExceptionHeaders = {\n serializedName: \"Container_renameExceptionHeaders\",\n type: {\n name: \"Composite\",\n className: \"ContainerRenameExceptionHeaders\",\n modelProperties: {\n errorCode: {\n serializedName: \"x-ms-error-code\",\n xmlName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst ContainerSubmitBatchHeaders = {\n serializedName: \"Container_submitBatchHeaders\",\n type: {\n name: \"Composite\",\n className: \"ContainerSubmitBatchHeaders\",\n modelProperties: {\n contentType: {\n serializedName: \"content-type\",\n xmlName: \"content-type\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n xmlName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n xmlName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst ContainerSubmitBatchExceptionHeaders = {\n serializedName: \"Container_submitBatchExceptionHeaders\",\n type: {\n name: \"Composite\",\n className: \"ContainerSubmitBatchExceptionHeaders\",\n modelProperties: {\n errorCode: {\n serializedName: \"x-ms-error-code\",\n xmlName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst ContainerFilterBlobsHeaders = {\n serializedName: \"Container_filterBlobsHeaders\",\n type: {\n name: \"Composite\",\n className: \"ContainerFilterBlobsHeaders\",\n modelProperties: {\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n xmlName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n xmlName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n xmlName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n xmlName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n }\n }\n }\n};\nconst ContainerFilterBlobsExceptionHeaders = {\n serializedName: \"Container_filterBlobsExceptionHeaders\",\n type: {\n name: \"Composite\",\n className: \"ContainerFilterBlobsExceptionHeaders\",\n modelProperties: {\n errorCode: {\n serializedName: \"x-ms-error-code\",\n xmlName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst ContainerAcquireLeaseHeaders = {\n serializedName: \"Container_acquireLeaseHeaders\",\n type: {\n name: \"Composite\",\n className: \"ContainerAcquireLeaseHeaders\",\n modelProperties: {\n etag: {\n serializedName: \"etag\",\n xmlName: \"etag\",\n type: {\n name: \"String\"\n }\n },\n lastModified: {\n serializedName: \"last-modified\",\n xmlName: \"last-modified\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n leaseId: {\n serializedName: \"x-ms-lease-id\",\n xmlName: \"x-ms-lease-id\",\n type: {\n name: \"String\"\n }\n },\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n xmlName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n xmlName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n xmlName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n xmlName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n }\n }\n }\n};\nconst ContainerAcquireLeaseExceptionHeaders = {\n serializedName: \"Container_acquireLeaseExceptionHeaders\",\n type: {\n name: \"Composite\",\n className: \"ContainerAcquireLeaseExceptionHeaders\",\n modelProperties: {\n errorCode: {\n serializedName: \"x-ms-error-code\",\n xmlName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst ContainerReleaseLeaseHeaders = {\n serializedName: \"Container_releaseLeaseHeaders\",\n type: {\n name: \"Composite\",\n className: \"ContainerReleaseLeaseHeaders\",\n modelProperties: {\n etag: {\n serializedName: \"etag\",\n xmlName: \"etag\",\n type: {\n name: \"String\"\n }\n },\n lastModified: {\n serializedName: \"last-modified\",\n xmlName: \"last-modified\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n xmlName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n xmlName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n xmlName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n xmlName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n }\n }\n }\n};\nconst ContainerReleaseLeaseExceptionHeaders = {\n serializedName: \"Container_releaseLeaseExceptionHeaders\",\n type: {\n name: \"Composite\",\n className: \"ContainerReleaseLeaseExceptionHeaders\",\n modelProperties: {\n errorCode: {\n serializedName: \"x-ms-error-code\",\n xmlName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst ContainerRenewLeaseHeaders = {\n serializedName: \"Container_renewLeaseHeaders\",\n type: {\n name: \"Composite\",\n className: \"ContainerRenewLeaseHeaders\",\n modelProperties: {\n etag: {\n serializedName: \"etag\",\n xmlName: \"etag\",\n type: {\n name: \"String\"\n }\n },\n lastModified: {\n serializedName: \"last-modified\",\n xmlName: \"last-modified\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n leaseId: {\n serializedName: \"x-ms-lease-id\",\n xmlName: \"x-ms-lease-id\",\n type: {\n name: \"String\"\n }\n },\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n xmlName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n xmlName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n xmlName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n xmlName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n }\n }\n }\n};\nconst ContainerRenewLeaseExceptionHeaders = {\n serializedName: \"Container_renewLeaseExceptionHeaders\",\n type: {\n name: \"Composite\",\n className: \"ContainerRenewLeaseExceptionHeaders\",\n modelProperties: {\n errorCode: {\n serializedName: \"x-ms-error-code\",\n xmlName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst ContainerBreakLeaseHeaders = {\n serializedName: \"Container_breakLeaseHeaders\",\n type: {\n name: \"Composite\",\n className: \"ContainerBreakLeaseHeaders\",\n modelProperties: {\n etag: {\n serializedName: \"etag\",\n xmlName: \"etag\",\n type: {\n name: \"String\"\n }\n },\n lastModified: {\n serializedName: \"last-modified\",\n xmlName: \"last-modified\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n leaseTime: {\n serializedName: \"x-ms-lease-time\",\n xmlName: \"x-ms-lease-time\",\n type: {\n name: \"Number\"\n }\n },\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n xmlName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n xmlName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n xmlName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n xmlName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n }\n }\n }\n};\nconst ContainerBreakLeaseExceptionHeaders = {\n serializedName: \"Container_breakLeaseExceptionHeaders\",\n type: {\n name: \"Composite\",\n className: \"ContainerBreakLeaseExceptionHeaders\",\n modelProperties: {\n errorCode: {\n serializedName: \"x-ms-error-code\",\n xmlName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst ContainerChangeLeaseHeaders = {\n serializedName: \"Container_changeLeaseHeaders\",\n type: {\n name: \"Composite\",\n className: \"ContainerChangeLeaseHeaders\",\n modelProperties: {\n etag: {\n serializedName: \"etag\",\n xmlName: \"etag\",\n type: {\n name: \"String\"\n }\n },\n lastModified: {\n serializedName: \"last-modified\",\n xmlName: \"last-modified\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n leaseId: {\n serializedName: \"x-ms-lease-id\",\n xmlName: \"x-ms-lease-id\",\n type: {\n name: \"String\"\n }\n },\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n xmlName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n xmlName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n xmlName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n xmlName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n }\n }\n }\n};\nconst ContainerChangeLeaseExceptionHeaders = {\n serializedName: \"Container_changeLeaseExceptionHeaders\",\n type: {\n name: \"Composite\",\n className: \"ContainerChangeLeaseExceptionHeaders\",\n modelProperties: {\n errorCode: {\n serializedName: \"x-ms-error-code\",\n xmlName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst ContainerListBlobFlatSegmentHeaders = {\n serializedName: \"Container_listBlobFlatSegmentHeaders\",\n type: {\n name: \"Composite\",\n className: \"ContainerListBlobFlatSegmentHeaders\",\n modelProperties: {\n contentType: {\n serializedName: \"content-type\",\n xmlName: \"content-type\",\n type: {\n name: \"String\"\n }\n },\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n xmlName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n xmlName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n xmlName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n xmlName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n errorCode: {\n serializedName: \"x-ms-error-code\",\n xmlName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst ContainerListBlobFlatSegmentExceptionHeaders = {\n serializedName: \"Container_listBlobFlatSegmentExceptionHeaders\",\n type: {\n name: \"Composite\",\n className: \"ContainerListBlobFlatSegmentExceptionHeaders\",\n modelProperties: {\n errorCode: {\n serializedName: \"x-ms-error-code\",\n xmlName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst ContainerListBlobHierarchySegmentHeaders = {\n serializedName: \"Container_listBlobHierarchySegmentHeaders\",\n type: {\n name: \"Composite\",\n className: \"ContainerListBlobHierarchySegmentHeaders\",\n modelProperties: {\n contentType: {\n serializedName: \"content-type\",\n xmlName: \"content-type\",\n type: {\n name: \"String\"\n }\n },\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n xmlName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n xmlName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n xmlName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n xmlName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n errorCode: {\n serializedName: \"x-ms-error-code\",\n xmlName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst ContainerListBlobHierarchySegmentExceptionHeaders = {\n serializedName: \"Container_listBlobHierarchySegmentExceptionHeaders\",\n type: {\n name: \"Composite\",\n className: \"ContainerListBlobHierarchySegmentExceptionHeaders\",\n modelProperties: {\n errorCode: {\n serializedName: \"x-ms-error-code\",\n xmlName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst ContainerGetAccountInfoHeaders = {\n serializedName: \"Container_getAccountInfoHeaders\",\n type: {\n name: \"Composite\",\n className: \"ContainerGetAccountInfoHeaders\",\n modelProperties: {\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n xmlName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n xmlName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n xmlName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n xmlName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n skuName: {\n serializedName: \"x-ms-sku-name\",\n xmlName: \"x-ms-sku-name\",\n type: {\n name: \"Enum\",\n allowedValues: [\n \"Standard_LRS\",\n \"Standard_GRS\",\n \"Standard_RAGRS\",\n \"Standard_ZRS\",\n \"Premium_LRS\"\n ]\n }\n },\n accountKind: {\n serializedName: \"x-ms-account-kind\",\n xmlName: \"x-ms-account-kind\",\n type: {\n name: \"Enum\",\n allowedValues: [\n \"Storage\",\n \"BlobStorage\",\n \"StorageV2\",\n \"FileStorage\",\n \"BlockBlobStorage\"\n ]\n }\n }\n }\n }\n};\nconst ContainerGetAccountInfoExceptionHeaders = {\n serializedName: \"Container_getAccountInfoExceptionHeaders\",\n type: {\n name: \"Composite\",\n className: \"ContainerGetAccountInfoExceptionHeaders\",\n modelProperties: {\n errorCode: {\n serializedName: \"x-ms-error-code\",\n xmlName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst BlobDownloadHeaders = {\n serializedName: \"Blob_downloadHeaders\",\n type: {\n name: \"Composite\",\n className: \"BlobDownloadHeaders\",\n modelProperties: {\n lastModified: {\n serializedName: \"last-modified\",\n xmlName: \"last-modified\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n metadata: {\n serializedName: \"x-ms-meta\",\n xmlName: \"x-ms-meta\",\n type: {\n name: \"Dictionary\",\n value: { type: { name: \"String\" } }\n },\n headerCollectionPrefix: \"x-ms-meta-\"\n },\n objectReplicationPolicyId: {\n serializedName: \"x-ms-or-policy-id\",\n xmlName: \"x-ms-or-policy-id\",\n type: {\n name: \"String\"\n }\n },\n objectReplicationRules: {\n serializedName: \"x-ms-or\",\n xmlName: \"x-ms-or\",\n type: {\n name: \"Dictionary\",\n value: { type: { name: \"String\" } }\n },\n headerCollectionPrefix: \"x-ms-or-\"\n },\n contentLength: {\n serializedName: \"content-length\",\n xmlName: \"content-length\",\n type: {\n name: \"Number\"\n }\n },\n contentType: {\n serializedName: \"content-type\",\n xmlName: \"content-type\",\n type: {\n name: \"String\"\n }\n },\n contentRange: {\n serializedName: \"content-range\",\n xmlName: \"content-range\",\n type: {\n name: \"String\"\n }\n },\n etag: {\n serializedName: \"etag\",\n xmlName: \"etag\",\n type: {\n name: \"String\"\n }\n },\n contentMD5: {\n serializedName: \"content-md5\",\n xmlName: \"content-md5\",\n type: {\n name: \"ByteArray\"\n }\n },\n contentEncoding: {\n serializedName: \"content-encoding\",\n xmlName: \"content-encoding\",\n type: {\n name: \"String\"\n }\n },\n cacheControl: {\n serializedName: \"cache-control\",\n xmlName: \"cache-control\",\n type: {\n name: \"String\"\n }\n },\n contentDisposition: {\n serializedName: \"content-disposition\",\n xmlName: \"content-disposition\",\n type: {\n name: \"String\"\n }\n },\n contentLanguage: {\n serializedName: \"content-language\",\n xmlName: \"content-language\",\n type: {\n name: \"String\"\n }\n },\n blobSequenceNumber: {\n serializedName: \"x-ms-blob-sequence-number\",\n xmlName: \"x-ms-blob-sequence-number\",\n type: {\n name: \"Number\"\n }\n },\n blobType: {\n serializedName: \"x-ms-blob-type\",\n xmlName: \"x-ms-blob-type\",\n type: {\n name: \"Enum\",\n allowedValues: [\"BlockBlob\", \"PageBlob\", \"AppendBlob\"]\n }\n },\n copyCompletedOn: {\n serializedName: \"x-ms-copy-completion-time\",\n xmlName: \"x-ms-copy-completion-time\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n copyStatusDescription: {\n serializedName: \"x-ms-copy-status-description\",\n xmlName: \"x-ms-copy-status-description\",\n type: {\n name: \"String\"\n }\n },\n copyId: {\n serializedName: \"x-ms-copy-id\",\n xmlName: \"x-ms-copy-id\",\n type: {\n name: \"String\"\n }\n },\n copyProgress: {\n serializedName: \"x-ms-copy-progress\",\n xmlName: \"x-ms-copy-progress\",\n type: {\n name: \"String\"\n }\n },\n copySource: {\n serializedName: \"x-ms-copy-source\",\n xmlName: \"x-ms-copy-source\",\n type: {\n name: \"String\"\n }\n },\n copyStatus: {\n serializedName: \"x-ms-copy-status\",\n xmlName: \"x-ms-copy-status\",\n type: {\n name: \"Enum\",\n allowedValues: [\"pending\", \"success\", \"aborted\", \"failed\"]\n }\n },\n leaseDuration: {\n serializedName: \"x-ms-lease-duration\",\n xmlName: \"x-ms-lease-duration\",\n type: {\n name: \"Enum\",\n allowedValues: [\"infinite\", \"fixed\"]\n }\n },\n leaseState: {\n serializedName: \"x-ms-lease-state\",\n xmlName: \"x-ms-lease-state\",\n type: {\n name: \"Enum\",\n allowedValues: [\n \"available\",\n \"leased\",\n \"expired\",\n \"breaking\",\n \"broken\"\n ]\n }\n },\n leaseStatus: {\n serializedName: \"x-ms-lease-status\",\n xmlName: \"x-ms-lease-status\",\n type: {\n name: \"Enum\",\n allowedValues: [\"locked\", \"unlocked\"]\n }\n },\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n xmlName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n xmlName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n xmlName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n versionId: {\n serializedName: \"x-ms-version-id\",\n xmlName: \"x-ms-version-id\",\n type: {\n name: \"String\"\n }\n },\n isCurrentVersion: {\n serializedName: \"x-ms-is-current-version\",\n xmlName: \"x-ms-is-current-version\",\n type: {\n name: \"Boolean\"\n }\n },\n acceptRanges: {\n serializedName: \"accept-ranges\",\n xmlName: \"accept-ranges\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n xmlName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n blobCommittedBlockCount: {\n serializedName: \"x-ms-blob-committed-block-count\",\n xmlName: \"x-ms-blob-committed-block-count\",\n type: {\n name: \"Number\"\n }\n },\n isServerEncrypted: {\n serializedName: \"x-ms-server-encrypted\",\n xmlName: \"x-ms-server-encrypted\",\n type: {\n name: \"Boolean\"\n }\n },\n encryptionKeySha256: {\n serializedName: \"x-ms-encryption-key-sha256\",\n xmlName: \"x-ms-encryption-key-sha256\",\n type: {\n name: \"String\"\n }\n },\n encryptionScope: {\n serializedName: \"x-ms-encryption-scope\",\n xmlName: \"x-ms-encryption-scope\",\n type: {\n name: \"String\"\n }\n },\n blobContentMD5: {\n serializedName: \"x-ms-blob-content-md5\",\n xmlName: \"x-ms-blob-content-md5\",\n type: {\n name: \"ByteArray\"\n }\n },\n tagCount: {\n serializedName: \"x-ms-tag-count\",\n xmlName: \"x-ms-tag-count\",\n type: {\n name: \"Number\"\n }\n },\n isSealed: {\n serializedName: \"x-ms-blob-sealed\",\n xmlName: \"x-ms-blob-sealed\",\n type: {\n name: \"Boolean\"\n }\n },\n lastAccessed: {\n serializedName: \"x-ms-last-access-time\",\n xmlName: \"x-ms-last-access-time\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n immutabilityPolicyExpiresOn: {\n serializedName: \"x-ms-immutability-policy-until-date\",\n xmlName: \"x-ms-immutability-policy-until-date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n immutabilityPolicyMode: {\n serializedName: \"x-ms-immutability-policy-mode\",\n xmlName: \"x-ms-immutability-policy-mode\",\n type: {\n name: \"Enum\",\n allowedValues: [\"Mutable\", \"Unlocked\", \"Locked\"]\n }\n },\n legalHold: {\n serializedName: \"x-ms-legal-hold\",\n xmlName: \"x-ms-legal-hold\",\n type: {\n name: \"Boolean\"\n }\n },\n errorCode: {\n serializedName: \"x-ms-error-code\",\n xmlName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n },\n contentCrc64: {\n serializedName: \"x-ms-content-crc64\",\n xmlName: \"x-ms-content-crc64\",\n type: {\n name: \"ByteArray\"\n }\n }\n }\n }\n};\nconst BlobDownloadExceptionHeaders = {\n serializedName: \"Blob_downloadExceptionHeaders\",\n type: {\n name: \"Composite\",\n className: \"BlobDownloadExceptionHeaders\",\n modelProperties: {\n errorCode: {\n serializedName: \"x-ms-error-code\",\n xmlName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst BlobGetPropertiesHeaders = {\n serializedName: \"Blob_getPropertiesHeaders\",\n type: {\n name: \"Composite\",\n className: \"BlobGetPropertiesHeaders\",\n modelProperties: {\n lastModified: {\n serializedName: \"last-modified\",\n xmlName: \"last-modified\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n createdOn: {\n serializedName: \"x-ms-creation-time\",\n xmlName: \"x-ms-creation-time\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n metadata: {\n serializedName: \"x-ms-meta\",\n xmlName: \"x-ms-meta\",\n type: {\n name: \"Dictionary\",\n value: { type: { name: \"String\" } }\n },\n headerCollectionPrefix: \"x-ms-meta-\"\n },\n objectReplicationPolicyId: {\n serializedName: \"x-ms-or-policy-id\",\n xmlName: \"x-ms-or-policy-id\",\n type: {\n name: \"String\"\n }\n },\n objectReplicationRules: {\n serializedName: \"x-ms-or\",\n xmlName: \"x-ms-or\",\n type: {\n name: \"Dictionary\",\n value: { type: { name: \"String\" } }\n },\n headerCollectionPrefix: \"x-ms-or-\"\n },\n blobType: {\n serializedName: \"x-ms-blob-type\",\n xmlName: \"x-ms-blob-type\",\n type: {\n name: \"Enum\",\n allowedValues: [\"BlockBlob\", \"PageBlob\", \"AppendBlob\"]\n }\n },\n copyCompletedOn: {\n serializedName: \"x-ms-copy-completion-time\",\n xmlName: \"x-ms-copy-completion-time\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n copyStatusDescription: {\n serializedName: \"x-ms-copy-status-description\",\n xmlName: \"x-ms-copy-status-description\",\n type: {\n name: \"String\"\n }\n },\n copyId: {\n serializedName: \"x-ms-copy-id\",\n xmlName: \"x-ms-copy-id\",\n type: {\n name: \"String\"\n }\n },\n copyProgress: {\n serializedName: \"x-ms-copy-progress\",\n xmlName: \"x-ms-copy-progress\",\n type: {\n name: \"String\"\n }\n },\n copySource: {\n serializedName: \"x-ms-copy-source\",\n xmlName: \"x-ms-copy-source\",\n type: {\n name: \"String\"\n }\n },\n copyStatus: {\n serializedName: \"x-ms-copy-status\",\n xmlName: \"x-ms-copy-status\",\n type: {\n name: \"Enum\",\n allowedValues: [\"pending\", \"success\", \"aborted\", \"failed\"]\n }\n },\n isIncrementalCopy: {\n serializedName: \"x-ms-incremental-copy\",\n xmlName: \"x-ms-incremental-copy\",\n type: {\n name: \"Boolean\"\n }\n },\n destinationSnapshot: {\n serializedName: \"x-ms-copy-destination-snapshot\",\n xmlName: \"x-ms-copy-destination-snapshot\",\n type: {\n name: \"String\"\n }\n },\n leaseDuration: {\n serializedName: \"x-ms-lease-duration\",\n xmlName: \"x-ms-lease-duration\",\n type: {\n name: \"Enum\",\n allowedValues: [\"infinite\", \"fixed\"]\n }\n },\n leaseState: {\n serializedName: \"x-ms-lease-state\",\n xmlName: \"x-ms-lease-state\",\n type: {\n name: \"Enum\",\n allowedValues: [\n \"available\",\n \"leased\",\n \"expired\",\n \"breaking\",\n \"broken\"\n ]\n }\n },\n leaseStatus: {\n serializedName: \"x-ms-lease-status\",\n xmlName: \"x-ms-lease-status\",\n type: {\n name: \"Enum\",\n allowedValues: [\"locked\", \"unlocked\"]\n }\n },\n contentLength: {\n serializedName: \"content-length\",\n xmlName: \"content-length\",\n type: {\n name: \"Number\"\n }\n },\n contentType: {\n serializedName: \"content-type\",\n xmlName: \"content-type\",\n type: {\n name: \"String\"\n }\n },\n etag: {\n serializedName: \"etag\",\n xmlName: \"etag\",\n type: {\n name: \"String\"\n }\n },\n contentMD5: {\n serializedName: \"content-md5\",\n xmlName: \"content-md5\",\n type: {\n name: \"ByteArray\"\n }\n },\n contentEncoding: {\n serializedName: \"content-encoding\",\n xmlName: \"content-encoding\",\n type: {\n name: \"String\"\n }\n },\n contentDisposition: {\n serializedName: \"content-disposition\",\n xmlName: \"content-disposition\",\n type: {\n name: \"String\"\n }\n },\n contentLanguage: {\n serializedName: \"content-language\",\n xmlName: \"content-language\",\n type: {\n name: \"String\"\n }\n },\n cacheControl: {\n serializedName: \"cache-control\",\n xmlName: \"cache-control\",\n type: {\n name: \"String\"\n }\n },\n blobSequenceNumber: {\n serializedName: \"x-ms-blob-sequence-number\",\n xmlName: \"x-ms-blob-sequence-number\",\n type: {\n name: \"Number\"\n }\n },\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n xmlName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n xmlName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n xmlName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n xmlName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n acceptRanges: {\n serializedName: \"accept-ranges\",\n xmlName: \"accept-ranges\",\n type: {\n name: \"String\"\n }\n },\n blobCommittedBlockCount: {\n serializedName: \"x-ms-blob-committed-block-count\",\n xmlName: \"x-ms-blob-committed-block-count\",\n type: {\n name: \"Number\"\n }\n },\n isServerEncrypted: {\n serializedName: \"x-ms-server-encrypted\",\n xmlName: \"x-ms-server-encrypted\",\n type: {\n name: \"Boolean\"\n }\n },\n encryptionKeySha256: {\n serializedName: \"x-ms-encryption-key-sha256\",\n xmlName: \"x-ms-encryption-key-sha256\",\n type: {\n name: \"String\"\n }\n },\n encryptionScope: {\n serializedName: \"x-ms-encryption-scope\",\n xmlName: \"x-ms-encryption-scope\",\n type: {\n name: \"String\"\n }\n },\n accessTier: {\n serializedName: \"x-ms-access-tier\",\n xmlName: \"x-ms-access-tier\",\n type: {\n name: \"String\"\n }\n },\n accessTierInferred: {\n serializedName: \"x-ms-access-tier-inferred\",\n xmlName: \"x-ms-access-tier-inferred\",\n type: {\n name: \"Boolean\"\n }\n },\n archiveStatus: {\n serializedName: \"x-ms-archive-status\",\n xmlName: \"x-ms-archive-status\",\n type: {\n name: \"String\"\n }\n },\n accessTierChangedOn: {\n serializedName: \"x-ms-access-tier-change-time\",\n xmlName: \"x-ms-access-tier-change-time\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n versionId: {\n serializedName: \"x-ms-version-id\",\n xmlName: \"x-ms-version-id\",\n type: {\n name: \"String\"\n }\n },\n isCurrentVersion: {\n serializedName: \"x-ms-is-current-version\",\n xmlName: \"x-ms-is-current-version\",\n type: {\n name: \"Boolean\"\n }\n },\n tagCount: {\n serializedName: \"x-ms-tag-count\",\n xmlName: \"x-ms-tag-count\",\n type: {\n name: \"Number\"\n }\n },\n expiresOn: {\n serializedName: \"x-ms-expiry-time\",\n xmlName: \"x-ms-expiry-time\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n isSealed: {\n serializedName: \"x-ms-blob-sealed\",\n xmlName: \"x-ms-blob-sealed\",\n type: {\n name: \"Boolean\"\n }\n },\n rehydratePriority: {\n serializedName: \"x-ms-rehydrate-priority\",\n xmlName: \"x-ms-rehydrate-priority\",\n type: {\n name: \"Enum\",\n allowedValues: [\"High\", \"Standard\"]\n }\n },\n lastAccessed: {\n serializedName: \"x-ms-last-access-time\",\n xmlName: \"x-ms-last-access-time\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n immutabilityPolicyExpiresOn: {\n serializedName: \"x-ms-immutability-policy-until-date\",\n xmlName: \"x-ms-immutability-policy-until-date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n immutabilityPolicyMode: {\n serializedName: \"x-ms-immutability-policy-mode\",\n xmlName: \"x-ms-immutability-policy-mode\",\n type: {\n name: \"Enum\",\n allowedValues: [\"Mutable\", \"Unlocked\", \"Locked\"]\n }\n },\n legalHold: {\n serializedName: \"x-ms-legal-hold\",\n xmlName: \"x-ms-legal-hold\",\n type: {\n name: \"Boolean\"\n }\n },\n errorCode: {\n serializedName: \"x-ms-error-code\",\n xmlName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst BlobGetPropertiesExceptionHeaders = {\n serializedName: \"Blob_getPropertiesExceptionHeaders\",\n type: {\n name: \"Composite\",\n className: \"BlobGetPropertiesExceptionHeaders\",\n modelProperties: {\n errorCode: {\n serializedName: \"x-ms-error-code\",\n xmlName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst BlobDeleteHeaders = {\n serializedName: \"Blob_deleteHeaders\",\n type: {\n name: \"Composite\",\n className: \"BlobDeleteHeaders\",\n modelProperties: {\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n xmlName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n xmlName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n xmlName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n xmlName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n errorCode: {\n serializedName: \"x-ms-error-code\",\n xmlName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst BlobDeleteExceptionHeaders = {\n serializedName: \"Blob_deleteExceptionHeaders\",\n type: {\n name: \"Composite\",\n className: \"BlobDeleteExceptionHeaders\",\n modelProperties: {\n errorCode: {\n serializedName: \"x-ms-error-code\",\n xmlName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst BlobUndeleteHeaders = {\n serializedName: \"Blob_undeleteHeaders\",\n type: {\n name: \"Composite\",\n className: \"BlobUndeleteHeaders\",\n modelProperties: {\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n xmlName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n xmlName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n xmlName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n xmlName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n errorCode: {\n serializedName: \"x-ms-error-code\",\n xmlName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst BlobUndeleteExceptionHeaders = {\n serializedName: \"Blob_undeleteExceptionHeaders\",\n type: {\n name: \"Composite\",\n className: \"BlobUndeleteExceptionHeaders\",\n modelProperties: {\n errorCode: {\n serializedName: \"x-ms-error-code\",\n xmlName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst BlobSetExpiryHeaders = {\n serializedName: \"Blob_setExpiryHeaders\",\n type: {\n name: \"Composite\",\n className: \"BlobSetExpiryHeaders\",\n modelProperties: {\n etag: {\n serializedName: \"etag\",\n xmlName: \"etag\",\n type: {\n name: \"String\"\n }\n },\n lastModified: {\n serializedName: \"last-modified\",\n xmlName: \"last-modified\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n xmlName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n xmlName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n xmlName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n xmlName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n }\n }\n }\n};\nconst BlobSetExpiryExceptionHeaders = {\n serializedName: \"Blob_setExpiryExceptionHeaders\",\n type: {\n name: \"Composite\",\n className: \"BlobSetExpiryExceptionHeaders\",\n modelProperties: {\n errorCode: {\n serializedName: \"x-ms-error-code\",\n xmlName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst BlobSetHttpHeadersHeaders = {\n serializedName: \"Blob_setHttpHeadersHeaders\",\n type: {\n name: \"Composite\",\n className: \"BlobSetHttpHeadersHeaders\",\n modelProperties: {\n etag: {\n serializedName: \"etag\",\n xmlName: \"etag\",\n type: {\n name: \"String\"\n }\n },\n lastModified: {\n serializedName: \"last-modified\",\n xmlName: \"last-modified\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n blobSequenceNumber: {\n serializedName: \"x-ms-blob-sequence-number\",\n xmlName: \"x-ms-blob-sequence-number\",\n type: {\n name: \"Number\"\n }\n },\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n xmlName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n xmlName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n xmlName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n xmlName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n errorCode: {\n serializedName: \"x-ms-error-code\",\n xmlName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst BlobSetHttpHeadersExceptionHeaders = {\n serializedName: \"Blob_setHttpHeadersExceptionHeaders\",\n type: {\n name: \"Composite\",\n className: \"BlobSetHttpHeadersExceptionHeaders\",\n modelProperties: {\n errorCode: {\n serializedName: \"x-ms-error-code\",\n xmlName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst BlobSetImmutabilityPolicyHeaders = {\n serializedName: \"Blob_setImmutabilityPolicyHeaders\",\n type: {\n name: \"Composite\",\n className: \"BlobSetImmutabilityPolicyHeaders\",\n modelProperties: {\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n xmlName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n xmlName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n xmlName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n xmlName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n immutabilityPolicyExpiry: {\n serializedName: \"x-ms-immutability-policy-until-date\",\n xmlName: \"x-ms-immutability-policy-until-date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n immutabilityPolicyMode: {\n serializedName: \"x-ms-immutability-policy-mode\",\n xmlName: \"x-ms-immutability-policy-mode\",\n type: {\n name: \"Enum\",\n allowedValues: [\"Mutable\", \"Unlocked\", \"Locked\"]\n }\n }\n }\n }\n};\nconst BlobSetImmutabilityPolicyExceptionHeaders = {\n serializedName: \"Blob_setImmutabilityPolicyExceptionHeaders\",\n type: {\n name: \"Composite\",\n className: \"BlobSetImmutabilityPolicyExceptionHeaders\",\n modelProperties: {\n errorCode: {\n serializedName: \"x-ms-error-code\",\n xmlName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst BlobDeleteImmutabilityPolicyHeaders = {\n serializedName: \"Blob_deleteImmutabilityPolicyHeaders\",\n type: {\n name: \"Composite\",\n className: \"BlobDeleteImmutabilityPolicyHeaders\",\n modelProperties: {\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n xmlName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n xmlName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n xmlName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n xmlName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n }\n }\n }\n};\nconst BlobDeleteImmutabilityPolicyExceptionHeaders = {\n serializedName: \"Blob_deleteImmutabilityPolicyExceptionHeaders\",\n type: {\n name: \"Composite\",\n className: \"BlobDeleteImmutabilityPolicyExceptionHeaders\",\n modelProperties: {\n errorCode: {\n serializedName: \"x-ms-error-code\",\n xmlName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst BlobSetLegalHoldHeaders = {\n serializedName: \"Blob_setLegalHoldHeaders\",\n type: {\n name: \"Composite\",\n className: \"BlobSetLegalHoldHeaders\",\n modelProperties: {\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n xmlName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n xmlName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n xmlName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n xmlName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n legalHold: {\n serializedName: \"x-ms-legal-hold\",\n xmlName: \"x-ms-legal-hold\",\n type: {\n name: \"Boolean\"\n }\n }\n }\n }\n};\nconst BlobSetLegalHoldExceptionHeaders = {\n serializedName: \"Blob_setLegalHoldExceptionHeaders\",\n type: {\n name: \"Composite\",\n className: \"BlobSetLegalHoldExceptionHeaders\",\n modelProperties: {\n errorCode: {\n serializedName: \"x-ms-error-code\",\n xmlName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst BlobSetMetadataHeaders = {\n serializedName: \"Blob_setMetadataHeaders\",\n type: {\n name: \"Composite\",\n className: \"BlobSetMetadataHeaders\",\n modelProperties: {\n etag: {\n serializedName: \"etag\",\n xmlName: \"etag\",\n type: {\n name: \"String\"\n }\n },\n lastModified: {\n serializedName: \"last-modified\",\n xmlName: \"last-modified\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n xmlName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n xmlName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n xmlName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n versionId: {\n serializedName: \"x-ms-version-id\",\n xmlName: \"x-ms-version-id\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n xmlName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n isServerEncrypted: {\n serializedName: \"x-ms-request-server-encrypted\",\n xmlName: \"x-ms-request-server-encrypted\",\n type: {\n name: \"Boolean\"\n }\n },\n encryptionKeySha256: {\n serializedName: \"x-ms-encryption-key-sha256\",\n xmlName: \"x-ms-encryption-key-sha256\",\n type: {\n name: \"String\"\n }\n },\n encryptionScope: {\n serializedName: \"x-ms-encryption-scope\",\n xmlName: \"x-ms-encryption-scope\",\n type: {\n name: \"String\"\n }\n },\n errorCode: {\n serializedName: \"x-ms-error-code\",\n xmlName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst BlobSetMetadataExceptionHeaders = {\n serializedName: \"Blob_setMetadataExceptionHeaders\",\n type: {\n name: \"Composite\",\n className: \"BlobSetMetadataExceptionHeaders\",\n modelProperties: {\n errorCode: {\n serializedName: \"x-ms-error-code\",\n xmlName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst BlobAcquireLeaseHeaders = {\n serializedName: \"Blob_acquireLeaseHeaders\",\n type: {\n name: \"Composite\",\n className: \"BlobAcquireLeaseHeaders\",\n modelProperties: {\n etag: {\n serializedName: \"etag\",\n xmlName: \"etag\",\n type: {\n name: \"String\"\n }\n },\n lastModified: {\n serializedName: \"last-modified\",\n xmlName: \"last-modified\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n leaseId: {\n serializedName: \"x-ms-lease-id\",\n xmlName: \"x-ms-lease-id\",\n type: {\n name: \"String\"\n }\n },\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n xmlName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n xmlName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n xmlName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n xmlName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n }\n }\n }\n};\nconst BlobAcquireLeaseExceptionHeaders = {\n serializedName: \"Blob_acquireLeaseExceptionHeaders\",\n type: {\n name: \"Composite\",\n className: \"BlobAcquireLeaseExceptionHeaders\",\n modelProperties: {\n errorCode: {\n serializedName: \"x-ms-error-code\",\n xmlName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst BlobReleaseLeaseHeaders = {\n serializedName: \"Blob_releaseLeaseHeaders\",\n type: {\n name: \"Composite\",\n className: \"BlobReleaseLeaseHeaders\",\n modelProperties: {\n etag: {\n serializedName: \"etag\",\n xmlName: \"etag\",\n type: {\n name: \"String\"\n }\n },\n lastModified: {\n serializedName: \"last-modified\",\n xmlName: \"last-modified\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n xmlName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n xmlName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n xmlName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n xmlName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n }\n }\n }\n};\nconst BlobReleaseLeaseExceptionHeaders = {\n serializedName: \"Blob_releaseLeaseExceptionHeaders\",\n type: {\n name: \"Composite\",\n className: \"BlobReleaseLeaseExceptionHeaders\",\n modelProperties: {\n errorCode: {\n serializedName: \"x-ms-error-code\",\n xmlName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst BlobRenewLeaseHeaders = {\n serializedName: \"Blob_renewLeaseHeaders\",\n type: {\n name: \"Composite\",\n className: \"BlobRenewLeaseHeaders\",\n modelProperties: {\n etag: {\n serializedName: \"etag\",\n xmlName: \"etag\",\n type: {\n name: \"String\"\n }\n },\n lastModified: {\n serializedName: \"last-modified\",\n xmlName: \"last-modified\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n leaseId: {\n serializedName: \"x-ms-lease-id\",\n xmlName: \"x-ms-lease-id\",\n type: {\n name: \"String\"\n }\n },\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n xmlName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n xmlName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n xmlName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n xmlName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n }\n }\n }\n};\nconst BlobRenewLeaseExceptionHeaders = {\n serializedName: \"Blob_renewLeaseExceptionHeaders\",\n type: {\n name: \"Composite\",\n className: \"BlobRenewLeaseExceptionHeaders\",\n modelProperties: {\n errorCode: {\n serializedName: \"x-ms-error-code\",\n xmlName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst BlobChangeLeaseHeaders = {\n serializedName: \"Blob_changeLeaseHeaders\",\n type: {\n name: \"Composite\",\n className: \"BlobChangeLeaseHeaders\",\n modelProperties: {\n etag: {\n serializedName: \"etag\",\n xmlName: \"etag\",\n type: {\n name: \"String\"\n }\n },\n lastModified: {\n serializedName: \"last-modified\",\n xmlName: \"last-modified\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n xmlName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n xmlName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n leaseId: {\n serializedName: \"x-ms-lease-id\",\n xmlName: \"x-ms-lease-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n xmlName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n xmlName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n }\n }\n }\n};\nconst BlobChangeLeaseExceptionHeaders = {\n serializedName: \"Blob_changeLeaseExceptionHeaders\",\n type: {\n name: \"Composite\",\n className: \"BlobChangeLeaseExceptionHeaders\",\n modelProperties: {\n errorCode: {\n serializedName: \"x-ms-error-code\",\n xmlName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst BlobBreakLeaseHeaders = {\n serializedName: \"Blob_breakLeaseHeaders\",\n type: {\n name: \"Composite\",\n className: \"BlobBreakLeaseHeaders\",\n modelProperties: {\n etag: {\n serializedName: \"etag\",\n xmlName: \"etag\",\n type: {\n name: \"String\"\n }\n },\n lastModified: {\n serializedName: \"last-modified\",\n xmlName: \"last-modified\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n leaseTime: {\n serializedName: \"x-ms-lease-time\",\n xmlName: \"x-ms-lease-time\",\n type: {\n name: \"Number\"\n }\n },\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n xmlName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n xmlName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n xmlName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n xmlName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n }\n }\n }\n};\nconst BlobBreakLeaseExceptionHeaders = {\n serializedName: \"Blob_breakLeaseExceptionHeaders\",\n type: {\n name: \"Composite\",\n className: \"BlobBreakLeaseExceptionHeaders\",\n modelProperties: {\n errorCode: {\n serializedName: \"x-ms-error-code\",\n xmlName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst BlobCreateSnapshotHeaders = {\n serializedName: \"Blob_createSnapshotHeaders\",\n type: {\n name: \"Composite\",\n className: \"BlobCreateSnapshotHeaders\",\n modelProperties: {\n snapshot: {\n serializedName: \"x-ms-snapshot\",\n xmlName: \"x-ms-snapshot\",\n type: {\n name: \"String\"\n }\n },\n etag: {\n serializedName: \"etag\",\n xmlName: \"etag\",\n type: {\n name: \"String\"\n }\n },\n lastModified: {\n serializedName: \"last-modified\",\n xmlName: \"last-modified\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n xmlName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n xmlName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n xmlName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n versionId: {\n serializedName: \"x-ms-version-id\",\n xmlName: \"x-ms-version-id\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n xmlName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n isServerEncrypted: {\n serializedName: \"x-ms-request-server-encrypted\",\n xmlName: \"x-ms-request-server-encrypted\",\n type: {\n name: \"Boolean\"\n }\n },\n errorCode: {\n serializedName: \"x-ms-error-code\",\n xmlName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst BlobCreateSnapshotExceptionHeaders = {\n serializedName: \"Blob_createSnapshotExceptionHeaders\",\n type: {\n name: \"Composite\",\n className: \"BlobCreateSnapshotExceptionHeaders\",\n modelProperties: {\n errorCode: {\n serializedName: \"x-ms-error-code\",\n xmlName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst BlobStartCopyFromURLHeaders = {\n serializedName: \"Blob_startCopyFromURLHeaders\",\n type: {\n name: \"Composite\",\n className: \"BlobStartCopyFromURLHeaders\",\n modelProperties: {\n etag: {\n serializedName: \"etag\",\n xmlName: \"etag\",\n type: {\n name: \"String\"\n }\n },\n lastModified: {\n serializedName: \"last-modified\",\n xmlName: \"last-modified\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n xmlName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n xmlName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n xmlName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n versionId: {\n serializedName: \"x-ms-version-id\",\n xmlName: \"x-ms-version-id\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n xmlName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n copyId: {\n serializedName: \"x-ms-copy-id\",\n xmlName: \"x-ms-copy-id\",\n type: {\n name: \"String\"\n }\n },\n copyStatus: {\n serializedName: \"x-ms-copy-status\",\n xmlName: \"x-ms-copy-status\",\n type: {\n name: \"Enum\",\n allowedValues: [\"pending\", \"success\", \"aborted\", \"failed\"]\n }\n },\n errorCode: {\n serializedName: \"x-ms-error-code\",\n xmlName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst BlobStartCopyFromURLExceptionHeaders = {\n serializedName: \"Blob_startCopyFromURLExceptionHeaders\",\n type: {\n name: \"Composite\",\n className: \"BlobStartCopyFromURLExceptionHeaders\",\n modelProperties: {\n errorCode: {\n serializedName: \"x-ms-error-code\",\n xmlName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst BlobCopyFromURLHeaders = {\n serializedName: \"Blob_copyFromURLHeaders\",\n type: {\n name: \"Composite\",\n className: \"BlobCopyFromURLHeaders\",\n modelProperties: {\n etag: {\n serializedName: \"etag\",\n xmlName: \"etag\",\n type: {\n name: \"String\"\n }\n },\n lastModified: {\n serializedName: \"last-modified\",\n xmlName: \"last-modified\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n xmlName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n xmlName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n xmlName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n versionId: {\n serializedName: \"x-ms-version-id\",\n xmlName: \"x-ms-version-id\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n xmlName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n copyId: {\n serializedName: \"x-ms-copy-id\",\n xmlName: \"x-ms-copy-id\",\n type: {\n name: \"String\"\n }\n },\n copyStatus: {\n defaultValue: \"success\",\n isConstant: true,\n serializedName: \"x-ms-copy-status\",\n type: {\n name: \"String\"\n }\n },\n contentMD5: {\n serializedName: \"content-md5\",\n xmlName: \"content-md5\",\n type: {\n name: \"ByteArray\"\n }\n },\n xMsContentCrc64: {\n serializedName: \"x-ms-content-crc64\",\n xmlName: \"x-ms-content-crc64\",\n type: {\n name: \"ByteArray\"\n }\n },\n encryptionScope: {\n serializedName: \"x-ms-encryption-scope\",\n xmlName: \"x-ms-encryption-scope\",\n type: {\n name: \"String\"\n }\n },\n errorCode: {\n serializedName: \"x-ms-error-code\",\n xmlName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst BlobCopyFromURLExceptionHeaders = {\n serializedName: \"Blob_copyFromURLExceptionHeaders\",\n type: {\n name: \"Composite\",\n className: \"BlobCopyFromURLExceptionHeaders\",\n modelProperties: {\n errorCode: {\n serializedName: \"x-ms-error-code\",\n xmlName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst BlobAbortCopyFromURLHeaders = {\n serializedName: \"Blob_abortCopyFromURLHeaders\",\n type: {\n name: \"Composite\",\n className: \"BlobAbortCopyFromURLHeaders\",\n modelProperties: {\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n xmlName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n xmlName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n xmlName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n xmlName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n errorCode: {\n serializedName: \"x-ms-error-code\",\n xmlName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst BlobAbortCopyFromURLExceptionHeaders = {\n serializedName: \"Blob_abortCopyFromURLExceptionHeaders\",\n type: {\n name: \"Composite\",\n className: \"BlobAbortCopyFromURLExceptionHeaders\",\n modelProperties: {\n errorCode: {\n serializedName: \"x-ms-error-code\",\n xmlName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst BlobSetTierHeaders = {\n serializedName: \"Blob_setTierHeaders\",\n type: {\n name: \"Composite\",\n className: \"BlobSetTierHeaders\",\n modelProperties: {\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n xmlName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n xmlName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n xmlName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n errorCode: {\n serializedName: \"x-ms-error-code\",\n xmlName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst BlobSetTierExceptionHeaders = {\n serializedName: \"Blob_setTierExceptionHeaders\",\n type: {\n name: \"Composite\",\n className: \"BlobSetTierExceptionHeaders\",\n modelProperties: {\n errorCode: {\n serializedName: \"x-ms-error-code\",\n xmlName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst BlobGetAccountInfoHeaders = {\n serializedName: \"Blob_getAccountInfoHeaders\",\n type: {\n name: \"Composite\",\n className: \"BlobGetAccountInfoHeaders\",\n modelProperties: {\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n xmlName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n xmlName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n xmlName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n xmlName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n skuName: {\n serializedName: \"x-ms-sku-name\",\n xmlName: \"x-ms-sku-name\",\n type: {\n name: \"Enum\",\n allowedValues: [\n \"Standard_LRS\",\n \"Standard_GRS\",\n \"Standard_RAGRS\",\n \"Standard_ZRS\",\n \"Premium_LRS\"\n ]\n }\n },\n accountKind: {\n serializedName: \"x-ms-account-kind\",\n xmlName: \"x-ms-account-kind\",\n type: {\n name: \"Enum\",\n allowedValues: [\n \"Storage\",\n \"BlobStorage\",\n \"StorageV2\",\n \"FileStorage\",\n \"BlockBlobStorage\"\n ]\n }\n }\n }\n }\n};\nconst BlobGetAccountInfoExceptionHeaders = {\n serializedName: \"Blob_getAccountInfoExceptionHeaders\",\n type: {\n name: \"Composite\",\n className: \"BlobGetAccountInfoExceptionHeaders\",\n modelProperties: {\n errorCode: {\n serializedName: \"x-ms-error-code\",\n xmlName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst BlobQueryHeaders = {\n serializedName: \"Blob_queryHeaders\",\n type: {\n name: \"Composite\",\n className: \"BlobQueryHeaders\",\n modelProperties: {\n lastModified: {\n serializedName: \"last-modified\",\n xmlName: \"last-modified\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n metadata: {\n serializedName: \"x-ms-meta\",\n xmlName: \"x-ms-meta\",\n type: {\n name: \"Dictionary\",\n value: { type: { name: \"String\" } }\n }\n },\n contentLength: {\n serializedName: \"content-length\",\n xmlName: \"content-length\",\n type: {\n name: \"Number\"\n }\n },\n contentType: {\n serializedName: \"content-type\",\n xmlName: \"content-type\",\n type: {\n name: \"String\"\n }\n },\n contentRange: {\n serializedName: \"content-range\",\n xmlName: \"content-range\",\n type: {\n name: \"String\"\n }\n },\n etag: {\n serializedName: \"etag\",\n xmlName: \"etag\",\n type: {\n name: \"String\"\n }\n },\n contentMD5: {\n serializedName: \"content-md5\",\n xmlName: \"content-md5\",\n type: {\n name: \"ByteArray\"\n }\n },\n contentEncoding: {\n serializedName: \"content-encoding\",\n xmlName: \"content-encoding\",\n type: {\n name: \"String\"\n }\n },\n cacheControl: {\n serializedName: \"cache-control\",\n xmlName: \"cache-control\",\n type: {\n name: \"String\"\n }\n },\n contentDisposition: {\n serializedName: \"content-disposition\",\n xmlName: \"content-disposition\",\n type: {\n name: \"String\"\n }\n },\n contentLanguage: {\n serializedName: \"content-language\",\n xmlName: \"content-language\",\n type: {\n name: \"String\"\n }\n },\n blobSequenceNumber: {\n serializedName: \"x-ms-blob-sequence-number\",\n xmlName: \"x-ms-blob-sequence-number\",\n type: {\n name: \"Number\"\n }\n },\n blobType: {\n serializedName: \"x-ms-blob-type\",\n xmlName: \"x-ms-blob-type\",\n type: {\n name: \"Enum\",\n allowedValues: [\"BlockBlob\", \"PageBlob\", \"AppendBlob\"]\n }\n },\n copyCompletionTime: {\n serializedName: \"x-ms-copy-completion-time\",\n xmlName: \"x-ms-copy-completion-time\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n copyStatusDescription: {\n serializedName: \"x-ms-copy-status-description\",\n xmlName: \"x-ms-copy-status-description\",\n type: {\n name: \"String\"\n }\n },\n copyId: {\n serializedName: \"x-ms-copy-id\",\n xmlName: \"x-ms-copy-id\",\n type: {\n name: \"String\"\n }\n },\n copyProgress: {\n serializedName: \"x-ms-copy-progress\",\n xmlName: \"x-ms-copy-progress\",\n type: {\n name: \"String\"\n }\n },\n copySource: {\n serializedName: \"x-ms-copy-source\",\n xmlName: \"x-ms-copy-source\",\n type: {\n name: \"String\"\n }\n },\n copyStatus: {\n serializedName: \"x-ms-copy-status\",\n xmlName: \"x-ms-copy-status\",\n type: {\n name: \"Enum\",\n allowedValues: [\"pending\", \"success\", \"aborted\", \"failed\"]\n }\n },\n leaseDuration: {\n serializedName: \"x-ms-lease-duration\",\n xmlName: \"x-ms-lease-duration\",\n type: {\n name: \"Enum\",\n allowedValues: [\"infinite\", \"fixed\"]\n }\n },\n leaseState: {\n serializedName: \"x-ms-lease-state\",\n xmlName: \"x-ms-lease-state\",\n type: {\n name: \"Enum\",\n allowedValues: [\n \"available\",\n \"leased\",\n \"expired\",\n \"breaking\",\n \"broken\"\n ]\n }\n },\n leaseStatus: {\n serializedName: \"x-ms-lease-status\",\n xmlName: \"x-ms-lease-status\",\n type: {\n name: \"Enum\",\n allowedValues: [\"locked\", \"unlocked\"]\n }\n },\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n xmlName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n xmlName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n xmlName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n acceptRanges: {\n serializedName: \"accept-ranges\",\n xmlName: \"accept-ranges\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n xmlName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n blobCommittedBlockCount: {\n serializedName: \"x-ms-blob-committed-block-count\",\n xmlName: \"x-ms-blob-committed-block-count\",\n type: {\n name: \"Number\"\n }\n },\n isServerEncrypted: {\n serializedName: \"x-ms-server-encrypted\",\n xmlName: \"x-ms-server-encrypted\",\n type: {\n name: \"Boolean\"\n }\n },\n encryptionKeySha256: {\n serializedName: \"x-ms-encryption-key-sha256\",\n xmlName: \"x-ms-encryption-key-sha256\",\n type: {\n name: \"String\"\n }\n },\n encryptionScope: {\n serializedName: \"x-ms-encryption-scope\",\n xmlName: \"x-ms-encryption-scope\",\n type: {\n name: \"String\"\n }\n },\n blobContentMD5: {\n serializedName: \"x-ms-blob-content-md5\",\n xmlName: \"x-ms-blob-content-md5\",\n type: {\n name: \"ByteArray\"\n }\n },\n errorCode: {\n serializedName: \"x-ms-error-code\",\n xmlName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n },\n contentCrc64: {\n serializedName: \"x-ms-content-crc64\",\n xmlName: \"x-ms-content-crc64\",\n type: {\n name: \"ByteArray\"\n }\n }\n }\n }\n};\nconst BlobQueryExceptionHeaders = {\n serializedName: \"Blob_queryExceptionHeaders\",\n type: {\n name: \"Composite\",\n className: \"BlobQueryExceptionHeaders\",\n modelProperties: {\n errorCode: {\n serializedName: \"x-ms-error-code\",\n xmlName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst BlobGetTagsHeaders = {\n serializedName: \"Blob_getTagsHeaders\",\n type: {\n name: \"Composite\",\n className: \"BlobGetTagsHeaders\",\n modelProperties: {\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n xmlName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n xmlName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n xmlName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n xmlName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n errorCode: {\n serializedName: \"x-ms-error-code\",\n xmlName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst BlobGetTagsExceptionHeaders = {\n serializedName: \"Blob_getTagsExceptionHeaders\",\n type: {\n name: \"Composite\",\n className: \"BlobGetTagsExceptionHeaders\",\n modelProperties: {\n errorCode: {\n serializedName: \"x-ms-error-code\",\n xmlName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst BlobSetTagsHeaders = {\n serializedName: \"Blob_setTagsHeaders\",\n type: {\n name: \"Composite\",\n className: \"BlobSetTagsHeaders\",\n modelProperties: {\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n xmlName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n xmlName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n xmlName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n xmlName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n errorCode: {\n serializedName: \"x-ms-error-code\",\n xmlName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst BlobSetTagsExceptionHeaders = {\n serializedName: \"Blob_setTagsExceptionHeaders\",\n type: {\n name: \"Composite\",\n className: \"BlobSetTagsExceptionHeaders\",\n modelProperties: {\n errorCode: {\n serializedName: \"x-ms-error-code\",\n xmlName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst PageBlobCreateHeaders = {\n serializedName: \"PageBlob_createHeaders\",\n type: {\n name: \"Composite\",\n className: \"PageBlobCreateHeaders\",\n modelProperties: {\n etag: {\n serializedName: \"etag\",\n xmlName: \"etag\",\n type: {\n name: \"String\"\n }\n },\n lastModified: {\n serializedName: \"last-modified\",\n xmlName: \"last-modified\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n contentMD5: {\n serializedName: \"content-md5\",\n xmlName: \"content-md5\",\n type: {\n name: \"ByteArray\"\n }\n },\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n xmlName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n xmlName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n xmlName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n versionId: {\n serializedName: \"x-ms-version-id\",\n xmlName: \"x-ms-version-id\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n xmlName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n isServerEncrypted: {\n serializedName: \"x-ms-request-server-encrypted\",\n xmlName: \"x-ms-request-server-encrypted\",\n type: {\n name: \"Boolean\"\n }\n },\n encryptionKeySha256: {\n serializedName: \"x-ms-encryption-key-sha256\",\n xmlName: \"x-ms-encryption-key-sha256\",\n type: {\n name: \"String\"\n }\n },\n encryptionScope: {\n serializedName: \"x-ms-encryption-scope\",\n xmlName: \"x-ms-encryption-scope\",\n type: {\n name: \"String\"\n }\n },\n errorCode: {\n serializedName: \"x-ms-error-code\",\n xmlName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst PageBlobCreateExceptionHeaders = {\n serializedName: \"PageBlob_createExceptionHeaders\",\n type: {\n name: \"Composite\",\n className: \"PageBlobCreateExceptionHeaders\",\n modelProperties: {\n errorCode: {\n serializedName: \"x-ms-error-code\",\n xmlName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst PageBlobUploadPagesHeaders = {\n serializedName: \"PageBlob_uploadPagesHeaders\",\n type: {\n name: \"Composite\",\n className: \"PageBlobUploadPagesHeaders\",\n modelProperties: {\n etag: {\n serializedName: \"etag\",\n xmlName: \"etag\",\n type: {\n name: \"String\"\n }\n },\n lastModified: {\n serializedName: \"last-modified\",\n xmlName: \"last-modified\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n contentMD5: {\n serializedName: \"content-md5\",\n xmlName: \"content-md5\",\n type: {\n name: \"ByteArray\"\n }\n },\n xMsContentCrc64: {\n serializedName: \"x-ms-content-crc64\",\n xmlName: \"x-ms-content-crc64\",\n type: {\n name: \"ByteArray\"\n }\n },\n blobSequenceNumber: {\n serializedName: \"x-ms-blob-sequence-number\",\n xmlName: \"x-ms-blob-sequence-number\",\n type: {\n name: \"Number\"\n }\n },\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n xmlName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n xmlName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n xmlName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n xmlName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n isServerEncrypted: {\n serializedName: \"x-ms-request-server-encrypted\",\n xmlName: \"x-ms-request-server-encrypted\",\n type: {\n name: \"Boolean\"\n }\n },\n encryptionKeySha256: {\n serializedName: \"x-ms-encryption-key-sha256\",\n xmlName: \"x-ms-encryption-key-sha256\",\n type: {\n name: \"String\"\n }\n },\n encryptionScope: {\n serializedName: \"x-ms-encryption-scope\",\n xmlName: \"x-ms-encryption-scope\",\n type: {\n name: \"String\"\n }\n },\n errorCode: {\n serializedName: \"x-ms-error-code\",\n xmlName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst PageBlobUploadPagesExceptionHeaders = {\n serializedName: \"PageBlob_uploadPagesExceptionHeaders\",\n type: {\n name: \"Composite\",\n className: \"PageBlobUploadPagesExceptionHeaders\",\n modelProperties: {\n errorCode: {\n serializedName: \"x-ms-error-code\",\n xmlName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst PageBlobClearPagesHeaders = {\n serializedName: \"PageBlob_clearPagesHeaders\",\n type: {\n name: \"Composite\",\n className: \"PageBlobClearPagesHeaders\",\n modelProperties: {\n etag: {\n serializedName: \"etag\",\n xmlName: \"etag\",\n type: {\n name: \"String\"\n }\n },\n lastModified: {\n serializedName: \"last-modified\",\n xmlName: \"last-modified\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n contentMD5: {\n serializedName: \"content-md5\",\n xmlName: \"content-md5\",\n type: {\n name: \"ByteArray\"\n }\n },\n xMsContentCrc64: {\n serializedName: \"x-ms-content-crc64\",\n xmlName: \"x-ms-content-crc64\",\n type: {\n name: \"ByteArray\"\n }\n },\n blobSequenceNumber: {\n serializedName: \"x-ms-blob-sequence-number\",\n xmlName: \"x-ms-blob-sequence-number\",\n type: {\n name: \"Number\"\n }\n },\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n xmlName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n xmlName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n xmlName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n xmlName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n errorCode: {\n serializedName: \"x-ms-error-code\",\n xmlName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst PageBlobClearPagesExceptionHeaders = {\n serializedName: \"PageBlob_clearPagesExceptionHeaders\",\n type: {\n name: \"Composite\",\n className: \"PageBlobClearPagesExceptionHeaders\",\n modelProperties: {\n errorCode: {\n serializedName: \"x-ms-error-code\",\n xmlName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst PageBlobUploadPagesFromURLHeaders = {\n serializedName: \"PageBlob_uploadPagesFromURLHeaders\",\n type: {\n name: \"Composite\",\n className: \"PageBlobUploadPagesFromURLHeaders\",\n modelProperties: {\n etag: {\n serializedName: \"etag\",\n xmlName: \"etag\",\n type: {\n name: \"String\"\n }\n },\n lastModified: {\n serializedName: \"last-modified\",\n xmlName: \"last-modified\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n contentMD5: {\n serializedName: \"content-md5\",\n xmlName: \"content-md5\",\n type: {\n name: \"ByteArray\"\n }\n },\n xMsContentCrc64: {\n serializedName: \"x-ms-content-crc64\",\n xmlName: \"x-ms-content-crc64\",\n type: {\n name: \"ByteArray\"\n }\n },\n blobSequenceNumber: {\n serializedName: \"x-ms-blob-sequence-number\",\n xmlName: \"x-ms-blob-sequence-number\",\n type: {\n name: \"Number\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n xmlName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n xmlName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n xmlName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n isServerEncrypted: {\n serializedName: \"x-ms-request-server-encrypted\",\n xmlName: \"x-ms-request-server-encrypted\",\n type: {\n name: \"Boolean\"\n }\n },\n encryptionKeySha256: {\n serializedName: \"x-ms-encryption-key-sha256\",\n xmlName: \"x-ms-encryption-key-sha256\",\n type: {\n name: \"String\"\n }\n },\n encryptionScope: {\n serializedName: \"x-ms-encryption-scope\",\n xmlName: \"x-ms-encryption-scope\",\n type: {\n name: \"String\"\n }\n },\n errorCode: {\n serializedName: \"x-ms-error-code\",\n xmlName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst PageBlobUploadPagesFromURLExceptionHeaders = {\n serializedName: \"PageBlob_uploadPagesFromURLExceptionHeaders\",\n type: {\n name: \"Composite\",\n className: \"PageBlobUploadPagesFromURLExceptionHeaders\",\n modelProperties: {\n errorCode: {\n serializedName: \"x-ms-error-code\",\n xmlName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst PageBlobGetPageRangesHeaders = {\n serializedName: \"PageBlob_getPageRangesHeaders\",\n type: {\n name: \"Composite\",\n className: \"PageBlobGetPageRangesHeaders\",\n modelProperties: {\n lastModified: {\n serializedName: \"last-modified\",\n xmlName: \"last-modified\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n etag: {\n serializedName: \"etag\",\n xmlName: \"etag\",\n type: {\n name: \"String\"\n }\n },\n blobContentLength: {\n serializedName: \"x-ms-blob-content-length\",\n xmlName: \"x-ms-blob-content-length\",\n type: {\n name: \"Number\"\n }\n },\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n xmlName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n xmlName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n xmlName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n xmlName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n errorCode: {\n serializedName: \"x-ms-error-code\",\n xmlName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst PageBlobGetPageRangesExceptionHeaders = {\n serializedName: \"PageBlob_getPageRangesExceptionHeaders\",\n type: {\n name: \"Composite\",\n className: \"PageBlobGetPageRangesExceptionHeaders\",\n modelProperties: {\n errorCode: {\n serializedName: \"x-ms-error-code\",\n xmlName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst PageBlobGetPageRangesDiffHeaders = {\n serializedName: \"PageBlob_getPageRangesDiffHeaders\",\n type: {\n name: \"Composite\",\n className: \"PageBlobGetPageRangesDiffHeaders\",\n modelProperties: {\n lastModified: {\n serializedName: \"last-modified\",\n xmlName: \"last-modified\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n etag: {\n serializedName: \"etag\",\n xmlName: \"etag\",\n type: {\n name: \"String\"\n }\n },\n blobContentLength: {\n serializedName: \"x-ms-blob-content-length\",\n xmlName: \"x-ms-blob-content-length\",\n type: {\n name: \"Number\"\n }\n },\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n xmlName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n xmlName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n xmlName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n xmlName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n errorCode: {\n serializedName: \"x-ms-error-code\",\n xmlName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst PageBlobGetPageRangesDiffExceptionHeaders = {\n serializedName: \"PageBlob_getPageRangesDiffExceptionHeaders\",\n type: {\n name: \"Composite\",\n className: \"PageBlobGetPageRangesDiffExceptionHeaders\",\n modelProperties: {\n errorCode: {\n serializedName: \"x-ms-error-code\",\n xmlName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst PageBlobResizeHeaders = {\n serializedName: \"PageBlob_resizeHeaders\",\n type: {\n name: \"Composite\",\n className: \"PageBlobResizeHeaders\",\n modelProperties: {\n etag: {\n serializedName: \"etag\",\n xmlName: \"etag\",\n type: {\n name: \"String\"\n }\n },\n lastModified: {\n serializedName: \"last-modified\",\n xmlName: \"last-modified\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n blobSequenceNumber: {\n serializedName: \"x-ms-blob-sequence-number\",\n xmlName: \"x-ms-blob-sequence-number\",\n type: {\n name: \"Number\"\n }\n },\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n xmlName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n xmlName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n xmlName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n xmlName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n errorCode: {\n serializedName: \"x-ms-error-code\",\n xmlName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst PageBlobResizeExceptionHeaders = {\n serializedName: \"PageBlob_resizeExceptionHeaders\",\n type: {\n name: \"Composite\",\n className: \"PageBlobResizeExceptionHeaders\",\n modelProperties: {\n errorCode: {\n serializedName: \"x-ms-error-code\",\n xmlName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst PageBlobUpdateSequenceNumberHeaders = {\n serializedName: \"PageBlob_updateSequenceNumberHeaders\",\n type: {\n name: \"Composite\",\n className: \"PageBlobUpdateSequenceNumberHeaders\",\n modelProperties: {\n etag: {\n serializedName: \"etag\",\n xmlName: \"etag\",\n type: {\n name: \"String\"\n }\n },\n lastModified: {\n serializedName: \"last-modified\",\n xmlName: \"last-modified\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n blobSequenceNumber: {\n serializedName: \"x-ms-blob-sequence-number\",\n xmlName: \"x-ms-blob-sequence-number\",\n type: {\n name: \"Number\"\n }\n },\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n xmlName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n xmlName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n xmlName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n xmlName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n errorCode: {\n serializedName: \"x-ms-error-code\",\n xmlName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst PageBlobUpdateSequenceNumberExceptionHeaders = {\n serializedName: \"PageBlob_updateSequenceNumberExceptionHeaders\",\n type: {\n name: \"Composite\",\n className: \"PageBlobUpdateSequenceNumberExceptionHeaders\",\n modelProperties: {\n errorCode: {\n serializedName: \"x-ms-error-code\",\n xmlName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst PageBlobCopyIncrementalHeaders = {\n serializedName: \"PageBlob_copyIncrementalHeaders\",\n type: {\n name: \"Composite\",\n className: \"PageBlobCopyIncrementalHeaders\",\n modelProperties: {\n etag: {\n serializedName: \"etag\",\n xmlName: \"etag\",\n type: {\n name: \"String\"\n }\n },\n lastModified: {\n serializedName: \"last-modified\",\n xmlName: \"last-modified\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n xmlName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n xmlName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n xmlName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n xmlName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n copyId: {\n serializedName: \"x-ms-copy-id\",\n xmlName: \"x-ms-copy-id\",\n type: {\n name: \"String\"\n }\n },\n copyStatus: {\n serializedName: \"x-ms-copy-status\",\n xmlName: \"x-ms-copy-status\",\n type: {\n name: \"Enum\",\n allowedValues: [\"pending\", \"success\", \"aborted\", \"failed\"]\n }\n },\n errorCode: {\n serializedName: \"x-ms-error-code\",\n xmlName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst PageBlobCopyIncrementalExceptionHeaders = {\n serializedName: \"PageBlob_copyIncrementalExceptionHeaders\",\n type: {\n name: \"Composite\",\n className: \"PageBlobCopyIncrementalExceptionHeaders\",\n modelProperties: {\n errorCode: {\n serializedName: \"x-ms-error-code\",\n xmlName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst AppendBlobCreateHeaders = {\n serializedName: \"AppendBlob_createHeaders\",\n type: {\n name: \"Composite\",\n className: \"AppendBlobCreateHeaders\",\n modelProperties: {\n etag: {\n serializedName: \"etag\",\n xmlName: \"etag\",\n type: {\n name: \"String\"\n }\n },\n lastModified: {\n serializedName: \"last-modified\",\n xmlName: \"last-modified\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n contentMD5: {\n serializedName: \"content-md5\",\n xmlName: \"content-md5\",\n type: {\n name: \"ByteArray\"\n }\n },\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n xmlName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n xmlName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n xmlName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n versionId: {\n serializedName: \"x-ms-version-id\",\n xmlName: \"x-ms-version-id\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n xmlName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n isServerEncrypted: {\n serializedName: \"x-ms-request-server-encrypted\",\n xmlName: \"x-ms-request-server-encrypted\",\n type: {\n name: \"Boolean\"\n }\n },\n encryptionKeySha256: {\n serializedName: \"x-ms-encryption-key-sha256\",\n xmlName: \"x-ms-encryption-key-sha256\",\n type: {\n name: \"String\"\n }\n },\n encryptionScope: {\n serializedName: \"x-ms-encryption-scope\",\n xmlName: \"x-ms-encryption-scope\",\n type: {\n name: \"String\"\n }\n },\n errorCode: {\n serializedName: \"x-ms-error-code\",\n xmlName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst AppendBlobCreateExceptionHeaders = {\n serializedName: \"AppendBlob_createExceptionHeaders\",\n type: {\n name: \"Composite\",\n className: \"AppendBlobCreateExceptionHeaders\",\n modelProperties: {\n errorCode: {\n serializedName: \"x-ms-error-code\",\n xmlName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst AppendBlobAppendBlockHeaders = {\n serializedName: \"AppendBlob_appendBlockHeaders\",\n type: {\n name: \"Composite\",\n className: \"AppendBlobAppendBlockHeaders\",\n modelProperties: {\n etag: {\n serializedName: \"etag\",\n xmlName: \"etag\",\n type: {\n name: \"String\"\n }\n },\n lastModified: {\n serializedName: \"last-modified\",\n xmlName: \"last-modified\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n contentMD5: {\n serializedName: \"content-md5\",\n xmlName: \"content-md5\",\n type: {\n name: \"ByteArray\"\n }\n },\n xMsContentCrc64: {\n serializedName: \"x-ms-content-crc64\",\n xmlName: \"x-ms-content-crc64\",\n type: {\n name: \"ByteArray\"\n }\n },\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n xmlName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n xmlName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n xmlName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n xmlName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n blobAppendOffset: {\n serializedName: \"x-ms-blob-append-offset\",\n xmlName: \"x-ms-blob-append-offset\",\n type: {\n name: \"String\"\n }\n },\n blobCommittedBlockCount: {\n serializedName: \"x-ms-blob-committed-block-count\",\n xmlName: \"x-ms-blob-committed-block-count\",\n type: {\n name: \"Number\"\n }\n },\n isServerEncrypted: {\n serializedName: \"x-ms-request-server-encrypted\",\n xmlName: \"x-ms-request-server-encrypted\",\n type: {\n name: \"Boolean\"\n }\n },\n encryptionKeySha256: {\n serializedName: \"x-ms-encryption-key-sha256\",\n xmlName: \"x-ms-encryption-key-sha256\",\n type: {\n name: \"String\"\n }\n },\n encryptionScope: {\n serializedName: \"x-ms-encryption-scope\",\n xmlName: \"x-ms-encryption-scope\",\n type: {\n name: \"String\"\n }\n },\n errorCode: {\n serializedName: \"x-ms-error-code\",\n xmlName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst AppendBlobAppendBlockExceptionHeaders = {\n serializedName: \"AppendBlob_appendBlockExceptionHeaders\",\n type: {\n name: \"Composite\",\n className: \"AppendBlobAppendBlockExceptionHeaders\",\n modelProperties: {\n errorCode: {\n serializedName: \"x-ms-error-code\",\n xmlName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst AppendBlobAppendBlockFromUrlHeaders = {\n serializedName: \"AppendBlob_appendBlockFromUrlHeaders\",\n type: {\n name: \"Composite\",\n className: \"AppendBlobAppendBlockFromUrlHeaders\",\n modelProperties: {\n etag: {\n serializedName: \"etag\",\n xmlName: \"etag\",\n type: {\n name: \"String\"\n }\n },\n lastModified: {\n serializedName: \"last-modified\",\n xmlName: \"last-modified\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n contentMD5: {\n serializedName: \"content-md5\",\n xmlName: \"content-md5\",\n type: {\n name: \"ByteArray\"\n }\n },\n xMsContentCrc64: {\n serializedName: \"x-ms-content-crc64\",\n xmlName: \"x-ms-content-crc64\",\n type: {\n name: \"ByteArray\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n xmlName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n xmlName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n xmlName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n blobAppendOffset: {\n serializedName: \"x-ms-blob-append-offset\",\n xmlName: \"x-ms-blob-append-offset\",\n type: {\n name: \"String\"\n }\n },\n blobCommittedBlockCount: {\n serializedName: \"x-ms-blob-committed-block-count\",\n xmlName: \"x-ms-blob-committed-block-count\",\n type: {\n name: \"Number\"\n }\n },\n encryptionKeySha256: {\n serializedName: \"x-ms-encryption-key-sha256\",\n xmlName: \"x-ms-encryption-key-sha256\",\n type: {\n name: \"String\"\n }\n },\n encryptionScope: {\n serializedName: \"x-ms-encryption-scope\",\n xmlName: \"x-ms-encryption-scope\",\n type: {\n name: \"String\"\n }\n },\n isServerEncrypted: {\n serializedName: \"x-ms-request-server-encrypted\",\n xmlName: \"x-ms-request-server-encrypted\",\n type: {\n name: \"Boolean\"\n }\n },\n errorCode: {\n serializedName: \"x-ms-error-code\",\n xmlName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst AppendBlobAppendBlockFromUrlExceptionHeaders = {\n serializedName: \"AppendBlob_appendBlockFromUrlExceptionHeaders\",\n type: {\n name: \"Composite\",\n className: \"AppendBlobAppendBlockFromUrlExceptionHeaders\",\n modelProperties: {\n errorCode: {\n serializedName: \"x-ms-error-code\",\n xmlName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst AppendBlobSealHeaders = {\n serializedName: \"AppendBlob_sealHeaders\",\n type: {\n name: \"Composite\",\n className: \"AppendBlobSealHeaders\",\n modelProperties: {\n etag: {\n serializedName: \"etag\",\n xmlName: \"etag\",\n type: {\n name: \"String\"\n }\n },\n lastModified: {\n serializedName: \"last-modified\",\n xmlName: \"last-modified\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n xmlName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n xmlName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n xmlName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n xmlName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n isSealed: {\n serializedName: \"x-ms-blob-sealed\",\n xmlName: \"x-ms-blob-sealed\",\n type: {\n name: \"Boolean\"\n }\n }\n }\n }\n};\nconst AppendBlobSealExceptionHeaders = {\n serializedName: \"AppendBlob_sealExceptionHeaders\",\n type: {\n name: \"Composite\",\n className: \"AppendBlobSealExceptionHeaders\",\n modelProperties: {\n errorCode: {\n serializedName: \"x-ms-error-code\",\n xmlName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst BlockBlobUploadHeaders = {\n serializedName: \"BlockBlob_uploadHeaders\",\n type: {\n name: \"Composite\",\n className: \"BlockBlobUploadHeaders\",\n modelProperties: {\n etag: {\n serializedName: \"etag\",\n xmlName: \"etag\",\n type: {\n name: \"String\"\n }\n },\n lastModified: {\n serializedName: \"last-modified\",\n xmlName: \"last-modified\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n contentMD5: {\n serializedName: \"content-md5\",\n xmlName: \"content-md5\",\n type: {\n name: \"ByteArray\"\n }\n },\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n xmlName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n xmlName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n xmlName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n versionId: {\n serializedName: \"x-ms-version-id\",\n xmlName: \"x-ms-version-id\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n xmlName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n isServerEncrypted: {\n serializedName: \"x-ms-request-server-encrypted\",\n xmlName: \"x-ms-request-server-encrypted\",\n type: {\n name: \"Boolean\"\n }\n },\n encryptionKeySha256: {\n serializedName: \"x-ms-encryption-key-sha256\",\n xmlName: \"x-ms-encryption-key-sha256\",\n type: {\n name: \"String\"\n }\n },\n encryptionScope: {\n serializedName: \"x-ms-encryption-scope\",\n xmlName: \"x-ms-encryption-scope\",\n type: {\n name: \"String\"\n }\n },\n errorCode: {\n serializedName: \"x-ms-error-code\",\n xmlName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst BlockBlobUploadExceptionHeaders = {\n serializedName: \"BlockBlob_uploadExceptionHeaders\",\n type: {\n name: \"Composite\",\n className: \"BlockBlobUploadExceptionHeaders\",\n modelProperties: {\n errorCode: {\n serializedName: \"x-ms-error-code\",\n xmlName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst BlockBlobPutBlobFromUrlHeaders = {\n serializedName: \"BlockBlob_putBlobFromUrlHeaders\",\n type: {\n name: \"Composite\",\n className: \"BlockBlobPutBlobFromUrlHeaders\",\n modelProperties: {\n etag: {\n serializedName: \"etag\",\n xmlName: \"etag\",\n type: {\n name: \"String\"\n }\n },\n lastModified: {\n serializedName: \"last-modified\",\n xmlName: \"last-modified\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n contentMD5: {\n serializedName: \"content-md5\",\n xmlName: \"content-md5\",\n type: {\n name: \"ByteArray\"\n }\n },\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n xmlName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n xmlName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n xmlName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n versionId: {\n serializedName: \"x-ms-version-id\",\n xmlName: \"x-ms-version-id\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n xmlName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n isServerEncrypted: {\n serializedName: \"x-ms-request-server-encrypted\",\n xmlName: \"x-ms-request-server-encrypted\",\n type: {\n name: \"Boolean\"\n }\n },\n encryptionKeySha256: {\n serializedName: \"x-ms-encryption-key-sha256\",\n xmlName: \"x-ms-encryption-key-sha256\",\n type: {\n name: \"String\"\n }\n },\n encryptionScope: {\n serializedName: \"x-ms-encryption-scope\",\n xmlName: \"x-ms-encryption-scope\",\n type: {\n name: \"String\"\n }\n },\n errorCode: {\n serializedName: \"x-ms-error-code\",\n xmlName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst BlockBlobPutBlobFromUrlExceptionHeaders = {\n serializedName: \"BlockBlob_putBlobFromUrlExceptionHeaders\",\n type: {\n name: \"Composite\",\n className: \"BlockBlobPutBlobFromUrlExceptionHeaders\",\n modelProperties: {\n errorCode: {\n serializedName: \"x-ms-error-code\",\n xmlName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst BlockBlobStageBlockHeaders = {\n serializedName: \"BlockBlob_stageBlockHeaders\",\n type: {\n name: \"Composite\",\n className: \"BlockBlobStageBlockHeaders\",\n modelProperties: {\n contentMD5: {\n serializedName: \"content-md5\",\n xmlName: \"content-md5\",\n type: {\n name: \"ByteArray\"\n }\n },\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n xmlName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n xmlName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n xmlName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n xmlName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n xMsContentCrc64: {\n serializedName: \"x-ms-content-crc64\",\n xmlName: \"x-ms-content-crc64\",\n type: {\n name: \"ByteArray\"\n }\n },\n isServerEncrypted: {\n serializedName: \"x-ms-request-server-encrypted\",\n xmlName: \"x-ms-request-server-encrypted\",\n type: {\n name: \"Boolean\"\n }\n },\n encryptionKeySha256: {\n serializedName: \"x-ms-encryption-key-sha256\",\n xmlName: \"x-ms-encryption-key-sha256\",\n type: {\n name: \"String\"\n }\n },\n encryptionScope: {\n serializedName: \"x-ms-encryption-scope\",\n xmlName: \"x-ms-encryption-scope\",\n type: {\n name: \"String\"\n }\n },\n errorCode: {\n serializedName: \"x-ms-error-code\",\n xmlName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst BlockBlobStageBlockExceptionHeaders = {\n serializedName: \"BlockBlob_stageBlockExceptionHeaders\",\n type: {\n name: \"Composite\",\n className: \"BlockBlobStageBlockExceptionHeaders\",\n modelProperties: {\n errorCode: {\n serializedName: \"x-ms-error-code\",\n xmlName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst BlockBlobStageBlockFromURLHeaders = {\n serializedName: \"BlockBlob_stageBlockFromURLHeaders\",\n type: {\n name: \"Composite\",\n className: \"BlockBlobStageBlockFromURLHeaders\",\n modelProperties: {\n contentMD5: {\n serializedName: \"content-md5\",\n xmlName: \"content-md5\",\n type: {\n name: \"ByteArray\"\n }\n },\n xMsContentCrc64: {\n serializedName: \"x-ms-content-crc64\",\n xmlName: \"x-ms-content-crc64\",\n type: {\n name: \"ByteArray\"\n }\n },\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n xmlName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n xmlName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n xmlName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n xmlName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n isServerEncrypted: {\n serializedName: \"x-ms-request-server-encrypted\",\n xmlName: \"x-ms-request-server-encrypted\",\n type: {\n name: \"Boolean\"\n }\n },\n encryptionKeySha256: {\n serializedName: \"x-ms-encryption-key-sha256\",\n xmlName: \"x-ms-encryption-key-sha256\",\n type: {\n name: \"String\"\n }\n },\n encryptionScope: {\n serializedName: \"x-ms-encryption-scope\",\n xmlName: \"x-ms-encryption-scope\",\n type: {\n name: \"String\"\n }\n },\n errorCode: {\n serializedName: \"x-ms-error-code\",\n xmlName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst BlockBlobStageBlockFromURLExceptionHeaders = {\n serializedName: \"BlockBlob_stageBlockFromURLExceptionHeaders\",\n type: {\n name: \"Composite\",\n className: \"BlockBlobStageBlockFromURLExceptionHeaders\",\n modelProperties: {\n errorCode: {\n serializedName: \"x-ms-error-code\",\n xmlName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst BlockBlobCommitBlockListHeaders = {\n serializedName: \"BlockBlob_commitBlockListHeaders\",\n type: {\n name: \"Composite\",\n className: \"BlockBlobCommitBlockListHeaders\",\n modelProperties: {\n etag: {\n serializedName: \"etag\",\n xmlName: \"etag\",\n type: {\n name: \"String\"\n }\n },\n lastModified: {\n serializedName: \"last-modified\",\n xmlName: \"last-modified\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n contentMD5: {\n serializedName: \"content-md5\",\n xmlName: \"content-md5\",\n type: {\n name: \"ByteArray\"\n }\n },\n xMsContentCrc64: {\n serializedName: \"x-ms-content-crc64\",\n xmlName: \"x-ms-content-crc64\",\n type: {\n name: \"ByteArray\"\n }\n },\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n xmlName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n xmlName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n xmlName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n versionId: {\n serializedName: \"x-ms-version-id\",\n xmlName: \"x-ms-version-id\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n xmlName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n isServerEncrypted: {\n serializedName: \"x-ms-request-server-encrypted\",\n xmlName: \"x-ms-request-server-encrypted\",\n type: {\n name: \"Boolean\"\n }\n },\n encryptionKeySha256: {\n serializedName: \"x-ms-encryption-key-sha256\",\n xmlName: \"x-ms-encryption-key-sha256\",\n type: {\n name: \"String\"\n }\n },\n encryptionScope: {\n serializedName: \"x-ms-encryption-scope\",\n xmlName: \"x-ms-encryption-scope\",\n type: {\n name: \"String\"\n }\n },\n errorCode: {\n serializedName: \"x-ms-error-code\",\n xmlName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst BlockBlobCommitBlockListExceptionHeaders = {\n serializedName: \"BlockBlob_commitBlockListExceptionHeaders\",\n type: {\n name: \"Composite\",\n className: \"BlockBlobCommitBlockListExceptionHeaders\",\n modelProperties: {\n errorCode: {\n serializedName: \"x-ms-error-code\",\n xmlName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst BlockBlobGetBlockListHeaders = {\n serializedName: \"BlockBlob_getBlockListHeaders\",\n type: {\n name: \"Composite\",\n className: \"BlockBlobGetBlockListHeaders\",\n modelProperties: {\n lastModified: {\n serializedName: \"last-modified\",\n xmlName: \"last-modified\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n etag: {\n serializedName: \"etag\",\n xmlName: \"etag\",\n type: {\n name: \"String\"\n }\n },\n contentType: {\n serializedName: \"content-type\",\n xmlName: \"content-type\",\n type: {\n name: \"String\"\n }\n },\n blobContentLength: {\n serializedName: \"x-ms-blob-content-length\",\n xmlName: \"x-ms-blob-content-length\",\n type: {\n name: \"Number\"\n }\n },\n clientRequestId: {\n serializedName: \"x-ms-client-request-id\",\n xmlName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n },\n requestId: {\n serializedName: \"x-ms-request-id\",\n xmlName: \"x-ms-request-id\",\n type: {\n name: \"String\"\n }\n },\n version: {\n serializedName: \"x-ms-version\",\n xmlName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n },\n date: {\n serializedName: \"date\",\n xmlName: \"date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n },\n errorCode: {\n serializedName: \"x-ms-error-code\",\n xmlName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\nconst BlockBlobGetBlockListExceptionHeaders = {\n serializedName: \"BlockBlob_getBlockListExceptionHeaders\",\n type: {\n name: \"Composite\",\n className: \"BlockBlobGetBlockListExceptionHeaders\",\n modelProperties: {\n errorCode: {\n serializedName: \"x-ms-error-code\",\n xmlName: \"x-ms-error-code\",\n type: {\n name: \"String\"\n }\n }\n }\n }\n};\n\nvar Mappers = /*#__PURE__*/Object.freeze({\n __proto__: null,\n BlobServiceProperties: BlobServiceProperties,\n Logging: Logging,\n RetentionPolicy: RetentionPolicy,\n Metrics: Metrics,\n CorsRule: CorsRule,\n StaticWebsite: StaticWebsite,\n StorageError: StorageError,\n BlobServiceStatistics: BlobServiceStatistics,\n GeoReplication: GeoReplication,\n ListContainersSegmentResponse: ListContainersSegmentResponse,\n ContainerItem: ContainerItem,\n ContainerProperties: ContainerProperties,\n KeyInfo: KeyInfo,\n UserDelegationKey: UserDelegationKey,\n FilterBlobSegment: FilterBlobSegment,\n FilterBlobItem: FilterBlobItem,\n BlobTags: BlobTags,\n BlobTag: BlobTag,\n SignedIdentifier: SignedIdentifier,\n AccessPolicy: AccessPolicy,\n ListBlobsFlatSegmentResponse: ListBlobsFlatSegmentResponse,\n BlobFlatListSegment: BlobFlatListSegment,\n BlobItemInternal: BlobItemInternal,\n BlobName: BlobName,\n BlobPropertiesInternal: BlobPropertiesInternal,\n ListBlobsHierarchySegmentResponse: ListBlobsHierarchySegmentResponse,\n BlobHierarchyListSegment: BlobHierarchyListSegment,\n BlobPrefix: BlobPrefix,\n BlockLookupList: BlockLookupList,\n BlockList: BlockList,\n Block: Block,\n PageList: PageList,\n PageRange: PageRange,\n ClearRange: ClearRange,\n QueryRequest: QueryRequest,\n QuerySerialization: QuerySerialization,\n QueryFormat: QueryFormat,\n DelimitedTextConfiguration: DelimitedTextConfiguration,\n JsonTextConfiguration: JsonTextConfiguration,\n ArrowConfiguration: ArrowConfiguration,\n ArrowField: ArrowField,\n ServiceSetPropertiesHeaders: ServiceSetPropertiesHeaders,\n ServiceSetPropertiesExceptionHeaders: ServiceSetPropertiesExceptionHeaders,\n ServiceGetPropertiesHeaders: ServiceGetPropertiesHeaders,\n ServiceGetPropertiesExceptionHeaders: ServiceGetPropertiesExceptionHeaders,\n ServiceGetStatisticsHeaders: ServiceGetStatisticsHeaders,\n ServiceGetStatisticsExceptionHeaders: ServiceGetStatisticsExceptionHeaders,\n ServiceListContainersSegmentHeaders: ServiceListContainersSegmentHeaders,\n ServiceListContainersSegmentExceptionHeaders: ServiceListContainersSegmentExceptionHeaders,\n ServiceGetUserDelegationKeyHeaders: ServiceGetUserDelegationKeyHeaders,\n ServiceGetUserDelegationKeyExceptionHeaders: ServiceGetUserDelegationKeyExceptionHeaders,\n ServiceGetAccountInfoHeaders: ServiceGetAccountInfoHeaders,\n ServiceGetAccountInfoExceptionHeaders: ServiceGetAccountInfoExceptionHeaders,\n ServiceSubmitBatchHeaders: ServiceSubmitBatchHeaders,\n ServiceSubmitBatchExceptionHeaders: ServiceSubmitBatchExceptionHeaders,\n ServiceFilterBlobsHeaders: ServiceFilterBlobsHeaders,\n ServiceFilterBlobsExceptionHeaders: ServiceFilterBlobsExceptionHeaders,\n ContainerCreateHeaders: ContainerCreateHeaders,\n ContainerCreateExceptionHeaders: ContainerCreateExceptionHeaders,\n ContainerGetPropertiesHeaders: ContainerGetPropertiesHeaders,\n ContainerGetPropertiesExceptionHeaders: ContainerGetPropertiesExceptionHeaders,\n ContainerDeleteHeaders: ContainerDeleteHeaders,\n ContainerDeleteExceptionHeaders: ContainerDeleteExceptionHeaders,\n ContainerSetMetadataHeaders: ContainerSetMetadataHeaders,\n ContainerSetMetadataExceptionHeaders: ContainerSetMetadataExceptionHeaders,\n ContainerGetAccessPolicyHeaders: ContainerGetAccessPolicyHeaders,\n ContainerGetAccessPolicyExceptionHeaders: ContainerGetAccessPolicyExceptionHeaders,\n ContainerSetAccessPolicyHeaders: ContainerSetAccessPolicyHeaders,\n ContainerSetAccessPolicyExceptionHeaders: ContainerSetAccessPolicyExceptionHeaders,\n ContainerRestoreHeaders: ContainerRestoreHeaders,\n ContainerRestoreExceptionHeaders: ContainerRestoreExceptionHeaders,\n ContainerRenameHeaders: ContainerRenameHeaders,\n ContainerRenameExceptionHeaders: ContainerRenameExceptionHeaders,\n ContainerSubmitBatchHeaders: ContainerSubmitBatchHeaders,\n ContainerSubmitBatchExceptionHeaders: ContainerSubmitBatchExceptionHeaders,\n ContainerFilterBlobsHeaders: ContainerFilterBlobsHeaders,\n ContainerFilterBlobsExceptionHeaders: ContainerFilterBlobsExceptionHeaders,\n ContainerAcquireLeaseHeaders: ContainerAcquireLeaseHeaders,\n ContainerAcquireLeaseExceptionHeaders: ContainerAcquireLeaseExceptionHeaders,\n ContainerReleaseLeaseHeaders: ContainerReleaseLeaseHeaders,\n ContainerReleaseLeaseExceptionHeaders: ContainerReleaseLeaseExceptionHeaders,\n ContainerRenewLeaseHeaders: ContainerRenewLeaseHeaders,\n ContainerRenewLeaseExceptionHeaders: ContainerRenewLeaseExceptionHeaders,\n ContainerBreakLeaseHeaders: ContainerBreakLeaseHeaders,\n ContainerBreakLeaseExceptionHeaders: ContainerBreakLeaseExceptionHeaders,\n ContainerChangeLeaseHeaders: ContainerChangeLeaseHeaders,\n ContainerChangeLeaseExceptionHeaders: ContainerChangeLeaseExceptionHeaders,\n ContainerListBlobFlatSegmentHeaders: ContainerListBlobFlatSegmentHeaders,\n ContainerListBlobFlatSegmentExceptionHeaders: ContainerListBlobFlatSegmentExceptionHeaders,\n ContainerListBlobHierarchySegmentHeaders: ContainerListBlobHierarchySegmentHeaders,\n ContainerListBlobHierarchySegmentExceptionHeaders: ContainerListBlobHierarchySegmentExceptionHeaders,\n ContainerGetAccountInfoHeaders: ContainerGetAccountInfoHeaders,\n ContainerGetAccountInfoExceptionHeaders: ContainerGetAccountInfoExceptionHeaders,\n BlobDownloadHeaders: BlobDownloadHeaders,\n BlobDownloadExceptionHeaders: BlobDownloadExceptionHeaders,\n BlobGetPropertiesHeaders: BlobGetPropertiesHeaders,\n BlobGetPropertiesExceptionHeaders: BlobGetPropertiesExceptionHeaders,\n BlobDeleteHeaders: BlobDeleteHeaders,\n BlobDeleteExceptionHeaders: BlobDeleteExceptionHeaders,\n BlobUndeleteHeaders: BlobUndeleteHeaders,\n BlobUndeleteExceptionHeaders: BlobUndeleteExceptionHeaders,\n BlobSetExpiryHeaders: BlobSetExpiryHeaders,\n BlobSetExpiryExceptionHeaders: BlobSetExpiryExceptionHeaders,\n BlobSetHttpHeadersHeaders: BlobSetHttpHeadersHeaders,\n BlobSetHttpHeadersExceptionHeaders: BlobSetHttpHeadersExceptionHeaders,\n BlobSetImmutabilityPolicyHeaders: BlobSetImmutabilityPolicyHeaders,\n BlobSetImmutabilityPolicyExceptionHeaders: BlobSetImmutabilityPolicyExceptionHeaders,\n BlobDeleteImmutabilityPolicyHeaders: BlobDeleteImmutabilityPolicyHeaders,\n BlobDeleteImmutabilityPolicyExceptionHeaders: BlobDeleteImmutabilityPolicyExceptionHeaders,\n BlobSetLegalHoldHeaders: BlobSetLegalHoldHeaders,\n BlobSetLegalHoldExceptionHeaders: BlobSetLegalHoldExceptionHeaders,\n BlobSetMetadataHeaders: BlobSetMetadataHeaders,\n BlobSetMetadataExceptionHeaders: BlobSetMetadataExceptionHeaders,\n BlobAcquireLeaseHeaders: BlobAcquireLeaseHeaders,\n BlobAcquireLeaseExceptionHeaders: BlobAcquireLeaseExceptionHeaders,\n BlobReleaseLeaseHeaders: BlobReleaseLeaseHeaders,\n BlobReleaseLeaseExceptionHeaders: BlobReleaseLeaseExceptionHeaders,\n BlobRenewLeaseHeaders: BlobRenewLeaseHeaders,\n BlobRenewLeaseExceptionHeaders: BlobRenewLeaseExceptionHeaders,\n BlobChangeLeaseHeaders: BlobChangeLeaseHeaders,\n BlobChangeLeaseExceptionHeaders: BlobChangeLeaseExceptionHeaders,\n BlobBreakLeaseHeaders: BlobBreakLeaseHeaders,\n BlobBreakLeaseExceptionHeaders: BlobBreakLeaseExceptionHeaders,\n BlobCreateSnapshotHeaders: BlobCreateSnapshotHeaders,\n BlobCreateSnapshotExceptionHeaders: BlobCreateSnapshotExceptionHeaders,\n BlobStartCopyFromURLHeaders: BlobStartCopyFromURLHeaders,\n BlobStartCopyFromURLExceptionHeaders: BlobStartCopyFromURLExceptionHeaders,\n BlobCopyFromURLHeaders: BlobCopyFromURLHeaders,\n BlobCopyFromURLExceptionHeaders: BlobCopyFromURLExceptionHeaders,\n BlobAbortCopyFromURLHeaders: BlobAbortCopyFromURLHeaders,\n BlobAbortCopyFromURLExceptionHeaders: BlobAbortCopyFromURLExceptionHeaders,\n BlobSetTierHeaders: BlobSetTierHeaders,\n BlobSetTierExceptionHeaders: BlobSetTierExceptionHeaders,\n BlobGetAccountInfoHeaders: BlobGetAccountInfoHeaders,\n BlobGetAccountInfoExceptionHeaders: BlobGetAccountInfoExceptionHeaders,\n BlobQueryHeaders: BlobQueryHeaders,\n BlobQueryExceptionHeaders: BlobQueryExceptionHeaders,\n BlobGetTagsHeaders: BlobGetTagsHeaders,\n BlobGetTagsExceptionHeaders: BlobGetTagsExceptionHeaders,\n BlobSetTagsHeaders: BlobSetTagsHeaders,\n BlobSetTagsExceptionHeaders: BlobSetTagsExceptionHeaders,\n PageBlobCreateHeaders: PageBlobCreateHeaders,\n PageBlobCreateExceptionHeaders: PageBlobCreateExceptionHeaders,\n PageBlobUploadPagesHeaders: PageBlobUploadPagesHeaders,\n PageBlobUploadPagesExceptionHeaders: PageBlobUploadPagesExceptionHeaders,\n PageBlobClearPagesHeaders: PageBlobClearPagesHeaders,\n PageBlobClearPagesExceptionHeaders: PageBlobClearPagesExceptionHeaders,\n PageBlobUploadPagesFromURLHeaders: PageBlobUploadPagesFromURLHeaders,\n PageBlobUploadPagesFromURLExceptionHeaders: PageBlobUploadPagesFromURLExceptionHeaders,\n PageBlobGetPageRangesHeaders: PageBlobGetPageRangesHeaders,\n PageBlobGetPageRangesExceptionHeaders: PageBlobGetPageRangesExceptionHeaders,\n PageBlobGetPageRangesDiffHeaders: PageBlobGetPageRangesDiffHeaders,\n PageBlobGetPageRangesDiffExceptionHeaders: PageBlobGetPageRangesDiffExceptionHeaders,\n PageBlobResizeHeaders: PageBlobResizeHeaders,\n PageBlobResizeExceptionHeaders: PageBlobResizeExceptionHeaders,\n PageBlobUpdateSequenceNumberHeaders: PageBlobUpdateSequenceNumberHeaders,\n PageBlobUpdateSequenceNumberExceptionHeaders: PageBlobUpdateSequenceNumberExceptionHeaders,\n PageBlobCopyIncrementalHeaders: PageBlobCopyIncrementalHeaders,\n PageBlobCopyIncrementalExceptionHeaders: PageBlobCopyIncrementalExceptionHeaders,\n AppendBlobCreateHeaders: AppendBlobCreateHeaders,\n AppendBlobCreateExceptionHeaders: AppendBlobCreateExceptionHeaders,\n AppendBlobAppendBlockHeaders: AppendBlobAppendBlockHeaders,\n AppendBlobAppendBlockExceptionHeaders: AppendBlobAppendBlockExceptionHeaders,\n AppendBlobAppendBlockFromUrlHeaders: AppendBlobAppendBlockFromUrlHeaders,\n AppendBlobAppendBlockFromUrlExceptionHeaders: AppendBlobAppendBlockFromUrlExceptionHeaders,\n AppendBlobSealHeaders: AppendBlobSealHeaders,\n AppendBlobSealExceptionHeaders: AppendBlobSealExceptionHeaders,\n BlockBlobUploadHeaders: BlockBlobUploadHeaders,\n BlockBlobUploadExceptionHeaders: BlockBlobUploadExceptionHeaders,\n BlockBlobPutBlobFromUrlHeaders: BlockBlobPutBlobFromUrlHeaders,\n BlockBlobPutBlobFromUrlExceptionHeaders: BlockBlobPutBlobFromUrlExceptionHeaders,\n BlockBlobStageBlockHeaders: BlockBlobStageBlockHeaders,\n BlockBlobStageBlockExceptionHeaders: BlockBlobStageBlockExceptionHeaders,\n BlockBlobStageBlockFromURLHeaders: BlockBlobStageBlockFromURLHeaders,\n BlockBlobStageBlockFromURLExceptionHeaders: BlockBlobStageBlockFromURLExceptionHeaders,\n BlockBlobCommitBlockListHeaders: BlockBlobCommitBlockListHeaders,\n BlockBlobCommitBlockListExceptionHeaders: BlockBlobCommitBlockListExceptionHeaders,\n BlockBlobGetBlockListHeaders: BlockBlobGetBlockListHeaders,\n BlockBlobGetBlockListExceptionHeaders: BlockBlobGetBlockListExceptionHeaders\n});\n\n/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\nconst contentType = {\n parameterPath: [\"options\", \"contentType\"],\n mapper: {\n defaultValue: \"application/xml\",\n isConstant: true,\n serializedName: \"Content-Type\",\n type: {\n name: \"String\"\n }\n }\n};\nconst blobServiceProperties = {\n parameterPath: \"blobServiceProperties\",\n mapper: BlobServiceProperties\n};\nconst accept = {\n parameterPath: \"accept\",\n mapper: {\n defaultValue: \"application/xml\",\n isConstant: true,\n serializedName: \"Accept\",\n type: {\n name: \"String\"\n }\n }\n};\nconst url = {\n parameterPath: \"url\",\n mapper: {\n serializedName: \"url\",\n required: true,\n xmlName: \"url\",\n type: {\n name: \"String\"\n }\n },\n skipEncoding: true\n};\nconst restype = {\n parameterPath: \"restype\",\n mapper: {\n defaultValue: \"service\",\n isConstant: true,\n serializedName: \"restype\",\n type: {\n name: \"String\"\n }\n }\n};\nconst comp = {\n parameterPath: \"comp\",\n mapper: {\n defaultValue: \"properties\",\n isConstant: true,\n serializedName: \"comp\",\n type: {\n name: \"String\"\n }\n }\n};\nconst timeoutInSeconds = {\n parameterPath: [\"options\", \"timeoutInSeconds\"],\n mapper: {\n constraints: {\n InclusiveMinimum: 0\n },\n serializedName: \"timeout\",\n xmlName: \"timeout\",\n type: {\n name: \"Number\"\n }\n }\n};\nconst version = {\n parameterPath: \"version\",\n mapper: {\n defaultValue: \"2021-10-04\",\n isConstant: true,\n serializedName: \"x-ms-version\",\n type: {\n name: \"String\"\n }\n }\n};\nconst requestId = {\n parameterPath: [\"options\", \"requestId\"],\n mapper: {\n serializedName: \"x-ms-client-request-id\",\n xmlName: \"x-ms-client-request-id\",\n type: {\n name: \"String\"\n }\n }\n};\nconst accept1 = {\n parameterPath: \"accept\",\n mapper: {\n defaultValue: \"application/xml\",\n isConstant: true,\n serializedName: \"Accept\",\n type: {\n name: \"String\"\n }\n }\n};\nconst comp1 = {\n parameterPath: \"comp\",\n mapper: {\n defaultValue: \"stats\",\n isConstant: true,\n serializedName: \"comp\",\n type: {\n name: \"String\"\n }\n }\n};\nconst comp2 = {\n parameterPath: \"comp\",\n mapper: {\n defaultValue: \"list\",\n isConstant: true,\n serializedName: \"comp\",\n type: {\n name: \"String\"\n }\n }\n};\nconst prefix = {\n parameterPath: [\"options\", \"prefix\"],\n mapper: {\n serializedName: \"prefix\",\n xmlName: \"prefix\",\n type: {\n name: \"String\"\n }\n }\n};\nconst marker = {\n parameterPath: [\"options\", \"marker\"],\n mapper: {\n serializedName: \"marker\",\n xmlName: \"marker\",\n type: {\n name: \"String\"\n }\n }\n};\nconst maxPageSize = {\n parameterPath: [\"options\", \"maxPageSize\"],\n mapper: {\n constraints: {\n InclusiveMinimum: 1\n },\n serializedName: \"maxresults\",\n xmlName: \"maxresults\",\n type: {\n name: \"Number\"\n }\n }\n};\nconst include = {\n parameterPath: [\"options\", \"include\"],\n mapper: {\n serializedName: \"include\",\n xmlName: \"include\",\n xmlElementName: \"ListContainersIncludeType\",\n type: {\n name: \"Sequence\",\n element: {\n type: {\n name: \"Enum\",\n allowedValues: [\"metadata\", \"deleted\", \"system\"]\n }\n }\n }\n },\n collectionFormat: coreHttp.QueryCollectionFormat.Csv\n};\nconst keyInfo = {\n parameterPath: \"keyInfo\",\n mapper: KeyInfo\n};\nconst comp3 = {\n parameterPath: \"comp\",\n mapper: {\n defaultValue: \"userdelegationkey\",\n isConstant: true,\n serializedName: \"comp\",\n type: {\n name: \"String\"\n }\n }\n};\nconst restype1 = {\n parameterPath: \"restype\",\n mapper: {\n defaultValue: \"account\",\n isConstant: true,\n serializedName: \"restype\",\n type: {\n name: \"String\"\n }\n }\n};\nconst body = {\n parameterPath: \"body\",\n mapper: {\n serializedName: \"body\",\n required: true,\n xmlName: \"body\",\n type: {\n name: \"Stream\"\n }\n }\n};\nconst comp4 = {\n parameterPath: \"comp\",\n mapper: {\n defaultValue: \"batch\",\n isConstant: true,\n serializedName: \"comp\",\n type: {\n name: \"String\"\n }\n }\n};\nconst contentLength = {\n parameterPath: \"contentLength\",\n mapper: {\n serializedName: \"Content-Length\",\n required: true,\n xmlName: \"Content-Length\",\n type: {\n name: \"Number\"\n }\n }\n};\nconst multipartContentType = {\n parameterPath: \"multipartContentType\",\n mapper: {\n serializedName: \"Content-Type\",\n required: true,\n xmlName: \"Content-Type\",\n type: {\n name: \"String\"\n }\n }\n};\nconst comp5 = {\n parameterPath: \"comp\",\n mapper: {\n defaultValue: \"blobs\",\n isConstant: true,\n serializedName: \"comp\",\n type: {\n name: \"String\"\n }\n }\n};\nconst where = {\n parameterPath: [\"options\", \"where\"],\n mapper: {\n serializedName: \"where\",\n xmlName: \"where\",\n type: {\n name: \"String\"\n }\n }\n};\nconst restype2 = {\n parameterPath: \"restype\",\n mapper: {\n defaultValue: \"container\",\n isConstant: true,\n serializedName: \"restype\",\n type: {\n name: \"String\"\n }\n }\n};\nconst metadata = {\n parameterPath: [\"options\", \"metadata\"],\n mapper: {\n serializedName: \"x-ms-meta\",\n xmlName: \"x-ms-meta\",\n type: {\n name: \"Dictionary\",\n value: { type: { name: \"String\" } }\n },\n headerCollectionPrefix: \"x-ms-meta-\"\n }\n};\nconst access = {\n parameterPath: [\"options\", \"access\"],\n mapper: {\n serializedName: \"x-ms-blob-public-access\",\n xmlName: \"x-ms-blob-public-access\",\n type: {\n name: \"Enum\",\n allowedValues: [\"container\", \"blob\"]\n }\n }\n};\nconst defaultEncryptionScope = {\n parameterPath: [\n \"options\",\n \"containerEncryptionScope\",\n \"defaultEncryptionScope\"\n ],\n mapper: {\n serializedName: \"x-ms-default-encryption-scope\",\n xmlName: \"x-ms-default-encryption-scope\",\n type: {\n name: \"String\"\n }\n }\n};\nconst preventEncryptionScopeOverride = {\n parameterPath: [\n \"options\",\n \"containerEncryptionScope\",\n \"preventEncryptionScopeOverride\"\n ],\n mapper: {\n serializedName: \"x-ms-deny-encryption-scope-override\",\n xmlName: \"x-ms-deny-encryption-scope-override\",\n type: {\n name: \"Boolean\"\n }\n }\n};\nconst leaseId = {\n parameterPath: [\"options\", \"leaseAccessConditions\", \"leaseId\"],\n mapper: {\n serializedName: \"x-ms-lease-id\",\n xmlName: \"x-ms-lease-id\",\n type: {\n name: \"String\"\n }\n }\n};\nconst ifModifiedSince = {\n parameterPath: [\"options\", \"modifiedAccessConditions\", \"ifModifiedSince\"],\n mapper: {\n serializedName: \"If-Modified-Since\",\n xmlName: \"If-Modified-Since\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n }\n};\nconst ifUnmodifiedSince = {\n parameterPath: [\"options\", \"modifiedAccessConditions\", \"ifUnmodifiedSince\"],\n mapper: {\n serializedName: \"If-Unmodified-Since\",\n xmlName: \"If-Unmodified-Since\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n }\n};\nconst comp6 = {\n parameterPath: \"comp\",\n mapper: {\n defaultValue: \"metadata\",\n isConstant: true,\n serializedName: \"comp\",\n type: {\n name: \"String\"\n }\n }\n};\nconst comp7 = {\n parameterPath: \"comp\",\n mapper: {\n defaultValue: \"acl\",\n isConstant: true,\n serializedName: \"comp\",\n type: {\n name: \"String\"\n }\n }\n};\nconst containerAcl = {\n parameterPath: [\"options\", \"containerAcl\"],\n mapper: {\n serializedName: \"containerAcl\",\n xmlName: \"SignedIdentifiers\",\n xmlIsWrapped: true,\n xmlElementName: \"SignedIdentifier\",\n type: {\n name: \"Sequence\",\n element: {\n type: {\n name: \"Composite\",\n className: \"SignedIdentifier\"\n }\n }\n }\n }\n};\nconst comp8 = {\n parameterPath: \"comp\",\n mapper: {\n defaultValue: \"undelete\",\n isConstant: true,\n serializedName: \"comp\",\n type: {\n name: \"String\"\n }\n }\n};\nconst deletedContainerName = {\n parameterPath: [\"options\", \"deletedContainerName\"],\n mapper: {\n serializedName: \"x-ms-deleted-container-name\",\n xmlName: \"x-ms-deleted-container-name\",\n type: {\n name: \"String\"\n }\n }\n};\nconst deletedContainerVersion = {\n parameterPath: [\"options\", \"deletedContainerVersion\"],\n mapper: {\n serializedName: \"x-ms-deleted-container-version\",\n xmlName: \"x-ms-deleted-container-version\",\n type: {\n name: \"String\"\n }\n }\n};\nconst comp9 = {\n parameterPath: \"comp\",\n mapper: {\n defaultValue: \"rename\",\n isConstant: true,\n serializedName: \"comp\",\n type: {\n name: \"String\"\n }\n }\n};\nconst sourceContainerName = {\n parameterPath: \"sourceContainerName\",\n mapper: {\n serializedName: \"x-ms-source-container-name\",\n required: true,\n xmlName: \"x-ms-source-container-name\",\n type: {\n name: \"String\"\n }\n }\n};\nconst sourceLeaseId = {\n parameterPath: [\"options\", \"sourceLeaseId\"],\n mapper: {\n serializedName: \"x-ms-source-lease-id\",\n xmlName: \"x-ms-source-lease-id\",\n type: {\n name: \"String\"\n }\n }\n};\nconst comp10 = {\n parameterPath: \"comp\",\n mapper: {\n defaultValue: \"lease\",\n isConstant: true,\n serializedName: \"comp\",\n type: {\n name: \"String\"\n }\n }\n};\nconst action = {\n parameterPath: \"action\",\n mapper: {\n defaultValue: \"acquire\",\n isConstant: true,\n serializedName: \"x-ms-lease-action\",\n type: {\n name: \"String\"\n }\n }\n};\nconst duration = {\n parameterPath: [\"options\", \"duration\"],\n mapper: {\n serializedName: \"x-ms-lease-duration\",\n xmlName: \"x-ms-lease-duration\",\n type: {\n name: \"Number\"\n }\n }\n};\nconst proposedLeaseId = {\n parameterPath: [\"options\", \"proposedLeaseId\"],\n mapper: {\n serializedName: \"x-ms-proposed-lease-id\",\n xmlName: \"x-ms-proposed-lease-id\",\n type: {\n name: \"String\"\n }\n }\n};\nconst action1 = {\n parameterPath: \"action\",\n mapper: {\n defaultValue: \"release\",\n isConstant: true,\n serializedName: \"x-ms-lease-action\",\n type: {\n name: \"String\"\n }\n }\n};\nconst leaseId1 = {\n parameterPath: \"leaseId\",\n mapper: {\n serializedName: \"x-ms-lease-id\",\n required: true,\n xmlName: \"x-ms-lease-id\",\n type: {\n name: \"String\"\n }\n }\n};\nconst action2 = {\n parameterPath: \"action\",\n mapper: {\n defaultValue: \"renew\",\n isConstant: true,\n serializedName: \"x-ms-lease-action\",\n type: {\n name: \"String\"\n }\n }\n};\nconst action3 = {\n parameterPath: \"action\",\n mapper: {\n defaultValue: \"break\",\n isConstant: true,\n serializedName: \"x-ms-lease-action\",\n type: {\n name: \"String\"\n }\n }\n};\nconst breakPeriod = {\n parameterPath: [\"options\", \"breakPeriod\"],\n mapper: {\n serializedName: \"x-ms-lease-break-period\",\n xmlName: \"x-ms-lease-break-period\",\n type: {\n name: \"Number\"\n }\n }\n};\nconst action4 = {\n parameterPath: \"action\",\n mapper: {\n defaultValue: \"change\",\n isConstant: true,\n serializedName: \"x-ms-lease-action\",\n type: {\n name: \"String\"\n }\n }\n};\nconst proposedLeaseId1 = {\n parameterPath: \"proposedLeaseId\",\n mapper: {\n serializedName: \"x-ms-proposed-lease-id\",\n required: true,\n xmlName: \"x-ms-proposed-lease-id\",\n type: {\n name: \"String\"\n }\n }\n};\nconst include1 = {\n parameterPath: [\"options\", \"include\"],\n mapper: {\n serializedName: \"include\",\n xmlName: \"include\",\n xmlElementName: \"ListBlobsIncludeItem\",\n type: {\n name: \"Sequence\",\n element: {\n type: {\n name: \"Enum\",\n allowedValues: [\n \"copy\",\n \"deleted\",\n \"metadata\",\n \"snapshots\",\n \"uncommittedblobs\",\n \"versions\",\n \"tags\",\n \"immutabilitypolicy\",\n \"legalhold\",\n \"deletedwithversions\"\n ]\n }\n }\n }\n },\n collectionFormat: coreHttp.QueryCollectionFormat.Csv\n};\nconst delimiter = {\n parameterPath: \"delimiter\",\n mapper: {\n serializedName: \"delimiter\",\n required: true,\n xmlName: \"delimiter\",\n type: {\n name: \"String\"\n }\n }\n};\nconst snapshot = {\n parameterPath: [\"options\", \"snapshot\"],\n mapper: {\n serializedName: \"snapshot\",\n xmlName: \"snapshot\",\n type: {\n name: \"String\"\n }\n }\n};\nconst versionId = {\n parameterPath: [\"options\", \"versionId\"],\n mapper: {\n serializedName: \"versionid\",\n xmlName: \"versionid\",\n type: {\n name: \"String\"\n }\n }\n};\nconst range = {\n parameterPath: [\"options\", \"range\"],\n mapper: {\n serializedName: \"x-ms-range\",\n xmlName: \"x-ms-range\",\n type: {\n name: \"String\"\n }\n }\n};\nconst rangeGetContentMD5 = {\n parameterPath: [\"options\", \"rangeGetContentMD5\"],\n mapper: {\n serializedName: \"x-ms-range-get-content-md5\",\n xmlName: \"x-ms-range-get-content-md5\",\n type: {\n name: \"Boolean\"\n }\n }\n};\nconst rangeGetContentCRC64 = {\n parameterPath: [\"options\", \"rangeGetContentCRC64\"],\n mapper: {\n serializedName: \"x-ms-range-get-content-crc64\",\n xmlName: \"x-ms-range-get-content-crc64\",\n type: {\n name: \"Boolean\"\n }\n }\n};\nconst encryptionKey = {\n parameterPath: [\"options\", \"cpkInfo\", \"encryptionKey\"],\n mapper: {\n serializedName: \"x-ms-encryption-key\",\n xmlName: \"x-ms-encryption-key\",\n type: {\n name: \"String\"\n }\n }\n};\nconst encryptionKeySha256 = {\n parameterPath: [\"options\", \"cpkInfo\", \"encryptionKeySha256\"],\n mapper: {\n serializedName: \"x-ms-encryption-key-sha256\",\n xmlName: \"x-ms-encryption-key-sha256\",\n type: {\n name: \"String\"\n }\n }\n};\nconst encryptionAlgorithm = {\n parameterPath: [\"options\", \"cpkInfo\", \"encryptionAlgorithm\"],\n mapper: {\n serializedName: \"x-ms-encryption-algorithm\",\n xmlName: \"x-ms-encryption-algorithm\",\n type: {\n name: \"String\"\n }\n }\n};\nconst ifMatch = {\n parameterPath: [\"options\", \"modifiedAccessConditions\", \"ifMatch\"],\n mapper: {\n serializedName: \"If-Match\",\n xmlName: \"If-Match\",\n type: {\n name: \"String\"\n }\n }\n};\nconst ifNoneMatch = {\n parameterPath: [\"options\", \"modifiedAccessConditions\", \"ifNoneMatch\"],\n mapper: {\n serializedName: \"If-None-Match\",\n xmlName: \"If-None-Match\",\n type: {\n name: \"String\"\n }\n }\n};\nconst ifTags = {\n parameterPath: [\"options\", \"modifiedAccessConditions\", \"ifTags\"],\n mapper: {\n serializedName: \"x-ms-if-tags\",\n xmlName: \"x-ms-if-tags\",\n type: {\n name: \"String\"\n }\n }\n};\nconst deleteSnapshots = {\n parameterPath: [\"options\", \"deleteSnapshots\"],\n mapper: {\n serializedName: \"x-ms-delete-snapshots\",\n xmlName: \"x-ms-delete-snapshots\",\n type: {\n name: \"Enum\",\n allowedValues: [\"include\", \"only\"]\n }\n }\n};\nconst blobDeleteType = {\n parameterPath: [\"options\", \"blobDeleteType\"],\n mapper: {\n serializedName: \"deletetype\",\n xmlName: \"deletetype\",\n type: {\n name: \"String\"\n }\n }\n};\nconst comp11 = {\n parameterPath: \"comp\",\n mapper: {\n defaultValue: \"expiry\",\n isConstant: true,\n serializedName: \"comp\",\n type: {\n name: \"String\"\n }\n }\n};\nconst expiryOptions = {\n parameterPath: \"expiryOptions\",\n mapper: {\n serializedName: \"x-ms-expiry-option\",\n required: true,\n xmlName: \"x-ms-expiry-option\",\n type: {\n name: \"String\"\n }\n }\n};\nconst expiresOn = {\n parameterPath: [\"options\", \"expiresOn\"],\n mapper: {\n serializedName: \"x-ms-expiry-time\",\n xmlName: \"x-ms-expiry-time\",\n type: {\n name: \"String\"\n }\n }\n};\nconst blobCacheControl = {\n parameterPath: [\"options\", \"blobHttpHeaders\", \"blobCacheControl\"],\n mapper: {\n serializedName: \"x-ms-blob-cache-control\",\n xmlName: \"x-ms-blob-cache-control\",\n type: {\n name: \"String\"\n }\n }\n};\nconst blobContentType = {\n parameterPath: [\"options\", \"blobHttpHeaders\", \"blobContentType\"],\n mapper: {\n serializedName: \"x-ms-blob-content-type\",\n xmlName: \"x-ms-blob-content-type\",\n type: {\n name: \"String\"\n }\n }\n};\nconst blobContentMD5 = {\n parameterPath: [\"options\", \"blobHttpHeaders\", \"blobContentMD5\"],\n mapper: {\n serializedName: \"x-ms-blob-content-md5\",\n xmlName: \"x-ms-blob-content-md5\",\n type: {\n name: \"ByteArray\"\n }\n }\n};\nconst blobContentEncoding = {\n parameterPath: [\"options\", \"blobHttpHeaders\", \"blobContentEncoding\"],\n mapper: {\n serializedName: \"x-ms-blob-content-encoding\",\n xmlName: \"x-ms-blob-content-encoding\",\n type: {\n name: \"String\"\n }\n }\n};\nconst blobContentLanguage = {\n parameterPath: [\"options\", \"blobHttpHeaders\", \"blobContentLanguage\"],\n mapper: {\n serializedName: \"x-ms-blob-content-language\",\n xmlName: \"x-ms-blob-content-language\",\n type: {\n name: \"String\"\n }\n }\n};\nconst blobContentDisposition = {\n parameterPath: [\"options\", \"blobHttpHeaders\", \"blobContentDisposition\"],\n mapper: {\n serializedName: \"x-ms-blob-content-disposition\",\n xmlName: \"x-ms-blob-content-disposition\",\n type: {\n name: \"String\"\n }\n }\n};\nconst comp12 = {\n parameterPath: \"comp\",\n mapper: {\n defaultValue: \"immutabilityPolicies\",\n isConstant: true,\n serializedName: \"comp\",\n type: {\n name: \"String\"\n }\n }\n};\nconst immutabilityPolicyExpiry = {\n parameterPath: [\"options\", \"immutabilityPolicyExpiry\"],\n mapper: {\n serializedName: \"x-ms-immutability-policy-until-date\",\n xmlName: \"x-ms-immutability-policy-until-date\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n }\n};\nconst immutabilityPolicyMode = {\n parameterPath: [\"options\", \"immutabilityPolicyMode\"],\n mapper: {\n serializedName: \"x-ms-immutability-policy-mode\",\n xmlName: \"x-ms-immutability-policy-mode\",\n type: {\n name: \"Enum\",\n allowedValues: [\"Mutable\", \"Unlocked\", \"Locked\"]\n }\n }\n};\nconst comp13 = {\n parameterPath: \"comp\",\n mapper: {\n defaultValue: \"legalhold\",\n isConstant: true,\n serializedName: \"comp\",\n type: {\n name: \"String\"\n }\n }\n};\nconst legalHold = {\n parameterPath: \"legalHold\",\n mapper: {\n serializedName: \"x-ms-legal-hold\",\n required: true,\n xmlName: \"x-ms-legal-hold\",\n type: {\n name: \"Boolean\"\n }\n }\n};\nconst encryptionScope = {\n parameterPath: [\"options\", \"encryptionScope\"],\n mapper: {\n serializedName: \"x-ms-encryption-scope\",\n xmlName: \"x-ms-encryption-scope\",\n type: {\n name: \"String\"\n }\n }\n};\nconst comp14 = {\n parameterPath: \"comp\",\n mapper: {\n defaultValue: \"snapshot\",\n isConstant: true,\n serializedName: \"comp\",\n type: {\n name: \"String\"\n }\n }\n};\nconst tier = {\n parameterPath: [\"options\", \"tier\"],\n mapper: {\n serializedName: \"x-ms-access-tier\",\n xmlName: \"x-ms-access-tier\",\n type: {\n name: \"Enum\",\n allowedValues: [\n \"P4\",\n \"P6\",\n \"P10\",\n \"P15\",\n \"P20\",\n \"P30\",\n \"P40\",\n \"P50\",\n \"P60\",\n \"P70\",\n \"P80\",\n \"Hot\",\n \"Cool\",\n \"Archive\"\n ]\n }\n }\n};\nconst rehydratePriority = {\n parameterPath: [\"options\", \"rehydratePriority\"],\n mapper: {\n serializedName: \"x-ms-rehydrate-priority\",\n xmlName: \"x-ms-rehydrate-priority\",\n type: {\n name: \"Enum\",\n allowedValues: [\"High\", \"Standard\"]\n }\n }\n};\nconst sourceIfModifiedSince = {\n parameterPath: [\n \"options\",\n \"sourceModifiedAccessConditions\",\n \"sourceIfModifiedSince\"\n ],\n mapper: {\n serializedName: \"x-ms-source-if-modified-since\",\n xmlName: \"x-ms-source-if-modified-since\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n }\n};\nconst sourceIfUnmodifiedSince = {\n parameterPath: [\n \"options\",\n \"sourceModifiedAccessConditions\",\n \"sourceIfUnmodifiedSince\"\n ],\n mapper: {\n serializedName: \"x-ms-source-if-unmodified-since\",\n xmlName: \"x-ms-source-if-unmodified-since\",\n type: {\n name: \"DateTimeRfc1123\"\n }\n }\n};\nconst sourceIfMatch = {\n parameterPath: [\"options\", \"sourceModifiedAccessConditions\", \"sourceIfMatch\"],\n mapper: {\n serializedName: \"x-ms-source-if-match\",\n xmlName: \"x-ms-source-if-match\",\n type: {\n name: \"String\"\n }\n }\n};\nconst sourceIfNoneMatch = {\n parameterPath: [\n \"options\",\n \"sourceModifiedAccessConditions\",\n \"sourceIfNoneMatch\"\n ],\n mapper: {\n serializedName: \"x-ms-source-if-none-match\",\n xmlName: \"x-ms-source-if-none-match\",\n type: {\n name: \"String\"\n }\n }\n};\nconst sourceIfTags = {\n parameterPath: [\"options\", \"sourceModifiedAccessConditions\", \"sourceIfTags\"],\n mapper: {\n serializedName: \"x-ms-source-if-tags\",\n xmlName: \"x-ms-source-if-tags\",\n type: {\n name: \"String\"\n }\n }\n};\nconst copySource = {\n parameterPath: \"copySource\",\n mapper: {\n serializedName: \"x-ms-copy-source\",\n required: true,\n xmlName: \"x-ms-copy-source\",\n type: {\n name: \"String\"\n }\n }\n};\nconst blobTagsString = {\n parameterPath: [\"options\", \"blobTagsString\"],\n mapper: {\n serializedName: \"x-ms-tags\",\n xmlName: \"x-ms-tags\",\n type: {\n name: \"String\"\n }\n }\n};\nconst sealBlob = {\n parameterPath: [\"options\", \"sealBlob\"],\n mapper: {\n serializedName: \"x-ms-seal-blob\",\n xmlName: \"x-ms-seal-blob\",\n type: {\n name: \"Boolean\"\n }\n }\n};\nconst legalHold1 = {\n parameterPath: [\"options\", \"legalHold\"],\n mapper: {\n serializedName: \"x-ms-legal-hold\",\n xmlName: \"x-ms-legal-hold\",\n type: {\n name: \"Boolean\"\n }\n }\n};\nconst xMsRequiresSync = {\n parameterPath: \"xMsRequiresSync\",\n mapper: {\n defaultValue: \"true\",\n isConstant: true,\n serializedName: \"x-ms-requires-sync\",\n type: {\n name: \"String\"\n }\n }\n};\nconst sourceContentMD5 = {\n parameterPath: [\"options\", \"sourceContentMD5\"],\n mapper: {\n serializedName: \"x-ms-source-content-md5\",\n xmlName: \"x-ms-source-content-md5\",\n type: {\n name: \"ByteArray\"\n }\n }\n};\nconst copySourceAuthorization = {\n parameterPath: [\"options\", \"copySourceAuthorization\"],\n mapper: {\n serializedName: \"x-ms-copy-source-authorization\",\n xmlName: \"x-ms-copy-source-authorization\",\n type: {\n name: \"String\"\n }\n }\n};\nconst copySourceTags = {\n parameterPath: [\"options\", \"copySourceTags\"],\n mapper: {\n serializedName: \"x-ms-copy-source-tag-option\",\n xmlName: \"x-ms-copy-source-tag-option\",\n type: {\n name: \"Enum\",\n allowedValues: [\"REPLACE\", \"COPY\"]\n }\n }\n};\nconst comp15 = {\n parameterPath: \"comp\",\n mapper: {\n defaultValue: \"copy\",\n isConstant: true,\n serializedName: \"comp\",\n type: {\n name: \"String\"\n }\n }\n};\nconst copyActionAbortConstant = {\n parameterPath: \"copyActionAbortConstant\",\n mapper: {\n defaultValue: \"abort\",\n isConstant: true,\n serializedName: \"x-ms-copy-action\",\n type: {\n name: \"String\"\n }\n }\n};\nconst copyId = {\n parameterPath: \"copyId\",\n mapper: {\n serializedName: \"copyid\",\n required: true,\n xmlName: \"copyid\",\n type: {\n name: \"String\"\n }\n }\n};\nconst comp16 = {\n parameterPath: \"comp\",\n mapper: {\n defaultValue: \"tier\",\n isConstant: true,\n serializedName: \"comp\",\n type: {\n name: \"String\"\n }\n }\n};\nconst tier1 = {\n parameterPath: \"tier\",\n mapper: {\n serializedName: \"x-ms-access-tier\",\n required: true,\n xmlName: \"x-ms-access-tier\",\n type: {\n name: \"Enum\",\n allowedValues: [\n \"P4\",\n \"P6\",\n \"P10\",\n \"P15\",\n \"P20\",\n \"P30\",\n \"P40\",\n \"P50\",\n \"P60\",\n \"P70\",\n \"P80\",\n \"Hot\",\n \"Cool\",\n \"Archive\"\n ]\n }\n }\n};\nconst queryRequest = {\n parameterPath: [\"options\", \"queryRequest\"],\n mapper: QueryRequest\n};\nconst comp17 = {\n parameterPath: \"comp\",\n mapper: {\n defaultValue: \"query\",\n isConstant: true,\n serializedName: \"comp\",\n type: {\n name: \"String\"\n }\n }\n};\nconst comp18 = {\n parameterPath: \"comp\",\n mapper: {\n defaultValue: \"tags\",\n isConstant: true,\n serializedName: \"comp\",\n type: {\n name: \"String\"\n }\n }\n};\nconst tags = {\n parameterPath: [\"options\", \"tags\"],\n mapper: BlobTags\n};\nconst transactionalContentMD5 = {\n parameterPath: [\"options\", \"transactionalContentMD5\"],\n mapper: {\n serializedName: \"Content-MD5\",\n xmlName: \"Content-MD5\",\n type: {\n name: \"ByteArray\"\n }\n }\n};\nconst transactionalContentCrc64 = {\n parameterPath: [\"options\", \"transactionalContentCrc64\"],\n mapper: {\n serializedName: \"x-ms-content-crc64\",\n xmlName: \"x-ms-content-crc64\",\n type: {\n name: \"ByteArray\"\n }\n }\n};\nconst blobType = {\n parameterPath: \"blobType\",\n mapper: {\n defaultValue: \"PageBlob\",\n isConstant: true,\n serializedName: \"x-ms-blob-type\",\n type: {\n name: \"String\"\n }\n }\n};\nconst blobContentLength = {\n parameterPath: \"blobContentLength\",\n mapper: {\n serializedName: \"x-ms-blob-content-length\",\n required: true,\n xmlName: \"x-ms-blob-content-length\",\n type: {\n name: \"Number\"\n }\n }\n};\nconst blobSequenceNumber = {\n parameterPath: [\"options\", \"blobSequenceNumber\"],\n mapper: {\n serializedName: \"x-ms-blob-sequence-number\",\n xmlName: \"x-ms-blob-sequence-number\",\n type: {\n name: \"Number\"\n }\n }\n};\nconst contentType1 = {\n parameterPath: [\"options\", \"contentType\"],\n mapper: {\n defaultValue: \"application/octet-stream\",\n isConstant: true,\n serializedName: \"Content-Type\",\n type: {\n name: \"String\"\n }\n }\n};\nconst body1 = {\n parameterPath: \"body\",\n mapper: {\n serializedName: \"body\",\n required: true,\n xmlName: \"body\",\n type: {\n name: \"Stream\"\n }\n }\n};\nconst accept2 = {\n parameterPath: \"accept\",\n mapper: {\n defaultValue: \"application/xml\",\n isConstant: true,\n serializedName: \"Accept\",\n type: {\n name: \"String\"\n }\n }\n};\nconst comp19 = {\n parameterPath: \"comp\",\n mapper: {\n defaultValue: \"page\",\n isConstant: true,\n serializedName: \"comp\",\n type: {\n name: \"String\"\n }\n }\n};\nconst pageWrite = {\n parameterPath: \"pageWrite\",\n mapper: {\n defaultValue: \"update\",\n isConstant: true,\n serializedName: \"x-ms-page-write\",\n type: {\n name: \"String\"\n }\n }\n};\nconst ifSequenceNumberLessThanOrEqualTo = {\n parameterPath: [\n \"options\",\n \"sequenceNumberAccessConditions\",\n \"ifSequenceNumberLessThanOrEqualTo\"\n ],\n mapper: {\n serializedName: \"x-ms-if-sequence-number-le\",\n xmlName: \"x-ms-if-sequence-number-le\",\n type: {\n name: \"Number\"\n }\n }\n};\nconst ifSequenceNumberLessThan = {\n parameterPath: [\n \"options\",\n \"sequenceNumberAccessConditions\",\n \"ifSequenceNumberLessThan\"\n ],\n mapper: {\n serializedName: \"x-ms-if-sequence-number-lt\",\n xmlName: \"x-ms-if-sequence-number-lt\",\n type: {\n name: \"Number\"\n }\n }\n};\nconst ifSequenceNumberEqualTo = {\n parameterPath: [\n \"options\",\n \"sequenceNumberAccessConditions\",\n \"ifSequenceNumberEqualTo\"\n ],\n mapper: {\n serializedName: \"x-ms-if-sequence-number-eq\",\n xmlName: \"x-ms-if-sequence-number-eq\",\n type: {\n name: \"Number\"\n }\n }\n};\nconst pageWrite1 = {\n parameterPath: \"pageWrite\",\n mapper: {\n defaultValue: \"clear\",\n isConstant: true,\n serializedName: \"x-ms-page-write\",\n type: {\n name: \"String\"\n }\n }\n};\nconst sourceUrl = {\n parameterPath: \"sourceUrl\",\n mapper: {\n serializedName: \"x-ms-copy-source\",\n required: true,\n xmlName: \"x-ms-copy-source\",\n type: {\n name: \"String\"\n }\n }\n};\nconst sourceRange = {\n parameterPath: \"sourceRange\",\n mapper: {\n serializedName: \"x-ms-source-range\",\n required: true,\n xmlName: \"x-ms-source-range\",\n type: {\n name: \"String\"\n }\n }\n};\nconst sourceContentCrc64 = {\n parameterPath: [\"options\", \"sourceContentCrc64\"],\n mapper: {\n serializedName: \"x-ms-source-content-crc64\",\n xmlName: \"x-ms-source-content-crc64\",\n type: {\n name: \"ByteArray\"\n }\n }\n};\nconst range1 = {\n parameterPath: \"range\",\n mapper: {\n serializedName: \"x-ms-range\",\n required: true,\n xmlName: \"x-ms-range\",\n type: {\n name: \"String\"\n }\n }\n};\nconst comp20 = {\n parameterPath: \"comp\",\n mapper: {\n defaultValue: \"pagelist\",\n isConstant: true,\n serializedName: \"comp\",\n type: {\n name: \"String\"\n }\n }\n};\nconst prevsnapshot = {\n parameterPath: [\"options\", \"prevsnapshot\"],\n mapper: {\n serializedName: \"prevsnapshot\",\n xmlName: \"prevsnapshot\",\n type: {\n name: \"String\"\n }\n }\n};\nconst prevSnapshotUrl = {\n parameterPath: [\"options\", \"prevSnapshotUrl\"],\n mapper: {\n serializedName: \"x-ms-previous-snapshot-url\",\n xmlName: \"x-ms-previous-snapshot-url\",\n type: {\n name: \"String\"\n }\n }\n};\nconst sequenceNumberAction = {\n parameterPath: \"sequenceNumberAction\",\n mapper: {\n serializedName: \"x-ms-sequence-number-action\",\n required: true,\n xmlName: \"x-ms-sequence-number-action\",\n type: {\n name: \"Enum\",\n allowedValues: [\"max\", \"update\", \"increment\"]\n }\n }\n};\nconst comp21 = {\n parameterPath: \"comp\",\n mapper: {\n defaultValue: \"incrementalcopy\",\n isConstant: true,\n serializedName: \"comp\",\n type: {\n name: \"String\"\n }\n }\n};\nconst blobType1 = {\n parameterPath: \"blobType\",\n mapper: {\n defaultValue: \"AppendBlob\",\n isConstant: true,\n serializedName: \"x-ms-blob-type\",\n type: {\n name: \"String\"\n }\n }\n};\nconst comp22 = {\n parameterPath: \"comp\",\n mapper: {\n defaultValue: \"appendblock\",\n isConstant: true,\n serializedName: \"comp\",\n type: {\n name: \"String\"\n }\n }\n};\nconst maxSize = {\n parameterPath: [\"options\", \"appendPositionAccessConditions\", \"maxSize\"],\n mapper: {\n serializedName: \"x-ms-blob-condition-maxsize\",\n xmlName: \"x-ms-blob-condition-maxsize\",\n type: {\n name: \"Number\"\n }\n }\n};\nconst appendPosition = {\n parameterPath: [\n \"options\",\n \"appendPositionAccessConditions\",\n \"appendPosition\"\n ],\n mapper: {\n serializedName: \"x-ms-blob-condition-appendpos\",\n xmlName: \"x-ms-blob-condition-appendpos\",\n type: {\n name: \"Number\"\n }\n }\n};\nconst sourceRange1 = {\n parameterPath: [\"options\", \"sourceRange\"],\n mapper: {\n serializedName: \"x-ms-source-range\",\n xmlName: \"x-ms-source-range\",\n type: {\n name: \"String\"\n }\n }\n};\nconst comp23 = {\n parameterPath: \"comp\",\n mapper: {\n defaultValue: \"seal\",\n isConstant: true,\n serializedName: \"comp\",\n type: {\n name: \"String\"\n }\n }\n};\nconst blobType2 = {\n parameterPath: \"blobType\",\n mapper: {\n defaultValue: \"BlockBlob\",\n isConstant: true,\n serializedName: \"x-ms-blob-type\",\n type: {\n name: \"String\"\n }\n }\n};\nconst copySourceBlobProperties = {\n parameterPath: [\"options\", \"copySourceBlobProperties\"],\n mapper: {\n serializedName: \"x-ms-copy-source-blob-properties\",\n xmlName: \"x-ms-copy-source-blob-properties\",\n type: {\n name: \"Boolean\"\n }\n }\n};\nconst comp24 = {\n parameterPath: \"comp\",\n mapper: {\n defaultValue: \"block\",\n isConstant: true,\n serializedName: \"comp\",\n type: {\n name: \"String\"\n }\n }\n};\nconst blockId = {\n parameterPath: \"blockId\",\n mapper: {\n serializedName: \"blockid\",\n required: true,\n xmlName: \"blockid\",\n type: {\n name: \"String\"\n }\n }\n};\nconst blocks = {\n parameterPath: \"blocks\",\n mapper: BlockLookupList\n};\nconst comp25 = {\n parameterPath: \"comp\",\n mapper: {\n defaultValue: \"blocklist\",\n isConstant: true,\n serializedName: \"comp\",\n type: {\n name: \"String\"\n }\n }\n};\nconst listType = {\n parameterPath: \"listType\",\n mapper: {\n defaultValue: \"committed\",\n serializedName: \"blocklisttype\",\n required: true,\n xmlName: \"blocklisttype\",\n type: {\n name: \"Enum\",\n allowedValues: [\"committed\", \"uncommitted\", \"all\"]\n }\n }\n};\n\n/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n/** Class representing a Service. */\nclass Service {\n /**\n * Initialize a new instance of the class Service class.\n * @param client Reference to the service client\n */\n constructor(client) {\n this.client = client;\n }\n /**\n * Sets properties for a storage account's Blob service endpoint, including properties for Storage\n * Analytics and CORS (Cross-Origin Resource Sharing) rules\n * @param blobServiceProperties The StorageService properties.\n * @param options The options parameters.\n */\n setProperties(blobServiceProperties, options) {\n const operationArguments = {\n blobServiceProperties,\n options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})\n };\n return this.client.sendOperationRequest(operationArguments, setPropertiesOperationSpec);\n }\n /**\n * gets the properties of a storage account's Blob service, including properties for Storage Analytics\n * and CORS (Cross-Origin Resource Sharing) rules.\n * @param options The options parameters.\n */\n getProperties(options) {\n const operationArguments = {\n options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})\n };\n return this.client.sendOperationRequest(operationArguments, getPropertiesOperationSpec$2);\n }\n /**\n * Retrieves statistics related to replication for the Blob service. It is only available on the\n * secondary location endpoint when read-access geo-redundant replication is enabled for the storage\n * account.\n * @param options The options parameters.\n */\n getStatistics(options) {\n const operationArguments = {\n options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})\n };\n return this.client.sendOperationRequest(operationArguments, getStatisticsOperationSpec);\n }\n /**\n * The List Containers Segment operation returns a list of the containers under the specified account\n * @param options The options parameters.\n */\n listContainersSegment(options) {\n const operationArguments = {\n options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})\n };\n return this.client.sendOperationRequest(operationArguments, listContainersSegmentOperationSpec);\n }\n /**\n * Retrieves a user delegation key for the Blob service. This is only a valid operation when using\n * bearer token authentication.\n * @param keyInfo Key information\n * @param options The options parameters.\n */\n getUserDelegationKey(keyInfo, options) {\n const operationArguments = {\n keyInfo,\n options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})\n };\n return this.client.sendOperationRequest(operationArguments, getUserDelegationKeyOperationSpec);\n }\n /**\n * Returns the sku name and account kind\n * @param options The options parameters.\n */\n getAccountInfo(options) {\n const operationArguments = {\n options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})\n };\n return this.client.sendOperationRequest(operationArguments, getAccountInfoOperationSpec$2);\n }\n /**\n * The Batch operation allows multiple API calls to be embedded into a single HTTP request.\n * @param contentLength The length of the request.\n * @param multipartContentType Required. The value of this header must be multipart/mixed with a batch\n * boundary. Example header value: multipart/mixed; boundary=batch_\n * @param body Initial data\n * @param options The options parameters.\n */\n submitBatch(contentLength, multipartContentType, body, options) {\n const operationArguments = {\n contentLength,\n multipartContentType,\n body,\n options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})\n };\n return this.client.sendOperationRequest(operationArguments, submitBatchOperationSpec$1);\n }\n /**\n * The Filter Blobs operation enables callers to list blobs across all containers whose tags match a\n * given search expression. Filter blobs searches across all containers within a storage account but\n * can be scoped within the expression to a single container.\n * @param options The options parameters.\n */\n filterBlobs(options) {\n const operationArguments = {\n options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})\n };\n return this.client.sendOperationRequest(operationArguments, filterBlobsOperationSpec$1);\n }\n}\n// Operation Specifications\nconst xmlSerializer$5 = new coreHttp__namespace.Serializer(Mappers, /* isXml */ true);\nconst setPropertiesOperationSpec = {\n path: \"/\",\n httpMethod: \"PUT\",\n responses: {\n 202: {\n headersMapper: ServiceSetPropertiesHeaders\n },\n default: {\n bodyMapper: StorageError,\n headersMapper: ServiceSetPropertiesExceptionHeaders\n }\n },\n requestBody: blobServiceProperties,\n queryParameters: [\n restype,\n comp,\n timeoutInSeconds\n ],\n urlParameters: [url],\n headerParameters: [\n contentType,\n accept,\n version,\n requestId\n ],\n isXML: true,\n contentType: \"application/xml; charset=utf-8\",\n mediaType: \"xml\",\n serializer: xmlSerializer$5\n};\nconst getPropertiesOperationSpec$2 = {\n path: \"/\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: BlobServiceProperties,\n headersMapper: ServiceGetPropertiesHeaders\n },\n default: {\n bodyMapper: StorageError,\n headersMapper: ServiceGetPropertiesExceptionHeaders\n }\n },\n queryParameters: [\n restype,\n comp,\n timeoutInSeconds\n ],\n urlParameters: [url],\n headerParameters: [\n version,\n requestId,\n accept1\n ],\n isXML: true,\n serializer: xmlSerializer$5\n};\nconst getStatisticsOperationSpec = {\n path: \"/\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: BlobServiceStatistics,\n headersMapper: ServiceGetStatisticsHeaders\n },\n default: {\n bodyMapper: StorageError,\n headersMapper: ServiceGetStatisticsExceptionHeaders\n }\n },\n queryParameters: [\n restype,\n timeoutInSeconds,\n comp1\n ],\n urlParameters: [url],\n headerParameters: [\n version,\n requestId,\n accept1\n ],\n isXML: true,\n serializer: xmlSerializer$5\n};\nconst listContainersSegmentOperationSpec = {\n path: \"/\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: ListContainersSegmentResponse,\n headersMapper: ServiceListContainersSegmentHeaders\n },\n default: {\n bodyMapper: StorageError,\n headersMapper: ServiceListContainersSegmentExceptionHeaders\n }\n },\n queryParameters: [\n timeoutInSeconds,\n comp2,\n prefix,\n marker,\n maxPageSize,\n include\n ],\n urlParameters: [url],\n headerParameters: [\n version,\n requestId,\n accept1\n ],\n isXML: true,\n serializer: xmlSerializer$5\n};\nconst getUserDelegationKeyOperationSpec = {\n path: \"/\",\n httpMethod: \"POST\",\n responses: {\n 200: {\n bodyMapper: UserDelegationKey,\n headersMapper: ServiceGetUserDelegationKeyHeaders\n },\n default: {\n bodyMapper: StorageError,\n headersMapper: ServiceGetUserDelegationKeyExceptionHeaders\n }\n },\n requestBody: keyInfo,\n queryParameters: [\n restype,\n timeoutInSeconds,\n comp3\n ],\n urlParameters: [url],\n headerParameters: [\n contentType,\n accept,\n version,\n requestId\n ],\n isXML: true,\n contentType: \"application/xml; charset=utf-8\",\n mediaType: \"xml\",\n serializer: xmlSerializer$5\n};\nconst getAccountInfoOperationSpec$2 = {\n path: \"/\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n headersMapper: ServiceGetAccountInfoHeaders\n },\n default: {\n bodyMapper: StorageError,\n headersMapper: ServiceGetAccountInfoExceptionHeaders\n }\n },\n queryParameters: [comp, restype1],\n urlParameters: [url],\n headerParameters: [version, accept1],\n isXML: true,\n serializer: xmlSerializer$5\n};\nconst submitBatchOperationSpec$1 = {\n path: \"/\",\n httpMethod: \"POST\",\n responses: {\n 202: {\n bodyMapper: {\n type: { name: \"Stream\" },\n serializedName: \"parsedResponse\"\n },\n headersMapper: ServiceSubmitBatchHeaders\n },\n default: {\n bodyMapper: StorageError,\n headersMapper: ServiceSubmitBatchExceptionHeaders\n }\n },\n requestBody: body,\n queryParameters: [timeoutInSeconds, comp4],\n urlParameters: [url],\n headerParameters: [\n contentType,\n accept,\n version,\n requestId,\n contentLength,\n multipartContentType\n ],\n isXML: true,\n contentType: \"application/xml; charset=utf-8\",\n mediaType: \"xml\",\n serializer: xmlSerializer$5\n};\nconst filterBlobsOperationSpec$1 = {\n path: \"/\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: FilterBlobSegment,\n headersMapper: ServiceFilterBlobsHeaders\n },\n default: {\n bodyMapper: StorageError,\n headersMapper: ServiceFilterBlobsExceptionHeaders\n }\n },\n queryParameters: [\n timeoutInSeconds,\n marker,\n maxPageSize,\n comp5,\n where\n ],\n urlParameters: [url],\n headerParameters: [\n version,\n requestId,\n accept1\n ],\n isXML: true,\n serializer: xmlSerializer$5\n};\n\n/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n/** Class representing a Container. */\nclass Container {\n /**\n * Initialize a new instance of the class Container class.\n * @param client Reference to the service client\n */\n constructor(client) {\n this.client = client;\n }\n /**\n * creates a new container under the specified account. If the container with the same name already\n * exists, the operation fails\n * @param options The options parameters.\n */\n create(options) {\n const operationArguments = {\n options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})\n };\n return this.client.sendOperationRequest(operationArguments, createOperationSpec$2);\n }\n /**\n * returns all user-defined metadata and system properties for the specified container. The data\n * returned does not include the container's list of blobs\n * @param options The options parameters.\n */\n getProperties(options) {\n const operationArguments = {\n options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})\n };\n return this.client.sendOperationRequest(operationArguments, getPropertiesOperationSpec$1);\n }\n /**\n * operation marks the specified container for deletion. The container and any blobs contained within\n * it are later deleted during garbage collection\n * @param options The options parameters.\n */\n delete(options) {\n const operationArguments = {\n options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})\n };\n return this.client.sendOperationRequest(operationArguments, deleteOperationSpec$1);\n }\n /**\n * operation sets one or more user-defined name-value pairs for the specified container.\n * @param options The options parameters.\n */\n setMetadata(options) {\n const operationArguments = {\n options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})\n };\n return this.client.sendOperationRequest(operationArguments, setMetadataOperationSpec$1);\n }\n /**\n * gets the permissions for the specified container. The permissions indicate whether container data\n * may be accessed publicly.\n * @param options The options parameters.\n */\n getAccessPolicy(options) {\n const operationArguments = {\n options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})\n };\n return this.client.sendOperationRequest(operationArguments, getAccessPolicyOperationSpec);\n }\n /**\n * sets the permissions for the specified container. The permissions indicate whether blobs in a\n * container may be accessed publicly.\n * @param options The options parameters.\n */\n setAccessPolicy(options) {\n const operationArguments = {\n options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})\n };\n return this.client.sendOperationRequest(operationArguments, setAccessPolicyOperationSpec);\n }\n /**\n * Restores a previously-deleted container.\n * @param options The options parameters.\n */\n restore(options) {\n const operationArguments = {\n options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})\n };\n return this.client.sendOperationRequest(operationArguments, restoreOperationSpec);\n }\n /**\n * Renames an existing container.\n * @param sourceContainerName Required. Specifies the name of the container to rename.\n * @param options The options parameters.\n */\n rename(sourceContainerName, options) {\n const operationArguments = {\n sourceContainerName,\n options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})\n };\n return this.client.sendOperationRequest(operationArguments, renameOperationSpec);\n }\n /**\n * The Batch operation allows multiple API calls to be embedded into a single HTTP request.\n * @param contentLength The length of the request.\n * @param multipartContentType Required. The value of this header must be multipart/mixed with a batch\n * boundary. Example header value: multipart/mixed; boundary=batch_\n * @param body Initial data\n * @param options The options parameters.\n */\n submitBatch(contentLength, multipartContentType, body, options) {\n const operationArguments = {\n contentLength,\n multipartContentType,\n body,\n options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})\n };\n return this.client.sendOperationRequest(operationArguments, submitBatchOperationSpec);\n }\n /**\n * The Filter Blobs operation enables callers to list blobs in a container whose tags match a given\n * search expression. Filter blobs searches within the given container.\n * @param options The options parameters.\n */\n filterBlobs(options) {\n const operationArguments = {\n options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})\n };\n return this.client.sendOperationRequest(operationArguments, filterBlobsOperationSpec);\n }\n /**\n * [Update] establishes and manages a lock on a container for delete operations. The lock duration can\n * be 15 to 60 seconds, or can be infinite\n * @param options The options parameters.\n */\n acquireLease(options) {\n const operationArguments = {\n options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})\n };\n return this.client.sendOperationRequest(operationArguments, acquireLeaseOperationSpec$1);\n }\n /**\n * [Update] establishes and manages a lock on a container for delete operations. The lock duration can\n * be 15 to 60 seconds, or can be infinite\n * @param leaseId Specifies the current lease ID on the resource.\n * @param options The options parameters.\n */\n releaseLease(leaseId, options) {\n const operationArguments = {\n leaseId,\n options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})\n };\n return this.client.sendOperationRequest(operationArguments, releaseLeaseOperationSpec$1);\n }\n /**\n * [Update] establishes and manages a lock on a container for delete operations. The lock duration can\n * be 15 to 60 seconds, or can be infinite\n * @param leaseId Specifies the current lease ID on the resource.\n * @param options The options parameters.\n */\n renewLease(leaseId, options) {\n const operationArguments = {\n leaseId,\n options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})\n };\n return this.client.sendOperationRequest(operationArguments, renewLeaseOperationSpec$1);\n }\n /**\n * [Update] establishes and manages a lock on a container for delete operations. The lock duration can\n * be 15 to 60 seconds, or can be infinite\n * @param options The options parameters.\n */\n breakLease(options) {\n const operationArguments = {\n options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})\n };\n return this.client.sendOperationRequest(operationArguments, breakLeaseOperationSpec$1);\n }\n /**\n * [Update] establishes and manages a lock on a container for delete operations. The lock duration can\n * be 15 to 60 seconds, or can be infinite\n * @param leaseId Specifies the current lease ID on the resource.\n * @param proposedLeaseId Proposed lease ID, in a GUID string format. The Blob service returns 400\n * (Invalid request) if the proposed lease ID is not in the correct format. See Guid Constructor\n * (String) for a list of valid GUID string formats.\n * @param options The options parameters.\n */\n changeLease(leaseId, proposedLeaseId, options) {\n const operationArguments = {\n leaseId,\n proposedLeaseId,\n options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})\n };\n return this.client.sendOperationRequest(operationArguments, changeLeaseOperationSpec$1);\n }\n /**\n * [Update] The List Blobs operation returns a list of the blobs under the specified container\n * @param options The options parameters.\n */\n listBlobFlatSegment(options) {\n const operationArguments = {\n options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})\n };\n return this.client.sendOperationRequest(operationArguments, listBlobFlatSegmentOperationSpec);\n }\n /**\n * [Update] The List Blobs operation returns a list of the blobs under the specified container\n * @param delimiter When the request includes this parameter, the operation returns a BlobPrefix\n * element in the response body that acts as a placeholder for all blobs whose names begin with the\n * same substring up to the appearance of the delimiter character. The delimiter may be a single\n * character or a string.\n * @param options The options parameters.\n */\n listBlobHierarchySegment(delimiter, options) {\n const operationArguments = {\n delimiter,\n options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})\n };\n return this.client.sendOperationRequest(operationArguments, listBlobHierarchySegmentOperationSpec);\n }\n /**\n * Returns the sku name and account kind\n * @param options The options parameters.\n */\n getAccountInfo(options) {\n const operationArguments = {\n options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})\n };\n return this.client.sendOperationRequest(operationArguments, getAccountInfoOperationSpec$1);\n }\n}\n// Operation Specifications\nconst xmlSerializer$4 = new coreHttp__namespace.Serializer(Mappers, /* isXml */ true);\nconst createOperationSpec$2 = {\n path: \"/{containerName}\",\n httpMethod: \"PUT\",\n responses: {\n 201: {\n headersMapper: ContainerCreateHeaders\n },\n default: {\n bodyMapper: StorageError,\n headersMapper: ContainerCreateExceptionHeaders\n }\n },\n queryParameters: [timeoutInSeconds, restype2],\n urlParameters: [url],\n headerParameters: [\n version,\n requestId,\n accept1,\n metadata,\n access,\n defaultEncryptionScope,\n preventEncryptionScopeOverride\n ],\n isXML: true,\n serializer: xmlSerializer$4\n};\nconst getPropertiesOperationSpec$1 = {\n path: \"/{containerName}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n headersMapper: ContainerGetPropertiesHeaders\n },\n default: {\n bodyMapper: StorageError,\n headersMapper: ContainerGetPropertiesExceptionHeaders\n }\n },\n queryParameters: [timeoutInSeconds, restype2],\n urlParameters: [url],\n headerParameters: [\n version,\n requestId,\n accept1,\n leaseId\n ],\n isXML: true,\n serializer: xmlSerializer$4\n};\nconst deleteOperationSpec$1 = {\n path: \"/{containerName}\",\n httpMethod: \"DELETE\",\n responses: {\n 202: {\n headersMapper: ContainerDeleteHeaders\n },\n default: {\n bodyMapper: StorageError,\n headersMapper: ContainerDeleteExceptionHeaders\n }\n },\n queryParameters: [timeoutInSeconds, restype2],\n urlParameters: [url],\n headerParameters: [\n version,\n requestId,\n accept1,\n leaseId,\n ifModifiedSince,\n ifUnmodifiedSince\n ],\n isXML: true,\n serializer: xmlSerializer$4\n};\nconst setMetadataOperationSpec$1 = {\n path: \"/{containerName}\",\n httpMethod: \"PUT\",\n responses: {\n 200: {\n headersMapper: ContainerSetMetadataHeaders\n },\n default: {\n bodyMapper: StorageError,\n headersMapper: ContainerSetMetadataExceptionHeaders\n }\n },\n queryParameters: [\n timeoutInSeconds,\n restype2,\n comp6\n ],\n urlParameters: [url],\n headerParameters: [\n version,\n requestId,\n accept1,\n metadata,\n leaseId,\n ifModifiedSince\n ],\n isXML: true,\n serializer: xmlSerializer$4\n};\nconst getAccessPolicyOperationSpec = {\n path: \"/{containerName}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: {\n type: {\n name: \"Sequence\",\n element: {\n type: { name: \"Composite\", className: \"SignedIdentifier\" }\n }\n },\n serializedName: \"SignedIdentifiers\",\n xmlName: \"SignedIdentifiers\",\n xmlIsWrapped: true,\n xmlElementName: \"SignedIdentifier\"\n },\n headersMapper: ContainerGetAccessPolicyHeaders\n },\n default: {\n bodyMapper: StorageError,\n headersMapper: ContainerGetAccessPolicyExceptionHeaders\n }\n },\n queryParameters: [\n timeoutInSeconds,\n restype2,\n comp7\n ],\n urlParameters: [url],\n headerParameters: [\n version,\n requestId,\n accept1,\n leaseId\n ],\n isXML: true,\n serializer: xmlSerializer$4\n};\nconst setAccessPolicyOperationSpec = {\n path: \"/{containerName}\",\n httpMethod: \"PUT\",\n responses: {\n 200: {\n headersMapper: ContainerSetAccessPolicyHeaders\n },\n default: {\n bodyMapper: StorageError,\n headersMapper: ContainerSetAccessPolicyExceptionHeaders\n }\n },\n requestBody: containerAcl,\n queryParameters: [\n timeoutInSeconds,\n restype2,\n comp7\n ],\n urlParameters: [url],\n headerParameters: [\n contentType,\n accept,\n version,\n requestId,\n access,\n leaseId,\n ifModifiedSince,\n ifUnmodifiedSince\n ],\n isXML: true,\n contentType: \"application/xml; charset=utf-8\",\n mediaType: \"xml\",\n serializer: xmlSerializer$4\n};\nconst restoreOperationSpec = {\n path: \"/{containerName}\",\n httpMethod: \"PUT\",\n responses: {\n 201: {\n headersMapper: ContainerRestoreHeaders\n },\n default: {\n bodyMapper: StorageError,\n headersMapper: ContainerRestoreExceptionHeaders\n }\n },\n queryParameters: [\n timeoutInSeconds,\n restype2,\n comp8\n ],\n urlParameters: [url],\n headerParameters: [\n version,\n requestId,\n accept1,\n deletedContainerName,\n deletedContainerVersion\n ],\n isXML: true,\n serializer: xmlSerializer$4\n};\nconst renameOperationSpec = {\n path: \"/{containerName}\",\n httpMethod: \"PUT\",\n responses: {\n 200: {\n headersMapper: ContainerRenameHeaders\n },\n default: {\n bodyMapper: StorageError,\n headersMapper: ContainerRenameExceptionHeaders\n }\n },\n queryParameters: [\n timeoutInSeconds,\n restype2,\n comp9\n ],\n urlParameters: [url],\n headerParameters: [\n version,\n requestId,\n accept1,\n sourceContainerName,\n sourceLeaseId\n ],\n isXML: true,\n serializer: xmlSerializer$4\n};\nconst submitBatchOperationSpec = {\n path: \"/{containerName}\",\n httpMethod: \"POST\",\n responses: {\n 202: {\n bodyMapper: {\n type: { name: \"Stream\" },\n serializedName: \"parsedResponse\"\n },\n headersMapper: ContainerSubmitBatchHeaders\n },\n default: {\n bodyMapper: StorageError,\n headersMapper: ContainerSubmitBatchExceptionHeaders\n }\n },\n requestBody: body,\n queryParameters: [\n timeoutInSeconds,\n comp4,\n restype2\n ],\n urlParameters: [url],\n headerParameters: [\n contentType,\n accept,\n version,\n requestId,\n contentLength,\n multipartContentType\n ],\n isXML: true,\n contentType: \"application/xml; charset=utf-8\",\n mediaType: \"xml\",\n serializer: xmlSerializer$4\n};\nconst filterBlobsOperationSpec = {\n path: \"/{containerName}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: FilterBlobSegment,\n headersMapper: ContainerFilterBlobsHeaders\n },\n default: {\n bodyMapper: StorageError,\n headersMapper: ContainerFilterBlobsExceptionHeaders\n }\n },\n queryParameters: [\n timeoutInSeconds,\n marker,\n maxPageSize,\n comp5,\n where,\n restype2\n ],\n urlParameters: [url],\n headerParameters: [\n version,\n requestId,\n accept1\n ],\n isXML: true,\n serializer: xmlSerializer$4\n};\nconst acquireLeaseOperationSpec$1 = {\n path: \"/{containerName}\",\n httpMethod: \"PUT\",\n responses: {\n 201: {\n headersMapper: ContainerAcquireLeaseHeaders\n },\n default: {\n bodyMapper: StorageError,\n headersMapper: ContainerAcquireLeaseExceptionHeaders\n }\n },\n queryParameters: [\n timeoutInSeconds,\n restype2,\n comp10\n ],\n urlParameters: [url],\n headerParameters: [\n version,\n requestId,\n accept1,\n ifModifiedSince,\n ifUnmodifiedSince,\n action,\n duration,\n proposedLeaseId\n ],\n isXML: true,\n serializer: xmlSerializer$4\n};\nconst releaseLeaseOperationSpec$1 = {\n path: \"/{containerName}\",\n httpMethod: \"PUT\",\n responses: {\n 200: {\n headersMapper: ContainerReleaseLeaseHeaders\n },\n default: {\n bodyMapper: StorageError,\n headersMapper: ContainerReleaseLeaseExceptionHeaders\n }\n },\n queryParameters: [\n timeoutInSeconds,\n restype2,\n comp10\n ],\n urlParameters: [url],\n headerParameters: [\n version,\n requestId,\n accept1,\n ifModifiedSince,\n ifUnmodifiedSince,\n action1,\n leaseId1\n ],\n isXML: true,\n serializer: xmlSerializer$4\n};\nconst renewLeaseOperationSpec$1 = {\n path: \"/{containerName}\",\n httpMethod: \"PUT\",\n responses: {\n 200: {\n headersMapper: ContainerRenewLeaseHeaders\n },\n default: {\n bodyMapper: StorageError,\n headersMapper: ContainerRenewLeaseExceptionHeaders\n }\n },\n queryParameters: [\n timeoutInSeconds,\n restype2,\n comp10\n ],\n urlParameters: [url],\n headerParameters: [\n version,\n requestId,\n accept1,\n ifModifiedSince,\n ifUnmodifiedSince,\n leaseId1,\n action2\n ],\n isXML: true,\n serializer: xmlSerializer$4\n};\nconst breakLeaseOperationSpec$1 = {\n path: \"/{containerName}\",\n httpMethod: \"PUT\",\n responses: {\n 202: {\n headersMapper: ContainerBreakLeaseHeaders\n },\n default: {\n bodyMapper: StorageError,\n headersMapper: ContainerBreakLeaseExceptionHeaders\n }\n },\n queryParameters: [\n timeoutInSeconds,\n restype2,\n comp10\n ],\n urlParameters: [url],\n headerParameters: [\n version,\n requestId,\n accept1,\n ifModifiedSince,\n ifUnmodifiedSince,\n action3,\n breakPeriod\n ],\n isXML: true,\n serializer: xmlSerializer$4\n};\nconst changeLeaseOperationSpec$1 = {\n path: \"/{containerName}\",\n httpMethod: \"PUT\",\n responses: {\n 200: {\n headersMapper: ContainerChangeLeaseHeaders\n },\n default: {\n bodyMapper: StorageError,\n headersMapper: ContainerChangeLeaseExceptionHeaders\n }\n },\n queryParameters: [\n timeoutInSeconds,\n restype2,\n comp10\n ],\n urlParameters: [url],\n headerParameters: [\n version,\n requestId,\n accept1,\n ifModifiedSince,\n ifUnmodifiedSince,\n leaseId1,\n action4,\n proposedLeaseId1\n ],\n isXML: true,\n serializer: xmlSerializer$4\n};\nconst listBlobFlatSegmentOperationSpec = {\n path: \"/{containerName}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: ListBlobsFlatSegmentResponse,\n headersMapper: ContainerListBlobFlatSegmentHeaders\n },\n default: {\n bodyMapper: StorageError,\n headersMapper: ContainerListBlobFlatSegmentExceptionHeaders\n }\n },\n queryParameters: [\n timeoutInSeconds,\n comp2,\n prefix,\n marker,\n maxPageSize,\n restype2,\n include1\n ],\n urlParameters: [url],\n headerParameters: [\n version,\n requestId,\n accept1\n ],\n isXML: true,\n serializer: xmlSerializer$4\n};\nconst listBlobHierarchySegmentOperationSpec = {\n path: \"/{containerName}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: ListBlobsHierarchySegmentResponse,\n headersMapper: ContainerListBlobHierarchySegmentHeaders\n },\n default: {\n bodyMapper: StorageError,\n headersMapper: ContainerListBlobHierarchySegmentExceptionHeaders\n }\n },\n queryParameters: [\n timeoutInSeconds,\n comp2,\n prefix,\n marker,\n maxPageSize,\n restype2,\n include1,\n delimiter\n ],\n urlParameters: [url],\n headerParameters: [\n version,\n requestId,\n accept1\n ],\n isXML: true,\n serializer: xmlSerializer$4\n};\nconst getAccountInfoOperationSpec$1 = {\n path: \"/{containerName}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n headersMapper: ContainerGetAccountInfoHeaders\n },\n default: {\n bodyMapper: StorageError,\n headersMapper: ContainerGetAccountInfoExceptionHeaders\n }\n },\n queryParameters: [comp, restype1],\n urlParameters: [url],\n headerParameters: [version, accept1],\n isXML: true,\n serializer: xmlSerializer$4\n};\n\n/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n/** Class representing a Blob. */\nclass Blob$1 {\n /**\n * Initialize a new instance of the class Blob class.\n * @param client Reference to the service client\n */\n constructor(client) {\n this.client = client;\n }\n /**\n * The Download operation reads or downloads a blob from the system, including its metadata and\n * properties. You can also call Download to read a snapshot.\n * @param options The options parameters.\n */\n download(options) {\n const operationArguments = {\n options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})\n };\n return this.client.sendOperationRequest(operationArguments, downloadOperationSpec);\n }\n /**\n * The Get Properties operation returns all user-defined metadata, standard HTTP properties, and system\n * properties for the blob. It does not return the content of the blob.\n * @param options The options parameters.\n */\n getProperties(options) {\n const operationArguments = {\n options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})\n };\n return this.client.sendOperationRequest(operationArguments, getPropertiesOperationSpec);\n }\n /**\n * If the storage account's soft delete feature is disabled then, when a blob is deleted, it is\n * permanently removed from the storage account. If the storage account's soft delete feature is\n * enabled, then, when a blob is deleted, it is marked for deletion and becomes inaccessible\n * immediately. However, the blob service retains the blob or snapshot for the number of days specified\n * by the DeleteRetentionPolicy section of [Storage service properties]\n * (Set-Blob-Service-Properties.md). After the specified number of days has passed, the blob's data is\n * permanently removed from the storage account. Note that you continue to be charged for the\n * soft-deleted blob's storage until it is permanently removed. Use the List Blobs API and specify the\n * \"include=deleted\" query parameter to discover which blobs and snapshots have been soft deleted. You\n * can then use the Undelete Blob API to restore a soft-deleted blob. All other operations on a\n * soft-deleted blob or snapshot causes the service to return an HTTP status code of 404\n * (ResourceNotFound).\n * @param options The options parameters.\n */\n delete(options) {\n const operationArguments = {\n options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})\n };\n return this.client.sendOperationRequest(operationArguments, deleteOperationSpec);\n }\n /**\n * Undelete a blob that was previously soft deleted\n * @param options The options parameters.\n */\n undelete(options) {\n const operationArguments = {\n options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})\n };\n return this.client.sendOperationRequest(operationArguments, undeleteOperationSpec);\n }\n /**\n * Sets the time a blob will expire and be deleted.\n * @param expiryOptions Required. Indicates mode of the expiry time\n * @param options The options parameters.\n */\n setExpiry(expiryOptions, options) {\n const operationArguments = {\n expiryOptions,\n options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})\n };\n return this.client.sendOperationRequest(operationArguments, setExpiryOperationSpec);\n }\n /**\n * The Set HTTP Headers operation sets system properties on the blob\n * @param options The options parameters.\n */\n setHttpHeaders(options) {\n const operationArguments = {\n options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})\n };\n return this.client.sendOperationRequest(operationArguments, setHttpHeadersOperationSpec);\n }\n /**\n * The Set Immutability Policy operation sets the immutability policy on the blob\n * @param options The options parameters.\n */\n setImmutabilityPolicy(options) {\n const operationArguments = {\n options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})\n };\n return this.client.sendOperationRequest(operationArguments, setImmutabilityPolicyOperationSpec);\n }\n /**\n * The Delete Immutability Policy operation deletes the immutability policy on the blob\n * @param options The options parameters.\n */\n deleteImmutabilityPolicy(options) {\n const operationArguments = {\n options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})\n };\n return this.client.sendOperationRequest(operationArguments, deleteImmutabilityPolicyOperationSpec);\n }\n /**\n * The Set Legal Hold operation sets a legal hold on the blob.\n * @param legalHold Specified if a legal hold should be set on the blob.\n * @param options The options parameters.\n */\n setLegalHold(legalHold, options) {\n const operationArguments = {\n legalHold,\n options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})\n };\n return this.client.sendOperationRequest(operationArguments, setLegalHoldOperationSpec);\n }\n /**\n * The Set Blob Metadata operation sets user-defined metadata for the specified blob as one or more\n * name-value pairs\n * @param options The options parameters.\n */\n setMetadata(options) {\n const operationArguments = {\n options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})\n };\n return this.client.sendOperationRequest(operationArguments, setMetadataOperationSpec);\n }\n /**\n * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete\n * operations\n * @param options The options parameters.\n */\n acquireLease(options) {\n const operationArguments = {\n options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})\n };\n return this.client.sendOperationRequest(operationArguments, acquireLeaseOperationSpec);\n }\n /**\n * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete\n * operations\n * @param leaseId Specifies the current lease ID on the resource.\n * @param options The options parameters.\n */\n releaseLease(leaseId, options) {\n const operationArguments = {\n leaseId,\n options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})\n };\n return this.client.sendOperationRequest(operationArguments, releaseLeaseOperationSpec);\n }\n /**\n * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete\n * operations\n * @param leaseId Specifies the current lease ID on the resource.\n * @param options The options parameters.\n */\n renewLease(leaseId, options) {\n const operationArguments = {\n leaseId,\n options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})\n };\n return this.client.sendOperationRequest(operationArguments, renewLeaseOperationSpec);\n }\n /**\n * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete\n * operations\n * @param leaseId Specifies the current lease ID on the resource.\n * @param proposedLeaseId Proposed lease ID, in a GUID string format. The Blob service returns 400\n * (Invalid request) if the proposed lease ID is not in the correct format. See Guid Constructor\n * (String) for a list of valid GUID string formats.\n * @param options The options parameters.\n */\n changeLease(leaseId, proposedLeaseId, options) {\n const operationArguments = {\n leaseId,\n proposedLeaseId,\n options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})\n };\n return this.client.sendOperationRequest(operationArguments, changeLeaseOperationSpec);\n }\n /**\n * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete\n * operations\n * @param options The options parameters.\n */\n breakLease(options) {\n const operationArguments = {\n options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})\n };\n return this.client.sendOperationRequest(operationArguments, breakLeaseOperationSpec);\n }\n /**\n * The Create Snapshot operation creates a read-only snapshot of a blob\n * @param options The options parameters.\n */\n createSnapshot(options) {\n const operationArguments = {\n options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})\n };\n return this.client.sendOperationRequest(operationArguments, createSnapshotOperationSpec);\n }\n /**\n * The Start Copy From URL operation copies a blob or an internet resource to a new blob.\n * @param copySource Specifies the name of the source page blob snapshot. This value is a URL of up to\n * 2 KB in length that specifies a page blob snapshot. The value should be URL-encoded as it would\n * appear in a request URI. The source blob must either be public or must be authenticated via a shared\n * access signature.\n * @param options The options parameters.\n */\n startCopyFromURL(copySource, options) {\n const operationArguments = {\n copySource,\n options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})\n };\n return this.client.sendOperationRequest(operationArguments, startCopyFromURLOperationSpec);\n }\n /**\n * The Copy From URL operation copies a blob or an internet resource to a new blob. It will not return\n * a response until the copy is complete.\n * @param copySource Specifies the name of the source page blob snapshot. This value is a URL of up to\n * 2 KB in length that specifies a page blob snapshot. The value should be URL-encoded as it would\n * appear in a request URI. The source blob must either be public or must be authenticated via a shared\n * access signature.\n * @param options The options parameters.\n */\n copyFromURL(copySource, options) {\n const operationArguments = {\n copySource,\n options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})\n };\n return this.client.sendOperationRequest(operationArguments, copyFromURLOperationSpec);\n }\n /**\n * The Abort Copy From URL operation aborts a pending Copy From URL operation, and leaves a destination\n * blob with zero length and full metadata.\n * @param copyId The copy identifier provided in the x-ms-copy-id header of the original Copy Blob\n * operation.\n * @param options The options parameters.\n */\n abortCopyFromURL(copyId, options) {\n const operationArguments = {\n copyId,\n options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})\n };\n return this.client.sendOperationRequest(operationArguments, abortCopyFromURLOperationSpec);\n }\n /**\n * The Set Tier operation sets the tier on a blob. The operation is allowed on a page blob in a premium\n * storage account and on a block blob in a blob storage account (locally redundant storage only). A\n * premium page blob's tier determines the allowed size, IOPS, and bandwidth of the blob. A block\n * blob's tier determines Hot/Cool/Archive storage type. This operation does not update the blob's\n * ETag.\n * @param tier Indicates the tier to be set on the blob.\n * @param options The options parameters.\n */\n setTier(tier, options) {\n const operationArguments = {\n tier,\n options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})\n };\n return this.client.sendOperationRequest(operationArguments, setTierOperationSpec);\n }\n /**\n * Returns the sku name and account kind\n * @param options The options parameters.\n */\n getAccountInfo(options) {\n const operationArguments = {\n options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})\n };\n return this.client.sendOperationRequest(operationArguments, getAccountInfoOperationSpec);\n }\n /**\n * The Query operation enables users to select/project on blob data by providing simple query\n * expressions.\n * @param options The options parameters.\n */\n query(options) {\n const operationArguments = {\n options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})\n };\n return this.client.sendOperationRequest(operationArguments, queryOperationSpec);\n }\n /**\n * The Get Tags operation enables users to get the tags associated with a blob.\n * @param options The options parameters.\n */\n getTags(options) {\n const operationArguments = {\n options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})\n };\n return this.client.sendOperationRequest(operationArguments, getTagsOperationSpec);\n }\n /**\n * The Set Tags operation enables users to set tags on a blob.\n * @param options The options parameters.\n */\n setTags(options) {\n const operationArguments = {\n options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})\n };\n return this.client.sendOperationRequest(operationArguments, setTagsOperationSpec);\n }\n}\n// Operation Specifications\nconst xmlSerializer$3 = new coreHttp__namespace.Serializer(Mappers, /* isXml */ true);\nconst downloadOperationSpec = {\n path: \"/{containerName}/{blob}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: {\n type: { name: \"Stream\" },\n serializedName: \"parsedResponse\"\n },\n headersMapper: BlobDownloadHeaders\n },\n 206: {\n bodyMapper: {\n type: { name: \"Stream\" },\n serializedName: \"parsedResponse\"\n },\n headersMapper: BlobDownloadHeaders\n },\n default: {\n bodyMapper: StorageError,\n headersMapper: BlobDownloadExceptionHeaders\n }\n },\n queryParameters: [\n timeoutInSeconds,\n snapshot,\n versionId\n ],\n urlParameters: [url],\n headerParameters: [\n version,\n requestId,\n accept1,\n leaseId,\n ifModifiedSince,\n ifUnmodifiedSince,\n range,\n rangeGetContentMD5,\n rangeGetContentCRC64,\n encryptionKey,\n encryptionKeySha256,\n encryptionAlgorithm,\n ifMatch,\n ifNoneMatch,\n ifTags\n ],\n isXML: true,\n serializer: xmlSerializer$3\n};\nconst getPropertiesOperationSpec = {\n path: \"/{containerName}/{blob}\",\n httpMethod: \"HEAD\",\n responses: {\n 200: {\n headersMapper: BlobGetPropertiesHeaders\n },\n default: {\n bodyMapper: StorageError,\n headersMapper: BlobGetPropertiesExceptionHeaders\n }\n },\n queryParameters: [\n timeoutInSeconds,\n snapshot,\n versionId\n ],\n urlParameters: [url],\n headerParameters: [\n version,\n requestId,\n accept1,\n leaseId,\n ifModifiedSince,\n ifUnmodifiedSince,\n encryptionKey,\n encryptionKeySha256,\n encryptionAlgorithm,\n ifMatch,\n ifNoneMatch,\n ifTags\n ],\n isXML: true,\n serializer: xmlSerializer$3\n};\nconst deleteOperationSpec = {\n path: \"/{containerName}/{blob}\",\n httpMethod: \"DELETE\",\n responses: {\n 202: {\n headersMapper: BlobDeleteHeaders\n },\n default: {\n bodyMapper: StorageError,\n headersMapper: BlobDeleteExceptionHeaders\n }\n },\n queryParameters: [\n timeoutInSeconds,\n snapshot,\n versionId,\n blobDeleteType\n ],\n urlParameters: [url],\n headerParameters: [\n version,\n requestId,\n accept1,\n leaseId,\n ifModifiedSince,\n ifUnmodifiedSince,\n ifMatch,\n ifNoneMatch,\n ifTags,\n deleteSnapshots\n ],\n isXML: true,\n serializer: xmlSerializer$3\n};\nconst undeleteOperationSpec = {\n path: \"/{containerName}/{blob}\",\n httpMethod: \"PUT\",\n responses: {\n 200: {\n headersMapper: BlobUndeleteHeaders\n },\n default: {\n bodyMapper: StorageError,\n headersMapper: BlobUndeleteExceptionHeaders\n }\n },\n queryParameters: [timeoutInSeconds, comp8],\n urlParameters: [url],\n headerParameters: [\n version,\n requestId,\n accept1\n ],\n isXML: true,\n serializer: xmlSerializer$3\n};\nconst setExpiryOperationSpec = {\n path: \"/{containerName}/{blob}\",\n httpMethod: \"PUT\",\n responses: {\n 200: {\n headersMapper: BlobSetExpiryHeaders\n },\n default: {\n bodyMapper: StorageError,\n headersMapper: BlobSetExpiryExceptionHeaders\n }\n },\n queryParameters: [timeoutInSeconds, comp11],\n urlParameters: [url],\n headerParameters: [\n version,\n requestId,\n accept1,\n expiryOptions,\n expiresOn\n ],\n isXML: true,\n serializer: xmlSerializer$3\n};\nconst setHttpHeadersOperationSpec = {\n path: \"/{containerName}/{blob}\",\n httpMethod: \"PUT\",\n responses: {\n 200: {\n headersMapper: BlobSetHttpHeadersHeaders\n },\n default: {\n bodyMapper: StorageError,\n headersMapper: BlobSetHttpHeadersExceptionHeaders\n }\n },\n queryParameters: [comp, timeoutInSeconds],\n urlParameters: [url],\n headerParameters: [\n version,\n requestId,\n accept1,\n leaseId,\n ifModifiedSince,\n ifUnmodifiedSince,\n ifMatch,\n ifNoneMatch,\n ifTags,\n blobCacheControl,\n blobContentType,\n blobContentMD5,\n blobContentEncoding,\n blobContentLanguage,\n blobContentDisposition\n ],\n isXML: true,\n serializer: xmlSerializer$3\n};\nconst setImmutabilityPolicyOperationSpec = {\n path: \"/{containerName}/{blob}\",\n httpMethod: \"PUT\",\n responses: {\n 200: {\n headersMapper: BlobSetImmutabilityPolicyHeaders\n },\n default: {\n bodyMapper: StorageError,\n headersMapper: BlobSetImmutabilityPolicyExceptionHeaders\n }\n },\n queryParameters: [timeoutInSeconds, comp12],\n urlParameters: [url],\n headerParameters: [\n version,\n requestId,\n accept1,\n ifUnmodifiedSince,\n immutabilityPolicyExpiry,\n immutabilityPolicyMode\n ],\n isXML: true,\n serializer: xmlSerializer$3\n};\nconst deleteImmutabilityPolicyOperationSpec = {\n path: \"/{containerName}/{blob}\",\n httpMethod: \"DELETE\",\n responses: {\n 200: {\n headersMapper: BlobDeleteImmutabilityPolicyHeaders\n },\n default: {\n bodyMapper: StorageError,\n headersMapper: BlobDeleteImmutabilityPolicyExceptionHeaders\n }\n },\n queryParameters: [timeoutInSeconds, comp12],\n urlParameters: [url],\n headerParameters: [\n version,\n requestId,\n accept1\n ],\n isXML: true,\n serializer: xmlSerializer$3\n};\nconst setLegalHoldOperationSpec = {\n path: \"/{containerName}/{blob}\",\n httpMethod: \"PUT\",\n responses: {\n 200: {\n headersMapper: BlobSetLegalHoldHeaders\n },\n default: {\n bodyMapper: StorageError,\n headersMapper: BlobSetLegalHoldExceptionHeaders\n }\n },\n queryParameters: [timeoutInSeconds, comp13],\n urlParameters: [url],\n headerParameters: [\n version,\n requestId,\n accept1,\n legalHold\n ],\n isXML: true,\n serializer: xmlSerializer$3\n};\nconst setMetadataOperationSpec = {\n path: \"/{containerName}/{blob}\",\n httpMethod: \"PUT\",\n responses: {\n 200: {\n headersMapper: BlobSetMetadataHeaders\n },\n default: {\n bodyMapper: StorageError,\n headersMapper: BlobSetMetadataExceptionHeaders\n }\n },\n queryParameters: [timeoutInSeconds, comp6],\n urlParameters: [url],\n headerParameters: [\n version,\n requestId,\n accept1,\n metadata,\n leaseId,\n ifModifiedSince,\n ifUnmodifiedSince,\n encryptionKey,\n encryptionKeySha256,\n encryptionAlgorithm,\n ifMatch,\n ifNoneMatch,\n ifTags,\n encryptionScope\n ],\n isXML: true,\n serializer: xmlSerializer$3\n};\nconst acquireLeaseOperationSpec = {\n path: \"/{containerName}/{blob}\",\n httpMethod: \"PUT\",\n responses: {\n 201: {\n headersMapper: BlobAcquireLeaseHeaders\n },\n default: {\n bodyMapper: StorageError,\n headersMapper: BlobAcquireLeaseExceptionHeaders\n }\n },\n queryParameters: [timeoutInSeconds, comp10],\n urlParameters: [url],\n headerParameters: [\n version,\n requestId,\n accept1,\n ifModifiedSince,\n ifUnmodifiedSince,\n action,\n duration,\n proposedLeaseId,\n ifMatch,\n ifNoneMatch,\n ifTags\n ],\n isXML: true,\n serializer: xmlSerializer$3\n};\nconst releaseLeaseOperationSpec = {\n path: \"/{containerName}/{blob}\",\n httpMethod: \"PUT\",\n responses: {\n 200: {\n headersMapper: BlobReleaseLeaseHeaders\n },\n default: {\n bodyMapper: StorageError,\n headersMapper: BlobReleaseLeaseExceptionHeaders\n }\n },\n queryParameters: [timeoutInSeconds, comp10],\n urlParameters: [url],\n headerParameters: [\n version,\n requestId,\n accept1,\n ifModifiedSince,\n ifUnmodifiedSince,\n action1,\n leaseId1,\n ifMatch,\n ifNoneMatch,\n ifTags\n ],\n isXML: true,\n serializer: xmlSerializer$3\n};\nconst renewLeaseOperationSpec = {\n path: \"/{containerName}/{blob}\",\n httpMethod: \"PUT\",\n responses: {\n 200: {\n headersMapper: BlobRenewLeaseHeaders\n },\n default: {\n bodyMapper: StorageError,\n headersMapper: BlobRenewLeaseExceptionHeaders\n }\n },\n queryParameters: [timeoutInSeconds, comp10],\n urlParameters: [url],\n headerParameters: [\n version,\n requestId,\n accept1,\n ifModifiedSince,\n ifUnmodifiedSince,\n leaseId1,\n action2,\n ifMatch,\n ifNoneMatch,\n ifTags\n ],\n isXML: true,\n serializer: xmlSerializer$3\n};\nconst changeLeaseOperationSpec = {\n path: \"/{containerName}/{blob}\",\n httpMethod: \"PUT\",\n responses: {\n 200: {\n headersMapper: BlobChangeLeaseHeaders\n },\n default: {\n bodyMapper: StorageError,\n headersMapper: BlobChangeLeaseExceptionHeaders\n }\n },\n queryParameters: [timeoutInSeconds, comp10],\n urlParameters: [url],\n headerParameters: [\n version,\n requestId,\n accept1,\n ifModifiedSince,\n ifUnmodifiedSince,\n leaseId1,\n action4,\n proposedLeaseId1,\n ifMatch,\n ifNoneMatch,\n ifTags\n ],\n isXML: true,\n serializer: xmlSerializer$3\n};\nconst breakLeaseOperationSpec = {\n path: \"/{containerName}/{blob}\",\n httpMethod: \"PUT\",\n responses: {\n 202: {\n headersMapper: BlobBreakLeaseHeaders\n },\n default: {\n bodyMapper: StorageError,\n headersMapper: BlobBreakLeaseExceptionHeaders\n }\n },\n queryParameters: [timeoutInSeconds, comp10],\n urlParameters: [url],\n headerParameters: [\n version,\n requestId,\n accept1,\n ifModifiedSince,\n ifUnmodifiedSince,\n action3,\n breakPeriod,\n ifMatch,\n ifNoneMatch,\n ifTags\n ],\n isXML: true,\n serializer: xmlSerializer$3\n};\nconst createSnapshotOperationSpec = {\n path: \"/{containerName}/{blob}\",\n httpMethod: \"PUT\",\n responses: {\n 201: {\n headersMapper: BlobCreateSnapshotHeaders\n },\n default: {\n bodyMapper: StorageError,\n headersMapper: BlobCreateSnapshotExceptionHeaders\n }\n },\n queryParameters: [timeoutInSeconds, comp14],\n urlParameters: [url],\n headerParameters: [\n version,\n requestId,\n accept1,\n metadata,\n leaseId,\n ifModifiedSince,\n ifUnmodifiedSince,\n encryptionKey,\n encryptionKeySha256,\n encryptionAlgorithm,\n ifMatch,\n ifNoneMatch,\n ifTags,\n encryptionScope\n ],\n isXML: true,\n serializer: xmlSerializer$3\n};\nconst startCopyFromURLOperationSpec = {\n path: \"/{containerName}/{blob}\",\n httpMethod: \"PUT\",\n responses: {\n 202: {\n headersMapper: BlobStartCopyFromURLHeaders\n },\n default: {\n bodyMapper: StorageError,\n headersMapper: BlobStartCopyFromURLExceptionHeaders\n }\n },\n queryParameters: [timeoutInSeconds],\n urlParameters: [url],\n headerParameters: [\n version,\n requestId,\n accept1,\n metadata,\n leaseId,\n ifModifiedSince,\n ifUnmodifiedSince,\n ifMatch,\n ifNoneMatch,\n ifTags,\n immutabilityPolicyExpiry,\n immutabilityPolicyMode,\n tier,\n rehydratePriority,\n sourceIfModifiedSince,\n sourceIfUnmodifiedSince,\n sourceIfMatch,\n sourceIfNoneMatch,\n sourceIfTags,\n copySource,\n blobTagsString,\n sealBlob,\n legalHold1\n ],\n isXML: true,\n serializer: xmlSerializer$3\n};\nconst copyFromURLOperationSpec = {\n path: \"/{containerName}/{blob}\",\n httpMethod: \"PUT\",\n responses: {\n 202: {\n headersMapper: BlobCopyFromURLHeaders\n },\n default: {\n bodyMapper: StorageError,\n headersMapper: BlobCopyFromURLExceptionHeaders\n }\n },\n queryParameters: [timeoutInSeconds],\n urlParameters: [url],\n headerParameters: [\n version,\n requestId,\n accept1,\n metadata,\n leaseId,\n ifModifiedSince,\n ifUnmodifiedSince,\n ifMatch,\n ifNoneMatch,\n ifTags,\n immutabilityPolicyExpiry,\n immutabilityPolicyMode,\n encryptionScope,\n tier,\n sourceIfModifiedSince,\n sourceIfUnmodifiedSince,\n sourceIfMatch,\n sourceIfNoneMatch,\n copySource,\n blobTagsString,\n legalHold1,\n xMsRequiresSync,\n sourceContentMD5,\n copySourceAuthorization,\n copySourceTags\n ],\n isXML: true,\n serializer: xmlSerializer$3\n};\nconst abortCopyFromURLOperationSpec = {\n path: \"/{containerName}/{blob}\",\n httpMethod: \"PUT\",\n responses: {\n 204: {\n headersMapper: BlobAbortCopyFromURLHeaders\n },\n default: {\n bodyMapper: StorageError,\n headersMapper: BlobAbortCopyFromURLExceptionHeaders\n }\n },\n queryParameters: [\n timeoutInSeconds,\n comp15,\n copyId\n ],\n urlParameters: [url],\n headerParameters: [\n version,\n requestId,\n accept1,\n leaseId,\n copyActionAbortConstant\n ],\n isXML: true,\n serializer: xmlSerializer$3\n};\nconst setTierOperationSpec = {\n path: \"/{containerName}/{blob}\",\n httpMethod: \"PUT\",\n responses: {\n 200: {\n headersMapper: BlobSetTierHeaders\n },\n 202: {\n headersMapper: BlobSetTierHeaders\n },\n default: {\n bodyMapper: StorageError,\n headersMapper: BlobSetTierExceptionHeaders\n }\n },\n queryParameters: [\n timeoutInSeconds,\n snapshot,\n versionId,\n comp16\n ],\n urlParameters: [url],\n headerParameters: [\n version,\n requestId,\n accept1,\n leaseId,\n ifTags,\n rehydratePriority,\n tier1\n ],\n isXML: true,\n serializer: xmlSerializer$3\n};\nconst getAccountInfoOperationSpec = {\n path: \"/{containerName}/{blob}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n headersMapper: BlobGetAccountInfoHeaders\n },\n default: {\n bodyMapper: StorageError,\n headersMapper: BlobGetAccountInfoExceptionHeaders\n }\n },\n queryParameters: [comp, restype1],\n urlParameters: [url],\n headerParameters: [version, accept1],\n isXML: true,\n serializer: xmlSerializer$3\n};\nconst queryOperationSpec = {\n path: \"/{containerName}/{blob}\",\n httpMethod: \"POST\",\n responses: {\n 200: {\n bodyMapper: {\n type: { name: \"Stream\" },\n serializedName: \"parsedResponse\"\n },\n headersMapper: BlobQueryHeaders\n },\n 206: {\n bodyMapper: {\n type: { name: \"Stream\" },\n serializedName: \"parsedResponse\"\n },\n headersMapper: BlobQueryHeaders\n },\n default: {\n bodyMapper: StorageError,\n headersMapper: BlobQueryExceptionHeaders\n }\n },\n requestBody: queryRequest,\n queryParameters: [\n timeoutInSeconds,\n snapshot,\n comp17\n ],\n urlParameters: [url],\n headerParameters: [\n contentType,\n accept,\n version,\n requestId,\n leaseId,\n ifModifiedSince,\n ifUnmodifiedSince,\n encryptionKey,\n encryptionKeySha256,\n encryptionAlgorithm,\n ifMatch,\n ifNoneMatch,\n ifTags\n ],\n isXML: true,\n contentType: \"application/xml; charset=utf-8\",\n mediaType: \"xml\",\n serializer: xmlSerializer$3\n};\nconst getTagsOperationSpec = {\n path: \"/{containerName}/{blob}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: BlobTags,\n headersMapper: BlobGetTagsHeaders\n },\n default: {\n bodyMapper: StorageError,\n headersMapper: BlobGetTagsExceptionHeaders\n }\n },\n queryParameters: [\n timeoutInSeconds,\n snapshot,\n versionId,\n comp18\n ],\n urlParameters: [url],\n headerParameters: [\n version,\n requestId,\n accept1,\n leaseId,\n ifTags\n ],\n isXML: true,\n serializer: xmlSerializer$3\n};\nconst setTagsOperationSpec = {\n path: \"/{containerName}/{blob}\",\n httpMethod: \"PUT\",\n responses: {\n 204: {\n headersMapper: BlobSetTagsHeaders\n },\n default: {\n bodyMapper: StorageError,\n headersMapper: BlobSetTagsExceptionHeaders\n }\n },\n requestBody: tags,\n queryParameters: [\n timeoutInSeconds,\n versionId,\n comp18\n ],\n urlParameters: [url],\n headerParameters: [\n contentType,\n accept,\n version,\n requestId,\n leaseId,\n ifTags,\n transactionalContentMD5,\n transactionalContentCrc64\n ],\n isXML: true,\n contentType: \"application/xml; charset=utf-8\",\n mediaType: \"xml\",\n serializer: xmlSerializer$3\n};\n\n/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n/** Class representing a PageBlob. */\nclass PageBlob {\n /**\n * Initialize a new instance of the class PageBlob class.\n * @param client Reference to the service client\n */\n constructor(client) {\n this.client = client;\n }\n /**\n * The Create operation creates a new page blob.\n * @param contentLength The length of the request.\n * @param blobContentLength This header specifies the maximum size for the page blob, up to 1 TB. The\n * page blob size must be aligned to a 512-byte boundary.\n * @param options The options parameters.\n */\n create(contentLength, blobContentLength, options) {\n const operationArguments = {\n contentLength,\n blobContentLength,\n options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})\n };\n return this.client.sendOperationRequest(operationArguments, createOperationSpec$1);\n }\n /**\n * The Upload Pages operation writes a range of pages to a page blob\n * @param contentLength The length of the request.\n * @param body Initial data\n * @param options The options parameters.\n */\n uploadPages(contentLength, body, options) {\n const operationArguments = {\n contentLength,\n body,\n options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})\n };\n return this.client.sendOperationRequest(operationArguments, uploadPagesOperationSpec);\n }\n /**\n * The Clear Pages operation clears a set of pages from a page blob\n * @param contentLength The length of the request.\n * @param options The options parameters.\n */\n clearPages(contentLength, options) {\n const operationArguments = {\n contentLength,\n options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})\n };\n return this.client.sendOperationRequest(operationArguments, clearPagesOperationSpec);\n }\n /**\n * The Upload Pages operation writes a range of pages to a page blob where the contents are read from a\n * URL\n * @param sourceUrl Specify a URL to the copy source.\n * @param sourceRange Bytes of source data in the specified range. The length of this range should\n * match the ContentLength header and x-ms-range/Range destination range header.\n * @param contentLength The length of the request.\n * @param range The range of bytes to which the source range would be written. The range should be 512\n * aligned and range-end is required.\n * @param options The options parameters.\n */\n uploadPagesFromURL(sourceUrl, sourceRange, contentLength, range, options) {\n const operationArguments = {\n sourceUrl,\n sourceRange,\n contentLength,\n range,\n options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})\n };\n return this.client.sendOperationRequest(operationArguments, uploadPagesFromURLOperationSpec);\n }\n /**\n * The Get Page Ranges operation returns the list of valid page ranges for a page blob or snapshot of a\n * page blob\n * @param options The options parameters.\n */\n getPageRanges(options) {\n const operationArguments = {\n options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})\n };\n return this.client.sendOperationRequest(operationArguments, getPageRangesOperationSpec);\n }\n /**\n * The Get Page Ranges Diff operation returns the list of valid page ranges for a page blob that were\n * changed between target blob and previous snapshot.\n * @param options The options parameters.\n */\n getPageRangesDiff(options) {\n const operationArguments = {\n options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})\n };\n return this.client.sendOperationRequest(operationArguments, getPageRangesDiffOperationSpec);\n }\n /**\n * Resize the Blob\n * @param blobContentLength This header specifies the maximum size for the page blob, up to 1 TB. The\n * page blob size must be aligned to a 512-byte boundary.\n * @param options The options parameters.\n */\n resize(blobContentLength, options) {\n const operationArguments = {\n blobContentLength,\n options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})\n };\n return this.client.sendOperationRequest(operationArguments, resizeOperationSpec);\n }\n /**\n * Update the sequence number of the blob\n * @param sequenceNumberAction Required if the x-ms-blob-sequence-number header is set for the request.\n * This property applies to page blobs only. This property indicates how the service should modify the\n * blob's sequence number\n * @param options The options parameters.\n */\n updateSequenceNumber(sequenceNumberAction, options) {\n const operationArguments = {\n sequenceNumberAction,\n options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})\n };\n return this.client.sendOperationRequest(operationArguments, updateSequenceNumberOperationSpec);\n }\n /**\n * The Copy Incremental operation copies a snapshot of the source page blob to a destination page blob.\n * The snapshot is copied such that only the differential changes between the previously copied\n * snapshot are transferred to the destination. The copied snapshots are complete copies of the\n * original snapshot and can be read or copied from as usual. This API is supported since REST version\n * 2016-05-31.\n * @param copySource Specifies the name of the source page blob snapshot. This value is a URL of up to\n * 2 KB in length that specifies a page blob snapshot. The value should be URL-encoded as it would\n * appear in a request URI. The source blob must either be public or must be authenticated via a shared\n * access signature.\n * @param options The options parameters.\n */\n copyIncremental(copySource, options) {\n const operationArguments = {\n copySource,\n options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})\n };\n return this.client.sendOperationRequest(operationArguments, copyIncrementalOperationSpec);\n }\n}\n// Operation Specifications\nconst xmlSerializer$2 = new coreHttp__namespace.Serializer(Mappers, /* isXml */ true);\nconst serializer$2 = new coreHttp__namespace.Serializer(Mappers, /* isXml */ false);\nconst createOperationSpec$1 = {\n path: \"/{containerName}/{blob}\",\n httpMethod: \"PUT\",\n responses: {\n 201: {\n headersMapper: PageBlobCreateHeaders\n },\n default: {\n bodyMapper: StorageError,\n headersMapper: PageBlobCreateExceptionHeaders\n }\n },\n queryParameters: [timeoutInSeconds],\n urlParameters: [url],\n headerParameters: [\n version,\n requestId,\n accept1,\n contentLength,\n metadata,\n leaseId,\n ifModifiedSince,\n ifUnmodifiedSince,\n encryptionKey,\n encryptionKeySha256,\n encryptionAlgorithm,\n ifMatch,\n ifNoneMatch,\n ifTags,\n blobCacheControl,\n blobContentType,\n blobContentMD5,\n blobContentEncoding,\n blobContentLanguage,\n blobContentDisposition,\n immutabilityPolicyExpiry,\n immutabilityPolicyMode,\n encryptionScope,\n tier,\n blobTagsString,\n legalHold1,\n blobType,\n blobContentLength,\n blobSequenceNumber\n ],\n isXML: true,\n serializer: xmlSerializer$2\n};\nconst uploadPagesOperationSpec = {\n path: \"/{containerName}/{blob}\",\n httpMethod: \"PUT\",\n responses: {\n 201: {\n headersMapper: PageBlobUploadPagesHeaders\n },\n default: {\n bodyMapper: StorageError,\n headersMapper: PageBlobUploadPagesExceptionHeaders\n }\n },\n requestBody: body1,\n queryParameters: [timeoutInSeconds, comp19],\n urlParameters: [url],\n headerParameters: [\n version,\n requestId,\n contentLength,\n leaseId,\n ifModifiedSince,\n ifUnmodifiedSince,\n range,\n encryptionKey,\n encryptionKeySha256,\n encryptionAlgorithm,\n ifMatch,\n ifNoneMatch,\n ifTags,\n encryptionScope,\n transactionalContentMD5,\n transactionalContentCrc64,\n contentType1,\n accept2,\n pageWrite,\n ifSequenceNumberLessThanOrEqualTo,\n ifSequenceNumberLessThan,\n ifSequenceNumberEqualTo\n ],\n mediaType: \"binary\",\n serializer: serializer$2\n};\nconst clearPagesOperationSpec = {\n path: \"/{containerName}/{blob}\",\n httpMethod: \"PUT\",\n responses: {\n 201: {\n headersMapper: PageBlobClearPagesHeaders\n },\n default: {\n bodyMapper: StorageError,\n headersMapper: PageBlobClearPagesExceptionHeaders\n }\n },\n queryParameters: [timeoutInSeconds, comp19],\n urlParameters: [url],\n headerParameters: [\n version,\n requestId,\n accept1,\n contentLength,\n leaseId,\n ifModifiedSince,\n ifUnmodifiedSince,\n range,\n encryptionKey,\n encryptionKeySha256,\n encryptionAlgorithm,\n ifMatch,\n ifNoneMatch,\n ifTags,\n encryptionScope,\n ifSequenceNumberLessThanOrEqualTo,\n ifSequenceNumberLessThan,\n ifSequenceNumberEqualTo,\n pageWrite1\n ],\n isXML: true,\n serializer: xmlSerializer$2\n};\nconst uploadPagesFromURLOperationSpec = {\n path: \"/{containerName}/{blob}\",\n httpMethod: \"PUT\",\n responses: {\n 201: {\n headersMapper: PageBlobUploadPagesFromURLHeaders\n },\n default: {\n bodyMapper: StorageError,\n headersMapper: PageBlobUploadPagesFromURLExceptionHeaders\n }\n },\n queryParameters: [timeoutInSeconds, comp19],\n urlParameters: [url],\n headerParameters: [\n version,\n requestId,\n accept1,\n contentLength,\n leaseId,\n ifModifiedSince,\n ifUnmodifiedSince,\n encryptionKey,\n encryptionKeySha256,\n encryptionAlgorithm,\n ifMatch,\n ifNoneMatch,\n ifTags,\n encryptionScope,\n sourceIfModifiedSince,\n sourceIfUnmodifiedSince,\n sourceIfMatch,\n sourceIfNoneMatch,\n sourceContentMD5,\n copySourceAuthorization,\n pageWrite,\n ifSequenceNumberLessThanOrEqualTo,\n ifSequenceNumberLessThan,\n ifSequenceNumberEqualTo,\n sourceUrl,\n sourceRange,\n sourceContentCrc64,\n range1\n ],\n isXML: true,\n serializer: xmlSerializer$2\n};\nconst getPageRangesOperationSpec = {\n path: \"/{containerName}/{blob}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: PageList,\n headersMapper: PageBlobGetPageRangesHeaders\n },\n default: {\n bodyMapper: StorageError,\n headersMapper: PageBlobGetPageRangesExceptionHeaders\n }\n },\n queryParameters: [\n timeoutInSeconds,\n marker,\n maxPageSize,\n snapshot,\n comp20\n ],\n urlParameters: [url],\n headerParameters: [\n version,\n requestId,\n accept1,\n leaseId,\n ifModifiedSince,\n ifUnmodifiedSince,\n range,\n ifMatch,\n ifNoneMatch,\n ifTags\n ],\n isXML: true,\n serializer: xmlSerializer$2\n};\nconst getPageRangesDiffOperationSpec = {\n path: \"/{containerName}/{blob}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: PageList,\n headersMapper: PageBlobGetPageRangesDiffHeaders\n },\n default: {\n bodyMapper: StorageError,\n headersMapper: PageBlobGetPageRangesDiffExceptionHeaders\n }\n },\n queryParameters: [\n timeoutInSeconds,\n marker,\n maxPageSize,\n snapshot,\n comp20,\n prevsnapshot\n ],\n urlParameters: [url],\n headerParameters: [\n version,\n requestId,\n accept1,\n leaseId,\n ifModifiedSince,\n ifUnmodifiedSince,\n range,\n ifMatch,\n ifNoneMatch,\n ifTags,\n prevSnapshotUrl\n ],\n isXML: true,\n serializer: xmlSerializer$2\n};\nconst resizeOperationSpec = {\n path: \"/{containerName}/{blob}\",\n httpMethod: \"PUT\",\n responses: {\n 200: {\n headersMapper: PageBlobResizeHeaders\n },\n default: {\n bodyMapper: StorageError,\n headersMapper: PageBlobResizeExceptionHeaders\n }\n },\n queryParameters: [comp, timeoutInSeconds],\n urlParameters: [url],\n headerParameters: [\n version,\n requestId,\n accept1,\n leaseId,\n ifModifiedSince,\n ifUnmodifiedSince,\n encryptionKey,\n encryptionKeySha256,\n encryptionAlgorithm,\n ifMatch,\n ifNoneMatch,\n ifTags,\n encryptionScope,\n blobContentLength\n ],\n isXML: true,\n serializer: xmlSerializer$2\n};\nconst updateSequenceNumberOperationSpec = {\n path: \"/{containerName}/{blob}\",\n httpMethod: \"PUT\",\n responses: {\n 200: {\n headersMapper: PageBlobUpdateSequenceNumberHeaders\n },\n default: {\n bodyMapper: StorageError,\n headersMapper: PageBlobUpdateSequenceNumberExceptionHeaders\n }\n },\n queryParameters: [comp, timeoutInSeconds],\n urlParameters: [url],\n headerParameters: [\n version,\n requestId,\n accept1,\n leaseId,\n ifModifiedSince,\n ifUnmodifiedSince,\n ifMatch,\n ifNoneMatch,\n ifTags,\n blobSequenceNumber,\n sequenceNumberAction\n ],\n isXML: true,\n serializer: xmlSerializer$2\n};\nconst copyIncrementalOperationSpec = {\n path: \"/{containerName}/{blob}\",\n httpMethod: \"PUT\",\n responses: {\n 202: {\n headersMapper: PageBlobCopyIncrementalHeaders\n },\n default: {\n bodyMapper: StorageError,\n headersMapper: PageBlobCopyIncrementalExceptionHeaders\n }\n },\n queryParameters: [timeoutInSeconds, comp21],\n urlParameters: [url],\n headerParameters: [\n version,\n requestId,\n accept1,\n ifModifiedSince,\n ifUnmodifiedSince,\n ifMatch,\n ifNoneMatch,\n ifTags,\n copySource\n ],\n isXML: true,\n serializer: xmlSerializer$2\n};\n\n/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n/** Class representing a AppendBlob. */\nclass AppendBlob {\n /**\n * Initialize a new instance of the class AppendBlob class.\n * @param client Reference to the service client\n */\n constructor(client) {\n this.client = client;\n }\n /**\n * The Create Append Blob operation creates a new append blob.\n * @param contentLength The length of the request.\n * @param options The options parameters.\n */\n create(contentLength, options) {\n const operationArguments = {\n contentLength,\n options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})\n };\n return this.client.sendOperationRequest(operationArguments, createOperationSpec);\n }\n /**\n * The Append Block operation commits a new block of data to the end of an existing append blob. The\n * Append Block operation is permitted only if the blob was created with x-ms-blob-type set to\n * AppendBlob. Append Block is supported only on version 2015-02-21 version or later.\n * @param contentLength The length of the request.\n * @param body Initial data\n * @param options The options parameters.\n */\n appendBlock(contentLength, body, options) {\n const operationArguments = {\n contentLength,\n body,\n options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})\n };\n return this.client.sendOperationRequest(operationArguments, appendBlockOperationSpec);\n }\n /**\n * The Append Block operation commits a new block of data to the end of an existing append blob where\n * the contents are read from a source url. The Append Block operation is permitted only if the blob\n * was created with x-ms-blob-type set to AppendBlob. Append Block is supported only on version\n * 2015-02-21 version or later.\n * @param sourceUrl Specify a URL to the copy source.\n * @param contentLength The length of the request.\n * @param options The options parameters.\n */\n appendBlockFromUrl(sourceUrl, contentLength, options) {\n const operationArguments = {\n sourceUrl,\n contentLength,\n options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})\n };\n return this.client.sendOperationRequest(operationArguments, appendBlockFromUrlOperationSpec);\n }\n /**\n * The Seal operation seals the Append Blob to make it read-only. Seal is supported only on version\n * 2019-12-12 version or later.\n * @param options The options parameters.\n */\n seal(options) {\n const operationArguments = {\n options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})\n };\n return this.client.sendOperationRequest(operationArguments, sealOperationSpec);\n }\n}\n// Operation Specifications\nconst xmlSerializer$1 = new coreHttp__namespace.Serializer(Mappers, /* isXml */ true);\nconst serializer$1 = new coreHttp__namespace.Serializer(Mappers, /* isXml */ false);\nconst createOperationSpec = {\n path: \"/{containerName}/{blob}\",\n httpMethod: \"PUT\",\n responses: {\n 201: {\n headersMapper: AppendBlobCreateHeaders\n },\n default: {\n bodyMapper: StorageError,\n headersMapper: AppendBlobCreateExceptionHeaders\n }\n },\n queryParameters: [timeoutInSeconds],\n urlParameters: [url],\n headerParameters: [\n version,\n requestId,\n accept1,\n contentLength,\n metadata,\n leaseId,\n ifModifiedSince,\n ifUnmodifiedSince,\n encryptionKey,\n encryptionKeySha256,\n encryptionAlgorithm,\n ifMatch,\n ifNoneMatch,\n ifTags,\n blobCacheControl,\n blobContentType,\n blobContentMD5,\n blobContentEncoding,\n blobContentLanguage,\n blobContentDisposition,\n immutabilityPolicyExpiry,\n immutabilityPolicyMode,\n encryptionScope,\n blobTagsString,\n legalHold1,\n blobType1\n ],\n isXML: true,\n serializer: xmlSerializer$1\n};\nconst appendBlockOperationSpec = {\n path: \"/{containerName}/{blob}\",\n httpMethod: \"PUT\",\n responses: {\n 201: {\n headersMapper: AppendBlobAppendBlockHeaders\n },\n default: {\n bodyMapper: StorageError,\n headersMapper: AppendBlobAppendBlockExceptionHeaders\n }\n },\n requestBody: body1,\n queryParameters: [timeoutInSeconds, comp22],\n urlParameters: [url],\n headerParameters: [\n version,\n requestId,\n contentLength,\n leaseId,\n ifModifiedSince,\n ifUnmodifiedSince,\n encryptionKey,\n encryptionKeySha256,\n encryptionAlgorithm,\n ifMatch,\n ifNoneMatch,\n ifTags,\n encryptionScope,\n transactionalContentMD5,\n transactionalContentCrc64,\n contentType1,\n accept2,\n maxSize,\n appendPosition\n ],\n mediaType: \"binary\",\n serializer: serializer$1\n};\nconst appendBlockFromUrlOperationSpec = {\n path: \"/{containerName}/{blob}\",\n httpMethod: \"PUT\",\n responses: {\n 201: {\n headersMapper: AppendBlobAppendBlockFromUrlHeaders\n },\n default: {\n bodyMapper: StorageError,\n headersMapper: AppendBlobAppendBlockFromUrlExceptionHeaders\n }\n },\n queryParameters: [timeoutInSeconds, comp22],\n urlParameters: [url],\n headerParameters: [\n version,\n requestId,\n accept1,\n contentLength,\n leaseId,\n ifModifiedSince,\n ifUnmodifiedSince,\n encryptionKey,\n encryptionKeySha256,\n encryptionAlgorithm,\n ifMatch,\n ifNoneMatch,\n ifTags,\n encryptionScope,\n sourceIfModifiedSince,\n sourceIfUnmodifiedSince,\n sourceIfMatch,\n sourceIfNoneMatch,\n sourceContentMD5,\n copySourceAuthorization,\n transactionalContentMD5,\n sourceUrl,\n sourceContentCrc64,\n maxSize,\n appendPosition,\n sourceRange1\n ],\n isXML: true,\n serializer: xmlSerializer$1\n};\nconst sealOperationSpec = {\n path: \"/{containerName}/{blob}\",\n httpMethod: \"PUT\",\n responses: {\n 200: {\n headersMapper: AppendBlobSealHeaders\n },\n default: {\n bodyMapper: StorageError,\n headersMapper: AppendBlobSealExceptionHeaders\n }\n },\n queryParameters: [timeoutInSeconds, comp23],\n urlParameters: [url],\n headerParameters: [\n version,\n requestId,\n accept1,\n leaseId,\n ifModifiedSince,\n ifUnmodifiedSince,\n ifMatch,\n ifNoneMatch,\n appendPosition\n ],\n isXML: true,\n serializer: xmlSerializer$1\n};\n\n/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n/** Class representing a BlockBlob. */\nclass BlockBlob {\n /**\n * Initialize a new instance of the class BlockBlob class.\n * @param client Reference to the service client\n */\n constructor(client) {\n this.client = client;\n }\n /**\n * The Upload Block Blob operation updates the content of an existing block blob. Updating an existing\n * block blob overwrites any existing metadata on the blob. Partial updates are not supported with Put\n * Blob; the content of the existing blob is overwritten with the content of the new blob. To perform a\n * partial update of the content of a block blob, use the Put Block List operation.\n * @param contentLength The length of the request.\n * @param body Initial data\n * @param options The options parameters.\n */\n upload(contentLength, body, options) {\n const operationArguments = {\n contentLength,\n body,\n options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})\n };\n return this.client.sendOperationRequest(operationArguments, uploadOperationSpec);\n }\n /**\n * The Put Blob from URL operation creates a new Block Blob where the contents of the blob are read\n * from a given URL. This API is supported beginning with the 2020-04-08 version. Partial updates are\n * not supported with Put Blob from URL; the content of an existing blob is overwritten with the\n * content of the new blob. To perform partial updates to a block blob’s contents using a source URL,\n * use the Put Block from URL API in conjunction with Put Block List.\n * @param contentLength The length of the request.\n * @param copySource Specifies the name of the source page blob snapshot. This value is a URL of up to\n * 2 KB in length that specifies a page blob snapshot. The value should be URL-encoded as it would\n * appear in a request URI. The source blob must either be public or must be authenticated via a shared\n * access signature.\n * @param options The options parameters.\n */\n putBlobFromUrl(contentLength, copySource, options) {\n const operationArguments = {\n contentLength,\n copySource,\n options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})\n };\n return this.client.sendOperationRequest(operationArguments, putBlobFromUrlOperationSpec);\n }\n /**\n * The Stage Block operation creates a new block to be committed as part of a blob\n * @param blockId A valid Base64 string value that identifies the block. Prior to encoding, the string\n * must be less than or equal to 64 bytes in size. For a given blob, the length of the value specified\n * for the blockid parameter must be the same size for each block.\n * @param contentLength The length of the request.\n * @param body Initial data\n * @param options The options parameters.\n */\n stageBlock(blockId, contentLength, body, options) {\n const operationArguments = {\n blockId,\n contentLength,\n body,\n options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})\n };\n return this.client.sendOperationRequest(operationArguments, stageBlockOperationSpec);\n }\n /**\n * The Stage Block operation creates a new block to be committed as part of a blob where the contents\n * are read from a URL.\n * @param blockId A valid Base64 string value that identifies the block. Prior to encoding, the string\n * must be less than or equal to 64 bytes in size. For a given blob, the length of the value specified\n * for the blockid parameter must be the same size for each block.\n * @param contentLength The length of the request.\n * @param sourceUrl Specify a URL to the copy source.\n * @param options The options parameters.\n */\n stageBlockFromURL(blockId, contentLength, sourceUrl, options) {\n const operationArguments = {\n blockId,\n contentLength,\n sourceUrl,\n options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})\n };\n return this.client.sendOperationRequest(operationArguments, stageBlockFromURLOperationSpec);\n }\n /**\n * The Commit Block List operation writes a blob by specifying the list of block IDs that make up the\n * blob. In order to be written as part of a blob, a block must have been successfully written to the\n * server in a prior Put Block operation. You can call Put Block List to update a blob by uploading\n * only those blocks that have changed, then committing the new and existing blocks together. You can\n * do this by specifying whether to commit a block from the committed block list or from the\n * uncommitted block list, or to commit the most recently uploaded version of the block, whichever list\n * it may belong to.\n * @param blocks Blob Blocks.\n * @param options The options parameters.\n */\n commitBlockList(blocks, options) {\n const operationArguments = {\n blocks,\n options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})\n };\n return this.client.sendOperationRequest(operationArguments, commitBlockListOperationSpec);\n }\n /**\n * The Get Block List operation retrieves the list of blocks that have been uploaded as part of a block\n * blob\n * @param listType Specifies whether to return the list of committed blocks, the list of uncommitted\n * blocks, or both lists together.\n * @param options The options parameters.\n */\n getBlockList(listType, options) {\n const operationArguments = {\n listType,\n options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})\n };\n return this.client.sendOperationRequest(operationArguments, getBlockListOperationSpec);\n }\n}\n// Operation Specifications\nconst xmlSerializer = new coreHttp__namespace.Serializer(Mappers, /* isXml */ true);\nconst serializer = new coreHttp__namespace.Serializer(Mappers, /* isXml */ false);\nconst uploadOperationSpec = {\n path: \"/{containerName}/{blob}\",\n httpMethod: \"PUT\",\n responses: {\n 201: {\n headersMapper: BlockBlobUploadHeaders\n },\n default: {\n bodyMapper: StorageError,\n headersMapper: BlockBlobUploadExceptionHeaders\n }\n },\n requestBody: body1,\n queryParameters: [timeoutInSeconds],\n urlParameters: [url],\n headerParameters: [\n version,\n requestId,\n contentLength,\n metadata,\n leaseId,\n ifModifiedSince,\n ifUnmodifiedSince,\n encryptionKey,\n encryptionKeySha256,\n encryptionAlgorithm,\n ifMatch,\n ifNoneMatch,\n ifTags,\n blobCacheControl,\n blobContentType,\n blobContentMD5,\n blobContentEncoding,\n blobContentLanguage,\n blobContentDisposition,\n immutabilityPolicyExpiry,\n immutabilityPolicyMode,\n encryptionScope,\n tier,\n blobTagsString,\n legalHold1,\n transactionalContentMD5,\n contentType1,\n accept2,\n blobType2\n ],\n mediaType: \"binary\",\n serializer\n};\nconst putBlobFromUrlOperationSpec = {\n path: \"/{containerName}/{blob}\",\n httpMethod: \"PUT\",\n responses: {\n 201: {\n headersMapper: BlockBlobPutBlobFromUrlHeaders\n },\n default: {\n bodyMapper: StorageError,\n headersMapper: BlockBlobPutBlobFromUrlExceptionHeaders\n }\n },\n queryParameters: [timeoutInSeconds],\n urlParameters: [url],\n headerParameters: [\n version,\n requestId,\n accept1,\n contentLength,\n metadata,\n leaseId,\n ifModifiedSince,\n ifUnmodifiedSince,\n encryptionKey,\n encryptionKeySha256,\n encryptionAlgorithm,\n ifMatch,\n ifNoneMatch,\n ifTags,\n blobCacheControl,\n blobContentType,\n blobContentMD5,\n blobContentEncoding,\n blobContentLanguage,\n blobContentDisposition,\n encryptionScope,\n tier,\n sourceIfModifiedSince,\n sourceIfUnmodifiedSince,\n sourceIfMatch,\n sourceIfNoneMatch,\n sourceIfTags,\n copySource,\n blobTagsString,\n sourceContentMD5,\n copySourceAuthorization,\n copySourceTags,\n transactionalContentMD5,\n blobType2,\n copySourceBlobProperties\n ],\n isXML: true,\n serializer: xmlSerializer\n};\nconst stageBlockOperationSpec = {\n path: \"/{containerName}/{blob}\",\n httpMethod: \"PUT\",\n responses: {\n 201: {\n headersMapper: BlockBlobStageBlockHeaders\n },\n default: {\n bodyMapper: StorageError,\n headersMapper: BlockBlobStageBlockExceptionHeaders\n }\n },\n requestBody: body1,\n queryParameters: [\n timeoutInSeconds,\n comp24,\n blockId\n ],\n urlParameters: [url],\n headerParameters: [\n version,\n requestId,\n contentLength,\n leaseId,\n encryptionKey,\n encryptionKeySha256,\n encryptionAlgorithm,\n encryptionScope,\n transactionalContentMD5,\n transactionalContentCrc64,\n contentType1,\n accept2\n ],\n mediaType: \"binary\",\n serializer\n};\nconst stageBlockFromURLOperationSpec = {\n path: \"/{containerName}/{blob}\",\n httpMethod: \"PUT\",\n responses: {\n 201: {\n headersMapper: BlockBlobStageBlockFromURLHeaders\n },\n default: {\n bodyMapper: StorageError,\n headersMapper: BlockBlobStageBlockFromURLExceptionHeaders\n }\n },\n queryParameters: [\n timeoutInSeconds,\n comp24,\n blockId\n ],\n urlParameters: [url],\n headerParameters: [\n version,\n requestId,\n accept1,\n contentLength,\n leaseId,\n encryptionKey,\n encryptionKeySha256,\n encryptionAlgorithm,\n encryptionScope,\n sourceIfModifiedSince,\n sourceIfUnmodifiedSince,\n sourceIfMatch,\n sourceIfNoneMatch,\n sourceContentMD5,\n copySourceAuthorization,\n sourceUrl,\n sourceContentCrc64,\n sourceRange1\n ],\n isXML: true,\n serializer: xmlSerializer\n};\nconst commitBlockListOperationSpec = {\n path: \"/{containerName}/{blob}\",\n httpMethod: \"PUT\",\n responses: {\n 201: {\n headersMapper: BlockBlobCommitBlockListHeaders\n },\n default: {\n bodyMapper: StorageError,\n headersMapper: BlockBlobCommitBlockListExceptionHeaders\n }\n },\n requestBody: blocks,\n queryParameters: [timeoutInSeconds, comp25],\n urlParameters: [url],\n headerParameters: [\n contentType,\n accept,\n version,\n requestId,\n metadata,\n leaseId,\n ifModifiedSince,\n ifUnmodifiedSince,\n encryptionKey,\n encryptionKeySha256,\n encryptionAlgorithm,\n ifMatch,\n ifNoneMatch,\n ifTags,\n blobCacheControl,\n blobContentType,\n blobContentMD5,\n blobContentEncoding,\n blobContentLanguage,\n blobContentDisposition,\n immutabilityPolicyExpiry,\n immutabilityPolicyMode,\n encryptionScope,\n tier,\n blobTagsString,\n legalHold1,\n transactionalContentMD5,\n transactionalContentCrc64\n ],\n isXML: true,\n contentType: \"application/xml; charset=utf-8\",\n mediaType: \"xml\",\n serializer: xmlSerializer\n};\nconst getBlockListOperationSpec = {\n path: \"/{containerName}/{blob}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: BlockList,\n headersMapper: BlockBlobGetBlockListHeaders\n },\n default: {\n bodyMapper: StorageError,\n headersMapper: BlockBlobGetBlockListExceptionHeaders\n }\n },\n queryParameters: [\n timeoutInSeconds,\n snapshot,\n comp25,\n listType\n ],\n urlParameters: [url],\n headerParameters: [\n version,\n requestId,\n accept1,\n leaseId,\n ifTags\n ],\n isXML: true,\n serializer: xmlSerializer\n};\n\n// Copyright (c) Microsoft Corporation.\n/**\n * The `@azure/logger` configuration for this package.\n */\nconst logger = logger$1.createClientLogger(\"storage-blob\");\n\n// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nconst SDK_VERSION = \"12.12.0\";\nconst SERVICE_VERSION = \"2021-10-04\";\nconst BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES = 256 * 1024 * 1024; // 256MB\nconst BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES = 4000 * 1024 * 1024; // 4000MB\nconst BLOCK_BLOB_MAX_BLOCKS = 50000;\nconst DEFAULT_BLOCK_BUFFER_SIZE_BYTES = 8 * 1024 * 1024; // 8MB\nconst DEFAULT_BLOB_DOWNLOAD_BLOCK_BYTES = 4 * 1024 * 1024; // 4MB\nconst DEFAULT_MAX_DOWNLOAD_RETRY_REQUESTS = 5;\nconst REQUEST_TIMEOUT = 100 * 1000; // In ms\n/**\n * The OAuth scope to use with Azure Storage.\n */\nconst StorageOAuthScopes = \"https://storage.azure.com/.default\";\nconst URLConstants = {\n Parameters: {\n FORCE_BROWSER_NO_CACHE: \"_\",\n SIGNATURE: \"sig\",\n SNAPSHOT: \"snapshot\",\n VERSIONID: \"versionid\",\n TIMEOUT: \"timeout\",\n },\n};\nconst HTTPURLConnection = {\n HTTP_ACCEPTED: 202,\n HTTP_CONFLICT: 409,\n HTTP_NOT_FOUND: 404,\n HTTP_PRECON_FAILED: 412,\n HTTP_RANGE_NOT_SATISFIABLE: 416,\n};\nconst HeaderConstants = {\n AUTHORIZATION: \"Authorization\",\n AUTHORIZATION_SCHEME: \"Bearer\",\n CONTENT_ENCODING: \"Content-Encoding\",\n CONTENT_ID: \"Content-ID\",\n CONTENT_LANGUAGE: \"Content-Language\",\n CONTENT_LENGTH: \"Content-Length\",\n CONTENT_MD5: \"Content-Md5\",\n CONTENT_TRANSFER_ENCODING: \"Content-Transfer-Encoding\",\n CONTENT_TYPE: \"Content-Type\",\n COOKIE: \"Cookie\",\n DATE: \"date\",\n IF_MATCH: \"if-match\",\n IF_MODIFIED_SINCE: \"if-modified-since\",\n IF_NONE_MATCH: \"if-none-match\",\n IF_UNMODIFIED_SINCE: \"if-unmodified-since\",\n PREFIX_FOR_STORAGE: \"x-ms-\",\n RANGE: \"Range\",\n USER_AGENT: \"User-Agent\",\n X_MS_CLIENT_REQUEST_ID: \"x-ms-client-request-id\",\n X_MS_COPY_SOURCE: \"x-ms-copy-source\",\n X_MS_DATE: \"x-ms-date\",\n X_MS_ERROR_CODE: \"x-ms-error-code\",\n X_MS_VERSION: \"x-ms-version\",\n};\nconst ETagNone = \"\";\nconst ETagAny = \"*\";\nconst SIZE_1_MB = 1 * 1024 * 1024;\nconst BATCH_MAX_REQUEST = 256;\nconst BATCH_MAX_PAYLOAD_IN_BYTES = 4 * SIZE_1_MB;\nconst HTTP_LINE_ENDING = \"\\r\\n\";\nconst HTTP_VERSION_1_1 = \"HTTP/1.1\";\nconst EncryptionAlgorithmAES25 = \"AES256\";\nconst DevelopmentConnectionString = `DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;BlobEndpoint=http://127.0.0.1:10000/devstoreaccount1;`;\nconst StorageBlobLoggingAllowedHeaderNames = [\n \"Access-Control-Allow-Origin\",\n \"Cache-Control\",\n \"Content-Length\",\n \"Content-Type\",\n \"Date\",\n \"Request-Id\",\n \"traceparent\",\n \"Transfer-Encoding\",\n \"User-Agent\",\n \"x-ms-client-request-id\",\n \"x-ms-date\",\n \"x-ms-error-code\",\n \"x-ms-request-id\",\n \"x-ms-return-client-request-id\",\n \"x-ms-version\",\n \"Accept-Ranges\",\n \"Content-Disposition\",\n \"Content-Encoding\",\n \"Content-Language\",\n \"Content-MD5\",\n \"Content-Range\",\n \"ETag\",\n \"Last-Modified\",\n \"Server\",\n \"Vary\",\n \"x-ms-content-crc64\",\n \"x-ms-copy-action\",\n \"x-ms-copy-completion-time\",\n \"x-ms-copy-id\",\n \"x-ms-copy-progress\",\n \"x-ms-copy-status\",\n \"x-ms-has-immutability-policy\",\n \"x-ms-has-legal-hold\",\n \"x-ms-lease-state\",\n \"x-ms-lease-status\",\n \"x-ms-range\",\n \"x-ms-request-server-encrypted\",\n \"x-ms-server-encrypted\",\n \"x-ms-snapshot\",\n \"x-ms-source-range\",\n \"If-Match\",\n \"If-Modified-Since\",\n \"If-None-Match\",\n \"If-Unmodified-Since\",\n \"x-ms-access-tier\",\n \"x-ms-access-tier-change-time\",\n \"x-ms-access-tier-inferred\",\n \"x-ms-account-kind\",\n \"x-ms-archive-status\",\n \"x-ms-blob-append-offset\",\n \"x-ms-blob-cache-control\",\n \"x-ms-blob-committed-block-count\",\n \"x-ms-blob-condition-appendpos\",\n \"x-ms-blob-condition-maxsize\",\n \"x-ms-blob-content-disposition\",\n \"x-ms-blob-content-encoding\",\n \"x-ms-blob-content-language\",\n \"x-ms-blob-content-length\",\n \"x-ms-blob-content-md5\",\n \"x-ms-blob-content-type\",\n \"x-ms-blob-public-access\",\n \"x-ms-blob-sequence-number\",\n \"x-ms-blob-type\",\n \"x-ms-copy-destination-snapshot\",\n \"x-ms-creation-time\",\n \"x-ms-default-encryption-scope\",\n \"x-ms-delete-snapshots\",\n \"x-ms-delete-type-permanent\",\n \"x-ms-deny-encryption-scope-override\",\n \"x-ms-encryption-algorithm\",\n \"x-ms-if-sequence-number-eq\",\n \"x-ms-if-sequence-number-le\",\n \"x-ms-if-sequence-number-lt\",\n \"x-ms-incremental-copy\",\n \"x-ms-lease-action\",\n \"x-ms-lease-break-period\",\n \"x-ms-lease-duration\",\n \"x-ms-lease-id\",\n \"x-ms-lease-time\",\n \"x-ms-page-write\",\n \"x-ms-proposed-lease-id\",\n \"x-ms-range-get-content-md5\",\n \"x-ms-rehydrate-priority\",\n \"x-ms-sequence-number-action\",\n \"x-ms-sku-name\",\n \"x-ms-source-content-md5\",\n \"x-ms-source-if-match\",\n \"x-ms-source-if-modified-since\",\n \"x-ms-source-if-none-match\",\n \"x-ms-source-if-unmodified-since\",\n \"x-ms-tag-count\",\n \"x-ms-encryption-key-sha256\",\n \"x-ms-if-tags\",\n \"x-ms-source-if-tags\",\n];\nconst StorageBlobLoggingAllowedQueryParameters = [\n \"comp\",\n \"maxresults\",\n \"rscc\",\n \"rscd\",\n \"rsce\",\n \"rscl\",\n \"rsct\",\n \"se\",\n \"si\",\n \"sip\",\n \"sp\",\n \"spr\",\n \"sr\",\n \"srt\",\n \"ss\",\n \"st\",\n \"sv\",\n \"include\",\n \"marker\",\n \"prefix\",\n \"copyid\",\n \"restype\",\n \"blockid\",\n \"blocklisttype\",\n \"delimiter\",\n \"prevsnapshot\",\n \"ske\",\n \"skoid\",\n \"sks\",\n \"skt\",\n \"sktid\",\n \"skv\",\n \"snapshot\",\n];\nconst BlobUsesCustomerSpecifiedEncryptionMsg = \"BlobUsesCustomerSpecifiedEncryption\";\nconst BlobDoesNotUseCustomerSpecifiedEncryption = \"BlobDoesNotUseCustomerSpecifiedEncryption\";\n/// List of ports used for path style addressing.\n/// Path style addressing means that storage account is put in URI's Path segment in instead of in host.\nconst PathStylePorts = [\n \"10000\",\n \"10001\",\n \"10002\",\n \"10003\",\n \"10004\",\n \"10100\",\n \"10101\",\n \"10102\",\n \"10103\",\n \"10104\",\n \"11000\",\n \"11001\",\n \"11002\",\n \"11003\",\n \"11004\",\n \"11100\",\n \"11101\",\n \"11102\",\n \"11103\",\n \"11104\",\n];\n\n// Copyright (c) Microsoft Corporation.\n/**\n * Reserved URL characters must be properly escaped for Storage services like Blob or File.\n *\n * ## URL encode and escape strategy for JS SDKs\n *\n * When customers pass a URL string into XxxClient classes constructor, the URL string may already be URL encoded or not.\n * But before sending to Azure Storage server, the URL must be encoded. However, it's hard for a SDK to guess whether the URL\n * string has been encoded or not. We have 2 potential strategies, and chose strategy two for the XxxClient constructors.\n *\n * ### Strategy One: Assume the customer URL string is not encoded, and always encode URL string in SDK.\n *\n * This is what legacy V2 SDK does, simple and works for most of the cases.\n * - When customer URL string is \"http://account.blob.core.windows.net/con/b:\",\n * SDK will encode it to \"http://account.blob.core.windows.net/con/b%3A\" and send to server. A blob named \"b:\" will be created.\n * - When customer URL string is \"http://account.blob.core.windows.net/con/b%3A\",\n * SDK will encode it to \"http://account.blob.core.windows.net/con/b%253A\" and send to server. A blob named \"b%3A\" will be created.\n *\n * But this strategy will make it not possible to create a blob with \"?\" in it's name. Because when customer URL string is\n * \"http://account.blob.core.windows.net/con/blob?name\", the \"?name\" will be treated as URL paramter instead of blob name.\n * If customer URL string is \"http://account.blob.core.windows.net/con/blob%3Fname\", a blob named \"blob%3Fname\" will be created.\n * V2 SDK doesn't have this issue because it doesn't allow customer pass in a full URL, it accepts a separate blob name and encodeURIComponent for it.\n * We cannot accept a SDK cannot create a blob name with \"?\". So we implement strategy two:\n *\n * ### Strategy Two: SDK doesn't assume the URL has been encoded or not. It will just escape the special characters.\n *\n * This is what V10 Blob Go SDK does. It accepts a URL type in Go, and call url.EscapedPath() to escape the special chars unescaped.\n * - When customer URL string is \"http://account.blob.core.windows.net/con/b:\",\n * SDK will escape \":\" like \"http://account.blob.core.windows.net/con/b%3A\" and send to server. A blob named \"b:\" will be created.\n * - When customer URL string is \"http://account.blob.core.windows.net/con/b%3A\",\n * There is no special characters, so send \"http://account.blob.core.windows.net/con/b%3A\" to server. A blob named \"b:\" will be created.\n * - When customer URL string is \"http://account.blob.core.windows.net/con/b%253A\",\n * There is no special characters, so send \"http://account.blob.core.windows.net/con/b%253A\" to server. A blob named \"b%3A\" will be created.\n *\n * This strategy gives us flexibility to create with any special characters. But \"%\" will be treated as a special characters, if the URL string\n * is not encoded, there shouldn't a \"%\" in the URL string, otherwise the URL is not a valid URL.\n * If customer needs to create a blob with \"%\" in it's blob name, use \"%25\" instead of \"%\". Just like above 3rd sample.\n * And following URL strings are invalid:\n * - \"http://account.blob.core.windows.net/con/b%\"\n * - \"http://account.blob.core.windows.net/con/b%2\"\n * - \"http://account.blob.core.windows.net/con/b%G\"\n *\n * Another special character is \"?\", use \"%2F\" to represent a blob name with \"?\" in a URL string.\n *\n * ### Strategy for containerName, blobName or other specific XXXName parameters in methods such as `containerClient.getBlobClient(blobName)`\n *\n * We will apply strategy one, and call encodeURIComponent for these parameters like blobName. Because what customers passes in is a plain name instead of a URL.\n *\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/naming-and-referencing-containers--blobs--and-metadata\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/naming-and-referencing-shares--directories--files--and-metadata\n *\n * @param url -\n */\nfunction escapeURLPath(url) {\n const urlParsed = coreHttp.URLBuilder.parse(url);\n let path = urlParsed.getPath();\n path = path || \"/\";\n path = escape(path);\n urlParsed.setPath(path);\n return urlParsed.toString();\n}\nfunction getProxyUriFromDevConnString(connectionString) {\n // Development Connection String\n // https://docs.microsoft.com/en-us/azure/storage/common/storage-configure-connection-string#connect-to-the-emulator-account-using-the-well-known-account-name-and-key\n let proxyUri = \"\";\n if (connectionString.search(\"DevelopmentStorageProxyUri=\") !== -1) {\n // CONNECTION_STRING=UseDevelopmentStorage=true;DevelopmentStorageProxyUri=http://myProxyUri\n const matchCredentials = connectionString.split(\";\");\n for (const element of matchCredentials) {\n if (element.trim().startsWith(\"DevelopmentStorageProxyUri=\")) {\n proxyUri = element.trim().match(\"DevelopmentStorageProxyUri=(.*)\")[1];\n }\n }\n }\n return proxyUri;\n}\nfunction getValueInConnString(connectionString, argument) {\n const elements = connectionString.split(\";\");\n for (const element of elements) {\n if (element.trim().startsWith(argument)) {\n return element.trim().match(argument + \"=(.*)\")[1];\n }\n }\n return \"\";\n}\n/**\n * Extracts the parts of an Azure Storage account connection string.\n *\n * @param connectionString - Connection string.\n * @returns String key value pairs of the storage account's url and credentials.\n */\nfunction extractConnectionStringParts(connectionString) {\n let proxyUri = \"\";\n if (connectionString.startsWith(\"UseDevelopmentStorage=true\")) {\n // Development connection string\n proxyUri = getProxyUriFromDevConnString(connectionString);\n connectionString = DevelopmentConnectionString;\n }\n // Matching BlobEndpoint in the Account connection string\n let blobEndpoint = getValueInConnString(connectionString, \"BlobEndpoint\");\n // Slicing off '/' at the end if exists\n // (The methods that use `extractConnectionStringParts` expect the url to not have `/` at the end)\n blobEndpoint = blobEndpoint.endsWith(\"/\") ? blobEndpoint.slice(0, -1) : blobEndpoint;\n if (connectionString.search(\"DefaultEndpointsProtocol=\") !== -1 &&\n connectionString.search(\"AccountKey=\") !== -1) {\n // Account connection string\n let defaultEndpointsProtocol = \"\";\n let accountName = \"\";\n let accountKey = Buffer.from(\"accountKey\", \"base64\");\n let endpointSuffix = \"\";\n // Get account name and key\n accountName = getValueInConnString(connectionString, \"AccountName\");\n accountKey = Buffer.from(getValueInConnString(connectionString, \"AccountKey\"), \"base64\");\n if (!blobEndpoint) {\n // BlobEndpoint is not present in the Account connection string\n // Can be obtained from `${defaultEndpointsProtocol}://${accountName}.blob.${endpointSuffix}`\n defaultEndpointsProtocol = getValueInConnString(connectionString, \"DefaultEndpointsProtocol\");\n const protocol = defaultEndpointsProtocol.toLowerCase();\n if (protocol !== \"https\" && protocol !== \"http\") {\n throw new Error(\"Invalid DefaultEndpointsProtocol in the provided Connection String. Expecting 'https' or 'http'\");\n }\n endpointSuffix = getValueInConnString(connectionString, \"EndpointSuffix\");\n if (!endpointSuffix) {\n throw new Error(\"Invalid EndpointSuffix in the provided Connection String\");\n }\n blobEndpoint = `${defaultEndpointsProtocol}://${accountName}.blob.${endpointSuffix}`;\n }\n if (!accountName) {\n throw new Error(\"Invalid AccountName in the provided Connection String\");\n }\n else if (accountKey.length === 0) {\n throw new Error(\"Invalid AccountKey in the provided Connection String\");\n }\n return {\n kind: \"AccountConnString\",\n url: blobEndpoint,\n accountName,\n accountKey,\n proxyUri,\n };\n }\n else {\n // SAS connection string\n const accountSas = getValueInConnString(connectionString, \"SharedAccessSignature\");\n const accountName = getAccountNameFromUrl(blobEndpoint);\n if (!blobEndpoint) {\n throw new Error(\"Invalid BlobEndpoint in the provided SAS Connection String\");\n }\n else if (!accountSas) {\n throw new Error(\"Invalid SharedAccessSignature in the provided SAS Connection String\");\n }\n return { kind: \"SASConnString\", url: blobEndpoint, accountName, accountSas };\n }\n}\n/**\n * Internal escape method implemented Strategy Two mentioned in escapeURL() description.\n *\n * @param text -\n */\nfunction escape(text) {\n return encodeURIComponent(text)\n .replace(/%2F/g, \"/\") // Don't escape for \"/\"\n .replace(/'/g, \"%27\") // Escape for \"'\"\n .replace(/\\+/g, \"%20\")\n .replace(/%25/g, \"%\"); // Revert encoded \"%\"\n}\n/**\n * Append a string to URL path. Will remove duplicated \"/\" in front of the string\n * when URL path ends with a \"/\".\n *\n * @param url - Source URL string\n * @param name - String to be appended to URL\n * @returns An updated URL string\n */\nfunction appendToURLPath(url, name) {\n const urlParsed = coreHttp.URLBuilder.parse(url);\n let path = urlParsed.getPath();\n path = path ? (path.endsWith(\"/\") ? `${path}${name}` : `${path}/${name}`) : name;\n urlParsed.setPath(path);\n return urlParsed.toString();\n}\n/**\n * Set URL parameter name and value. If name exists in URL parameters, old value\n * will be replaced by name key. If not provide value, the parameter will be deleted.\n *\n * @param url - Source URL string\n * @param name - Parameter name\n * @param value - Parameter value\n * @returns An updated URL string\n */\nfunction setURLParameter(url, name, value) {\n const urlParsed = coreHttp.URLBuilder.parse(url);\n urlParsed.setQueryParameter(name, value);\n return urlParsed.toString();\n}\n/**\n * Get URL parameter by name.\n *\n * @param url -\n * @param name -\n */\nfunction getURLParameter(url, name) {\n const urlParsed = coreHttp.URLBuilder.parse(url);\n return urlParsed.getQueryParameterValue(name);\n}\n/**\n * Set URL host.\n *\n * @param url - Source URL string\n * @param host - New host string\n * @returns An updated URL string\n */\nfunction setURLHost(url, host) {\n const urlParsed = coreHttp.URLBuilder.parse(url);\n urlParsed.setHost(host);\n return urlParsed.toString();\n}\n/**\n * Get URL path from an URL string.\n *\n * @param url - Source URL string\n */\nfunction getURLPath(url) {\n const urlParsed = coreHttp.URLBuilder.parse(url);\n return urlParsed.getPath();\n}\n/**\n * Get URL scheme from an URL string.\n *\n * @param url - Source URL string\n */\nfunction getURLScheme(url) {\n const urlParsed = coreHttp.URLBuilder.parse(url);\n return urlParsed.getScheme();\n}\n/**\n * Get URL path and query from an URL string.\n *\n * @param url - Source URL string\n */\nfunction getURLPathAndQuery(url) {\n const urlParsed = coreHttp.URLBuilder.parse(url);\n const pathString = urlParsed.getPath();\n if (!pathString) {\n throw new RangeError(\"Invalid url without valid path.\");\n }\n let queryString = urlParsed.getQuery() || \"\";\n queryString = queryString.trim();\n if (queryString !== \"\") {\n queryString = queryString.startsWith(\"?\") ? queryString : `?${queryString}`; // Ensure query string start with '?'\n }\n return `${pathString}${queryString}`;\n}\n/**\n * Get URL query key value pairs from an URL string.\n *\n * @param url -\n */\nfunction getURLQueries(url) {\n let queryString = coreHttp.URLBuilder.parse(url).getQuery();\n if (!queryString) {\n return {};\n }\n queryString = queryString.trim();\n queryString = queryString.startsWith(\"?\") ? queryString.substr(1) : queryString;\n let querySubStrings = queryString.split(\"&\");\n querySubStrings = querySubStrings.filter((value) => {\n const indexOfEqual = value.indexOf(\"=\");\n const lastIndexOfEqual = value.lastIndexOf(\"=\");\n return (indexOfEqual > 0 && indexOfEqual === lastIndexOfEqual && lastIndexOfEqual < value.length - 1);\n });\n const queries = {};\n for (const querySubString of querySubStrings) {\n const splitResults = querySubString.split(\"=\");\n const key = splitResults[0];\n const value = splitResults[1];\n queries[key] = value;\n }\n return queries;\n}\n/**\n * Append a string to URL query.\n *\n * @param url - Source URL string.\n * @param queryParts - String to be appended to the URL query.\n * @returns An updated URL string.\n */\nfunction appendToURLQuery(url, queryParts) {\n const urlParsed = coreHttp.URLBuilder.parse(url);\n let query = urlParsed.getQuery();\n if (query) {\n query += \"&\" + queryParts;\n }\n else {\n query = queryParts;\n }\n urlParsed.setQuery(query);\n return urlParsed.toString();\n}\n/**\n * Rounds a date off to seconds.\n *\n * @param date -\n * @param withMilliseconds - If true, YYYY-MM-DDThh:mm:ss.fffffffZ will be returned;\n * If false, YYYY-MM-DDThh:mm:ssZ will be returned.\n * @returns Date string in ISO8061 format, with or without 7 milliseconds component\n */\nfunction truncatedISO8061Date(date, withMilliseconds = true) {\n // Date.toISOString() will return like \"2018-10-29T06:34:36.139Z\"\n const dateString = date.toISOString();\n return withMilliseconds\n ? dateString.substring(0, dateString.length - 1) + \"0000\" + \"Z\"\n : dateString.substring(0, dateString.length - 5) + \"Z\";\n}\n/**\n * Base64 encode.\n *\n * @param content -\n */\nfunction base64encode(content) {\n return !coreHttp.isNode ? btoa(content) : Buffer.from(content).toString(\"base64\");\n}\n/**\n * Generate a 64 bytes base64 block ID string.\n *\n * @param blockIndex -\n */\nfunction generateBlockID(blockIDPrefix, blockIndex) {\n // To generate a 64 bytes base64 string, source string should be 48\n const maxSourceStringLength = 48;\n // A blob can have a maximum of 100,000 uncommitted blocks at any given time\n const maxBlockIndexLength = 6;\n const maxAllowedBlockIDPrefixLength = maxSourceStringLength - maxBlockIndexLength;\n if (blockIDPrefix.length > maxAllowedBlockIDPrefixLength) {\n blockIDPrefix = blockIDPrefix.slice(0, maxAllowedBlockIDPrefixLength);\n }\n const res = blockIDPrefix +\n padStart(blockIndex.toString(), maxSourceStringLength - blockIDPrefix.length, \"0\");\n return base64encode(res);\n}\n/**\n * Delay specified time interval.\n *\n * @param timeInMs -\n * @param aborter -\n * @param abortError -\n */\nasync function delay(timeInMs, aborter, abortError) {\n return new Promise((resolve, reject) => {\n /* eslint-disable-next-line prefer-const */\n let timeout;\n const abortHandler = () => {\n if (timeout !== undefined) {\n clearTimeout(timeout);\n }\n reject(abortError);\n };\n const resolveHandler = () => {\n if (aborter !== undefined) {\n aborter.removeEventListener(\"abort\", abortHandler);\n }\n resolve();\n };\n timeout = setTimeout(resolveHandler, timeInMs);\n if (aborter !== undefined) {\n aborter.addEventListener(\"abort\", abortHandler);\n }\n });\n}\n/**\n * String.prototype.padStart()\n *\n * @param currentString -\n * @param targetLength -\n * @param padString -\n */\nfunction padStart(currentString, targetLength, padString = \" \") {\n // @ts-expect-error: TS doesn't know this code needs to run downlevel sometimes\n if (String.prototype.padStart) {\n return currentString.padStart(targetLength, padString);\n }\n padString = padString || \" \";\n if (currentString.length > targetLength) {\n return currentString;\n }\n else {\n targetLength = targetLength - currentString.length;\n if (targetLength > padString.length) {\n padString += padString.repeat(targetLength / padString.length);\n }\n return padString.slice(0, targetLength) + currentString;\n }\n}\n/**\n * If two strings are equal when compared case insensitive.\n *\n * @param str1 -\n * @param str2 -\n */\nfunction iEqual(str1, str2) {\n return str1.toLocaleLowerCase() === str2.toLocaleLowerCase();\n}\n/**\n * Extracts account name from the url\n * @param url - url to extract the account name from\n * @returns with the account name\n */\nfunction getAccountNameFromUrl(url) {\n const parsedUrl = coreHttp.URLBuilder.parse(url);\n let accountName;\n try {\n if (parsedUrl.getHost().split(\".\")[1] === \"blob\") {\n // `${defaultEndpointsProtocol}://${accountName}.blob.${endpointSuffix}`;\n accountName = parsedUrl.getHost().split(\".\")[0];\n }\n else if (isIpEndpointStyle(parsedUrl)) {\n // IPv4/IPv6 address hosts... Example - http://192.0.0.10:10001/devstoreaccount1/\n // Single word domain without a [dot] in the endpoint... Example - http://localhost:10001/devstoreaccount1/\n // .getPath() -> /devstoreaccount1/\n accountName = parsedUrl.getPath().split(\"/\")[1];\n }\n else {\n // Custom domain case: \"https://customdomain.com/containername/blob\".\n accountName = \"\";\n }\n return accountName;\n }\n catch (error) {\n throw new Error(\"Unable to extract accountName with provided information.\");\n }\n}\nfunction isIpEndpointStyle(parsedUrl) {\n if (parsedUrl.getHost() === undefined) {\n return false;\n }\n const host = parsedUrl.getHost() + (parsedUrl.getPort() === undefined ? \"\" : \":\" + parsedUrl.getPort());\n // Case 1: Ipv6, use a broad regex to find out candidates whose host contains two ':'.\n // Case 2: localhost(:port), use broad regex to match port part.\n // Case 3: Ipv4, use broad regex which just check if host contains Ipv4.\n // For valid host please refer to https://man7.org/linux/man-pages/man7/hostname.7.html.\n return (/^.*:.*:.*$|^localhost(:[0-9]+)?$|^(\\d|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])(\\.(\\d|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])){3}(:[0-9]+)?$/.test(host) ||\n (parsedUrl.getPort() !== undefined && PathStylePorts.includes(parsedUrl.getPort())));\n}\n/**\n * Convert Tags to encoded string.\n *\n * @param tags -\n */\nfunction toBlobTagsString(tags) {\n if (tags === undefined) {\n return undefined;\n }\n const tagPairs = [];\n for (const key in tags) {\n if (Object.prototype.hasOwnProperty.call(tags, key)) {\n const value = tags[key];\n tagPairs.push(`${encodeURIComponent(key)}=${encodeURIComponent(value)}`);\n }\n }\n return tagPairs.join(\"&\");\n}\n/**\n * Convert Tags type to BlobTags.\n *\n * @param tags -\n */\nfunction toBlobTags(tags) {\n if (tags === undefined) {\n return undefined;\n }\n const res = {\n blobTagSet: [],\n };\n for (const key in tags) {\n if (Object.prototype.hasOwnProperty.call(tags, key)) {\n const value = tags[key];\n res.blobTagSet.push({\n key,\n value,\n });\n }\n }\n return res;\n}\n/**\n * Covert BlobTags to Tags type.\n *\n * @param tags -\n */\nfunction toTags(tags) {\n if (tags === undefined) {\n return undefined;\n }\n const res = {};\n for (const blobTag of tags.blobTagSet) {\n res[blobTag.key] = blobTag.value;\n }\n return res;\n}\n/**\n * Convert BlobQueryTextConfiguration to QuerySerialization type.\n *\n * @param textConfiguration -\n */\nfunction toQuerySerialization(textConfiguration) {\n if (textConfiguration === undefined) {\n return undefined;\n }\n switch (textConfiguration.kind) {\n case \"csv\":\n return {\n format: {\n type: \"delimited\",\n delimitedTextConfiguration: {\n columnSeparator: textConfiguration.columnSeparator || \",\",\n fieldQuote: textConfiguration.fieldQuote || \"\",\n recordSeparator: textConfiguration.recordSeparator,\n escapeChar: textConfiguration.escapeCharacter || \"\",\n headersPresent: textConfiguration.hasHeaders || false,\n },\n },\n };\n case \"json\":\n return {\n format: {\n type: \"json\",\n jsonTextConfiguration: {\n recordSeparator: textConfiguration.recordSeparator,\n },\n },\n };\n case \"arrow\":\n return {\n format: {\n type: \"arrow\",\n arrowConfiguration: {\n schema: textConfiguration.schema,\n },\n },\n };\n case \"parquet\":\n return {\n format: {\n type: \"parquet\",\n },\n };\n default:\n throw Error(\"Invalid BlobQueryTextConfiguration.\");\n }\n}\nfunction parseObjectReplicationRecord(objectReplicationRecord) {\n if (!objectReplicationRecord) {\n return undefined;\n }\n if (\"policy-id\" in objectReplicationRecord) {\n // If the dictionary contains a key with policy id, we are not required to do any parsing since\n // the policy id should already be stored in the ObjectReplicationDestinationPolicyId.\n return undefined;\n }\n const orProperties = [];\n for (const key in objectReplicationRecord) {\n const ids = key.split(\"_\");\n const policyPrefix = \"or-\";\n if (ids[0].startsWith(policyPrefix)) {\n ids[0] = ids[0].substring(policyPrefix.length);\n }\n const rule = {\n ruleId: ids[1],\n replicationStatus: objectReplicationRecord[key],\n };\n const policyIndex = orProperties.findIndex((policy) => policy.policyId === ids[0]);\n if (policyIndex > -1) {\n orProperties[policyIndex].rules.push(rule);\n }\n else {\n orProperties.push({\n policyId: ids[0],\n rules: [rule],\n });\n }\n }\n return orProperties;\n}\n/**\n * Attach a TokenCredential to an object.\n *\n * @param thing -\n * @param credential -\n */\nfunction attachCredential(thing, credential) {\n thing.credential = credential;\n return thing;\n}\nfunction httpAuthorizationToString(httpAuthorization) {\n return httpAuthorization ? httpAuthorization.scheme + \" \" + httpAuthorization.value : undefined;\n}\nfunction BlobNameToString(name) {\n if (name.encoded) {\n return decodeURIComponent(name.content);\n }\n else {\n return name.content;\n }\n}\nfunction ConvertInternalResponseOfListBlobFlat(internalResponse) {\n return Object.assign(Object.assign({}, internalResponse), { segment: {\n blobItems: internalResponse.segment.blobItems.map((blobItemInteral) => {\n const blobItem = Object.assign(Object.assign({}, blobItemInteral), { name: BlobNameToString(blobItemInteral.name) });\n return blobItem;\n }),\n } });\n}\nfunction ConvertInternalResponseOfListBlobHierarchy(internalResponse) {\n var _a;\n return Object.assign(Object.assign({}, internalResponse), { segment: {\n blobPrefixes: (_a = internalResponse.segment.blobPrefixes) === null || _a === void 0 ? void 0 : _a.map((blobPrefixInternal) => {\n const blobPrefix = {\n name: BlobNameToString(blobPrefixInternal.name),\n };\n return blobPrefix;\n }),\n blobItems: internalResponse.segment.blobItems.map((blobItemInteral) => {\n const blobItem = Object.assign(Object.assign({}, blobItemInteral), { name: BlobNameToString(blobItemInteral.name) });\n return blobItem;\n }),\n } });\n}\nfunction decodeBase64String(value) {\n if (coreHttp.isNode) {\n return Buffer.from(value, \"base64\");\n }\n else {\n const byteString = atob(value);\n const arr = new Uint8Array(byteString.length);\n for (let i = 0; i < byteString.length; i++) {\n arr[i] = byteString.charCodeAt(i);\n }\n return arr;\n }\n}\nfunction ParseBoolean(content) {\n if (content === undefined)\n return undefined;\n if (content === \"true\")\n return true;\n if (content === \"false\")\n return false;\n return undefined;\n}\nfunction ParseBlobName(blobNameInXML) {\n if (blobNameInXML[\"$\"] !== undefined && blobNameInXML[\"#\"] !== undefined) {\n return {\n encoded: ParseBoolean(blobNameInXML[\"$\"][\"Encoded\"]),\n content: blobNameInXML[\"#\"],\n };\n }\n else {\n return {\n encoded: false,\n content: blobNameInXML,\n };\n }\n}\nfunction ParseBlobProperties(blobPropertiesInXML) {\n const blobProperties = blobPropertiesInXML;\n if (blobPropertiesInXML[\"Creation-Time\"]) {\n blobProperties.createdOn = new Date(blobPropertiesInXML[\"Creation-Time\"]);\n delete blobProperties[\"Creation-Time\"];\n }\n if (blobPropertiesInXML[\"Last-Modified\"]) {\n blobProperties.lastModified = new Date(blobPropertiesInXML[\"Last-Modified\"]);\n delete blobProperties[\"Last-Modified\"];\n }\n if (blobPropertiesInXML[\"Etag\"]) {\n blobProperties.etag = blobPropertiesInXML[\"Etag\"];\n delete blobProperties[\"Etag\"];\n }\n if (blobPropertiesInXML[\"Content-Length\"]) {\n blobProperties.contentLength = parseFloat(blobPropertiesInXML[\"Content-Length\"]);\n delete blobProperties[\"Content-Length\"];\n }\n if (blobPropertiesInXML[\"Content-Type\"]) {\n blobProperties.contentType = blobPropertiesInXML[\"Content-Type\"];\n delete blobProperties[\"Content-Type\"];\n }\n if (blobPropertiesInXML[\"Content-Encoding\"]) {\n blobProperties.contentEncoding = blobPropertiesInXML[\"Content-Encoding\"];\n delete blobProperties[\"Content-Encoding\"];\n }\n if (blobPropertiesInXML[\"Content-Language\"]) {\n blobProperties.contentLanguage = blobPropertiesInXML[\"Content-Language\"];\n delete blobProperties[\"Content-Language\"];\n }\n if (blobPropertiesInXML[\"Content-MD5\"]) {\n blobProperties.contentMD5 = decodeBase64String(blobPropertiesInXML[\"Content-MD5\"]);\n delete blobProperties[\"Content-MD5\"];\n }\n if (blobPropertiesInXML[\"Content-Disposition\"]) {\n blobProperties.contentDisposition = blobPropertiesInXML[\"Content-Disposition\"];\n delete blobProperties[\"Content-Disposition\"];\n }\n if (blobPropertiesInXML[\"Cache-Control\"]) {\n blobProperties.cacheControl = blobPropertiesInXML[\"Cache-Control\"];\n delete blobProperties[\"Cache-Control\"];\n }\n if (blobPropertiesInXML[\"x-ms-blob-sequence-number\"]) {\n blobProperties.blobSequenceNumber = parseFloat(blobPropertiesInXML[\"x-ms-blob-sequence-number\"]);\n delete blobProperties[\"x-ms-blob-sequence-number\"];\n }\n if (blobPropertiesInXML[\"BlobType\"]) {\n blobProperties.blobType = blobPropertiesInXML[\"BlobType\"];\n delete blobProperties[\"BlobType\"];\n }\n if (blobPropertiesInXML[\"LeaseStatus\"]) {\n blobProperties.leaseStatus = blobPropertiesInXML[\"LeaseStatus\"];\n delete blobProperties[\"LeaseStatus\"];\n }\n if (blobPropertiesInXML[\"LeaseState\"]) {\n blobProperties.leaseState = blobPropertiesInXML[\"LeaseState\"];\n delete blobProperties[\"LeaseState\"];\n }\n if (blobPropertiesInXML[\"LeaseDuration\"]) {\n blobProperties.leaseDuration = blobPropertiesInXML[\"LeaseDuration\"];\n delete blobProperties[\"LeaseDuration\"];\n }\n if (blobPropertiesInXML[\"CopyId\"]) {\n blobProperties.copyId = blobPropertiesInXML[\"CopyId\"];\n delete blobProperties[\"CopyId\"];\n }\n if (blobPropertiesInXML[\"CopyStatus\"]) {\n blobProperties.copyStatus = blobPropertiesInXML[\"CopyStatus\"];\n delete blobProperties[\"CopyStatus\"];\n }\n if (blobPropertiesInXML[\"CopySource\"]) {\n blobProperties.copySource = blobPropertiesInXML[\"CopySource\"];\n delete blobProperties[\"CopySource\"];\n }\n if (blobPropertiesInXML[\"CopyProgress\"]) {\n blobProperties.copyProgress = blobPropertiesInXML[\"CopyProgress\"];\n delete blobProperties[\"CopyProgress\"];\n }\n if (blobPropertiesInXML[\"CopyCompletionTime\"]) {\n blobProperties.copyCompletedOn = new Date(blobPropertiesInXML[\"CopyCompletionTime\"]);\n delete blobProperties[\"CopyCompletionTime\"];\n }\n if (blobPropertiesInXML[\"CopyStatusDescription\"]) {\n blobProperties.copyStatusDescription = blobPropertiesInXML[\"CopyStatusDescription\"];\n delete blobProperties[\"CopyStatusDescription\"];\n }\n if (blobPropertiesInXML[\"ServerEncrypted\"]) {\n blobProperties.serverEncrypted = ParseBoolean(blobPropertiesInXML[\"ServerEncrypted\"]);\n delete blobProperties[\"ServerEncrypted\"];\n }\n if (blobPropertiesInXML[\"IncrementalCopy\"]) {\n blobProperties.incrementalCopy = ParseBoolean(blobPropertiesInXML[\"IncrementalCopy\"]);\n delete blobProperties[\"IncrementalCopy\"];\n }\n if (blobPropertiesInXML[\"DestinationSnapshot\"]) {\n blobProperties.destinationSnapshot = blobPropertiesInXML[\"DestinationSnapshot\"];\n delete blobProperties[\"DestinationSnapshot\"];\n }\n if (blobPropertiesInXML[\"DeletedTime\"]) {\n blobProperties.deletedOn = new Date(blobPropertiesInXML[\"DeletedTime\"]);\n delete blobProperties[\"DeletedTime\"];\n }\n if (blobPropertiesInXML[\"RemainingRetentionDays\"]) {\n blobProperties.remainingRetentionDays = parseFloat(blobPropertiesInXML[\"RemainingRetentionDays\"]);\n delete blobProperties[\"RemainingRetentionDays\"];\n }\n if (blobPropertiesInXML[\"AccessTier\"]) {\n blobProperties.accessTier = blobPropertiesInXML[\"AccessTier\"];\n delete blobProperties[\"AccessTier\"];\n }\n if (blobPropertiesInXML[\"AccessTierInferred\"]) {\n blobProperties.accessTierInferred = ParseBoolean(blobPropertiesInXML[\"AccessTierInferred\"]);\n delete blobProperties[\"AccessTierInferred\"];\n }\n if (blobPropertiesInXML[\"ArchiveStatus\"]) {\n blobProperties.archiveStatus = blobPropertiesInXML[\"ArchiveStatus\"];\n delete blobProperties[\"ArchiveStatus\"];\n }\n if (blobPropertiesInXML[\"CustomerProvidedKeySha256\"]) {\n blobProperties.customerProvidedKeySha256 = blobPropertiesInXML[\"CustomerProvidedKeySha256\"];\n delete blobProperties[\"CustomerProvidedKeySha256\"];\n }\n if (blobPropertiesInXML[\"EncryptionScope\"]) {\n blobProperties.encryptionScope = blobPropertiesInXML[\"EncryptionScope\"];\n delete blobProperties[\"EncryptionScope\"];\n }\n if (blobPropertiesInXML[\"AccessTierChangeTime\"]) {\n blobProperties.accessTierChangedOn = new Date(blobPropertiesInXML[\"AccessTierChangeTime\"]);\n delete blobProperties[\"AccessTierChangeTime\"];\n }\n if (blobPropertiesInXML[\"TagCount\"]) {\n blobProperties.tagCount = parseFloat(blobPropertiesInXML[\"TagCount\"]);\n delete blobProperties[\"TagCount\"];\n }\n if (blobPropertiesInXML[\"Expiry-Time\"]) {\n blobProperties.expiresOn = new Date(blobPropertiesInXML[\"Expiry-Time\"]);\n delete blobProperties[\"Expiry-Time\"];\n }\n if (blobPropertiesInXML[\"Sealed\"]) {\n blobProperties.isSealed = ParseBoolean(blobPropertiesInXML[\"Sealed\"]);\n delete blobProperties[\"Sealed\"];\n }\n if (blobPropertiesInXML[\"RehydratePriority\"]) {\n blobProperties.rehydratePriority = blobPropertiesInXML[\"RehydratePriority\"];\n delete blobProperties[\"RehydratePriority\"];\n }\n if (blobPropertiesInXML[\"LastAccessTime\"]) {\n blobProperties.lastAccessedOn = new Date(blobPropertiesInXML[\"LastAccessTime\"]);\n delete blobProperties[\"LastAccessTime\"];\n }\n if (blobPropertiesInXML[\"ImmutabilityPolicyUntilDate\"]) {\n blobProperties.immutabilityPolicyExpiresOn = new Date(blobPropertiesInXML[\"ImmutabilityPolicyUntilDate\"]);\n delete blobProperties[\"ImmutabilityPolicyUntilDate\"];\n }\n if (blobPropertiesInXML[\"ImmutabilityPolicyMode\"]) {\n blobProperties.immutabilityPolicyMode = blobPropertiesInXML[\"ImmutabilityPolicyMode\"];\n delete blobProperties[\"ImmutabilityPolicyMode\"];\n }\n if (blobPropertiesInXML[\"LegalHold\"]) {\n blobProperties.legalHold = ParseBoolean(blobPropertiesInXML[\"LegalHold\"]);\n delete blobProperties[\"LegalHold\"];\n }\n return blobProperties;\n}\nfunction ParseBlobItem(blobInXML) {\n const blobItem = blobInXML;\n blobItem.properties = ParseBlobProperties(blobInXML[\"Properties\"]);\n delete blobItem[\"Properties\"];\n blobItem.name = ParseBlobName(blobInXML[\"Name\"]);\n delete blobItem[\"Name\"];\n blobItem.deleted = ParseBoolean(blobInXML[\"Deleted\"]);\n delete blobItem[\"Deleted\"];\n if (blobInXML[\"Snapshot\"]) {\n blobItem.snapshot = blobInXML[\"Snapshot\"];\n delete blobItem[\"Snapshot\"];\n }\n if (blobInXML[\"VersionId\"]) {\n blobItem.versionId = blobInXML[\"VersionId\"];\n delete blobItem[\"VersionId\"];\n }\n if (blobInXML[\"IsCurrentVersion\"]) {\n blobItem.isCurrentVersion = ParseBoolean(blobInXML[\"IsCurrentVersion\"]);\n delete blobItem[\"IsCurrentVersion\"];\n }\n if (blobInXML[\"Metadata\"]) {\n blobItem.metadata = blobInXML[\"Metadata\"];\n delete blobItem[\"Metadata\"];\n }\n if (blobInXML[\"Tags\"]) {\n blobItem.blobTags = ParseBlobTags(blobInXML[\"Tags\"]);\n delete blobItem[\"Tags\"];\n }\n if (blobInXML[\"OrMetadata\"]) {\n blobItem.objectReplicationMetadata = blobInXML[\"OrMetadata\"];\n delete blobItem[\"OrMetadata\"];\n }\n if (blobInXML[\"HasVersionsOnly\"]) {\n blobItem.hasVersionsOnly = ParseBoolean(blobInXML[\"HasVersionsOnly\"]);\n delete blobItem[\"HasVersionsOnly\"];\n }\n return blobItem;\n}\nfunction ParseBlobPrefix(blobPrefixInXML) {\n return {\n name: ParseBlobName(blobPrefixInXML[\"Name\"]),\n };\n}\nfunction ParseBlobTag(blobTagInXML) {\n return {\n key: blobTagInXML[\"Key\"],\n value: blobTagInXML[\"Value\"],\n };\n}\nfunction ParseBlobTags(blobTagsInXML) {\n if (blobTagsInXML === undefined ||\n blobTagsInXML[\"TagSet\"] === undefined ||\n blobTagsInXML[\"TagSet\"][\"Tag\"] === undefined) {\n return undefined;\n }\n const blobTagSet = [];\n if (blobTagsInXML[\"TagSet\"][\"Tag\"] instanceof Array) {\n blobTagsInXML[\"TagSet\"][\"Tag\"].forEach((blobTagInXML) => {\n blobTagSet.push(ParseBlobTag(blobTagInXML));\n });\n }\n else {\n blobTagSet.push(ParseBlobTag(blobTagsInXML[\"TagSet\"][\"Tag\"]));\n }\n return { blobTagSet: blobTagSet };\n}\nfunction ProcessBlobItems(blobArrayInXML) {\n const blobItems = [];\n if (blobArrayInXML instanceof Array) {\n blobArrayInXML.forEach((blobInXML) => {\n blobItems.push(ParseBlobItem(blobInXML));\n });\n }\n else {\n blobItems.push(ParseBlobItem(blobArrayInXML));\n }\n return blobItems;\n}\nfunction ProcessBlobPrefixes(blobPrefixesInXML) {\n const blobPrefixes = [];\n if (blobPrefixesInXML instanceof Array) {\n blobPrefixesInXML.forEach((blobPrefixInXML) => {\n blobPrefixes.push(ParseBlobPrefix(blobPrefixInXML));\n });\n }\n else {\n blobPrefixes.push(ParseBlobPrefix(blobPrefixesInXML));\n }\n return blobPrefixes;\n}\nfunction* ExtractPageRangeInfoItems(getPageRangesSegment) {\n let pageRange = [];\n let clearRange = [];\n if (getPageRangesSegment.pageRange)\n pageRange = getPageRangesSegment.pageRange;\n if (getPageRangesSegment.clearRange)\n clearRange = getPageRangesSegment.clearRange;\n let pageRangeIndex = 0;\n let clearRangeIndex = 0;\n while (pageRangeIndex < pageRange.length && clearRangeIndex < clearRange.length) {\n if (pageRange[pageRangeIndex].start < clearRange[clearRangeIndex].start) {\n yield {\n start: pageRange[pageRangeIndex].start,\n end: pageRange[pageRangeIndex].end,\n isClear: false,\n };\n ++pageRangeIndex;\n }\n else {\n yield {\n start: clearRange[clearRangeIndex].start,\n end: clearRange[clearRangeIndex].end,\n isClear: true,\n };\n ++clearRangeIndex;\n }\n }\n for (; pageRangeIndex < pageRange.length; ++pageRangeIndex) {\n yield {\n start: pageRange[pageRangeIndex].start,\n end: pageRange[pageRangeIndex].end,\n isClear: false,\n };\n }\n for (; clearRangeIndex < clearRange.length; ++clearRangeIndex) {\n yield {\n start: clearRange[clearRangeIndex].start,\n end: clearRange[clearRangeIndex].end,\n isClear: true,\n };\n }\n}\n/**\n * Escape the blobName but keep path separator ('/').\n */\nfunction EscapePath(blobName) {\n const split = blobName.split(\"/\");\n for (let i = 0; i < split.length; i++) {\n split[i] = encodeURIComponent(split[i]);\n }\n return split.join(\"/\");\n}\n\n// Copyright (c) Microsoft Corporation.\n/**\n * StorageBrowserPolicy will handle differences between Node.js and browser runtime, including:\n *\n * 1. Browsers cache GET/HEAD requests by adding conditional headers such as 'IF_MODIFIED_SINCE'.\n * StorageBrowserPolicy is a policy used to add a timestamp query to GET/HEAD request URL\n * thus avoid the browser cache.\n *\n * 2. Remove cookie header for security\n *\n * 3. Remove content-length header to avoid browsers warning\n */\nclass StorageBrowserPolicy extends coreHttp.BaseRequestPolicy {\n /**\n * Creates an instance of StorageBrowserPolicy.\n * @param nextPolicy -\n * @param options -\n */\n // The base class has a protected constructor. Adding a public one to enable constructing of this class.\n /* eslint-disable-next-line @typescript-eslint/no-useless-constructor*/\n constructor(nextPolicy, options) {\n super(nextPolicy, options);\n }\n /**\n * Sends out request.\n *\n * @param request -\n */\n async sendRequest(request) {\n if (coreHttp.isNode) {\n return this._nextPolicy.sendRequest(request);\n }\n if (request.method.toUpperCase() === \"GET\" || request.method.toUpperCase() === \"HEAD\") {\n request.url = setURLParameter(request.url, URLConstants.Parameters.FORCE_BROWSER_NO_CACHE, new Date().getTime().toString());\n }\n request.headers.remove(HeaderConstants.COOKIE);\n // According to XHR standards, content-length should be fully controlled by browsers\n request.headers.remove(HeaderConstants.CONTENT_LENGTH);\n return this._nextPolicy.sendRequest(request);\n }\n}\n\n// Copyright (c) Microsoft Corporation.\n/**\n * StorageBrowserPolicyFactory is a factory class helping generating StorageBrowserPolicy objects.\n */\nclass StorageBrowserPolicyFactory {\n /**\n * Creates a StorageBrowserPolicyFactory object.\n *\n * @param nextPolicy -\n * @param options -\n */\n create(nextPolicy, options) {\n return new StorageBrowserPolicy(nextPolicy, options);\n }\n}\n\n// Copyright (c) Microsoft Corporation.\n/**\n * RetryPolicy types.\n */\nexports.StorageRetryPolicyType = void 0;\n(function (StorageRetryPolicyType) {\n /**\n * Exponential retry. Retry time delay grows exponentially.\n */\n StorageRetryPolicyType[StorageRetryPolicyType[\"EXPONENTIAL\"] = 0] = \"EXPONENTIAL\";\n /**\n * Linear retry. Retry time delay grows linearly.\n */\n StorageRetryPolicyType[StorageRetryPolicyType[\"FIXED\"] = 1] = \"FIXED\";\n})(exports.StorageRetryPolicyType || (exports.StorageRetryPolicyType = {}));\n// Default values of StorageRetryOptions\nconst DEFAULT_RETRY_OPTIONS = {\n maxRetryDelayInMs: 120 * 1000,\n maxTries: 4,\n retryDelayInMs: 4 * 1000,\n retryPolicyType: exports.StorageRetryPolicyType.EXPONENTIAL,\n secondaryHost: \"\",\n tryTimeoutInMs: undefined, // Use server side default timeout strategy\n};\nconst RETRY_ABORT_ERROR = new abortController.AbortError(\"The operation was aborted.\");\n/**\n * Retry policy with exponential retry and linear retry implemented.\n */\nclass StorageRetryPolicy extends coreHttp.BaseRequestPolicy {\n /**\n * Creates an instance of RetryPolicy.\n *\n * @param nextPolicy -\n * @param options -\n * @param retryOptions -\n */\n constructor(nextPolicy, options, retryOptions = DEFAULT_RETRY_OPTIONS) {\n super(nextPolicy, options);\n // Initialize retry options\n this.retryOptions = {\n retryPolicyType: retryOptions.retryPolicyType\n ? retryOptions.retryPolicyType\n : DEFAULT_RETRY_OPTIONS.retryPolicyType,\n maxTries: retryOptions.maxTries && retryOptions.maxTries >= 1\n ? Math.floor(retryOptions.maxTries)\n : DEFAULT_RETRY_OPTIONS.maxTries,\n tryTimeoutInMs: retryOptions.tryTimeoutInMs && retryOptions.tryTimeoutInMs >= 0\n ? retryOptions.tryTimeoutInMs\n : DEFAULT_RETRY_OPTIONS.tryTimeoutInMs,\n retryDelayInMs: retryOptions.retryDelayInMs && retryOptions.retryDelayInMs >= 0\n ? Math.min(retryOptions.retryDelayInMs, retryOptions.maxRetryDelayInMs\n ? retryOptions.maxRetryDelayInMs\n : DEFAULT_RETRY_OPTIONS.maxRetryDelayInMs)\n : DEFAULT_RETRY_OPTIONS.retryDelayInMs,\n maxRetryDelayInMs: retryOptions.maxRetryDelayInMs && retryOptions.maxRetryDelayInMs >= 0\n ? retryOptions.maxRetryDelayInMs\n : DEFAULT_RETRY_OPTIONS.maxRetryDelayInMs,\n secondaryHost: retryOptions.secondaryHost\n ? retryOptions.secondaryHost\n : DEFAULT_RETRY_OPTIONS.secondaryHost,\n };\n }\n /**\n * Sends request.\n *\n * @param request -\n */\n async sendRequest(request) {\n return this.attemptSendRequest(request, false, 1);\n }\n /**\n * Decide and perform next retry. Won't mutate request parameter.\n *\n * @param request -\n * @param secondaryHas404 - If attempt was against the secondary & it returned a StatusNotFound (404), then\n * the resource was not found. This may be due to replication delay. So, in this\n * case, we'll never try the secondary again for this operation.\n * @param attempt - How many retries has been attempted to performed, starting from 1, which includes\n * the attempt will be performed by this method call.\n */\n async attemptSendRequest(request, secondaryHas404, attempt) {\n const newRequest = request.clone();\n const isPrimaryRetry = secondaryHas404 ||\n !this.retryOptions.secondaryHost ||\n !(request.method === \"GET\" || request.method === \"HEAD\" || request.method === \"OPTIONS\") ||\n attempt % 2 === 1;\n if (!isPrimaryRetry) {\n newRequest.url = setURLHost(newRequest.url, this.retryOptions.secondaryHost);\n }\n // Set the server-side timeout query parameter \"timeout=[seconds]\"\n if (this.retryOptions.tryTimeoutInMs) {\n newRequest.url = setURLParameter(newRequest.url, URLConstants.Parameters.TIMEOUT, Math.floor(this.retryOptions.tryTimeoutInMs / 1000).toString());\n }\n let response;\n try {\n logger.info(`RetryPolicy: =====> Try=${attempt} ${isPrimaryRetry ? \"Primary\" : \"Secondary\"}`);\n response = await this._nextPolicy.sendRequest(newRequest);\n if (!this.shouldRetry(isPrimaryRetry, attempt, response)) {\n return response;\n }\n secondaryHas404 = secondaryHas404 || (!isPrimaryRetry && response.status === 404);\n }\n catch (err) {\n logger.error(`RetryPolicy: Caught error, message: ${err.message}, code: ${err.code}`);\n if (!this.shouldRetry(isPrimaryRetry, attempt, response, err)) {\n throw err;\n }\n }\n await this.delay(isPrimaryRetry, attempt, request.abortSignal);\n return this.attemptSendRequest(request, secondaryHas404, ++attempt);\n }\n /**\n * Decide whether to retry according to last HTTP response and retry counters.\n *\n * @param isPrimaryRetry -\n * @param attempt -\n * @param response -\n * @param err -\n */\n shouldRetry(isPrimaryRetry, attempt, response, err) {\n if (attempt >= this.retryOptions.maxTries) {\n logger.info(`RetryPolicy: Attempt(s) ${attempt} >= maxTries ${this.retryOptions\n .maxTries}, no further try.`);\n return false;\n }\n // Handle network failures, you may need to customize the list when you implement\n // your own http client\n const retriableErrors = [\n \"ETIMEDOUT\",\n \"ESOCKETTIMEDOUT\",\n \"ECONNREFUSED\",\n \"ECONNRESET\",\n \"ENOENT\",\n \"ENOTFOUND\",\n \"TIMEOUT\",\n \"EPIPE\",\n \"REQUEST_SEND_ERROR\", // For default xhr based http client provided in ms-rest-js\n ];\n if (err) {\n for (const retriableError of retriableErrors) {\n if (err.name.toUpperCase().includes(retriableError) ||\n err.message.toUpperCase().includes(retriableError) ||\n (err.code && err.code.toString().toUpperCase() === retriableError)) {\n logger.info(`RetryPolicy: Network error ${retriableError} found, will retry.`);\n return true;\n }\n }\n }\n // If attempt was against the secondary & it returned a StatusNotFound (404), then\n // the resource was not found. This may be due to replication delay. So, in this\n // case, we'll never try the secondary again for this operation.\n if (response || err) {\n const statusCode = response ? response.status : err ? err.statusCode : 0;\n if (!isPrimaryRetry && statusCode === 404) {\n logger.info(`RetryPolicy: Secondary access with 404, will retry.`);\n return true;\n }\n // Server internal error or server timeout\n if (statusCode === 503 || statusCode === 500) {\n logger.info(`RetryPolicy: Will retry for status code ${statusCode}.`);\n return true;\n }\n }\n if ((err === null || err === void 0 ? void 0 : err.code) === \"PARSE_ERROR\" && (err === null || err === void 0 ? void 0 : err.message.startsWith(`Error \"Error: Unclosed root tag`))) {\n logger.info(\"RetryPolicy: Incomplete XML response likely due to service timeout, will retry.\");\n return true;\n }\n return false;\n }\n /**\n * Delay a calculated time between retries.\n *\n * @param isPrimaryRetry -\n * @param attempt -\n * @param abortSignal -\n */\n async delay(isPrimaryRetry, attempt, abortSignal) {\n let delayTimeInMs = 0;\n if (isPrimaryRetry) {\n switch (this.retryOptions.retryPolicyType) {\n case exports.StorageRetryPolicyType.EXPONENTIAL:\n delayTimeInMs = Math.min((Math.pow(2, attempt - 1) - 1) * this.retryOptions.retryDelayInMs, this.retryOptions.maxRetryDelayInMs);\n break;\n case exports.StorageRetryPolicyType.FIXED:\n delayTimeInMs = this.retryOptions.retryDelayInMs;\n break;\n }\n }\n else {\n delayTimeInMs = Math.random() * 1000;\n }\n logger.info(`RetryPolicy: Delay for ${delayTimeInMs}ms`);\n return delay(delayTimeInMs, abortSignal, RETRY_ABORT_ERROR);\n }\n}\n\n// Copyright (c) Microsoft Corporation.\n/**\n * StorageRetryPolicyFactory is a factory class helping generating {@link StorageRetryPolicy} objects.\n */\nclass StorageRetryPolicyFactory {\n /**\n * Creates an instance of StorageRetryPolicyFactory.\n * @param retryOptions -\n */\n constructor(retryOptions) {\n this.retryOptions = retryOptions;\n }\n /**\n * Creates a StorageRetryPolicy object.\n *\n * @param nextPolicy -\n * @param options -\n */\n create(nextPolicy, options) {\n return new StorageRetryPolicy(nextPolicy, options, this.retryOptions);\n }\n}\n\n// Copyright (c) Microsoft Corporation.\n/**\n * Credential policy used to sign HTTP(S) requests before sending. This is an\n * abstract class.\n */\nclass CredentialPolicy extends coreHttp.BaseRequestPolicy {\n /**\n * Sends out request.\n *\n * @param request -\n */\n sendRequest(request) {\n return this._nextPolicy.sendRequest(this.signRequest(request));\n }\n /**\n * Child classes must implement this method with request signing. This method\n * will be executed in {@link sendRequest}.\n *\n * @param request -\n */\n signRequest(request) {\n // Child classes must override this method with request signing. This method\n // will be executed in sendRequest().\n return request;\n }\n}\n\n// Copyright (c) Microsoft Corporation.\n/**\n * AnonymousCredentialPolicy is used with HTTP(S) requests that read public resources\n * or for use with Shared Access Signatures (SAS).\n */\nclass AnonymousCredentialPolicy extends CredentialPolicy {\n /**\n * Creates an instance of AnonymousCredentialPolicy.\n * @param nextPolicy -\n * @param options -\n */\n // The base class has a protected constructor. Adding a public one to enable constructing of this class.\n /* eslint-disable-next-line @typescript-eslint/no-useless-constructor*/\n constructor(nextPolicy, options) {\n super(nextPolicy, options);\n }\n}\n\n// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n/**\n * Credential is an abstract class for Azure Storage HTTP requests signing. This\n * class will host an credentialPolicyCreator factory which generates CredentialPolicy.\n */\nclass Credential {\n /**\n * Creates a RequestPolicy object.\n *\n * @param _nextPolicy -\n * @param _options -\n */\n create(_nextPolicy, _options) {\n throw new Error(\"Method should be implemented in children classes.\");\n }\n}\n\n// Copyright (c) Microsoft Corporation.\n/**\n * AnonymousCredential provides a credentialPolicyCreator member used to create\n * AnonymousCredentialPolicy objects. AnonymousCredentialPolicy is used with\n * HTTP(S) requests that read public resources or for use with Shared Access\n * Signatures (SAS).\n */\nclass AnonymousCredential extends Credential {\n /**\n * Creates an {@link AnonymousCredentialPolicy} object.\n *\n * @param nextPolicy -\n * @param options -\n */\n create(nextPolicy, options) {\n return new AnonymousCredentialPolicy(nextPolicy, options);\n }\n}\n\n// Copyright (c) Microsoft Corporation.\n/**\n * TelemetryPolicy is a policy used to tag user-agent header for every requests.\n */\nclass TelemetryPolicy extends coreHttp.BaseRequestPolicy {\n /**\n * Creates an instance of TelemetryPolicy.\n * @param nextPolicy -\n * @param options -\n * @param telemetry -\n */\n constructor(nextPolicy, options, telemetry) {\n super(nextPolicy, options);\n this.telemetry = telemetry;\n }\n /**\n * Sends out request.\n *\n * @param request -\n */\n async sendRequest(request) {\n if (coreHttp.isNode) {\n if (!request.headers) {\n request.headers = new coreHttp.HttpHeaders();\n }\n if (!request.headers.get(HeaderConstants.USER_AGENT)) {\n request.headers.set(HeaderConstants.USER_AGENT, this.telemetry);\n }\n }\n return this._nextPolicy.sendRequest(request);\n }\n}\n\n// Copyright (c) Microsoft Corporation.\n/**\n * TelemetryPolicyFactory is a factory class helping generating {@link TelemetryPolicy} objects.\n */\nclass TelemetryPolicyFactory {\n /**\n * Creates an instance of TelemetryPolicyFactory.\n * @param telemetry -\n */\n constructor(telemetry) {\n const userAgentInfo = [];\n if (coreHttp.isNode) {\n if (telemetry) {\n const telemetryString = telemetry.userAgentPrefix || \"\";\n if (telemetryString.length > 0 && userAgentInfo.indexOf(telemetryString) === -1) {\n userAgentInfo.push(telemetryString);\n }\n }\n // e.g. azsdk-js-storageblob/10.0.0\n const libInfo = `azsdk-js-storageblob/${SDK_VERSION}`;\n if (userAgentInfo.indexOf(libInfo) === -1) {\n userAgentInfo.push(libInfo);\n }\n // e.g. (NODE-VERSION 4.9.1; Windows_NT 10.0.16299)\n let runtimeInfo = `(NODE-VERSION ${process.version})`;\n if (os__namespace) {\n runtimeInfo = `(NODE-VERSION ${process.version}; ${os__namespace.type()} ${os__namespace.release()})`;\n }\n if (userAgentInfo.indexOf(runtimeInfo) === -1) {\n userAgentInfo.push(runtimeInfo);\n }\n }\n this.telemetryString = userAgentInfo.join(\" \");\n }\n /**\n * Creates a TelemetryPolicy object.\n *\n * @param nextPolicy -\n * @param options -\n */\n create(nextPolicy, options) {\n return new TelemetryPolicy(nextPolicy, options, this.telemetryString);\n }\n}\n\n// Copyright (c) Microsoft Corporation.\nconst _defaultHttpClient = new coreHttp.DefaultHttpClient();\nfunction getCachedDefaultHttpClient() {\n return _defaultHttpClient;\n}\n\n// Copyright (c) Microsoft Corporation.\n/**\n * A set of constants used internally when processing requests.\n */\nconst Constants = {\n DefaultScope: \"/.default\",\n /**\n * Defines constants for use with HTTP headers.\n */\n HeaderConstants: {\n /**\n * The Authorization header.\n */\n AUTHORIZATION: \"authorization\",\n },\n};\n// Default options for the cycler if none are provided\nconst DEFAULT_CYCLER_OPTIONS = {\n forcedRefreshWindowInMs: 1000,\n retryIntervalInMs: 3000,\n refreshWindowInMs: 1000 * 60 * 2, // Start refreshing 2m before expiry\n};\n/**\n * Converts an an unreliable access token getter (which may resolve with null)\n * into an AccessTokenGetter by retrying the unreliable getter in a regular\n * interval.\n *\n * @param getAccessToken - a function that produces a promise of an access\n * token that may fail by returning null\n * @param retryIntervalInMs - the time (in milliseconds) to wait between retry\n * attempts\n * @param timeoutInMs - the timestamp after which the refresh attempt will fail,\n * throwing an exception\n * @returns - a promise that, if it resolves, will resolve with an access token\n */\nasync function beginRefresh(getAccessToken, retryIntervalInMs, timeoutInMs) {\n // This wrapper handles exceptions gracefully as long as we haven't exceeded\n // the timeout.\n async function tryGetAccessToken() {\n if (Date.now() < timeoutInMs) {\n try {\n return await getAccessToken();\n }\n catch (_a) {\n return null;\n }\n }\n else {\n const finalToken = await getAccessToken();\n // Timeout is up, so throw if it's still null\n if (finalToken === null) {\n throw new Error(\"Failed to refresh access token.\");\n }\n return finalToken;\n }\n }\n let token = await tryGetAccessToken();\n while (token === null) {\n await coreHttp.delay(retryIntervalInMs);\n token = await tryGetAccessToken();\n }\n return token;\n}\n/**\n * Creates a token cycler from a credential, scopes, and optional settings.\n *\n * A token cycler represents a way to reliably retrieve a valid access token\n * from a TokenCredential. It will handle initializing the token, refreshing it\n * when it nears expiration, and synchronizes refresh attempts to avoid\n * concurrency hazards.\n *\n * @param credential - the underlying TokenCredential that provides the access\n * token\n * @param scopes - the scopes to request authorization for\n * @param tokenCyclerOptions - optionally override default settings for the cycler\n *\n * @returns - a function that reliably produces a valid access token\n */\nfunction createTokenCycler(credential, scopes, tokenCyclerOptions) {\n let refreshWorker = null;\n let token = null;\n const options = Object.assign(Object.assign({}, DEFAULT_CYCLER_OPTIONS), tokenCyclerOptions);\n /**\n * This little holder defines several predicates that we use to construct\n * the rules of refreshing the token.\n */\n const cycler = {\n /**\n * Produces true if a refresh job is currently in progress.\n */\n get isRefreshing() {\n return refreshWorker !== null;\n },\n /**\n * Produces true if the cycler SHOULD refresh (we are within the refresh\n * window and not already refreshing)\n */\n get shouldRefresh() {\n var _a;\n return (!cycler.isRefreshing &&\n ((_a = token === null || token === void 0 ? void 0 : token.expiresOnTimestamp) !== null && _a !== void 0 ? _a : 0) - options.refreshWindowInMs < Date.now());\n },\n /**\n * Produces true if the cycler MUST refresh (null or nearly-expired\n * token).\n */\n get mustRefresh() {\n return (token === null || token.expiresOnTimestamp - options.forcedRefreshWindowInMs < Date.now());\n },\n };\n /**\n * Starts a refresh job or returns the existing job if one is already\n * running.\n */\n function refresh(getTokenOptions) {\n var _a;\n if (!cycler.isRefreshing) {\n // We bind `scopes` here to avoid passing it around a lot\n const tryGetAccessToken = () => credential.getToken(scopes, getTokenOptions);\n // Take advantage of promise chaining to insert an assignment to `token`\n // before the refresh can be considered done.\n refreshWorker = beginRefresh(tryGetAccessToken, options.retryIntervalInMs, \n // If we don't have a token, then we should timeout immediately\n (_a = token === null || token === void 0 ? void 0 : token.expiresOnTimestamp) !== null && _a !== void 0 ? _a : Date.now())\n .then((_token) => {\n refreshWorker = null;\n token = _token;\n return token;\n })\n .catch((reason) => {\n // We also should reset the refresher if we enter a failed state. All\n // existing awaiters will throw, but subsequent requests will start a\n // new retry chain.\n refreshWorker = null;\n token = null;\n throw reason;\n });\n }\n return refreshWorker;\n }\n return async (tokenOptions) => {\n //\n // Simple rules:\n // - If we MUST refresh, then return the refresh task, blocking\n // the pipeline until a token is available.\n // - If we SHOULD refresh, then run refresh but don't return it\n // (we can still use the cached token).\n // - Return the token, since it's fine if we didn't return in\n // step 1.\n //\n if (cycler.mustRefresh)\n return refresh(tokenOptions);\n if (cycler.shouldRefresh) {\n refresh(tokenOptions);\n }\n return token;\n };\n}\n/**\n * We will retrieve the challenge only if the response status code was 401,\n * and if the response contained the header \"WWW-Authenticate\" with a non-empty value.\n */\nfunction getChallenge(response) {\n const challenge = response.headers.get(\"WWW-Authenticate\");\n if (response.status === 401 && challenge) {\n return challenge;\n }\n return;\n}\n/**\n * Converts: `Bearer a=\"b\" c=\"d\"`.\n * Into: `[ { a: 'b', c: 'd' }]`.\n *\n * @internal\n */\nfunction parseChallenge(challenge) {\n const bearerChallenge = challenge.slice(\"Bearer \".length);\n const challengeParts = `${bearerChallenge.trim()} `.split(\" \").filter((x) => x);\n const keyValuePairs = challengeParts.map((keyValue) => (([key, value]) => ({ [key]: value }))(keyValue.trim().split(\"=\")));\n // Key-value pairs to plain object:\n return keyValuePairs.reduce((a, b) => (Object.assign(Object.assign({}, a), b)), {});\n}\n// #endregion\n/**\n * Creates a new factory for a RequestPolicy that applies a bearer token to\n * the requests' `Authorization` headers.\n *\n * @param credential - The TokenCredential implementation that can supply the bearer token.\n * @param scopes - The scopes for which the bearer token applies.\n */\nfunction storageBearerTokenChallengeAuthenticationPolicy(credential, scopes) {\n // This simple function encapsulates the entire process of reliably retrieving the token\n let getToken = createTokenCycler(credential, scopes);\n class StorageBearerTokenChallengeAuthenticationPolicy extends coreHttp.BaseRequestPolicy {\n constructor(nextPolicy, options) {\n super(nextPolicy, options);\n }\n async sendRequest(webResource) {\n if (!webResource.url.toLowerCase().startsWith(\"https://\")) {\n throw new Error(\"Bearer token authentication is not permitted for non-TLS protected (non-https) URLs.\");\n }\n const getTokenInternal = getToken;\n const token = (await getTokenInternal({\n abortSignal: webResource.abortSignal,\n tracingOptions: {\n tracingContext: webResource.tracingContext,\n },\n })).token;\n webResource.headers.set(Constants.HeaderConstants.AUTHORIZATION, `Bearer ${token}`);\n const response = await this._nextPolicy.sendRequest(webResource);\n if ((response === null || response === void 0 ? void 0 : response.status) === 401) {\n const challenge = getChallenge(response);\n if (challenge) {\n const challengeInfo = parseChallenge(challenge);\n const challengeScopes = challengeInfo.resource_id + Constants.DefaultScope;\n const parsedAuthUri = coreHttp.URLBuilder.parse(challengeInfo.authorization_uri);\n const pathSegments = parsedAuthUri.getPath().split(\"/\");\n const tenantId = pathSegments[1];\n const getTokenForChallenge = createTokenCycler(credential, challengeScopes);\n const tokenForChallenge = (await getTokenForChallenge({\n abortSignal: webResource.abortSignal,\n tracingOptions: {\n tracingContext: webResource.tracingContext,\n },\n tenantId: tenantId,\n })).token;\n getToken = getTokenForChallenge;\n webResource.headers.set(Constants.HeaderConstants.AUTHORIZATION, `Bearer ${tokenForChallenge}`);\n return this._nextPolicy.sendRequest(webResource);\n }\n }\n return response;\n }\n }\n return {\n create: (nextPolicy, options) => {\n return new StorageBearerTokenChallengeAuthenticationPolicy(nextPolicy, options);\n },\n };\n}\n\n// Copyright (c) Microsoft Corporation.\n/**\n * A helper to decide if a given argument satisfies the Pipeline contract\n * @param pipeline - An argument that may be a Pipeline\n * @returns true when the argument satisfies the Pipeline contract\n */\nfunction isPipelineLike(pipeline) {\n if (!pipeline || typeof pipeline !== \"object\") {\n return false;\n }\n const castPipeline = pipeline;\n return (Array.isArray(castPipeline.factories) &&\n typeof castPipeline.options === \"object\" &&\n typeof castPipeline.toServiceClientOptions === \"function\");\n}\n/**\n * A Pipeline class containing HTTP request policies.\n * You can create a default Pipeline by calling {@link newPipeline}.\n * Or you can create a Pipeline with your own policies by the constructor of Pipeline.\n *\n * Refer to {@link newPipeline} and provided policies before implementing your\n * customized Pipeline.\n */\nclass Pipeline {\n /**\n * Creates an instance of Pipeline. Customize HTTPClient by implementing IHttpClient interface.\n *\n * @param factories -\n * @param options -\n */\n constructor(factories, options = {}) {\n this.factories = factories;\n // when options.httpClient is not specified, passing in a DefaultHttpClient instance to\n // avoid each client creating its own http client.\n this.options = Object.assign(Object.assign({}, options), { httpClient: options.httpClient || getCachedDefaultHttpClient() });\n }\n /**\n * Transfer Pipeline object to ServiceClientOptions object which is required by\n * ServiceClient constructor.\n *\n * @returns The ServiceClientOptions object from this Pipeline.\n */\n toServiceClientOptions() {\n return {\n httpClient: this.options.httpClient,\n requestPolicyFactories: this.factories,\n };\n }\n}\n/**\n * Creates a new Pipeline object with Credential provided.\n *\n * @param credential - Such as AnonymousCredential, StorageSharedKeyCredential or any credential from the `@azure/identity` package to authenticate requests to the service. You can also provide an object that implements the TokenCredential interface. If not specified, AnonymousCredential is used.\n * @param pipelineOptions - Optional. Options.\n * @returns A new Pipeline object.\n */\nfunction newPipeline(credential, pipelineOptions = {}) {\n var _a;\n if (credential === undefined) {\n credential = new AnonymousCredential();\n }\n // Order is important. Closer to the API at the top & closer to the network at the bottom.\n // The credential's policy factory must appear close to the wire so it can sign any\n // changes made by other factories (like UniqueRequestIDPolicyFactory)\n const telemetryPolicy = new TelemetryPolicyFactory(pipelineOptions.userAgentOptions);\n const factories = [\n coreHttp.tracingPolicy({ userAgent: telemetryPolicy.telemetryString }),\n coreHttp.keepAlivePolicy(pipelineOptions.keepAliveOptions),\n telemetryPolicy,\n coreHttp.generateClientRequestIdPolicy(),\n new StorageBrowserPolicyFactory(),\n new StorageRetryPolicyFactory(pipelineOptions.retryOptions),\n // Default deserializationPolicy is provided by protocol layer\n // Use customized XML char key of \"#\" so we could deserialize metadata\n // with \"_\" key\n coreHttp.deserializationPolicy(undefined, { xmlCharKey: \"#\" }),\n coreHttp.logPolicy({\n logger: logger.info,\n allowedHeaderNames: StorageBlobLoggingAllowedHeaderNames,\n allowedQueryParameters: StorageBlobLoggingAllowedQueryParameters,\n }),\n ];\n if (coreHttp.isNode) {\n // policies only available in Node.js runtime, not in browsers\n factories.push(coreHttp.proxyPolicy(pipelineOptions.proxyOptions));\n factories.push(coreHttp.disableResponseDecompressionPolicy());\n }\n factories.push(coreHttp.isTokenCredential(credential)\n ? attachCredential(storageBearerTokenChallengeAuthenticationPolicy(credential, (_a = pipelineOptions.audience) !== null && _a !== void 0 ? _a : StorageOAuthScopes), credential)\n : credential);\n return new Pipeline(factories, pipelineOptions);\n}\n\n// Copyright (c) Microsoft Corporation.\n/**\n * StorageSharedKeyCredentialPolicy is a policy used to sign HTTP request with a shared key.\n */\nclass StorageSharedKeyCredentialPolicy extends CredentialPolicy {\n /**\n * Creates an instance of StorageSharedKeyCredentialPolicy.\n * @param nextPolicy -\n * @param options -\n * @param factory -\n */\n constructor(nextPolicy, options, factory) {\n super(nextPolicy, options);\n this.factory = factory;\n }\n /**\n * Signs request.\n *\n * @param request -\n */\n signRequest(request) {\n request.headers.set(HeaderConstants.X_MS_DATE, new Date().toUTCString());\n if (request.body &&\n (typeof request.body === \"string\" || request.body !== undefined) &&\n request.body.length > 0) {\n request.headers.set(HeaderConstants.CONTENT_LENGTH, Buffer.byteLength(request.body));\n }\n const stringToSign = [\n request.method.toUpperCase(),\n this.getHeaderValueToSign(request, HeaderConstants.CONTENT_LANGUAGE),\n this.getHeaderValueToSign(request, HeaderConstants.CONTENT_ENCODING),\n this.getHeaderValueToSign(request, HeaderConstants.CONTENT_LENGTH),\n this.getHeaderValueToSign(request, HeaderConstants.CONTENT_MD5),\n this.getHeaderValueToSign(request, HeaderConstants.CONTENT_TYPE),\n this.getHeaderValueToSign(request, HeaderConstants.DATE),\n this.getHeaderValueToSign(request, HeaderConstants.IF_MODIFIED_SINCE),\n this.getHeaderValueToSign(request, HeaderConstants.IF_MATCH),\n this.getHeaderValueToSign(request, HeaderConstants.IF_NONE_MATCH),\n this.getHeaderValueToSign(request, HeaderConstants.IF_UNMODIFIED_SINCE),\n this.getHeaderValueToSign(request, HeaderConstants.RANGE),\n ].join(\"\\n\") +\n \"\\n\" +\n this.getCanonicalizedHeadersString(request) +\n this.getCanonicalizedResourceString(request);\n const signature = this.factory.computeHMACSHA256(stringToSign);\n request.headers.set(HeaderConstants.AUTHORIZATION, `SharedKey ${this.factory.accountName}:${signature}`);\n // console.log(`[URL]:${request.url}`);\n // console.log(`[HEADERS]:${request.headers.toString()}`);\n // console.log(`[STRING TO SIGN]:${JSON.stringify(stringToSign)}`);\n // console.log(`[KEY]: ${request.headers.get(HeaderConstants.AUTHORIZATION)}`);\n return request;\n }\n /**\n * Retrieve header value according to shared key sign rules.\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/authenticate-with-shared-key\n *\n * @param request -\n * @param headerName -\n */\n getHeaderValueToSign(request, headerName) {\n const value = request.headers.get(headerName);\n if (!value) {\n return \"\";\n }\n // When using version 2015-02-21 or later, if Content-Length is zero, then\n // set the Content-Length part of the StringToSign to an empty string.\n // https://docs.microsoft.com/en-us/rest/api/storageservices/authenticate-with-shared-key\n if (headerName === HeaderConstants.CONTENT_LENGTH && value === \"0\") {\n return \"\";\n }\n return value;\n }\n /**\n * To construct the CanonicalizedHeaders portion of the signature string, follow these steps:\n * 1. Retrieve all headers for the resource that begin with x-ms-, including the x-ms-date header.\n * 2. Convert each HTTP header name to lowercase.\n * 3. Sort the headers lexicographically by header name, in ascending order.\n * Each header may appear only once in the string.\n * 4. Replace any linear whitespace in the header value with a single space.\n * 5. Trim any whitespace around the colon in the header.\n * 6. Finally, append a new-line character to each canonicalized header in the resulting list.\n * Construct the CanonicalizedHeaders string by concatenating all headers in this list into a single string.\n *\n * @param request -\n */\n getCanonicalizedHeadersString(request) {\n let headersArray = request.headers.headersArray().filter((value) => {\n return value.name.toLowerCase().startsWith(HeaderConstants.PREFIX_FOR_STORAGE);\n });\n headersArray.sort((a, b) => {\n return a.name.toLowerCase().localeCompare(b.name.toLowerCase());\n });\n // Remove duplicate headers\n headersArray = headersArray.filter((value, index, array) => {\n if (index > 0 && value.name.toLowerCase() === array[index - 1].name.toLowerCase()) {\n return false;\n }\n return true;\n });\n let canonicalizedHeadersStringToSign = \"\";\n headersArray.forEach((header) => {\n canonicalizedHeadersStringToSign += `${header.name\n .toLowerCase()\n .trimRight()}:${header.value.trimLeft()}\\n`;\n });\n return canonicalizedHeadersStringToSign;\n }\n /**\n * Retrieves the webResource canonicalized resource string.\n *\n * @param request -\n */\n getCanonicalizedResourceString(request) {\n const path = getURLPath(request.url) || \"/\";\n let canonicalizedResourceString = \"\";\n canonicalizedResourceString += `/${this.factory.accountName}${path}`;\n const queries = getURLQueries(request.url);\n const lowercaseQueries = {};\n if (queries) {\n const queryKeys = [];\n for (const key in queries) {\n if (Object.prototype.hasOwnProperty.call(queries, key)) {\n const lowercaseKey = key.toLowerCase();\n lowercaseQueries[lowercaseKey] = queries[key];\n queryKeys.push(lowercaseKey);\n }\n }\n queryKeys.sort();\n for (const key of queryKeys) {\n canonicalizedResourceString += `\\n${key}:${decodeURIComponent(lowercaseQueries[key])}`;\n }\n }\n return canonicalizedResourceString;\n }\n}\n\n// Copyright (c) Microsoft Corporation.\n/**\n * ONLY AVAILABLE IN NODE.JS RUNTIME.\n *\n * StorageSharedKeyCredential for account key authorization of Azure Storage service.\n */\nclass StorageSharedKeyCredential extends Credential {\n /**\n * Creates an instance of StorageSharedKeyCredential.\n * @param accountName -\n * @param accountKey -\n */\n constructor(accountName, accountKey) {\n super();\n this.accountName = accountName;\n this.accountKey = Buffer.from(accountKey, \"base64\");\n }\n /**\n * Creates a StorageSharedKeyCredentialPolicy object.\n *\n * @param nextPolicy -\n * @param options -\n */\n create(nextPolicy, options) {\n return new StorageSharedKeyCredentialPolicy(nextPolicy, options, this);\n }\n /**\n * Generates a hash signature for an HTTP request or for a SAS.\n *\n * @param stringToSign -\n */\n computeHMACSHA256(stringToSign) {\n return crypto.createHmac(\"sha256\", this.accountKey).update(stringToSign, \"utf8\").digest(\"base64\");\n }\n}\n\n/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\nconst packageName = \"azure-storage-blob\";\nconst packageVersion = \"12.12.0\";\nclass StorageClientContext extends coreHttp__namespace.ServiceClient {\n /**\n * Initializes a new instance of the StorageClientContext class.\n * @param url The URL of the service account, container, or blob that is the target of the desired\n * operation.\n * @param options The parameter options\n */\n constructor(url, options) {\n if (url === undefined) {\n throw new Error(\"'url' cannot be null\");\n }\n // Initializing default values for options\n if (!options) {\n options = {};\n }\n if (!options.userAgent) {\n const defaultUserAgent = coreHttp__namespace.getDefaultUserAgentValue();\n options.userAgent = `${packageName}/${packageVersion} ${defaultUserAgent}`;\n }\n super(undefined, options);\n this.requestContentType = \"application/json; charset=utf-8\";\n this.baseUri = options.endpoint || \"{url}\";\n // Parameter assignments\n this.url = url;\n // Assigning values to Constant parameters\n this.version = options.version || \"2021-10-04\";\n }\n}\n\n// Copyright (c) Microsoft Corporation.\n/**\n * A StorageClient represents a based URL class for {@link BlobServiceClient}, {@link ContainerClient}\n * and etc.\n */\nclass StorageClient {\n /**\n * Creates an instance of StorageClient.\n * @param url - url to resource\n * @param pipeline - request policy pipeline.\n */\n constructor(url, pipeline) {\n // URL should be encoded and only once, protocol layer shouldn't encode URL again\n this.url = escapeURLPath(url);\n this.accountName = getAccountNameFromUrl(url);\n this.pipeline = pipeline;\n this.storageClientContext = new StorageClientContext(this.url, pipeline.toServiceClientOptions());\n this.isHttps = iEqual(getURLScheme(this.url) || \"\", \"https\");\n this.credential = new AnonymousCredential();\n for (const factory of this.pipeline.factories) {\n if ((coreHttp.isNode && factory instanceof StorageSharedKeyCredential) ||\n factory instanceof AnonymousCredential) {\n this.credential = factory;\n }\n else if (coreHttp.isTokenCredential(factory.credential)) {\n // Only works if the factory has been attached a \"credential\" property.\n // We do that in newPipeline() when using TokenCredential.\n this.credential = factory.credential;\n }\n }\n // Override protocol layer's default content-type\n const storageClientContext = this.storageClientContext;\n storageClientContext.requestContentType = undefined;\n }\n}\n\n// Copyright (c) Microsoft Corporation.\n/**\n * Creates a span using the global tracer.\n * @internal\n */\nconst createSpan = coreTracing.createSpanFunction({\n packagePrefix: \"Azure.Storage.Blob\",\n namespace: \"Microsoft.Storage\",\n});\n/**\n * @internal\n *\n * Adapt the tracing options from OperationOptions to what they need to be for\n * RequestOptionsBase (when we update to later OpenTelemetry versions this is now\n * two separate fields, not just one).\n */\nfunction convertTracingToRequestOptionsBase(options) {\n var _a, _b;\n return {\n // By passing spanOptions if they exist at runtime, we're backwards compatible with @azure/core-tracing@preview.13 and earlier.\n spanOptions: (_a = options === null || options === void 0 ? void 0 : options.tracingOptions) === null || _a === void 0 ? void 0 : _a.spanOptions,\n tracingContext: (_b = options === null || options === void 0 ? void 0 : options.tracingOptions) === null || _b === void 0 ? void 0 : _b.tracingContext,\n };\n}\n\n// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n/**\n * ONLY AVAILABLE IN NODE.JS RUNTIME.\n *\n * This is a helper class to construct a string representing the permissions granted by a ServiceSAS to a blob. Setting\n * a value to true means that any SAS which uses these permissions will grant permissions for that operation. Once all\n * the values are set, this should be serialized with toString and set as the permissions field on a\n * {@link BlobSASSignatureValues} object. It is possible to construct the permissions string without this class, but\n * the order of the permissions is particular and this class guarantees correctness.\n */\nclass BlobSASPermissions {\n constructor() {\n /**\n * Specifies Read access granted.\n */\n this.read = false;\n /**\n * Specifies Add access granted.\n */\n this.add = false;\n /**\n * Specifies Create access granted.\n */\n this.create = false;\n /**\n * Specifies Write access granted.\n */\n this.write = false;\n /**\n * Specifies Delete access granted.\n */\n this.delete = false;\n /**\n * Specifies Delete version access granted.\n */\n this.deleteVersion = false;\n /**\n * Specfies Tag access granted.\n */\n this.tag = false;\n /**\n * Specifies Move access granted.\n */\n this.move = false;\n /**\n * Specifies Execute access granted.\n */\n this.execute = false;\n /**\n * Specifies SetImmutabilityPolicy access granted.\n */\n this.setImmutabilityPolicy = false;\n /**\n * Specifies that Permanent Delete is permitted.\n */\n this.permanentDelete = false;\n }\n /**\n * Creates a {@link BlobSASPermissions} from the specified permissions string. This method will throw an\n * Error if it encounters a character that does not correspond to a valid permission.\n *\n * @param permissions -\n */\n static parse(permissions) {\n const blobSASPermissions = new BlobSASPermissions();\n for (const char of permissions) {\n switch (char) {\n case \"r\":\n blobSASPermissions.read = true;\n break;\n case \"a\":\n blobSASPermissions.add = true;\n break;\n case \"c\":\n blobSASPermissions.create = true;\n break;\n case \"w\":\n blobSASPermissions.write = true;\n break;\n case \"d\":\n blobSASPermissions.delete = true;\n break;\n case \"x\":\n blobSASPermissions.deleteVersion = true;\n break;\n case \"t\":\n blobSASPermissions.tag = true;\n break;\n case \"m\":\n blobSASPermissions.move = true;\n break;\n case \"e\":\n blobSASPermissions.execute = true;\n break;\n case \"i\":\n blobSASPermissions.setImmutabilityPolicy = true;\n break;\n case \"y\":\n blobSASPermissions.permanentDelete = true;\n break;\n default:\n throw new RangeError(`Invalid permission: ${char}`);\n }\n }\n return blobSASPermissions;\n }\n /**\n * Creates a {@link BlobSASPermissions} from a raw object which contains same keys as it\n * and boolean values for them.\n *\n * @param permissionLike -\n */\n static from(permissionLike) {\n const blobSASPermissions = new BlobSASPermissions();\n if (permissionLike.read) {\n blobSASPermissions.read = true;\n }\n if (permissionLike.add) {\n blobSASPermissions.add = true;\n }\n if (permissionLike.create) {\n blobSASPermissions.create = true;\n }\n if (permissionLike.write) {\n blobSASPermissions.write = true;\n }\n if (permissionLike.delete) {\n blobSASPermissions.delete = true;\n }\n if (permissionLike.deleteVersion) {\n blobSASPermissions.deleteVersion = true;\n }\n if (permissionLike.tag) {\n blobSASPermissions.tag = true;\n }\n if (permissionLike.move) {\n blobSASPermissions.move = true;\n }\n if (permissionLike.execute) {\n blobSASPermissions.execute = true;\n }\n if (permissionLike.setImmutabilityPolicy) {\n blobSASPermissions.setImmutabilityPolicy = true;\n }\n if (permissionLike.permanentDelete) {\n blobSASPermissions.permanentDelete = true;\n }\n return blobSASPermissions;\n }\n /**\n * Converts the given permissions to a string. Using this method will guarantee the permissions are in an\n * order accepted by the service.\n *\n * @returns A string which represents the BlobSASPermissions\n */\n toString() {\n const permissions = [];\n if (this.read) {\n permissions.push(\"r\");\n }\n if (this.add) {\n permissions.push(\"a\");\n }\n if (this.create) {\n permissions.push(\"c\");\n }\n if (this.write) {\n permissions.push(\"w\");\n }\n if (this.delete) {\n permissions.push(\"d\");\n }\n if (this.deleteVersion) {\n permissions.push(\"x\");\n }\n if (this.tag) {\n permissions.push(\"t\");\n }\n if (this.move) {\n permissions.push(\"m\");\n }\n if (this.execute) {\n permissions.push(\"e\");\n }\n if (this.setImmutabilityPolicy) {\n permissions.push(\"i\");\n }\n if (this.permanentDelete) {\n permissions.push(\"y\");\n }\n return permissions.join(\"\");\n }\n}\n\n// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n/**\n * This is a helper class to construct a string representing the permissions granted by a ServiceSAS to a container.\n * Setting a value to true means that any SAS which uses these permissions will grant permissions for that operation.\n * Once all the values are set, this should be serialized with toString and set as the permissions field on a\n * {@link BlobSASSignatureValues} object. It is possible to construct the permissions string without this class, but\n * the order of the permissions is particular and this class guarantees correctness.\n */\nclass ContainerSASPermissions {\n constructor() {\n /**\n * Specifies Read access granted.\n */\n this.read = false;\n /**\n * Specifies Add access granted.\n */\n this.add = false;\n /**\n * Specifies Create access granted.\n */\n this.create = false;\n /**\n * Specifies Write access granted.\n */\n this.write = false;\n /**\n * Specifies Delete access granted.\n */\n this.delete = false;\n /**\n * Specifies Delete version access granted.\n */\n this.deleteVersion = false;\n /**\n * Specifies List access granted.\n */\n this.list = false;\n /**\n * Specfies Tag access granted.\n */\n this.tag = false;\n /**\n * Specifies Move access granted.\n */\n this.move = false;\n /**\n * Specifies Execute access granted.\n */\n this.execute = false;\n /**\n * Specifies SetImmutabilityPolicy access granted.\n */\n this.setImmutabilityPolicy = false;\n /**\n * Specifies that Permanent Delete is permitted.\n */\n this.permanentDelete = false;\n /**\n * Specifies that Filter Blobs by Tags is permitted.\n */\n this.filterByTags = false;\n }\n /**\n * Creates an {@link ContainerSASPermissions} from the specified permissions string. This method will throw an\n * Error if it encounters a character that does not correspond to a valid permission.\n *\n * @param permissions -\n */\n static parse(permissions) {\n const containerSASPermissions = new ContainerSASPermissions();\n for (const char of permissions) {\n switch (char) {\n case \"r\":\n containerSASPermissions.read = true;\n break;\n case \"a\":\n containerSASPermissions.add = true;\n break;\n case \"c\":\n containerSASPermissions.create = true;\n break;\n case \"w\":\n containerSASPermissions.write = true;\n break;\n case \"d\":\n containerSASPermissions.delete = true;\n break;\n case \"l\":\n containerSASPermissions.list = true;\n break;\n case \"t\":\n containerSASPermissions.tag = true;\n break;\n case \"x\":\n containerSASPermissions.deleteVersion = true;\n break;\n case \"m\":\n containerSASPermissions.move = true;\n break;\n case \"e\":\n containerSASPermissions.execute = true;\n break;\n case \"i\":\n containerSASPermissions.setImmutabilityPolicy = true;\n break;\n case \"y\":\n containerSASPermissions.permanentDelete = true;\n break;\n case \"f\":\n containerSASPermissions.filterByTags = true;\n break;\n default:\n throw new RangeError(`Invalid permission ${char}`);\n }\n }\n return containerSASPermissions;\n }\n /**\n * Creates a {@link ContainerSASPermissions} from a raw object which contains same keys as it\n * and boolean values for them.\n *\n * @param permissionLike -\n */\n static from(permissionLike) {\n const containerSASPermissions = new ContainerSASPermissions();\n if (permissionLike.read) {\n containerSASPermissions.read = true;\n }\n if (permissionLike.add) {\n containerSASPermissions.add = true;\n }\n if (permissionLike.create) {\n containerSASPermissions.create = true;\n }\n if (permissionLike.write) {\n containerSASPermissions.write = true;\n }\n if (permissionLike.delete) {\n containerSASPermissions.delete = true;\n }\n if (permissionLike.list) {\n containerSASPermissions.list = true;\n }\n if (permissionLike.deleteVersion) {\n containerSASPermissions.deleteVersion = true;\n }\n if (permissionLike.tag) {\n containerSASPermissions.tag = true;\n }\n if (permissionLike.move) {\n containerSASPermissions.move = true;\n }\n if (permissionLike.execute) {\n containerSASPermissions.execute = true;\n }\n if (permissionLike.setImmutabilityPolicy) {\n containerSASPermissions.setImmutabilityPolicy = true;\n }\n if (permissionLike.permanentDelete) {\n containerSASPermissions.permanentDelete = true;\n }\n if (permissionLike.filterByTags) {\n containerSASPermissions.filterByTags = true;\n }\n return containerSASPermissions;\n }\n /**\n * Converts the given permissions to a string. Using this method will guarantee the permissions are in an\n * order accepted by the service.\n *\n * The order of the characters should be as specified here to ensure correctness.\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/constructing-a-service-sas\n *\n */\n toString() {\n const permissions = [];\n if (this.read) {\n permissions.push(\"r\");\n }\n if (this.add) {\n permissions.push(\"a\");\n }\n if (this.create) {\n permissions.push(\"c\");\n }\n if (this.write) {\n permissions.push(\"w\");\n }\n if (this.delete) {\n permissions.push(\"d\");\n }\n if (this.deleteVersion) {\n permissions.push(\"x\");\n }\n if (this.list) {\n permissions.push(\"l\");\n }\n if (this.tag) {\n permissions.push(\"t\");\n }\n if (this.move) {\n permissions.push(\"m\");\n }\n if (this.execute) {\n permissions.push(\"e\");\n }\n if (this.setImmutabilityPolicy) {\n permissions.push(\"i\");\n }\n if (this.permanentDelete) {\n permissions.push(\"y\");\n }\n if (this.filterByTags) {\n permissions.push(\"f\");\n }\n return permissions.join(\"\");\n }\n}\n\n// Copyright (c) Microsoft Corporation.\n/**\n * ONLY AVAILABLE IN NODE.JS RUNTIME.\n *\n * UserDelegationKeyCredential is only used for generation of user delegation SAS.\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/create-user-delegation-sas\n */\nclass UserDelegationKeyCredential {\n /**\n * Creates an instance of UserDelegationKeyCredential.\n * @param accountName -\n * @param userDelegationKey -\n */\n constructor(accountName, userDelegationKey) {\n this.accountName = accountName;\n this.userDelegationKey = userDelegationKey;\n this.key = Buffer.from(userDelegationKey.value, \"base64\");\n }\n /**\n * Generates a hash signature for an HTTP request or for a SAS.\n *\n * @param stringToSign -\n */\n computeHMACSHA256(stringToSign) {\n // console.log(`stringToSign: ${JSON.stringify(stringToSign)}`);\n return crypto.createHmac(\"sha256\", this.key).update(stringToSign, \"utf8\").digest(\"base64\");\n }\n}\n\n// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n/**\n * Generate SasIPRange format string. For example:\n *\n * \"8.8.8.8\" or \"1.1.1.1-255.255.255.255\"\n *\n * @param ipRange -\n */\nfunction ipRangeToString(ipRange) {\n return ipRange.end ? `${ipRange.start}-${ipRange.end}` : ipRange.start;\n}\n\n// Copyright (c) Microsoft Corporation.\n/**\n * Protocols for generated SAS.\n */\nexports.SASProtocol = void 0;\n(function (SASProtocol) {\n /**\n * Protocol that allows HTTPS only\n */\n SASProtocol[\"Https\"] = \"https\";\n /**\n * Protocol that allows both HTTPS and HTTP\n */\n SASProtocol[\"HttpsAndHttp\"] = \"https,http\";\n})(exports.SASProtocol || (exports.SASProtocol = {}));\n/**\n * Represents the components that make up an Azure Storage SAS' query parameters. This type is not constructed directly\n * by the user; it is only generated by the {@link AccountSASSignatureValues} and {@link BlobSASSignatureValues}\n * types. Once generated, it can be encoded into a {@link String} and appended to a URL directly (though caution should\n * be taken here in case there are existing query parameters, which might affect the appropriate means of appending\n * these query parameters).\n *\n * NOTE: Instances of this class are immutable.\n */\nclass SASQueryParameters {\n constructor(version, signature, permissionsOrOptions, services, resourceTypes, protocol, startsOn, expiresOn, ipRange, identifier, resource, cacheControl, contentDisposition, contentEncoding, contentLanguage, contentType, userDelegationKey, preauthorizedAgentObjectId, correlationId, encryptionScope) {\n this.version = version;\n this.signature = signature;\n if (permissionsOrOptions !== undefined && typeof permissionsOrOptions !== \"string\") {\n // SASQueryParametersOptions\n this.permissions = permissionsOrOptions.permissions;\n this.services = permissionsOrOptions.services;\n this.resourceTypes = permissionsOrOptions.resourceTypes;\n this.protocol = permissionsOrOptions.protocol;\n this.startsOn = permissionsOrOptions.startsOn;\n this.expiresOn = permissionsOrOptions.expiresOn;\n this.ipRangeInner = permissionsOrOptions.ipRange;\n this.identifier = permissionsOrOptions.identifier;\n this.encryptionScope = permissionsOrOptions.encryptionScope;\n this.resource = permissionsOrOptions.resource;\n this.cacheControl = permissionsOrOptions.cacheControl;\n this.contentDisposition = permissionsOrOptions.contentDisposition;\n this.contentEncoding = permissionsOrOptions.contentEncoding;\n this.contentLanguage = permissionsOrOptions.contentLanguage;\n this.contentType = permissionsOrOptions.contentType;\n if (permissionsOrOptions.userDelegationKey) {\n this.signedOid = permissionsOrOptions.userDelegationKey.signedObjectId;\n this.signedTenantId = permissionsOrOptions.userDelegationKey.signedTenantId;\n this.signedStartsOn = permissionsOrOptions.userDelegationKey.signedStartsOn;\n this.signedExpiresOn = permissionsOrOptions.userDelegationKey.signedExpiresOn;\n this.signedService = permissionsOrOptions.userDelegationKey.signedService;\n this.signedVersion = permissionsOrOptions.userDelegationKey.signedVersion;\n this.preauthorizedAgentObjectId = permissionsOrOptions.preauthorizedAgentObjectId;\n this.correlationId = permissionsOrOptions.correlationId;\n }\n }\n else {\n this.services = services;\n this.resourceTypes = resourceTypes;\n this.expiresOn = expiresOn;\n this.permissions = permissionsOrOptions;\n this.protocol = protocol;\n this.startsOn = startsOn;\n this.ipRangeInner = ipRange;\n this.encryptionScope = encryptionScope;\n this.identifier = identifier;\n this.resource = resource;\n this.cacheControl = cacheControl;\n this.contentDisposition = contentDisposition;\n this.contentEncoding = contentEncoding;\n this.contentLanguage = contentLanguage;\n this.contentType = contentType;\n if (userDelegationKey) {\n this.signedOid = userDelegationKey.signedObjectId;\n this.signedTenantId = userDelegationKey.signedTenantId;\n this.signedStartsOn = userDelegationKey.signedStartsOn;\n this.signedExpiresOn = userDelegationKey.signedExpiresOn;\n this.signedService = userDelegationKey.signedService;\n this.signedVersion = userDelegationKey.signedVersion;\n this.preauthorizedAgentObjectId = preauthorizedAgentObjectId;\n this.correlationId = correlationId;\n }\n }\n }\n /**\n * Optional. IP range allowed for this SAS.\n *\n * @readonly\n */\n get ipRange() {\n if (this.ipRangeInner) {\n return {\n end: this.ipRangeInner.end,\n start: this.ipRangeInner.start,\n };\n }\n return undefined;\n }\n /**\n * Encodes all SAS query parameters into a string that can be appended to a URL.\n *\n */\n toString() {\n const params = [\n \"sv\",\n \"ss\",\n \"srt\",\n \"spr\",\n \"st\",\n \"se\",\n \"sip\",\n \"si\",\n \"ses\",\n \"skoid\",\n \"sktid\",\n \"skt\",\n \"ske\",\n \"sks\",\n \"skv\",\n \"sr\",\n \"sp\",\n \"sig\",\n \"rscc\",\n \"rscd\",\n \"rsce\",\n \"rscl\",\n \"rsct\",\n \"saoid\",\n \"scid\",\n ];\n const queries = [];\n for (const param of params) {\n switch (param) {\n case \"sv\":\n this.tryAppendQueryParameter(queries, param, this.version);\n break;\n case \"ss\":\n this.tryAppendQueryParameter(queries, param, this.services);\n break;\n case \"srt\":\n this.tryAppendQueryParameter(queries, param, this.resourceTypes);\n break;\n case \"spr\":\n this.tryAppendQueryParameter(queries, param, this.protocol);\n break;\n case \"st\":\n this.tryAppendQueryParameter(queries, param, this.startsOn ? truncatedISO8061Date(this.startsOn, false) : undefined);\n break;\n case \"se\":\n this.tryAppendQueryParameter(queries, param, this.expiresOn ? truncatedISO8061Date(this.expiresOn, false) : undefined);\n break;\n case \"sip\":\n this.tryAppendQueryParameter(queries, param, this.ipRange ? ipRangeToString(this.ipRange) : undefined);\n break;\n case \"si\":\n this.tryAppendQueryParameter(queries, param, this.identifier);\n break;\n case \"ses\":\n this.tryAppendQueryParameter(queries, param, this.encryptionScope);\n break;\n case \"skoid\": // Signed object ID\n this.tryAppendQueryParameter(queries, param, this.signedOid);\n break;\n case \"sktid\": // Signed tenant ID\n this.tryAppendQueryParameter(queries, param, this.signedTenantId);\n break;\n case \"skt\": // Signed key start time\n this.tryAppendQueryParameter(queries, param, this.signedStartsOn ? truncatedISO8061Date(this.signedStartsOn, false) : undefined);\n break;\n case \"ske\": // Signed key expiry time\n this.tryAppendQueryParameter(queries, param, this.signedExpiresOn ? truncatedISO8061Date(this.signedExpiresOn, false) : undefined);\n break;\n case \"sks\": // Signed key service\n this.tryAppendQueryParameter(queries, param, this.signedService);\n break;\n case \"skv\": // Signed key version\n this.tryAppendQueryParameter(queries, param, this.signedVersion);\n break;\n case \"sr\":\n this.tryAppendQueryParameter(queries, param, this.resource);\n break;\n case \"sp\":\n this.tryAppendQueryParameter(queries, param, this.permissions);\n break;\n case \"sig\":\n this.tryAppendQueryParameter(queries, param, this.signature);\n break;\n case \"rscc\":\n this.tryAppendQueryParameter(queries, param, this.cacheControl);\n break;\n case \"rscd\":\n this.tryAppendQueryParameter(queries, param, this.contentDisposition);\n break;\n case \"rsce\":\n this.tryAppendQueryParameter(queries, param, this.contentEncoding);\n break;\n case \"rscl\":\n this.tryAppendQueryParameter(queries, param, this.contentLanguage);\n break;\n case \"rsct\":\n this.tryAppendQueryParameter(queries, param, this.contentType);\n break;\n case \"saoid\":\n this.tryAppendQueryParameter(queries, param, this.preauthorizedAgentObjectId);\n break;\n case \"scid\":\n this.tryAppendQueryParameter(queries, param, this.correlationId);\n break;\n }\n }\n return queries.join(\"&\");\n }\n /**\n * A private helper method used to filter and append query key/value pairs into an array.\n *\n * @param queries -\n * @param key -\n * @param value -\n */\n tryAppendQueryParameter(queries, key, value) {\n if (!value) {\n return;\n }\n key = encodeURIComponent(key);\n value = encodeURIComponent(value);\n if (key.length > 0 && value.length > 0) {\n queries.push(`${key}=${value}`);\n }\n }\n}\n\n// Copyright (c) Microsoft Corporation.\nfunction generateBlobSASQueryParameters(blobSASSignatureValues, sharedKeyCredentialOrUserDelegationKey, accountName) {\n const version = blobSASSignatureValues.version ? blobSASSignatureValues.version : SERVICE_VERSION;\n const sharedKeyCredential = sharedKeyCredentialOrUserDelegationKey instanceof StorageSharedKeyCredential\n ? sharedKeyCredentialOrUserDelegationKey\n : undefined;\n let userDelegationKeyCredential;\n if (sharedKeyCredential === undefined && accountName !== undefined) {\n userDelegationKeyCredential = new UserDelegationKeyCredential(accountName, sharedKeyCredentialOrUserDelegationKey);\n }\n if (sharedKeyCredential === undefined && userDelegationKeyCredential === undefined) {\n throw TypeError(\"Invalid sharedKeyCredential, userDelegationKey or accountName.\");\n }\n // Version 2020-12-06 adds support for encryptionscope in SAS.\n if (version >= \"2020-12-06\") {\n if (sharedKeyCredential !== undefined) {\n return generateBlobSASQueryParameters20201206(blobSASSignatureValues, sharedKeyCredential);\n }\n else {\n return generateBlobSASQueryParametersUDK20201206(blobSASSignatureValues, userDelegationKeyCredential);\n }\n }\n // Version 2019-12-12 adds support for the blob tags permission.\n // Version 2018-11-09 adds support for the signed resource and signed blob snapshot time fields.\n // https://docs.microsoft.com/en-us/rest/api/storageservices/constructing-a-service-sas#constructing-the-signature-string\n if (version >= \"2018-11-09\") {\n if (sharedKeyCredential !== undefined) {\n return generateBlobSASQueryParameters20181109(blobSASSignatureValues, sharedKeyCredential);\n }\n else {\n // Version 2020-02-10 delegation SAS signature construction includes preauthorizedAgentObjectId, agentObjectId, correlationId.\n if (version >= \"2020-02-10\") {\n return generateBlobSASQueryParametersUDK20200210(blobSASSignatureValues, userDelegationKeyCredential);\n }\n else {\n return generateBlobSASQueryParametersUDK20181109(blobSASSignatureValues, userDelegationKeyCredential);\n }\n }\n }\n if (version >= \"2015-04-05\") {\n if (sharedKeyCredential !== undefined) {\n return generateBlobSASQueryParameters20150405(blobSASSignatureValues, sharedKeyCredential);\n }\n else {\n throw new RangeError(\"'version' must be >= '2018-11-09' when generating user delegation SAS using user delegation key.\");\n }\n }\n throw new RangeError(\"'version' must be >= '2015-04-05'.\");\n}\n/**\n * ONLY AVAILABLE IN NODE.JS RUNTIME.\n * IMPLEMENTATION FOR API VERSION FROM 2015-04-05 AND BEFORE 2018-11-09.\n *\n * Creates an instance of SASQueryParameters.\n *\n * Only accepts required settings needed to create a SAS. For optional settings please\n * set corresponding properties directly, such as permissions, startsOn and identifier.\n *\n * WARNING: When identifier is not provided, permissions and expiresOn are required.\n * You MUST assign value to identifier or expiresOn & permissions manually if you initial with\n * this constructor.\n *\n * @param blobSASSignatureValues -\n * @param sharedKeyCredential -\n */\nfunction generateBlobSASQueryParameters20150405(blobSASSignatureValues, sharedKeyCredential) {\n blobSASSignatureValues = SASSignatureValuesSanityCheckAndAutofill(blobSASSignatureValues);\n if (!blobSASSignatureValues.identifier &&\n !(blobSASSignatureValues.permissions && blobSASSignatureValues.expiresOn)) {\n throw new RangeError(\"Must provide 'permissions' and 'expiresOn' for Blob SAS generation when 'identifier' is not provided.\");\n }\n let resource = \"c\";\n if (blobSASSignatureValues.blobName) {\n resource = \"b\";\n }\n // Calling parse and toString guarantees the proper ordering and throws on invalid characters.\n let verifiedPermissions;\n if (blobSASSignatureValues.permissions) {\n if (blobSASSignatureValues.blobName) {\n verifiedPermissions = BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString();\n }\n else {\n verifiedPermissions = ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString();\n }\n }\n // Signature is generated on the un-url-encoded values.\n const stringToSign = [\n verifiedPermissions ? verifiedPermissions : \"\",\n blobSASSignatureValues.startsOn\n ? truncatedISO8061Date(blobSASSignatureValues.startsOn, false)\n : \"\",\n blobSASSignatureValues.expiresOn\n ? truncatedISO8061Date(blobSASSignatureValues.expiresOn, false)\n : \"\",\n getCanonicalName(sharedKeyCredential.accountName, blobSASSignatureValues.containerName, blobSASSignatureValues.blobName),\n blobSASSignatureValues.identifier,\n blobSASSignatureValues.ipRange ? ipRangeToString(blobSASSignatureValues.ipRange) : \"\",\n blobSASSignatureValues.protocol ? blobSASSignatureValues.protocol : \"\",\n blobSASSignatureValues.version,\n blobSASSignatureValues.cacheControl ? blobSASSignatureValues.cacheControl : \"\",\n blobSASSignatureValues.contentDisposition ? blobSASSignatureValues.contentDisposition : \"\",\n blobSASSignatureValues.contentEncoding ? blobSASSignatureValues.contentEncoding : \"\",\n blobSASSignatureValues.contentLanguage ? blobSASSignatureValues.contentLanguage : \"\",\n blobSASSignatureValues.contentType ? blobSASSignatureValues.contentType : \"\",\n ].join(\"\\n\");\n const signature = sharedKeyCredential.computeHMACSHA256(stringToSign);\n return new SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, undefined, undefined, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType);\n}\n/**\n * ONLY AVAILABLE IN NODE.JS RUNTIME.\n * IMPLEMENTATION FOR API VERSION FROM 2018-11-09.\n *\n * Creates an instance of SASQueryParameters.\n *\n * Only accepts required settings needed to create a SAS. For optional settings please\n * set corresponding properties directly, such as permissions, startsOn and identifier.\n *\n * WARNING: When identifier is not provided, permissions and expiresOn are required.\n * You MUST assign value to identifier or expiresOn & permissions manually if you initial with\n * this constructor.\n *\n * @param blobSASSignatureValues -\n * @param sharedKeyCredential -\n */\nfunction generateBlobSASQueryParameters20181109(blobSASSignatureValues, sharedKeyCredential) {\n blobSASSignatureValues = SASSignatureValuesSanityCheckAndAutofill(blobSASSignatureValues);\n if (!blobSASSignatureValues.identifier &&\n !(blobSASSignatureValues.permissions && blobSASSignatureValues.expiresOn)) {\n throw new RangeError(\"Must provide 'permissions' and 'expiresOn' for Blob SAS generation when 'identifier' is not provided.\");\n }\n let resource = \"c\";\n let timestamp = blobSASSignatureValues.snapshotTime;\n if (blobSASSignatureValues.blobName) {\n resource = \"b\";\n if (blobSASSignatureValues.snapshotTime) {\n resource = \"bs\";\n }\n else if (blobSASSignatureValues.versionId) {\n resource = \"bv\";\n timestamp = blobSASSignatureValues.versionId;\n }\n }\n // Calling parse and toString guarantees the proper ordering and throws on invalid characters.\n let verifiedPermissions;\n if (blobSASSignatureValues.permissions) {\n if (blobSASSignatureValues.blobName) {\n verifiedPermissions = BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString();\n }\n else {\n verifiedPermissions = ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString();\n }\n }\n // Signature is generated on the un-url-encoded values.\n const stringToSign = [\n verifiedPermissions ? verifiedPermissions : \"\",\n blobSASSignatureValues.startsOn\n ? truncatedISO8061Date(blobSASSignatureValues.startsOn, false)\n : \"\",\n blobSASSignatureValues.expiresOn\n ? truncatedISO8061Date(blobSASSignatureValues.expiresOn, false)\n : \"\",\n getCanonicalName(sharedKeyCredential.accountName, blobSASSignatureValues.containerName, blobSASSignatureValues.blobName),\n blobSASSignatureValues.identifier,\n blobSASSignatureValues.ipRange ? ipRangeToString(blobSASSignatureValues.ipRange) : \"\",\n blobSASSignatureValues.protocol ? blobSASSignatureValues.protocol : \"\",\n blobSASSignatureValues.version,\n resource,\n timestamp,\n blobSASSignatureValues.cacheControl ? blobSASSignatureValues.cacheControl : \"\",\n blobSASSignatureValues.contentDisposition ? blobSASSignatureValues.contentDisposition : \"\",\n blobSASSignatureValues.contentEncoding ? blobSASSignatureValues.contentEncoding : \"\",\n blobSASSignatureValues.contentLanguage ? blobSASSignatureValues.contentLanguage : \"\",\n blobSASSignatureValues.contentType ? blobSASSignatureValues.contentType : \"\",\n ].join(\"\\n\");\n const signature = sharedKeyCredential.computeHMACSHA256(stringToSign);\n return new SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, undefined, undefined, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType);\n}\n/**\n * ONLY AVAILABLE IN NODE.JS RUNTIME.\n * IMPLEMENTATION FOR API VERSION FROM 2020-12-06.\n *\n * Creates an instance of SASQueryParameters.\n *\n * Only accepts required settings needed to create a SAS. For optional settings please\n * set corresponding properties directly, such as permissions, startsOn and identifier.\n *\n * WARNING: When identifier is not provided, permissions and expiresOn are required.\n * You MUST assign value to identifier or expiresOn & permissions manually if you initial with\n * this constructor.\n *\n * @param blobSASSignatureValues -\n * @param sharedKeyCredential -\n */\nfunction generateBlobSASQueryParameters20201206(blobSASSignatureValues, sharedKeyCredential) {\n blobSASSignatureValues = SASSignatureValuesSanityCheckAndAutofill(blobSASSignatureValues);\n if (!blobSASSignatureValues.identifier &&\n !(blobSASSignatureValues.permissions && blobSASSignatureValues.expiresOn)) {\n throw new RangeError(\"Must provide 'permissions' and 'expiresOn' for Blob SAS generation when 'identifier' is not provided.\");\n }\n let resource = \"c\";\n let timestamp = blobSASSignatureValues.snapshotTime;\n if (blobSASSignatureValues.blobName) {\n resource = \"b\";\n if (blobSASSignatureValues.snapshotTime) {\n resource = \"bs\";\n }\n else if (blobSASSignatureValues.versionId) {\n resource = \"bv\";\n timestamp = blobSASSignatureValues.versionId;\n }\n }\n // Calling parse and toString guarantees the proper ordering and throws on invalid characters.\n let verifiedPermissions;\n if (blobSASSignatureValues.permissions) {\n if (blobSASSignatureValues.blobName) {\n verifiedPermissions = BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString();\n }\n else {\n verifiedPermissions = ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString();\n }\n }\n // Signature is generated on the un-url-encoded values.\n const stringToSign = [\n verifiedPermissions ? verifiedPermissions : \"\",\n blobSASSignatureValues.startsOn\n ? truncatedISO8061Date(blobSASSignatureValues.startsOn, false)\n : \"\",\n blobSASSignatureValues.expiresOn\n ? truncatedISO8061Date(blobSASSignatureValues.expiresOn, false)\n : \"\",\n getCanonicalName(sharedKeyCredential.accountName, blobSASSignatureValues.containerName, blobSASSignatureValues.blobName),\n blobSASSignatureValues.identifier,\n blobSASSignatureValues.ipRange ? ipRangeToString(blobSASSignatureValues.ipRange) : \"\",\n blobSASSignatureValues.protocol ? blobSASSignatureValues.protocol : \"\",\n blobSASSignatureValues.version,\n resource,\n timestamp,\n blobSASSignatureValues.encryptionScope,\n blobSASSignatureValues.cacheControl ? blobSASSignatureValues.cacheControl : \"\",\n blobSASSignatureValues.contentDisposition ? blobSASSignatureValues.contentDisposition : \"\",\n blobSASSignatureValues.contentEncoding ? blobSASSignatureValues.contentEncoding : \"\",\n blobSASSignatureValues.contentLanguage ? blobSASSignatureValues.contentLanguage : \"\",\n blobSASSignatureValues.contentType ? blobSASSignatureValues.contentType : \"\",\n ].join(\"\\n\");\n const signature = sharedKeyCredential.computeHMACSHA256(stringToSign);\n return new SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, undefined, undefined, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType, undefined, undefined, undefined, blobSASSignatureValues.encryptionScope);\n}\n/**\n * ONLY AVAILABLE IN NODE.JS RUNTIME.\n * IMPLEMENTATION FOR API VERSION FROM 2018-11-09.\n *\n * Creates an instance of SASQueryParameters.\n *\n * Only accepts required settings needed to create a SAS. For optional settings please\n * set corresponding properties directly, such as permissions, startsOn.\n *\n * WARNING: identifier will be ignored, permissions and expiresOn are required.\n *\n * @param blobSASSignatureValues -\n * @param userDelegationKeyCredential -\n */\nfunction generateBlobSASQueryParametersUDK20181109(blobSASSignatureValues, userDelegationKeyCredential) {\n blobSASSignatureValues = SASSignatureValuesSanityCheckAndAutofill(blobSASSignatureValues);\n // Stored access policies are not supported for a user delegation SAS.\n if (!blobSASSignatureValues.permissions || !blobSASSignatureValues.expiresOn) {\n throw new RangeError(\"Must provide 'permissions' and 'expiresOn' for Blob SAS generation when generating user delegation SAS.\");\n }\n let resource = \"c\";\n let timestamp = blobSASSignatureValues.snapshotTime;\n if (blobSASSignatureValues.blobName) {\n resource = \"b\";\n if (blobSASSignatureValues.snapshotTime) {\n resource = \"bs\";\n }\n else if (blobSASSignatureValues.versionId) {\n resource = \"bv\";\n timestamp = blobSASSignatureValues.versionId;\n }\n }\n // Calling parse and toString guarantees the proper ordering and throws on invalid characters.\n let verifiedPermissions;\n if (blobSASSignatureValues.permissions) {\n if (blobSASSignatureValues.blobName) {\n verifiedPermissions = BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString();\n }\n else {\n verifiedPermissions = ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString();\n }\n }\n // Signature is generated on the un-url-encoded values.\n const stringToSign = [\n verifiedPermissions ? verifiedPermissions : \"\",\n blobSASSignatureValues.startsOn\n ? truncatedISO8061Date(blobSASSignatureValues.startsOn, false)\n : \"\",\n blobSASSignatureValues.expiresOn\n ? truncatedISO8061Date(blobSASSignatureValues.expiresOn, false)\n : \"\",\n getCanonicalName(userDelegationKeyCredential.accountName, blobSASSignatureValues.containerName, blobSASSignatureValues.blobName),\n userDelegationKeyCredential.userDelegationKey.signedObjectId,\n userDelegationKeyCredential.userDelegationKey.signedTenantId,\n userDelegationKeyCredential.userDelegationKey.signedStartsOn\n ? truncatedISO8061Date(userDelegationKeyCredential.userDelegationKey.signedStartsOn, false)\n : \"\",\n userDelegationKeyCredential.userDelegationKey.signedExpiresOn\n ? truncatedISO8061Date(userDelegationKeyCredential.userDelegationKey.signedExpiresOn, false)\n : \"\",\n userDelegationKeyCredential.userDelegationKey.signedService,\n userDelegationKeyCredential.userDelegationKey.signedVersion,\n blobSASSignatureValues.ipRange ? ipRangeToString(blobSASSignatureValues.ipRange) : \"\",\n blobSASSignatureValues.protocol ? blobSASSignatureValues.protocol : \"\",\n blobSASSignatureValues.version,\n resource,\n timestamp,\n blobSASSignatureValues.cacheControl,\n blobSASSignatureValues.contentDisposition,\n blobSASSignatureValues.contentEncoding,\n blobSASSignatureValues.contentLanguage,\n blobSASSignatureValues.contentType,\n ].join(\"\\n\");\n const signature = userDelegationKeyCredential.computeHMACSHA256(stringToSign);\n return new SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, undefined, undefined, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType, userDelegationKeyCredential.userDelegationKey);\n}\n/**\n * ONLY AVAILABLE IN NODE.JS RUNTIME.\n * IMPLEMENTATION FOR API VERSION FROM 2020-02-10.\n *\n * Creates an instance of SASQueryParameters.\n *\n * Only accepts required settings needed to create a SAS. For optional settings please\n * set corresponding properties directly, such as permissions, startsOn.\n *\n * WARNING: identifier will be ignored, permissions and expiresOn are required.\n *\n * @param blobSASSignatureValues -\n * @param userDelegationKeyCredential -\n */\nfunction generateBlobSASQueryParametersUDK20200210(blobSASSignatureValues, userDelegationKeyCredential) {\n blobSASSignatureValues = SASSignatureValuesSanityCheckAndAutofill(blobSASSignatureValues);\n // Stored access policies are not supported for a user delegation SAS.\n if (!blobSASSignatureValues.permissions || !blobSASSignatureValues.expiresOn) {\n throw new RangeError(\"Must provide 'permissions' and 'expiresOn' for Blob SAS generation when generating user delegation SAS.\");\n }\n let resource = \"c\";\n let timestamp = blobSASSignatureValues.snapshotTime;\n if (blobSASSignatureValues.blobName) {\n resource = \"b\";\n if (blobSASSignatureValues.snapshotTime) {\n resource = \"bs\";\n }\n else if (blobSASSignatureValues.versionId) {\n resource = \"bv\";\n timestamp = blobSASSignatureValues.versionId;\n }\n }\n // Calling parse and toString guarantees the proper ordering and throws on invalid characters.\n let verifiedPermissions;\n if (blobSASSignatureValues.permissions) {\n if (blobSASSignatureValues.blobName) {\n verifiedPermissions = BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString();\n }\n else {\n verifiedPermissions = ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString();\n }\n }\n // Signature is generated on the un-url-encoded values.\n const stringToSign = [\n verifiedPermissions ? verifiedPermissions : \"\",\n blobSASSignatureValues.startsOn\n ? truncatedISO8061Date(blobSASSignatureValues.startsOn, false)\n : \"\",\n blobSASSignatureValues.expiresOn\n ? truncatedISO8061Date(blobSASSignatureValues.expiresOn, false)\n : \"\",\n getCanonicalName(userDelegationKeyCredential.accountName, blobSASSignatureValues.containerName, blobSASSignatureValues.blobName),\n userDelegationKeyCredential.userDelegationKey.signedObjectId,\n userDelegationKeyCredential.userDelegationKey.signedTenantId,\n userDelegationKeyCredential.userDelegationKey.signedStartsOn\n ? truncatedISO8061Date(userDelegationKeyCredential.userDelegationKey.signedStartsOn, false)\n : \"\",\n userDelegationKeyCredential.userDelegationKey.signedExpiresOn\n ? truncatedISO8061Date(userDelegationKeyCredential.userDelegationKey.signedExpiresOn, false)\n : \"\",\n userDelegationKeyCredential.userDelegationKey.signedService,\n userDelegationKeyCredential.userDelegationKey.signedVersion,\n blobSASSignatureValues.preauthorizedAgentObjectId,\n undefined,\n blobSASSignatureValues.correlationId,\n blobSASSignatureValues.ipRange ? ipRangeToString(blobSASSignatureValues.ipRange) : \"\",\n blobSASSignatureValues.protocol ? blobSASSignatureValues.protocol : \"\",\n blobSASSignatureValues.version,\n resource,\n timestamp,\n blobSASSignatureValues.cacheControl,\n blobSASSignatureValues.contentDisposition,\n blobSASSignatureValues.contentEncoding,\n blobSASSignatureValues.contentLanguage,\n blobSASSignatureValues.contentType,\n ].join(\"\\n\");\n const signature = userDelegationKeyCredential.computeHMACSHA256(stringToSign);\n return new SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, undefined, undefined, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType, userDelegationKeyCredential.userDelegationKey, blobSASSignatureValues.preauthorizedAgentObjectId, blobSASSignatureValues.correlationId);\n}\n/**\n * ONLY AVAILABLE IN NODE.JS RUNTIME.\n * IMPLEMENTATION FOR API VERSION FROM 2020-12-06.\n *\n * Creates an instance of SASQueryParameters.\n *\n * Only accepts required settings needed to create a SAS. For optional settings please\n * set corresponding properties directly, such as permissions, startsOn.\n *\n * WARNING: identifier will be ignored, permissions and expiresOn are required.\n *\n * @param blobSASSignatureValues -\n * @param userDelegationKeyCredential -\n */\nfunction generateBlobSASQueryParametersUDK20201206(blobSASSignatureValues, userDelegationKeyCredential) {\n blobSASSignatureValues = SASSignatureValuesSanityCheckAndAutofill(blobSASSignatureValues);\n // Stored access policies are not supported for a user delegation SAS.\n if (!blobSASSignatureValues.permissions || !blobSASSignatureValues.expiresOn) {\n throw new RangeError(\"Must provide 'permissions' and 'expiresOn' for Blob SAS generation when generating user delegation SAS.\");\n }\n let resource = \"c\";\n let timestamp = blobSASSignatureValues.snapshotTime;\n if (blobSASSignatureValues.blobName) {\n resource = \"b\";\n if (blobSASSignatureValues.snapshotTime) {\n resource = \"bs\";\n }\n else if (blobSASSignatureValues.versionId) {\n resource = \"bv\";\n timestamp = blobSASSignatureValues.versionId;\n }\n }\n // Calling parse and toString guarantees the proper ordering and throws on invalid characters.\n let verifiedPermissions;\n if (blobSASSignatureValues.permissions) {\n if (blobSASSignatureValues.blobName) {\n verifiedPermissions = BlobSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString();\n }\n else {\n verifiedPermissions = ContainerSASPermissions.parse(blobSASSignatureValues.permissions.toString()).toString();\n }\n }\n // Signature is generated on the un-url-encoded values.\n const stringToSign = [\n verifiedPermissions ? verifiedPermissions : \"\",\n blobSASSignatureValues.startsOn\n ? truncatedISO8061Date(blobSASSignatureValues.startsOn, false)\n : \"\",\n blobSASSignatureValues.expiresOn\n ? truncatedISO8061Date(blobSASSignatureValues.expiresOn, false)\n : \"\",\n getCanonicalName(userDelegationKeyCredential.accountName, blobSASSignatureValues.containerName, blobSASSignatureValues.blobName),\n userDelegationKeyCredential.userDelegationKey.signedObjectId,\n userDelegationKeyCredential.userDelegationKey.signedTenantId,\n userDelegationKeyCredential.userDelegationKey.signedStartsOn\n ? truncatedISO8061Date(userDelegationKeyCredential.userDelegationKey.signedStartsOn, false)\n : \"\",\n userDelegationKeyCredential.userDelegationKey.signedExpiresOn\n ? truncatedISO8061Date(userDelegationKeyCredential.userDelegationKey.signedExpiresOn, false)\n : \"\",\n userDelegationKeyCredential.userDelegationKey.signedService,\n userDelegationKeyCredential.userDelegationKey.signedVersion,\n blobSASSignatureValues.preauthorizedAgentObjectId,\n undefined,\n blobSASSignatureValues.correlationId,\n blobSASSignatureValues.ipRange ? ipRangeToString(blobSASSignatureValues.ipRange) : \"\",\n blobSASSignatureValues.protocol ? blobSASSignatureValues.protocol : \"\",\n blobSASSignatureValues.version,\n resource,\n timestamp,\n blobSASSignatureValues.encryptionScope,\n blobSASSignatureValues.cacheControl,\n blobSASSignatureValues.contentDisposition,\n blobSASSignatureValues.contentEncoding,\n blobSASSignatureValues.contentLanguage,\n blobSASSignatureValues.contentType,\n ].join(\"\\n\");\n const signature = userDelegationKeyCredential.computeHMACSHA256(stringToSign);\n return new SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, undefined, undefined, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType, userDelegationKeyCredential.userDelegationKey, blobSASSignatureValues.preauthorizedAgentObjectId, blobSASSignatureValues.correlationId, blobSASSignatureValues.encryptionScope);\n}\nfunction getCanonicalName(accountName, containerName, blobName) {\n // Container: \"/blob/account/containerName\"\n // Blob: \"/blob/account/containerName/blobName\"\n const elements = [`/blob/${accountName}/${containerName}`];\n if (blobName) {\n elements.push(`/${blobName}`);\n }\n return elements.join(\"\");\n}\nfunction SASSignatureValuesSanityCheckAndAutofill(blobSASSignatureValues) {\n const version = blobSASSignatureValues.version ? blobSASSignatureValues.version : SERVICE_VERSION;\n if (blobSASSignatureValues.snapshotTime && version < \"2018-11-09\") {\n throw RangeError(\"'version' must be >= '2018-11-09' when providing 'snapshotTime'.\");\n }\n if (blobSASSignatureValues.blobName === undefined && blobSASSignatureValues.snapshotTime) {\n throw RangeError(\"Must provide 'blobName' when providing 'snapshotTime'.\");\n }\n if (blobSASSignatureValues.versionId && version < \"2019-10-10\") {\n throw RangeError(\"'version' must be >= '2019-10-10' when providing 'versionId'.\");\n }\n if (blobSASSignatureValues.blobName === undefined && blobSASSignatureValues.versionId) {\n throw RangeError(\"Must provide 'blobName' when providing 'versionId'.\");\n }\n if (blobSASSignatureValues.permissions &&\n blobSASSignatureValues.permissions.setImmutabilityPolicy &&\n version < \"2020-08-04\") {\n throw RangeError(\"'version' must be >= '2020-08-04' when provided 'i' permission.\");\n }\n if (blobSASSignatureValues.permissions &&\n blobSASSignatureValues.permissions.deleteVersion &&\n version < \"2019-10-10\") {\n throw RangeError(\"'version' must be >= '2019-10-10' when providing 'x' permission.\");\n }\n if (blobSASSignatureValues.permissions &&\n blobSASSignatureValues.permissions.permanentDelete &&\n version < \"2019-10-10\") {\n throw RangeError(\"'version' must be >= '2019-10-10' when providing 'y' permission.\");\n }\n if (blobSASSignatureValues.permissions &&\n blobSASSignatureValues.permissions.tag &&\n version < \"2019-12-12\") {\n throw RangeError(\"'version' must be >= '2019-12-12' when providing 't' permission.\");\n }\n if (version < \"2020-02-10\" &&\n blobSASSignatureValues.permissions &&\n (blobSASSignatureValues.permissions.move || blobSASSignatureValues.permissions.execute)) {\n throw RangeError(\"'version' must be >= '2020-02-10' when providing the 'm' or 'e' permission.\");\n }\n if (version < \"2021-04-10\" &&\n blobSASSignatureValues.permissions &&\n blobSASSignatureValues.permissions.filterByTags) {\n throw RangeError(\"'version' must be >= '2021-04-10' when providing the 'f' permission.\");\n }\n if (version < \"2020-02-10\" &&\n (blobSASSignatureValues.preauthorizedAgentObjectId || blobSASSignatureValues.correlationId)) {\n throw RangeError(\"'version' must be >= '2020-02-10' when providing 'preauthorizedAgentObjectId' or 'correlationId'.\");\n }\n if (blobSASSignatureValues.encryptionScope && version < \"2020-12-06\") {\n throw RangeError(\"'version' must be >= '2020-12-06' when provided 'encryptionScope' in SAS.\");\n }\n blobSASSignatureValues.version = version;\n return blobSASSignatureValues;\n}\n\n// Copyright (c) Microsoft Corporation.\n/**\n * A client that manages leases for a {@link ContainerClient} or a {@link BlobClient}.\n */\nclass BlobLeaseClient {\n /**\n * Creates an instance of BlobLeaseClient.\n * @param client - The client to make the lease operation requests.\n * @param leaseId - Initial proposed lease id.\n */\n constructor(client, leaseId) {\n const clientContext = new StorageClientContext(client.url, client.pipeline.toServiceClientOptions());\n this._url = client.url;\n if (client.name === undefined) {\n this._isContainer = true;\n this._containerOrBlobOperation = new Container(clientContext);\n }\n else {\n this._isContainer = false;\n this._containerOrBlobOperation = new Blob$1(clientContext);\n }\n if (!leaseId) {\n leaseId = coreHttp.generateUuid();\n }\n this._leaseId = leaseId;\n }\n /**\n * Gets the lease Id.\n *\n * @readonly\n */\n get leaseId() {\n return this._leaseId;\n }\n /**\n * Gets the url.\n *\n * @readonly\n */\n get url() {\n return this._url;\n }\n /**\n * Establishes and manages a lock on a container for delete operations, or on a blob\n * for write and delete operations.\n * The lock duration can be 15 to 60 seconds, or can be infinite.\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/lease-container\n * and\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/lease-blob\n *\n * @param duration - Must be between 15 to 60 seconds, or infinite (-1)\n * @param options - option to configure lease management operations.\n * @returns Response data for acquire lease operation.\n */\n async acquireLease(duration, options = {}) {\n var _a, _b, _c, _d, _e, _f;\n const { span, updatedOptions } = createSpan(\"BlobLeaseClient-acquireLease\", options);\n if (this._isContainer &&\n ((((_a = options.conditions) === null || _a === void 0 ? void 0 : _a.ifMatch) && ((_b = options.conditions) === null || _b === void 0 ? void 0 : _b.ifMatch) !== ETagNone) ||\n (((_c = options.conditions) === null || _c === void 0 ? void 0 : _c.ifNoneMatch) && ((_d = options.conditions) === null || _d === void 0 ? void 0 : _d.ifNoneMatch) !== ETagNone) ||\n ((_e = options.conditions) === null || _e === void 0 ? void 0 : _e.tagConditions))) {\n throw new RangeError(\"The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable.\");\n }\n try {\n return await this._containerOrBlobOperation.acquireLease(Object.assign({ abortSignal: options.abortSignal, duration, modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_f = options.conditions) === null || _f === void 0 ? void 0 : _f.tagConditions }), proposedLeaseId: this._leaseId }, convertTracingToRequestOptionsBase(updatedOptions)));\n }\n catch (e) {\n span.setStatus({\n code: coreTracing.SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n }\n finally {\n span.end();\n }\n }\n /**\n * To change the ID of the lease.\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/lease-container\n * and\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/lease-blob\n *\n * @param proposedLeaseId - the proposed new lease Id.\n * @param options - option to configure lease management operations.\n * @returns Response data for change lease operation.\n */\n async changeLease(proposedLeaseId, options = {}) {\n var _a, _b, _c, _d, _e, _f;\n const { span, updatedOptions } = createSpan(\"BlobLeaseClient-changeLease\", options);\n if (this._isContainer &&\n ((((_a = options.conditions) === null || _a === void 0 ? void 0 : _a.ifMatch) && ((_b = options.conditions) === null || _b === void 0 ? void 0 : _b.ifMatch) !== ETagNone) ||\n (((_c = options.conditions) === null || _c === void 0 ? void 0 : _c.ifNoneMatch) && ((_d = options.conditions) === null || _d === void 0 ? void 0 : _d.ifNoneMatch) !== ETagNone) ||\n ((_e = options.conditions) === null || _e === void 0 ? void 0 : _e.tagConditions))) {\n throw new RangeError(\"The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable.\");\n }\n try {\n const response = await this._containerOrBlobOperation.changeLease(this._leaseId, proposedLeaseId, Object.assign({ abortSignal: options.abortSignal, modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_f = options.conditions) === null || _f === void 0 ? void 0 : _f.tagConditions }) }, convertTracingToRequestOptionsBase(updatedOptions)));\n this._leaseId = proposedLeaseId;\n return response;\n }\n catch (e) {\n span.setStatus({\n code: coreTracing.SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n }\n finally {\n span.end();\n }\n }\n /**\n * To free the lease if it is no longer needed so that another client may\n * immediately acquire a lease against the container or the blob.\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/lease-container\n * and\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/lease-blob\n *\n * @param options - option to configure lease management operations.\n * @returns Response data for release lease operation.\n */\n async releaseLease(options = {}) {\n var _a, _b, _c, _d, _e, _f;\n const { span, updatedOptions } = createSpan(\"BlobLeaseClient-releaseLease\", options);\n if (this._isContainer &&\n ((((_a = options.conditions) === null || _a === void 0 ? void 0 : _a.ifMatch) && ((_b = options.conditions) === null || _b === void 0 ? void 0 : _b.ifMatch) !== ETagNone) ||\n (((_c = options.conditions) === null || _c === void 0 ? void 0 : _c.ifNoneMatch) && ((_d = options.conditions) === null || _d === void 0 ? void 0 : _d.ifNoneMatch) !== ETagNone) ||\n ((_e = options.conditions) === null || _e === void 0 ? void 0 : _e.tagConditions))) {\n throw new RangeError(\"The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable.\");\n }\n try {\n return await this._containerOrBlobOperation.releaseLease(this._leaseId, Object.assign({ abortSignal: options.abortSignal, modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_f = options.conditions) === null || _f === void 0 ? void 0 : _f.tagConditions }) }, convertTracingToRequestOptionsBase(updatedOptions)));\n }\n catch (e) {\n span.setStatus({\n code: coreTracing.SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n }\n finally {\n span.end();\n }\n }\n /**\n * To renew the lease.\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/lease-container\n * and\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/lease-blob\n *\n * @param options - Optional option to configure lease management operations.\n * @returns Response data for renew lease operation.\n */\n async renewLease(options = {}) {\n var _a, _b, _c, _d, _e, _f;\n const { span, updatedOptions } = createSpan(\"BlobLeaseClient-renewLease\", options);\n if (this._isContainer &&\n ((((_a = options.conditions) === null || _a === void 0 ? void 0 : _a.ifMatch) && ((_b = options.conditions) === null || _b === void 0 ? void 0 : _b.ifMatch) !== ETagNone) ||\n (((_c = options.conditions) === null || _c === void 0 ? void 0 : _c.ifNoneMatch) && ((_d = options.conditions) === null || _d === void 0 ? void 0 : _d.ifNoneMatch) !== ETagNone) ||\n ((_e = options.conditions) === null || _e === void 0 ? void 0 : _e.tagConditions))) {\n throw new RangeError(\"The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable.\");\n }\n try {\n return await this._containerOrBlobOperation.renewLease(this._leaseId, Object.assign({ abortSignal: options.abortSignal, modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_f = options.conditions) === null || _f === void 0 ? void 0 : _f.tagConditions }) }, convertTracingToRequestOptionsBase(updatedOptions)));\n }\n catch (e) {\n span.setStatus({\n code: coreTracing.SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n }\n finally {\n span.end();\n }\n }\n /**\n * To end the lease but ensure that another client cannot acquire a new lease\n * until the current lease period has expired.\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/lease-container\n * and\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/lease-blob\n *\n * @param breakPeriod - Break period\n * @param options - Optional options to configure lease management operations.\n * @returns Response data for break lease operation.\n */\n async breakLease(breakPeriod, options = {}) {\n var _a, _b, _c, _d, _e, _f;\n const { span, updatedOptions } = createSpan(\"BlobLeaseClient-breakLease\", options);\n if (this._isContainer &&\n ((((_a = options.conditions) === null || _a === void 0 ? void 0 : _a.ifMatch) && ((_b = options.conditions) === null || _b === void 0 ? void 0 : _b.ifMatch) !== ETagNone) ||\n (((_c = options.conditions) === null || _c === void 0 ? void 0 : _c.ifNoneMatch) && ((_d = options.conditions) === null || _d === void 0 ? void 0 : _d.ifNoneMatch) !== ETagNone) ||\n ((_e = options.conditions) === null || _e === void 0 ? void 0 : _e.tagConditions))) {\n throw new RangeError(\"The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable.\");\n }\n try {\n const operationOptions = Object.assign({ abortSignal: options.abortSignal, breakPeriod, modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_f = options.conditions) === null || _f === void 0 ? void 0 : _f.tagConditions }) }, convertTracingToRequestOptionsBase(updatedOptions));\n return await this._containerOrBlobOperation.breakLease(operationOptions);\n }\n catch (e) {\n span.setStatus({\n code: coreTracing.SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n }\n finally {\n span.end();\n }\n }\n}\n\n// Copyright (c) Microsoft Corporation.\n/**\n * ONLY AVAILABLE IN NODE.JS RUNTIME.\n *\n * A Node.js ReadableStream will internally retry when internal ReadableStream unexpected ends.\n */\nclass RetriableReadableStream extends stream.Readable {\n /**\n * Creates an instance of RetriableReadableStream.\n *\n * @param source - The current ReadableStream returned from getter\n * @param getter - A method calling downloading request returning\n * a new ReadableStream from specified offset\n * @param offset - Offset position in original data source to read\n * @param count - How much data in original data source to read\n * @param options -\n */\n constructor(source, getter, offset, count, options = {}) {\n super({ highWaterMark: options.highWaterMark });\n this.retries = 0;\n this.sourceDataHandler = (data) => {\n if (this.options.doInjectErrorOnce) {\n this.options.doInjectErrorOnce = undefined;\n this.source.pause();\n this.source.removeAllListeners(\"data\");\n this.source.emit(\"end\");\n return;\n }\n // console.log(\n // `Offset: ${this.offset}, Received ${data.length} from internal stream`\n // );\n this.offset += data.length;\n if (this.onProgress) {\n this.onProgress({ loadedBytes: this.offset - this.start });\n }\n if (!this.push(data)) {\n this.source.pause();\n }\n };\n this.sourceErrorOrEndHandler = (err) => {\n if (err && err.name === \"AbortError\") {\n this.destroy(err);\n return;\n }\n // console.log(\n // `Source stream emits end or error, offset: ${\n // this.offset\n // }, dest end : ${this.end}`\n // );\n this.removeSourceEventHandlers();\n if (this.offset - 1 === this.end) {\n this.push(null);\n }\n else if (this.offset <= this.end) {\n // console.log(\n // `retries: ${this.retries}, max retries: ${this.maxRetries}`\n // );\n if (this.retries < this.maxRetryRequests) {\n this.retries += 1;\n this.getter(this.offset)\n .then((newSource) => {\n this.source = newSource;\n this.setSourceEventHandlers();\n return;\n })\n .catch((error) => {\n this.destroy(error);\n });\n }\n else {\n this.destroy(new Error(`Data corruption failure: received less data than required and reached maxRetires limitation. Received data offset: ${this.offset - 1}, data needed offset: ${this.end}, retries: ${this.retries}, max retries: ${this.maxRetryRequests}`));\n }\n }\n else {\n this.destroy(new Error(`Data corruption failure: Received more data than original request, data needed offset is ${this.end}, received offset: ${this.offset - 1}`));\n }\n };\n this.getter = getter;\n this.source = source;\n this.start = offset;\n this.offset = offset;\n this.end = offset + count - 1;\n this.maxRetryRequests =\n options.maxRetryRequests && options.maxRetryRequests >= 0 ? options.maxRetryRequests : 0;\n this.onProgress = options.onProgress;\n this.options = options;\n this.setSourceEventHandlers();\n }\n _read() {\n this.source.resume();\n }\n setSourceEventHandlers() {\n this.source.on(\"data\", this.sourceDataHandler);\n this.source.on(\"end\", this.sourceErrorOrEndHandler);\n this.source.on(\"error\", this.sourceErrorOrEndHandler);\n }\n removeSourceEventHandlers() {\n this.source.removeListener(\"data\", this.sourceDataHandler);\n this.source.removeListener(\"end\", this.sourceErrorOrEndHandler);\n this.source.removeListener(\"error\", this.sourceErrorOrEndHandler);\n }\n _destroy(error, callback) {\n // remove listener from source and release source\n this.removeSourceEventHandlers();\n this.source.destroy();\n callback(error === null ? undefined : error);\n }\n}\n\n// Copyright (c) Microsoft Corporation.\n/**\n * ONLY AVAILABLE IN NODE.JS RUNTIME.\n *\n * BlobDownloadResponse implements BlobDownloadResponseParsed interface, and in Node.js runtime it will\n * automatically retry when internal read stream unexpected ends. (This kind of unexpected ends cannot\n * trigger retries defined in pipeline retry policy.)\n *\n * The {@link readableStreamBody} stream will retry underlayer, you can just use it as a normal Node.js\n * Readable stream.\n */\nclass BlobDownloadResponse {\n /**\n * Creates an instance of BlobDownloadResponse.\n *\n * @param originalResponse -\n * @param getter -\n * @param offset -\n * @param count -\n * @param options -\n */\n constructor(originalResponse, getter, offset, count, options = {}) {\n this.originalResponse = originalResponse;\n this.blobDownloadStream = new RetriableReadableStream(this.originalResponse.readableStreamBody, getter, offset, count, options);\n }\n /**\n * Indicates that the service supports\n * requests for partial file content.\n *\n * @readonly\n */\n get acceptRanges() {\n return this.originalResponse.acceptRanges;\n }\n /**\n * Returns if it was previously specified\n * for the file.\n *\n * @readonly\n */\n get cacheControl() {\n return this.originalResponse.cacheControl;\n }\n /**\n * Returns the value that was specified\n * for the 'x-ms-content-disposition' header and specifies how to process the\n * response.\n *\n * @readonly\n */\n get contentDisposition() {\n return this.originalResponse.contentDisposition;\n }\n /**\n * Returns the value that was specified\n * for the Content-Encoding request header.\n *\n * @readonly\n */\n get contentEncoding() {\n return this.originalResponse.contentEncoding;\n }\n /**\n * Returns the value that was specified\n * for the Content-Language request header.\n *\n * @readonly\n */\n get contentLanguage() {\n return this.originalResponse.contentLanguage;\n }\n /**\n * The current sequence number for a\n * page blob. This header is not returned for block blobs or append blobs.\n *\n * @readonly\n */\n get blobSequenceNumber() {\n return this.originalResponse.blobSequenceNumber;\n }\n /**\n * The blob's type. Possible values include:\n * 'BlockBlob', 'PageBlob', 'AppendBlob'.\n *\n * @readonly\n */\n get blobType() {\n return this.originalResponse.blobType;\n }\n /**\n * The number of bytes present in the\n * response body.\n *\n * @readonly\n */\n get contentLength() {\n return this.originalResponse.contentLength;\n }\n /**\n * If the file has an MD5 hash and the\n * request is to read the full file, this response header is returned so that\n * the client can check for message content integrity. If the request is to\n * read a specified range and the 'x-ms-range-get-content-md5' is set to\n * true, then the request returns an MD5 hash for the range, as long as the\n * range size is less than or equal to 4 MB. If neither of these sets of\n * conditions is true, then no value is returned for the 'Content-MD5'\n * header.\n *\n * @readonly\n */\n get contentMD5() {\n return this.originalResponse.contentMD5;\n }\n /**\n * Indicates the range of bytes returned if\n * the client requested a subset of the file by setting the Range request\n * header.\n *\n * @readonly\n */\n get contentRange() {\n return this.originalResponse.contentRange;\n }\n /**\n * The content type specified for the file.\n * The default content type is 'application/octet-stream'\n *\n * @readonly\n */\n get contentType() {\n return this.originalResponse.contentType;\n }\n /**\n * Conclusion time of the last attempted\n * Copy File operation where this file was the destination file. This value\n * can specify the time of a completed, aborted, or failed copy attempt.\n *\n * @readonly\n */\n get copyCompletedOn() {\n return this.originalResponse.copyCompletedOn;\n }\n /**\n * String identifier for the last attempted Copy\n * File operation where this file was the destination file.\n *\n * @readonly\n */\n get copyId() {\n return this.originalResponse.copyId;\n }\n /**\n * Contains the number of bytes copied and\n * the total bytes in the source in the last attempted Copy File operation\n * where this file was the destination file. Can show between 0 and\n * Content-Length bytes copied.\n *\n * @readonly\n */\n get copyProgress() {\n return this.originalResponse.copyProgress;\n }\n /**\n * URL up to 2KB in length that specifies the\n * source file used in the last attempted Copy File operation where this file\n * was the destination file.\n *\n * @readonly\n */\n get copySource() {\n return this.originalResponse.copySource;\n }\n /**\n * State of the copy operation\n * identified by 'x-ms-copy-id'. Possible values include: 'pending',\n * 'success', 'aborted', 'failed'\n *\n * @readonly\n */\n get copyStatus() {\n return this.originalResponse.copyStatus;\n }\n /**\n * Only appears when\n * x-ms-copy-status is failed or pending. Describes cause of fatal or\n * non-fatal copy operation failure.\n *\n * @readonly\n */\n get copyStatusDescription() {\n return this.originalResponse.copyStatusDescription;\n }\n /**\n * When a blob is leased,\n * specifies whether the lease is of infinite or fixed duration. Possible\n * values include: 'infinite', 'fixed'.\n *\n * @readonly\n */\n get leaseDuration() {\n return this.originalResponse.leaseDuration;\n }\n /**\n * Lease state of the blob. Possible\n * values include: 'available', 'leased', 'expired', 'breaking', 'broken'.\n *\n * @readonly\n */\n get leaseState() {\n return this.originalResponse.leaseState;\n }\n /**\n * The current lease status of the\n * blob. Possible values include: 'locked', 'unlocked'.\n *\n * @readonly\n */\n get leaseStatus() {\n return this.originalResponse.leaseStatus;\n }\n /**\n * A UTC date/time value generated by the service that\n * indicates the time at which the response was initiated.\n *\n * @readonly\n */\n get date() {\n return this.originalResponse.date;\n }\n /**\n * The number of committed blocks\n * present in the blob. This header is returned only for append blobs.\n *\n * @readonly\n */\n get blobCommittedBlockCount() {\n return this.originalResponse.blobCommittedBlockCount;\n }\n /**\n * The ETag contains a value that you can use to\n * perform operations conditionally, in quotes.\n *\n * @readonly\n */\n get etag() {\n return this.originalResponse.etag;\n }\n /**\n * The number of tags associated with the blob\n *\n * @readonly\n */\n get tagCount() {\n return this.originalResponse.tagCount;\n }\n /**\n * The error code.\n *\n * @readonly\n */\n get errorCode() {\n return this.originalResponse.errorCode;\n }\n /**\n * The value of this header is set to\n * true if the file data and application metadata are completely encrypted\n * using the specified algorithm. Otherwise, the value is set to false (when\n * the file is unencrypted, or if only parts of the file/application metadata\n * are encrypted).\n *\n * @readonly\n */\n get isServerEncrypted() {\n return this.originalResponse.isServerEncrypted;\n }\n /**\n * If the blob has a MD5 hash, and if\n * request contains range header (Range or x-ms-range), this response header\n * is returned with the value of the whole blob's MD5 value. This value may\n * or may not be equal to the value returned in Content-MD5 header, with the\n * latter calculated from the requested range.\n *\n * @readonly\n */\n get blobContentMD5() {\n return this.originalResponse.blobContentMD5;\n }\n /**\n * Returns the date and time the file was last\n * modified. Any operation that modifies the file or its properties updates\n * the last modified time.\n *\n * @readonly\n */\n get lastModified() {\n return this.originalResponse.lastModified;\n }\n /**\n * Returns the UTC date and time generated by the service that indicates the time at which the blob was\n * last read or written to.\n *\n * @readonly\n */\n get lastAccessed() {\n return this.originalResponse.lastAccessed;\n }\n /**\n * A name-value pair\n * to associate with a file storage object.\n *\n * @readonly\n */\n get metadata() {\n return this.originalResponse.metadata;\n }\n /**\n * This header uniquely identifies the request\n * that was made and can be used for troubleshooting the request.\n *\n * @readonly\n */\n get requestId() {\n return this.originalResponse.requestId;\n }\n /**\n * If a client request id header is sent in the request, this header will be present in the\n * response with the same value.\n *\n * @readonly\n */\n get clientRequestId() {\n return this.originalResponse.clientRequestId;\n }\n /**\n * Indicates the version of the Blob service used\n * to execute the request.\n *\n * @readonly\n */\n get version() {\n return this.originalResponse.version;\n }\n /**\n * Indicates the versionId of the downloaded blob version.\n *\n * @readonly\n */\n get versionId() {\n return this.originalResponse.versionId;\n }\n /**\n * Indicates whether version of this blob is a current version.\n *\n * @readonly\n */\n get isCurrentVersion() {\n return this.originalResponse.isCurrentVersion;\n }\n /**\n * The SHA-256 hash of the encryption key used to encrypt the blob. This value is only returned\n * when the blob was encrypted with a customer-provided key.\n *\n * @readonly\n */\n get encryptionKeySha256() {\n return this.originalResponse.encryptionKeySha256;\n }\n /**\n * If the request is to read a specified range and the x-ms-range-get-content-crc64 is set to\n * true, then the request returns a crc64 for the range, as long as the range size is less than\n * or equal to 4 MB. If both x-ms-range-get-content-crc64 & x-ms-range-get-content-md5 is\n * specified in the same request, it will fail with 400(Bad Request)\n */\n get contentCrc64() {\n return this.originalResponse.contentCrc64;\n }\n /**\n * Object Replication Policy Id of the destination blob.\n *\n * @readonly\n */\n get objectReplicationDestinationPolicyId() {\n return this.originalResponse.objectReplicationDestinationPolicyId;\n }\n /**\n * Parsed Object Replication Policy Id, Rule Id(s) and status of the source blob.\n *\n * @readonly\n */\n get objectReplicationSourceProperties() {\n return this.originalResponse.objectReplicationSourceProperties;\n }\n /**\n * If this blob has been sealed.\n *\n * @readonly\n */\n get isSealed() {\n return this.originalResponse.isSealed;\n }\n /**\n * UTC date/time value generated by the service that indicates the time at which the blob immutability policy will expire.\n *\n * @readonly\n */\n get immutabilityPolicyExpiresOn() {\n return this.originalResponse.immutabilityPolicyExpiresOn;\n }\n /**\n * Indicates immutability policy mode.\n *\n * @readonly\n */\n get immutabilityPolicyMode() {\n return this.originalResponse.immutabilityPolicyMode;\n }\n /**\n * Indicates if a legal hold is present on the blob.\n *\n * @readonly\n */\n get legalHold() {\n return this.originalResponse.legalHold;\n }\n /**\n * The response body as a browser Blob.\n * Always undefined in node.js.\n *\n * @readonly\n */\n get contentAsBlob() {\n return this.originalResponse.blobBody;\n }\n /**\n * The response body as a node.js Readable stream.\n * Always undefined in the browser.\n *\n * It will automatically retry when internal read stream unexpected ends.\n *\n * @readonly\n */\n get readableStreamBody() {\n return coreHttp.isNode ? this.blobDownloadStream : undefined;\n }\n /**\n * The HTTP response.\n */\n get _response() {\n return this.originalResponse._response;\n }\n}\n\n// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nconst AVRO_SYNC_MARKER_SIZE = 16;\nconst AVRO_INIT_BYTES = new Uint8Array([79, 98, 106, 1]);\nconst AVRO_CODEC_KEY = \"avro.codec\";\nconst AVRO_SCHEMA_KEY = \"avro.schema\";\n\n// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nclass AvroParser {\n /**\n * Reads a fixed number of bytes from the stream.\n *\n * @param stream -\n * @param length -\n * @param options -\n */\n static async readFixedBytes(stream, length, options = {}) {\n const bytes = await stream.read(length, { abortSignal: options.abortSignal });\n if (bytes.length !== length) {\n throw new Error(\"Hit stream end.\");\n }\n return bytes;\n }\n /**\n * Reads a single byte from the stream.\n *\n * @param stream -\n * @param options -\n */\n static async readByte(stream, options = {}) {\n const buf = await AvroParser.readFixedBytes(stream, 1, options);\n return buf[0];\n }\n // int and long are stored in variable-length zig-zag coding.\n // variable-length: https://lucene.apache.org/core/3_5_0/fileformats.html#VInt\n // zig-zag: https://developers.google.com/protocol-buffers/docs/encoding?csw=1#types\n static async readZigZagLong(stream, options = {}) {\n let zigZagEncoded = 0;\n let significanceInBit = 0;\n let byte, haveMoreByte, significanceInFloat;\n do {\n byte = await AvroParser.readByte(stream, options);\n haveMoreByte = byte & 0x80;\n zigZagEncoded |= (byte & 0x7f) << significanceInBit;\n significanceInBit += 7;\n } while (haveMoreByte && significanceInBit < 28); // bitwise operation only works for 32-bit integers\n if (haveMoreByte) {\n // Switch to float arithmetic\n // eslint-disable-next-line no-self-assign\n zigZagEncoded = zigZagEncoded;\n significanceInFloat = 268435456; // 2 ** 28.\n do {\n byte = await AvroParser.readByte(stream, options);\n zigZagEncoded += (byte & 0x7f) * significanceInFloat;\n significanceInFloat *= 128; // 2 ** 7\n } while (byte & 0x80);\n const res = (zigZagEncoded % 2 ? -(zigZagEncoded + 1) : zigZagEncoded) / 2;\n if (res < Number.MIN_SAFE_INTEGER || res > Number.MAX_SAFE_INTEGER) {\n throw new Error(\"Integer overflow.\");\n }\n return res;\n }\n return (zigZagEncoded >> 1) ^ -(zigZagEncoded & 1);\n }\n static async readLong(stream, options = {}) {\n return AvroParser.readZigZagLong(stream, options);\n }\n static async readInt(stream, options = {}) {\n return AvroParser.readZigZagLong(stream, options);\n }\n static async readNull() {\n return null;\n }\n static async readBoolean(stream, options = {}) {\n const b = await AvroParser.readByte(stream, options);\n if (b === 1) {\n return true;\n }\n else if (b === 0) {\n return false;\n }\n else {\n throw new Error(\"Byte was not a boolean.\");\n }\n }\n static async readFloat(stream, options = {}) {\n const u8arr = await AvroParser.readFixedBytes(stream, 4, options);\n const view = new DataView(u8arr.buffer, u8arr.byteOffset, u8arr.byteLength);\n return view.getFloat32(0, true); // littleEndian = true\n }\n static async readDouble(stream, options = {}) {\n const u8arr = await AvroParser.readFixedBytes(stream, 8, options);\n const view = new DataView(u8arr.buffer, u8arr.byteOffset, u8arr.byteLength);\n return view.getFloat64(0, true); // littleEndian = true\n }\n static async readBytes(stream, options = {}) {\n const size = await AvroParser.readLong(stream, options);\n if (size < 0) {\n throw new Error(\"Bytes size was negative.\");\n }\n return stream.read(size, { abortSignal: options.abortSignal });\n }\n static async readString(stream, options = {}) {\n const u8arr = await AvroParser.readBytes(stream, options);\n const utf8decoder = new TextDecoder();\n return utf8decoder.decode(u8arr);\n }\n static async readMapPair(stream, readItemMethod, options = {}) {\n const key = await AvroParser.readString(stream, options);\n // FUTURE: this won't work with readFixed (currently not supported) which needs a length as the parameter.\n const value = await readItemMethod(stream, options);\n return { key, value };\n }\n static async readMap(stream, readItemMethod, options = {}) {\n const readPairMethod = (s, opts = {}) => {\n return AvroParser.readMapPair(s, readItemMethod, opts);\n };\n const pairs = await AvroParser.readArray(stream, readPairMethod, options);\n const dict = {};\n for (const pair of pairs) {\n dict[pair.key] = pair.value;\n }\n return dict;\n }\n static async readArray(stream, readItemMethod, options = {}) {\n const items = [];\n for (let count = await AvroParser.readLong(stream, options); count !== 0; count = await AvroParser.readLong(stream, options)) {\n if (count < 0) {\n // Ignore block sizes\n await AvroParser.readLong(stream, options);\n count = -count;\n }\n while (count--) {\n const item = await readItemMethod(stream, options);\n items.push(item);\n }\n }\n return items;\n }\n}\nvar AvroComplex;\n(function (AvroComplex) {\n AvroComplex[\"RECORD\"] = \"record\";\n AvroComplex[\"ENUM\"] = \"enum\";\n AvroComplex[\"ARRAY\"] = \"array\";\n AvroComplex[\"MAP\"] = \"map\";\n AvroComplex[\"UNION\"] = \"union\";\n AvroComplex[\"FIXED\"] = \"fixed\";\n})(AvroComplex || (AvroComplex = {}));\nvar AvroPrimitive;\n(function (AvroPrimitive) {\n AvroPrimitive[\"NULL\"] = \"null\";\n AvroPrimitive[\"BOOLEAN\"] = \"boolean\";\n AvroPrimitive[\"INT\"] = \"int\";\n AvroPrimitive[\"LONG\"] = \"long\";\n AvroPrimitive[\"FLOAT\"] = \"float\";\n AvroPrimitive[\"DOUBLE\"] = \"double\";\n AvroPrimitive[\"BYTES\"] = \"bytes\";\n AvroPrimitive[\"STRING\"] = \"string\";\n})(AvroPrimitive || (AvroPrimitive = {}));\nclass AvroType {\n /**\n * Determines the AvroType from the Avro Schema.\n */\n static fromSchema(schema) {\n if (typeof schema === \"string\") {\n return AvroType.fromStringSchema(schema);\n }\n else if (Array.isArray(schema)) {\n return AvroType.fromArraySchema(schema);\n }\n else {\n return AvroType.fromObjectSchema(schema);\n }\n }\n static fromStringSchema(schema) {\n switch (schema) {\n case AvroPrimitive.NULL:\n case AvroPrimitive.BOOLEAN:\n case AvroPrimitive.INT:\n case AvroPrimitive.LONG:\n case AvroPrimitive.FLOAT:\n case AvroPrimitive.DOUBLE:\n case AvroPrimitive.BYTES:\n case AvroPrimitive.STRING:\n return new AvroPrimitiveType(schema);\n default:\n throw new Error(`Unexpected Avro type ${schema}`);\n }\n }\n static fromArraySchema(schema) {\n return new AvroUnionType(schema.map(AvroType.fromSchema));\n }\n static fromObjectSchema(schema) {\n const type = schema.type;\n // Primitives can be defined as strings or objects\n try {\n return AvroType.fromStringSchema(type);\n }\n catch (err) {\n // eslint-disable-line no-empty\n }\n switch (type) {\n case AvroComplex.RECORD:\n if (schema.aliases) {\n throw new Error(`aliases currently is not supported, schema: ${schema}`);\n }\n if (!schema.name) {\n throw new Error(`Required attribute 'name' doesn't exist on schema: ${schema}`);\n }\n // eslint-disable-next-line no-case-declarations\n const fields = {};\n if (!schema.fields) {\n throw new Error(`Required attribute 'fields' doesn't exist on schema: ${schema}`);\n }\n for (const field of schema.fields) {\n fields[field.name] = AvroType.fromSchema(field.type);\n }\n return new AvroRecordType(fields, schema.name);\n case AvroComplex.ENUM:\n if (schema.aliases) {\n throw new Error(`aliases currently is not supported, schema: ${schema}`);\n }\n if (!schema.symbols) {\n throw new Error(`Required attribute 'symbols' doesn't exist on schema: ${schema}`);\n }\n return new AvroEnumType(schema.symbols);\n case AvroComplex.MAP:\n if (!schema.values) {\n throw new Error(`Required attribute 'values' doesn't exist on schema: ${schema}`);\n }\n return new AvroMapType(AvroType.fromSchema(schema.values));\n case AvroComplex.ARRAY: // Unused today\n case AvroComplex.FIXED: // Unused today\n default:\n throw new Error(`Unexpected Avro type ${type} in ${schema}`);\n }\n }\n}\nclass AvroPrimitiveType extends AvroType {\n constructor(primitive) {\n super();\n this._primitive = primitive;\n }\n read(stream, options = {}) {\n switch (this._primitive) {\n case AvroPrimitive.NULL:\n return AvroParser.readNull();\n case AvroPrimitive.BOOLEAN:\n return AvroParser.readBoolean(stream, options);\n case AvroPrimitive.INT:\n return AvroParser.readInt(stream, options);\n case AvroPrimitive.LONG:\n return AvroParser.readLong(stream, options);\n case AvroPrimitive.FLOAT:\n return AvroParser.readFloat(stream, options);\n case AvroPrimitive.DOUBLE:\n return AvroParser.readDouble(stream, options);\n case AvroPrimitive.BYTES:\n return AvroParser.readBytes(stream, options);\n case AvroPrimitive.STRING:\n return AvroParser.readString(stream, options);\n default:\n throw new Error(\"Unknown Avro Primitive\");\n }\n }\n}\nclass AvroEnumType extends AvroType {\n constructor(symbols) {\n super();\n this._symbols = symbols;\n }\n async read(stream, options = {}) {\n const value = await AvroParser.readInt(stream, options);\n return this._symbols[value];\n }\n}\nclass AvroUnionType extends AvroType {\n constructor(types) {\n super();\n this._types = types;\n }\n async read(stream, options = {}) {\n const typeIndex = await AvroParser.readInt(stream, options);\n return this._types[typeIndex].read(stream, options);\n }\n}\nclass AvroMapType extends AvroType {\n constructor(itemType) {\n super();\n this._itemType = itemType;\n }\n read(stream, options = {}) {\n const readItemMethod = (s, opts) => {\n return this._itemType.read(s, opts);\n };\n return AvroParser.readMap(stream, readItemMethod, options);\n }\n}\nclass AvroRecordType extends AvroType {\n constructor(fields, name) {\n super();\n this._fields = fields;\n this._name = name;\n }\n async read(stream, options = {}) {\n const record = {};\n record[\"$schema\"] = this._name;\n for (const key in this._fields) {\n if (Object.prototype.hasOwnProperty.call(this._fields, key)) {\n record[key] = await this._fields[key].read(stream, options);\n }\n }\n return record;\n }\n}\n\n// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nfunction arraysEqual(a, b) {\n if (a === b)\n return true;\n // eslint-disable-next-line eqeqeq\n if (a == null || b == null)\n return false;\n if (a.length !== b.length)\n return false;\n for (let i = 0; i < a.length; ++i) {\n if (a[i] !== b[i])\n return false;\n }\n return true;\n}\n\n// Copyright (c) Microsoft Corporation.\nclass AvroReader {\n constructor(dataStream, headerStream, currentBlockOffset, indexWithinCurrentBlock) {\n this._dataStream = dataStream;\n this._headerStream = headerStream || dataStream;\n this._initialized = false;\n this._blockOffset = currentBlockOffset || 0;\n this._objectIndex = indexWithinCurrentBlock || 0;\n this._initialBlockOffset = currentBlockOffset || 0;\n }\n get blockOffset() {\n return this._blockOffset;\n }\n get objectIndex() {\n return this._objectIndex;\n }\n async initialize(options = {}) {\n const header = await AvroParser.readFixedBytes(this._headerStream, AVRO_INIT_BYTES.length, {\n abortSignal: options.abortSignal,\n });\n if (!arraysEqual(header, AVRO_INIT_BYTES)) {\n throw new Error(\"Stream is not an Avro file.\");\n }\n // File metadata is written as if defined by the following map schema:\n // { \"type\": \"map\", \"values\": \"bytes\"}\n this._metadata = await AvroParser.readMap(this._headerStream, AvroParser.readString, {\n abortSignal: options.abortSignal,\n });\n // Validate codec\n const codec = this._metadata[AVRO_CODEC_KEY];\n if (!(codec === undefined || codec === null || codec === \"null\")) {\n throw new Error(\"Codecs are not supported\");\n }\n // The 16-byte, randomly-generated sync marker for this file.\n this._syncMarker = await AvroParser.readFixedBytes(this._headerStream, AVRO_SYNC_MARKER_SIZE, {\n abortSignal: options.abortSignal,\n });\n // Parse the schema\n const schema = JSON.parse(this._metadata[AVRO_SCHEMA_KEY]);\n this._itemType = AvroType.fromSchema(schema);\n if (this._blockOffset === 0) {\n this._blockOffset = this._initialBlockOffset + this._dataStream.position;\n }\n this._itemsRemainingInBlock = await AvroParser.readLong(this._dataStream, {\n abortSignal: options.abortSignal,\n });\n // skip block length\n await AvroParser.readLong(this._dataStream, { abortSignal: options.abortSignal });\n this._initialized = true;\n if (this._objectIndex && this._objectIndex > 0) {\n for (let i = 0; i < this._objectIndex; i++) {\n await this._itemType.read(this._dataStream, { abortSignal: options.abortSignal });\n this._itemsRemainingInBlock--;\n }\n }\n }\n hasNext() {\n return !this._initialized || this._itemsRemainingInBlock > 0;\n }\n parseObjects(options = {}) {\n return tslib.__asyncGenerator(this, arguments, function* parseObjects_1() {\n if (!this._initialized) {\n yield tslib.__await(this.initialize(options));\n }\n while (this.hasNext()) {\n const result = yield tslib.__await(this._itemType.read(this._dataStream, {\n abortSignal: options.abortSignal,\n }));\n this._itemsRemainingInBlock--;\n this._objectIndex++;\n if (this._itemsRemainingInBlock === 0) {\n const marker = yield tslib.__await(AvroParser.readFixedBytes(this._dataStream, AVRO_SYNC_MARKER_SIZE, {\n abortSignal: options.abortSignal,\n }));\n this._blockOffset = this._initialBlockOffset + this._dataStream.position;\n this._objectIndex = 0;\n if (!arraysEqual(this._syncMarker, marker)) {\n throw new Error(\"Stream is not a valid Avro file.\");\n }\n try {\n this._itemsRemainingInBlock = yield tslib.__await(AvroParser.readLong(this._dataStream, {\n abortSignal: options.abortSignal,\n }));\n }\n catch (err) {\n // We hit the end of the stream.\n this._itemsRemainingInBlock = 0;\n }\n if (this._itemsRemainingInBlock > 0) {\n // Ignore block size\n yield tslib.__await(AvroParser.readLong(this._dataStream, { abortSignal: options.abortSignal }));\n }\n }\n yield yield tslib.__await(result);\n }\n });\n }\n}\n\n// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nclass AvroReadable {\n}\n\n// Copyright (c) Microsoft Corporation.\nconst ABORT_ERROR = new abortController.AbortError(\"Reading from the avro stream was aborted.\");\nclass AvroReadableFromStream extends AvroReadable {\n constructor(readable) {\n super();\n this._readable = readable;\n this._position = 0;\n }\n toUint8Array(data) {\n if (typeof data === \"string\") {\n return Buffer.from(data);\n }\n return data;\n }\n get position() {\n return this._position;\n }\n async read(size, options = {}) {\n var _a;\n if ((_a = options.abortSignal) === null || _a === void 0 ? void 0 : _a.aborted) {\n throw ABORT_ERROR;\n }\n if (size < 0) {\n throw new Error(`size parameter should be positive: ${size}`);\n }\n if (size === 0) {\n return new Uint8Array();\n }\n if (!this._readable.readable) {\n throw new Error(\"Stream no longer readable.\");\n }\n // See if there is already enough data.\n const chunk = this._readable.read(size);\n if (chunk) {\n this._position += chunk.length;\n // chunk.length maybe less than desired size if the stream ends.\n return this.toUint8Array(chunk);\n }\n else {\n // register callback to wait for enough data to read\n return new Promise((resolve, reject) => {\n /* eslint-disable @typescript-eslint/no-use-before-define */\n const cleanUp = () => {\n this._readable.removeListener(\"readable\", readableCallback);\n this._readable.removeListener(\"error\", rejectCallback);\n this._readable.removeListener(\"end\", rejectCallback);\n this._readable.removeListener(\"close\", rejectCallback);\n if (options.abortSignal) {\n options.abortSignal.removeEventListener(\"abort\", abortHandler);\n }\n };\n const readableCallback = () => {\n const callbackChunk = this._readable.read(size);\n if (callbackChunk) {\n this._position += callbackChunk.length;\n cleanUp();\n // callbackChunk.length maybe less than desired size if the stream ends.\n resolve(this.toUint8Array(callbackChunk));\n }\n };\n const rejectCallback = () => {\n cleanUp();\n reject();\n };\n const abortHandler = () => {\n cleanUp();\n reject(ABORT_ERROR);\n };\n this._readable.on(\"readable\", readableCallback);\n this._readable.once(\"error\", rejectCallback);\n this._readable.once(\"end\", rejectCallback);\n this._readable.once(\"close\", rejectCallback);\n if (options.abortSignal) {\n options.abortSignal.addEventListener(\"abort\", abortHandler);\n }\n /* eslint-enable @typescript-eslint/no-use-before-define */\n });\n }\n }\n}\n\n// Copyright (c) Microsoft Corporation.\n/**\n * ONLY AVAILABLE IN NODE.JS RUNTIME.\n *\n * A Node.js BlobQuickQueryStream will internally parse avro data stream for blob query.\n */\nclass BlobQuickQueryStream extends stream.Readable {\n /**\n * Creates an instance of BlobQuickQueryStream.\n *\n * @param source - The current ReadableStream returned from getter\n * @param options -\n */\n constructor(source, options = {}) {\n super();\n this.avroPaused = true;\n this.source = source;\n this.onProgress = options.onProgress;\n this.onError = options.onError;\n this.avroReader = new AvroReader(new AvroReadableFromStream(this.source));\n this.avroIter = this.avroReader.parseObjects({ abortSignal: options.abortSignal });\n }\n _read() {\n if (this.avroPaused) {\n this.readInternal().catch((err) => {\n this.emit(\"error\", err);\n });\n }\n }\n async readInternal() {\n this.avroPaused = false;\n let avroNext;\n do {\n avroNext = await this.avroIter.next();\n if (avroNext.done) {\n break;\n }\n const obj = avroNext.value;\n const schema = obj.$schema;\n if (typeof schema !== \"string\") {\n throw Error(\"Missing schema in avro record.\");\n }\n switch (schema) {\n case \"com.microsoft.azure.storage.queryBlobContents.resultData\":\n {\n const data = obj.data;\n if (data instanceof Uint8Array === false) {\n throw Error(\"Invalid data in avro result record.\");\n }\n if (!this.push(Buffer.from(data))) {\n this.avroPaused = true;\n }\n }\n break;\n case \"com.microsoft.azure.storage.queryBlobContents.progress\":\n {\n const bytesScanned = obj.bytesScanned;\n if (typeof bytesScanned !== \"number\") {\n throw Error(\"Invalid bytesScanned in avro progress record.\");\n }\n if (this.onProgress) {\n this.onProgress({ loadedBytes: bytesScanned });\n }\n }\n break;\n case \"com.microsoft.azure.storage.queryBlobContents.end\":\n if (this.onProgress) {\n const totalBytes = obj.totalBytes;\n if (typeof totalBytes !== \"number\") {\n throw Error(\"Invalid totalBytes in avro end record.\");\n }\n this.onProgress({ loadedBytes: totalBytes });\n }\n this.push(null);\n break;\n case \"com.microsoft.azure.storage.queryBlobContents.error\":\n if (this.onError) {\n const fatal = obj.fatal;\n if (typeof fatal !== \"boolean\") {\n throw Error(\"Invalid fatal in avro error record.\");\n }\n const name = obj.name;\n if (typeof name !== \"string\") {\n throw Error(\"Invalid name in avro error record.\");\n }\n const description = obj.description;\n if (typeof description !== \"string\") {\n throw Error(\"Invalid description in avro error record.\");\n }\n const position = obj.position;\n if (typeof position !== \"number\") {\n throw Error(\"Invalid position in avro error record.\");\n }\n this.onError({\n position,\n name,\n isFatal: fatal,\n description,\n });\n }\n break;\n default:\n throw Error(`Unknown schema ${schema} in avro progress record.`);\n }\n } while (!avroNext.done && !this.avroPaused);\n }\n}\n\n// Copyright (c) Microsoft Corporation.\n/**\n * ONLY AVAILABLE IN NODE.JS RUNTIME.\n *\n * BlobQueryResponse implements BlobDownloadResponseModel interface, and in Node.js runtime it will\n * parse avor data returned by blob query.\n */\nclass BlobQueryResponse {\n /**\n * Creates an instance of BlobQueryResponse.\n *\n * @param originalResponse -\n * @param options -\n */\n constructor(originalResponse, options = {}) {\n this.originalResponse = originalResponse;\n this.blobDownloadStream = new BlobQuickQueryStream(this.originalResponse.readableStreamBody, options);\n }\n /**\n * Indicates that the service supports\n * requests for partial file content.\n *\n * @readonly\n */\n get acceptRanges() {\n return this.originalResponse.acceptRanges;\n }\n /**\n * Returns if it was previously specified\n * for the file.\n *\n * @readonly\n */\n get cacheControl() {\n return this.originalResponse.cacheControl;\n }\n /**\n * Returns the value that was specified\n * for the 'x-ms-content-disposition' header and specifies how to process the\n * response.\n *\n * @readonly\n */\n get contentDisposition() {\n return this.originalResponse.contentDisposition;\n }\n /**\n * Returns the value that was specified\n * for the Content-Encoding request header.\n *\n * @readonly\n */\n get contentEncoding() {\n return this.originalResponse.contentEncoding;\n }\n /**\n * Returns the value that was specified\n * for the Content-Language request header.\n *\n * @readonly\n */\n get contentLanguage() {\n return this.originalResponse.contentLanguage;\n }\n /**\n * The current sequence number for a\n * page blob. This header is not returned for block blobs or append blobs.\n *\n * @readonly\n */\n get blobSequenceNumber() {\n return this.originalResponse.blobSequenceNumber;\n }\n /**\n * The blob's type. Possible values include:\n * 'BlockBlob', 'PageBlob', 'AppendBlob'.\n *\n * @readonly\n */\n get blobType() {\n return this.originalResponse.blobType;\n }\n /**\n * The number of bytes present in the\n * response body.\n *\n * @readonly\n */\n get contentLength() {\n return this.originalResponse.contentLength;\n }\n /**\n * If the file has an MD5 hash and the\n * request is to read the full file, this response header is returned so that\n * the client can check for message content integrity. If the request is to\n * read a specified range and the 'x-ms-range-get-content-md5' is set to\n * true, then the request returns an MD5 hash for the range, as long as the\n * range size is less than or equal to 4 MB. If neither of these sets of\n * conditions is true, then no value is returned for the 'Content-MD5'\n * header.\n *\n * @readonly\n */\n get contentMD5() {\n return this.originalResponse.contentMD5;\n }\n /**\n * Indicates the range of bytes returned if\n * the client requested a subset of the file by setting the Range request\n * header.\n *\n * @readonly\n */\n get contentRange() {\n return this.originalResponse.contentRange;\n }\n /**\n * The content type specified for the file.\n * The default content type is 'application/octet-stream'\n *\n * @readonly\n */\n get contentType() {\n return this.originalResponse.contentType;\n }\n /**\n * Conclusion time of the last attempted\n * Copy File operation where this file was the destination file. This value\n * can specify the time of a completed, aborted, or failed copy attempt.\n *\n * @readonly\n */\n get copyCompletedOn() {\n return undefined;\n }\n /**\n * String identifier for the last attempted Copy\n * File operation where this file was the destination file.\n *\n * @readonly\n */\n get copyId() {\n return this.originalResponse.copyId;\n }\n /**\n * Contains the number of bytes copied and\n * the total bytes in the source in the last attempted Copy File operation\n * where this file was the destination file. Can show between 0 and\n * Content-Length bytes copied.\n *\n * @readonly\n */\n get copyProgress() {\n return this.originalResponse.copyProgress;\n }\n /**\n * URL up to 2KB in length that specifies the\n * source file used in the last attempted Copy File operation where this file\n * was the destination file.\n *\n * @readonly\n */\n get copySource() {\n return this.originalResponse.copySource;\n }\n /**\n * State of the copy operation\n * identified by 'x-ms-copy-id'. Possible values include: 'pending',\n * 'success', 'aborted', 'failed'\n *\n * @readonly\n */\n get copyStatus() {\n return this.originalResponse.copyStatus;\n }\n /**\n * Only appears when\n * x-ms-copy-status is failed or pending. Describes cause of fatal or\n * non-fatal copy operation failure.\n *\n * @readonly\n */\n get copyStatusDescription() {\n return this.originalResponse.copyStatusDescription;\n }\n /**\n * When a blob is leased,\n * specifies whether the lease is of infinite or fixed duration. Possible\n * values include: 'infinite', 'fixed'.\n *\n * @readonly\n */\n get leaseDuration() {\n return this.originalResponse.leaseDuration;\n }\n /**\n * Lease state of the blob. Possible\n * values include: 'available', 'leased', 'expired', 'breaking', 'broken'.\n *\n * @readonly\n */\n get leaseState() {\n return this.originalResponse.leaseState;\n }\n /**\n * The current lease status of the\n * blob. Possible values include: 'locked', 'unlocked'.\n *\n * @readonly\n */\n get leaseStatus() {\n return this.originalResponse.leaseStatus;\n }\n /**\n * A UTC date/time value generated by the service that\n * indicates the time at which the response was initiated.\n *\n * @readonly\n */\n get date() {\n return this.originalResponse.date;\n }\n /**\n * The number of committed blocks\n * present in the blob. This header is returned only for append blobs.\n *\n * @readonly\n */\n get blobCommittedBlockCount() {\n return this.originalResponse.blobCommittedBlockCount;\n }\n /**\n * The ETag contains a value that you can use to\n * perform operations conditionally, in quotes.\n *\n * @readonly\n */\n get etag() {\n return this.originalResponse.etag;\n }\n /**\n * The error code.\n *\n * @readonly\n */\n get errorCode() {\n return this.originalResponse.errorCode;\n }\n /**\n * The value of this header is set to\n * true if the file data and application metadata are completely encrypted\n * using the specified algorithm. Otherwise, the value is set to false (when\n * the file is unencrypted, or if only parts of the file/application metadata\n * are encrypted).\n *\n * @readonly\n */\n get isServerEncrypted() {\n return this.originalResponse.isServerEncrypted;\n }\n /**\n * If the blob has a MD5 hash, and if\n * request contains range header (Range or x-ms-range), this response header\n * is returned with the value of the whole blob's MD5 value. This value may\n * or may not be equal to the value returned in Content-MD5 header, with the\n * latter calculated from the requested range.\n *\n * @readonly\n */\n get blobContentMD5() {\n return this.originalResponse.blobContentMD5;\n }\n /**\n * Returns the date and time the file was last\n * modified. Any operation that modifies the file or its properties updates\n * the last modified time.\n *\n * @readonly\n */\n get lastModified() {\n return this.originalResponse.lastModified;\n }\n /**\n * A name-value pair\n * to associate with a file storage object.\n *\n * @readonly\n */\n get metadata() {\n return this.originalResponse.metadata;\n }\n /**\n * This header uniquely identifies the request\n * that was made and can be used for troubleshooting the request.\n *\n * @readonly\n */\n get requestId() {\n return this.originalResponse.requestId;\n }\n /**\n * If a client request id header is sent in the request, this header will be present in the\n * response with the same value.\n *\n * @readonly\n */\n get clientRequestId() {\n return this.originalResponse.clientRequestId;\n }\n /**\n * Indicates the version of the File service used\n * to execute the request.\n *\n * @readonly\n */\n get version() {\n return this.originalResponse.version;\n }\n /**\n * The SHA-256 hash of the encryption key used to encrypt the blob. This value is only returned\n * when the blob was encrypted with a customer-provided key.\n *\n * @readonly\n */\n get encryptionKeySha256() {\n return this.originalResponse.encryptionKeySha256;\n }\n /**\n * If the request is to read a specified range and the x-ms-range-get-content-crc64 is set to\n * true, then the request returns a crc64 for the range, as long as the range size is less than\n * or equal to 4 MB. If both x-ms-range-get-content-crc64 & x-ms-range-get-content-md5 is\n * specified in the same request, it will fail with 400(Bad Request)\n */\n get contentCrc64() {\n return this.originalResponse.contentCrc64;\n }\n /**\n * The response body as a browser Blob.\n * Always undefined in node.js.\n *\n * @readonly\n */\n get blobBody() {\n return undefined;\n }\n /**\n * The response body as a node.js Readable stream.\n * Always undefined in the browser.\n *\n * It will parse avor data returned by blob query.\n *\n * @readonly\n */\n get readableStreamBody() {\n return coreHttp.isNode ? this.blobDownloadStream : undefined;\n }\n /**\n * The HTTP response.\n */\n get _response() {\n return this.originalResponse._response;\n }\n}\n\n// Copyright (c) Microsoft Corporation.\n/**\n * Represents the access tier on a blob.\n * For detailed information about block blob level tiering see {@link https://docs.microsoft.com/azure/storage/blobs/storage-blob-storage-tiers|Hot, cool and archive storage tiers.}\n */\nexports.BlockBlobTier = void 0;\n(function (BlockBlobTier) {\n /**\n * Optimized for storing data that is accessed frequently.\n */\n BlockBlobTier[\"Hot\"] = \"Hot\";\n /**\n * Optimized for storing data that is infrequently accessed and stored for at least 30 days.\n */\n BlockBlobTier[\"Cool\"] = \"Cool\";\n /**\n * Optimized for storing data that is rarely accessed and stored for at least 180 days\n * with flexible latency requirements (on the order of hours).\n */\n BlockBlobTier[\"Archive\"] = \"Archive\";\n})(exports.BlockBlobTier || (exports.BlockBlobTier = {}));\n/**\n * Specifies the page blob tier to set the blob to. This is only applicable to page blobs on premium storage accounts.\n * Please see {@link https://docs.microsoft.com/azure/storage/storage-premium-storage#scalability-and-performance-targets|here}\n * for detailed information on the corresponding IOPS and throughput per PageBlobTier.\n */\nexports.PremiumPageBlobTier = void 0;\n(function (PremiumPageBlobTier) {\n /**\n * P4 Tier.\n */\n PremiumPageBlobTier[\"P4\"] = \"P4\";\n /**\n * P6 Tier.\n */\n PremiumPageBlobTier[\"P6\"] = \"P6\";\n /**\n * P10 Tier.\n */\n PremiumPageBlobTier[\"P10\"] = \"P10\";\n /**\n * P15 Tier.\n */\n PremiumPageBlobTier[\"P15\"] = \"P15\";\n /**\n * P20 Tier.\n */\n PremiumPageBlobTier[\"P20\"] = \"P20\";\n /**\n * P30 Tier.\n */\n PremiumPageBlobTier[\"P30\"] = \"P30\";\n /**\n * P40 Tier.\n */\n PremiumPageBlobTier[\"P40\"] = \"P40\";\n /**\n * P50 Tier.\n */\n PremiumPageBlobTier[\"P50\"] = \"P50\";\n /**\n * P60 Tier.\n */\n PremiumPageBlobTier[\"P60\"] = \"P60\";\n /**\n * P70 Tier.\n */\n PremiumPageBlobTier[\"P70\"] = \"P70\";\n /**\n * P80 Tier.\n */\n PremiumPageBlobTier[\"P80\"] = \"P80\";\n})(exports.PremiumPageBlobTier || (exports.PremiumPageBlobTier = {}));\nfunction toAccessTier(tier) {\n if (tier === undefined) {\n return undefined;\n }\n return tier; // No more check if string is a valid AccessTier, and left this to underlay logic to decide(service).\n}\nfunction ensureCpkIfSpecified(cpk, isHttps) {\n if (cpk && !isHttps) {\n throw new RangeError(\"Customer-provided encryption key must be used over HTTPS.\");\n }\n if (cpk && !cpk.encryptionAlgorithm) {\n cpk.encryptionAlgorithm = EncryptionAlgorithmAES25;\n }\n}\n/**\n * Defines the known cloud audiences for Storage.\n */\nexports.StorageBlobAudience = void 0;\n(function (StorageBlobAudience) {\n /**\n * The OAuth scope to use to retrieve an AAD token for Azure Storage.\n */\n StorageBlobAudience[\"StorageOAuthScopes\"] = \"https://storage.azure.com/.default\";\n /**\n * The OAuth scope to use to retrieve an AAD token for Azure Disk.\n */\n StorageBlobAudience[\"DiskComputeOAuthScopes\"] = \"https://disk.compute.azure.com/.default\";\n})(exports.StorageBlobAudience || (exports.StorageBlobAudience = {}));\n\n// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n/**\n * Function that converts PageRange and ClearRange to a common Range object.\n * PageRange and ClearRange have start and end while Range offset and count\n * this function normalizes to Range.\n * @param response - Model PageBlob Range response\n */\nfunction rangeResponseFromModel(response) {\n const pageRange = (response._response.parsedBody.pageRange || []).map((x) => ({\n offset: x.start,\n count: x.end - x.start,\n }));\n const clearRange = (response._response.parsedBody.clearRange || []).map((x) => ({\n offset: x.start,\n count: x.end - x.start,\n }));\n return Object.assign(Object.assign({}, response), { pageRange,\n clearRange, _response: Object.assign(Object.assign({}, response._response), { parsedBody: {\n pageRange,\n clearRange,\n } }) });\n}\n\n// Copyright (c) Microsoft Corporation.\n/**\n * This is the poller returned by {@link BlobClient.beginCopyFromURL}.\n * This can not be instantiated directly outside of this package.\n *\n * @hidden\n */\nclass BlobBeginCopyFromUrlPoller extends coreLro.Poller {\n constructor(options) {\n const { blobClient, copySource, intervalInMs = 15000, onProgress, resumeFrom, startCopyFromURLOptions, } = options;\n let state;\n if (resumeFrom) {\n state = JSON.parse(resumeFrom).state;\n }\n const operation = makeBlobBeginCopyFromURLPollOperation(Object.assign(Object.assign({}, state), { blobClient,\n copySource,\n startCopyFromURLOptions }));\n super(operation);\n if (typeof onProgress === \"function\") {\n this.onProgress(onProgress);\n }\n this.intervalInMs = intervalInMs;\n }\n delay() {\n return coreHttp.delay(this.intervalInMs);\n }\n}\n/**\n * Note: Intentionally using function expression over arrow function expression\n * so that the function can be invoked with a different context.\n * This affects what `this` refers to.\n * @hidden\n */\nconst cancel = async function cancel(options = {}) {\n const state = this.state;\n const { copyId } = state;\n if (state.isCompleted) {\n return makeBlobBeginCopyFromURLPollOperation(state);\n }\n if (!copyId) {\n state.isCancelled = true;\n return makeBlobBeginCopyFromURLPollOperation(state);\n }\n // if abortCopyFromURL throws, it will bubble up to user's poller.cancelOperation call\n await state.blobClient.abortCopyFromURL(copyId, {\n abortSignal: options.abortSignal,\n });\n state.isCancelled = true;\n return makeBlobBeginCopyFromURLPollOperation(state);\n};\n/**\n * Note: Intentionally using function expression over arrow function expression\n * so that the function can be invoked with a different context.\n * This affects what `this` refers to.\n * @hidden\n */\nconst update = async function update(options = {}) {\n const state = this.state;\n const { blobClient, copySource, startCopyFromURLOptions } = state;\n if (!state.isStarted) {\n state.isStarted = true;\n const result = await blobClient.startCopyFromURL(copySource, startCopyFromURLOptions);\n // copyId is needed to abort\n state.copyId = result.copyId;\n if (result.copyStatus === \"success\") {\n state.result = result;\n state.isCompleted = true;\n }\n }\n else if (!state.isCompleted) {\n try {\n const result = await state.blobClient.getProperties({ abortSignal: options.abortSignal });\n const { copyStatus, copyProgress } = result;\n const prevCopyProgress = state.copyProgress;\n if (copyProgress) {\n state.copyProgress = copyProgress;\n }\n if (copyStatus === \"pending\" &&\n copyProgress !== prevCopyProgress &&\n typeof options.fireProgress === \"function\") {\n // trigger in setTimeout, or swallow error?\n options.fireProgress(state);\n }\n else if (copyStatus === \"success\") {\n state.result = result;\n state.isCompleted = true;\n }\n else if (copyStatus === \"failed\") {\n state.error = new Error(`Blob copy failed with reason: \"${result.copyStatusDescription || \"unknown\"}\"`);\n state.isCompleted = true;\n }\n }\n catch (err) {\n state.error = err;\n state.isCompleted = true;\n }\n }\n return makeBlobBeginCopyFromURLPollOperation(state);\n};\n/**\n * Note: Intentionally using function expression over arrow function expression\n * so that the function can be invoked with a different context.\n * This affects what `this` refers to.\n * @hidden\n */\nconst toString = function toString() {\n return JSON.stringify({ state: this.state }, (key, value) => {\n // remove blobClient from serialized state since a client can't be hydrated from this info.\n if (key === \"blobClient\") {\n return undefined;\n }\n return value;\n });\n};\n/**\n * Creates a poll operation given the provided state.\n * @hidden\n */\nfunction makeBlobBeginCopyFromURLPollOperation(state) {\n return {\n state: Object.assign({}, state),\n cancel,\n toString,\n update,\n };\n}\n\n// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n/**\n * Generate a range string. For example:\n *\n * \"bytes=255-\" or \"bytes=0-511\"\n *\n * @param iRange -\n */\nfunction rangeToString(iRange) {\n if (iRange.offset < 0) {\n throw new RangeError(`Range.offset cannot be smaller than 0.`);\n }\n if (iRange.count && iRange.count <= 0) {\n throw new RangeError(`Range.count must be larger than 0. Leave it undefined if you want a range from offset to the end.`);\n }\n return iRange.count\n ? `bytes=${iRange.offset}-${iRange.offset + iRange.count - 1}`\n : `bytes=${iRange.offset}-`;\n}\n\n// Copyright (c) Microsoft Corporation.\n/**\n * States for Batch.\n */\nvar BatchStates;\n(function (BatchStates) {\n BatchStates[BatchStates[\"Good\"] = 0] = \"Good\";\n BatchStates[BatchStates[\"Error\"] = 1] = \"Error\";\n})(BatchStates || (BatchStates = {}));\n/**\n * Batch provides basic parallel execution with concurrency limits.\n * Will stop execute left operations when one of the executed operation throws an error.\n * But Batch cannot cancel ongoing operations, you need to cancel them by yourself.\n */\nclass Batch {\n /**\n * Creates an instance of Batch.\n * @param concurrency -\n */\n constructor(concurrency = 5) {\n /**\n * Number of active operations under execution.\n */\n this.actives = 0;\n /**\n * Number of completed operations under execution.\n */\n this.completed = 0;\n /**\n * Offset of next operation to be executed.\n */\n this.offset = 0;\n /**\n * Operation array to be executed.\n */\n this.operations = [];\n /**\n * States of Batch. When an error happens, state will turn into error.\n * Batch will stop execute left operations.\n */\n this.state = BatchStates.Good;\n if (concurrency < 1) {\n throw new RangeError(\"concurrency must be larger than 0\");\n }\n this.concurrency = concurrency;\n this.emitter = new events.EventEmitter();\n }\n /**\n * Add a operation into queue.\n *\n * @param operation -\n */\n addOperation(operation) {\n this.operations.push(async () => {\n try {\n this.actives++;\n await operation();\n this.actives--;\n this.completed++;\n this.parallelExecute();\n }\n catch (error) {\n this.emitter.emit(\"error\", error);\n }\n });\n }\n /**\n * Start execute operations in the queue.\n *\n */\n async do() {\n if (this.operations.length === 0) {\n return Promise.resolve();\n }\n this.parallelExecute();\n return new Promise((resolve, reject) => {\n this.emitter.on(\"finish\", resolve);\n this.emitter.on(\"error\", (error) => {\n this.state = BatchStates.Error;\n reject(error);\n });\n });\n }\n /**\n * Get next operation to be executed. Return null when reaching ends.\n *\n */\n nextOperation() {\n if (this.offset < this.operations.length) {\n return this.operations[this.offset++];\n }\n return null;\n }\n /**\n * Start execute operations. One one the most important difference between\n * this method with do() is that do() wraps as an sync method.\n *\n */\n parallelExecute() {\n if (this.state === BatchStates.Error) {\n return;\n }\n if (this.completed >= this.operations.length) {\n this.emitter.emit(\"finish\");\n return;\n }\n while (this.actives < this.concurrency) {\n const operation = this.nextOperation();\n if (operation) {\n operation();\n }\n else {\n return;\n }\n }\n }\n}\n\n// Copyright (c) Microsoft Corporation.\n/**\n * This class generates a readable stream from the data in an array of buffers.\n */\nclass BuffersStream extends stream.Readable {\n /**\n * Creates an instance of BuffersStream that will emit the data\n * contained in the array of buffers.\n *\n * @param buffers - Array of buffers containing the data\n * @param byteLength - The total length of data contained in the buffers\n */\n constructor(buffers, byteLength, options) {\n super(options);\n this.buffers = buffers;\n this.byteLength = byteLength;\n this.byteOffsetInCurrentBuffer = 0;\n this.bufferIndex = 0;\n this.pushedBytesLength = 0;\n // check byteLength is no larger than buffers[] total length\n let buffersLength = 0;\n for (const buf of this.buffers) {\n buffersLength += buf.byteLength;\n }\n if (buffersLength < this.byteLength) {\n throw new Error(\"Data size shouldn't be larger than the total length of buffers.\");\n }\n }\n /**\n * Internal _read() that will be called when the stream wants to pull more data in.\n *\n * @param size - Optional. The size of data to be read\n */\n _read(size) {\n if (this.pushedBytesLength >= this.byteLength) {\n this.push(null);\n }\n if (!size) {\n size = this.readableHighWaterMark;\n }\n const outBuffers = [];\n let i = 0;\n while (i < size && this.pushedBytesLength < this.byteLength) {\n // The last buffer may be longer than the data it contains.\n const remainingDataInAllBuffers = this.byteLength - this.pushedBytesLength;\n const remainingCapacityInThisBuffer = this.buffers[this.bufferIndex].byteLength - this.byteOffsetInCurrentBuffer;\n const remaining = Math.min(remainingCapacityInThisBuffer, remainingDataInAllBuffers);\n if (remaining > size - i) {\n // chunkSize = size - i\n const end = this.byteOffsetInCurrentBuffer + size - i;\n outBuffers.push(this.buffers[this.bufferIndex].slice(this.byteOffsetInCurrentBuffer, end));\n this.pushedBytesLength += size - i;\n this.byteOffsetInCurrentBuffer = end;\n i = size;\n break;\n }\n else {\n // chunkSize = remaining\n const end = this.byteOffsetInCurrentBuffer + remaining;\n outBuffers.push(this.buffers[this.bufferIndex].slice(this.byteOffsetInCurrentBuffer, end));\n if (remaining === remainingCapacityInThisBuffer) {\n // this.buffers[this.bufferIndex] used up, shift to next one\n this.byteOffsetInCurrentBuffer = 0;\n this.bufferIndex++;\n }\n else {\n this.byteOffsetInCurrentBuffer = end;\n }\n this.pushedBytesLength += remaining;\n i += remaining;\n }\n }\n if (outBuffers.length > 1) {\n this.push(Buffer.concat(outBuffers));\n }\n else if (outBuffers.length === 1) {\n this.push(outBuffers[0]);\n }\n }\n}\n\n// Copyright (c) Microsoft Corporation.\n/**\n * maxBufferLength is max size of each buffer in the pooled buffers.\n */\n// Can't use import as Typescript doesn't recognize \"buffer\".\nconst maxBufferLength = require(\"buffer\").constants.MAX_LENGTH;\n/**\n * This class provides a buffer container which conceptually has no hard size limit.\n * It accepts a capacity, an array of input buffers and the total length of input data.\n * It will allocate an internal \"buffer\" of the capacity and fill the data in the input buffers\n * into the internal \"buffer\" serially with respect to the total length.\n * Then by calling PooledBuffer.getReadableStream(), you can get a readable stream\n * assembled from all the data in the internal \"buffer\".\n */\nclass PooledBuffer {\n constructor(capacity, buffers, totalLength) {\n /**\n * Internal buffers used to keep the data.\n * Each buffer has a length of the maxBufferLength except last one.\n */\n this.buffers = [];\n this.capacity = capacity;\n this._size = 0;\n // allocate\n const bufferNum = Math.ceil(capacity / maxBufferLength);\n for (let i = 0; i < bufferNum; i++) {\n let len = i === bufferNum - 1 ? capacity % maxBufferLength : maxBufferLength;\n if (len === 0) {\n len = maxBufferLength;\n }\n this.buffers.push(Buffer.allocUnsafe(len));\n }\n if (buffers) {\n this.fill(buffers, totalLength);\n }\n }\n /**\n * The size of the data contained in the pooled buffers.\n */\n get size() {\n return this._size;\n }\n /**\n * Fill the internal buffers with data in the input buffers serially\n * with respect to the total length and the total capacity of the internal buffers.\n * Data copied will be shift out of the input buffers.\n *\n * @param buffers - Input buffers containing the data to be filled in the pooled buffer\n * @param totalLength - Total length of the data to be filled in.\n *\n */\n fill(buffers, totalLength) {\n this._size = Math.min(this.capacity, totalLength);\n let i = 0, j = 0, targetOffset = 0, sourceOffset = 0, totalCopiedNum = 0;\n while (totalCopiedNum < this._size) {\n const source = buffers[i];\n const target = this.buffers[j];\n const copiedNum = source.copy(target, targetOffset, sourceOffset);\n totalCopiedNum += copiedNum;\n sourceOffset += copiedNum;\n targetOffset += copiedNum;\n if (sourceOffset === source.length) {\n i++;\n sourceOffset = 0;\n }\n if (targetOffset === target.length) {\n j++;\n targetOffset = 0;\n }\n }\n // clear copied from source buffers\n buffers.splice(0, i);\n if (buffers.length > 0) {\n buffers[0] = buffers[0].slice(sourceOffset);\n }\n }\n /**\n * Get the readable stream assembled from all the data in the internal buffers.\n *\n */\n getReadableStream() {\n return new BuffersStream(this.buffers, this.size);\n }\n}\n\n// Copyright (c) Microsoft Corporation.\n/**\n * This class accepts a Node.js Readable stream as input, and keeps reading data\n * from the stream into the internal buffer structure, until it reaches maxBuffers.\n * Every available buffer will try to trigger outgoingHandler.\n *\n * The internal buffer structure includes an incoming buffer array, and a outgoing\n * buffer array. The incoming buffer array includes the \"empty\" buffers can be filled\n * with new incoming data. The outgoing array includes the filled buffers to be\n * handled by outgoingHandler. Every above buffer size is defined by parameter bufferSize.\n *\n * NUM_OF_ALL_BUFFERS = BUFFERS_IN_INCOMING + BUFFERS_IN_OUTGOING + BUFFERS_UNDER_HANDLING\n *\n * NUM_OF_ALL_BUFFERS lesser than or equal to maxBuffers\n *\n * PERFORMANCE IMPROVEMENT TIPS:\n * 1. Input stream highWaterMark is better to set a same value with bufferSize\n * parameter, which will avoid Buffer.concat() operations.\n * 2. concurrency should set a smaller value than maxBuffers, which is helpful to\n * reduce the possibility when a outgoing handler waits for the stream data.\n * in this situation, outgoing handlers are blocked.\n * Outgoing queue shouldn't be empty.\n */\nclass BufferScheduler {\n /**\n * Creates an instance of BufferScheduler.\n *\n * @param readable - A Node.js Readable stream\n * @param bufferSize - Buffer size of every maintained buffer\n * @param maxBuffers - How many buffers can be allocated\n * @param outgoingHandler - An async function scheduled to be\n * triggered when a buffer fully filled\n * with stream data\n * @param concurrency - Concurrency of executing outgoingHandlers (>0)\n * @param encoding - [Optional] Encoding of Readable stream when it's a string stream\n */\n constructor(readable, bufferSize, maxBuffers, outgoingHandler, concurrency, encoding) {\n /**\n * An internal event emitter.\n */\n this.emitter = new events.EventEmitter();\n /**\n * An internal offset marker to track data offset in bytes of next outgoingHandler.\n */\n this.offset = 0;\n /**\n * An internal marker to track whether stream is end.\n */\n this.isStreamEnd = false;\n /**\n * An internal marker to track whether stream or outgoingHandler returns error.\n */\n this.isError = false;\n /**\n * How many handlers are executing.\n */\n this.executingOutgoingHandlers = 0;\n /**\n * How many buffers have been allocated.\n */\n this.numBuffers = 0;\n /**\n * Because this class doesn't know how much data every time stream pops, which\n * is defined by highWaterMarker of the stream. So BufferScheduler will cache\n * data received from the stream, when data in unresolvedDataArray exceeds the\n * blockSize defined, it will try to concat a blockSize of buffer, fill into available\n * buffers from incoming and push to outgoing array.\n */\n this.unresolvedDataArray = [];\n /**\n * How much data consisted in unresolvedDataArray.\n */\n this.unresolvedLength = 0;\n /**\n * The array includes all the available buffers can be used to fill data from stream.\n */\n this.incoming = [];\n /**\n * The array (queue) includes all the buffers filled from stream data.\n */\n this.outgoing = [];\n if (bufferSize <= 0) {\n throw new RangeError(`bufferSize must be larger than 0, current is ${bufferSize}`);\n }\n if (maxBuffers <= 0) {\n throw new RangeError(`maxBuffers must be larger than 0, current is ${maxBuffers}`);\n }\n if (concurrency <= 0) {\n throw new RangeError(`concurrency must be larger than 0, current is ${concurrency}`);\n }\n this.bufferSize = bufferSize;\n this.maxBuffers = maxBuffers;\n this.readable = readable;\n this.outgoingHandler = outgoingHandler;\n this.concurrency = concurrency;\n this.encoding = encoding;\n }\n /**\n * Start the scheduler, will return error when stream of any of the outgoingHandlers\n * returns error.\n *\n */\n async do() {\n return new Promise((resolve, reject) => {\n this.readable.on(\"data\", (data) => {\n data = typeof data === \"string\" ? Buffer.from(data, this.encoding) : data;\n this.appendUnresolvedData(data);\n if (!this.resolveData()) {\n this.readable.pause();\n }\n });\n this.readable.on(\"error\", (err) => {\n this.emitter.emit(\"error\", err);\n });\n this.readable.on(\"end\", () => {\n this.isStreamEnd = true;\n this.emitter.emit(\"checkEnd\");\n });\n this.emitter.on(\"error\", (err) => {\n this.isError = true;\n this.readable.pause();\n reject(err);\n });\n this.emitter.on(\"checkEnd\", () => {\n if (this.outgoing.length > 0) {\n this.triggerOutgoingHandlers();\n return;\n }\n if (this.isStreamEnd && this.executingOutgoingHandlers === 0) {\n if (this.unresolvedLength > 0 && this.unresolvedLength < this.bufferSize) {\n const buffer = this.shiftBufferFromUnresolvedDataArray();\n this.outgoingHandler(() => buffer.getReadableStream(), buffer.size, this.offset)\n .then(resolve)\n .catch(reject);\n }\n else if (this.unresolvedLength >= this.bufferSize) {\n return;\n }\n else {\n resolve();\n }\n }\n });\n });\n }\n /**\n * Insert a new data into unresolved array.\n *\n * @param data -\n */\n appendUnresolvedData(data) {\n this.unresolvedDataArray.push(data);\n this.unresolvedLength += data.length;\n }\n /**\n * Try to shift a buffer with size in blockSize. The buffer returned may be less\n * than blockSize when data in unresolvedDataArray is less than bufferSize.\n *\n */\n shiftBufferFromUnresolvedDataArray(buffer) {\n if (!buffer) {\n buffer = new PooledBuffer(this.bufferSize, this.unresolvedDataArray, this.unresolvedLength);\n }\n else {\n buffer.fill(this.unresolvedDataArray, this.unresolvedLength);\n }\n this.unresolvedLength -= buffer.size;\n return buffer;\n }\n /**\n * Resolve data in unresolvedDataArray. For every buffer with size in blockSize\n * shifted, it will try to get (or allocate a buffer) from incoming, and fill it,\n * then push it into outgoing to be handled by outgoing handler.\n *\n * Return false when available buffers in incoming are not enough, else true.\n *\n * @returns Return false when buffers in incoming are not enough, else true.\n */\n resolveData() {\n while (this.unresolvedLength >= this.bufferSize) {\n let buffer;\n if (this.incoming.length > 0) {\n buffer = this.incoming.shift();\n this.shiftBufferFromUnresolvedDataArray(buffer);\n }\n else {\n if (this.numBuffers < this.maxBuffers) {\n buffer = this.shiftBufferFromUnresolvedDataArray();\n this.numBuffers++;\n }\n else {\n // No available buffer, wait for buffer returned\n return false;\n }\n }\n this.outgoing.push(buffer);\n this.triggerOutgoingHandlers();\n }\n return true;\n }\n /**\n * Try to trigger a outgoing handler for every buffer in outgoing. Stop when\n * concurrency reaches.\n */\n async triggerOutgoingHandlers() {\n let buffer;\n do {\n if (this.executingOutgoingHandlers >= this.concurrency) {\n return;\n }\n buffer = this.outgoing.shift();\n if (buffer) {\n this.triggerOutgoingHandler(buffer);\n }\n } while (buffer);\n }\n /**\n * Trigger a outgoing handler for a buffer shifted from outgoing.\n *\n * @param buffer -\n */\n async triggerOutgoingHandler(buffer) {\n const bufferLength = buffer.size;\n this.executingOutgoingHandlers++;\n this.offset += bufferLength;\n try {\n await this.outgoingHandler(() => buffer.getReadableStream(), bufferLength, this.offset - bufferLength);\n }\n catch (err) {\n this.emitter.emit(\"error\", err);\n return;\n }\n this.executingOutgoingHandlers--;\n this.reuseBuffer(buffer);\n this.emitter.emit(\"checkEnd\");\n }\n /**\n * Return buffer used by outgoing handler into incoming.\n *\n * @param buffer -\n */\n reuseBuffer(buffer) {\n this.incoming.push(buffer);\n if (!this.isError && this.resolveData() && !this.isStreamEnd) {\n this.readable.resume();\n }\n }\n}\n\n// Copyright (c) Microsoft Corporation.\n/**\n * Reads a readable stream into buffer. Fill the buffer from offset to end.\n *\n * @param stream - A Node.js Readable stream\n * @param buffer - Buffer to be filled, length must greater than or equal to offset\n * @param offset - From which position in the buffer to be filled, inclusive\n * @param end - To which position in the buffer to be filled, exclusive\n * @param encoding - Encoding of the Readable stream\n */\nasync function streamToBuffer(stream, buffer, offset, end, encoding) {\n let pos = 0; // Position in stream\n const count = end - offset; // Total amount of data needed in stream\n return new Promise((resolve, reject) => {\n const timeout = setTimeout(() => reject(new Error(`The operation cannot be completed in timeout.`)), REQUEST_TIMEOUT);\n stream.on(\"readable\", () => {\n if (pos >= count) {\n clearTimeout(timeout);\n resolve();\n return;\n }\n let chunk = stream.read();\n if (!chunk) {\n return;\n }\n if (typeof chunk === \"string\") {\n chunk = Buffer.from(chunk, encoding);\n }\n // How much data needed in this chunk\n const chunkLength = pos + chunk.length > count ? count - pos : chunk.length;\n buffer.fill(chunk.slice(0, chunkLength), offset + pos, offset + pos + chunkLength);\n pos += chunkLength;\n });\n stream.on(\"end\", () => {\n clearTimeout(timeout);\n if (pos < count) {\n reject(new Error(`Stream drains before getting enough data needed. Data read: ${pos}, data need: ${count}`));\n }\n resolve();\n });\n stream.on(\"error\", (msg) => {\n clearTimeout(timeout);\n reject(msg);\n });\n });\n}\n/**\n * Reads a readable stream into buffer entirely.\n *\n * @param stream - A Node.js Readable stream\n * @param buffer - Buffer to be filled, length must greater than or equal to offset\n * @param encoding - Encoding of the Readable stream\n * @returns with the count of bytes read.\n * @throws `RangeError` If buffer size is not big enough.\n */\nasync function streamToBuffer2(stream, buffer, encoding) {\n let pos = 0; // Position in stream\n const bufferSize = buffer.length;\n return new Promise((resolve, reject) => {\n stream.on(\"readable\", () => {\n let chunk = stream.read();\n if (!chunk) {\n return;\n }\n if (typeof chunk === \"string\") {\n chunk = Buffer.from(chunk, encoding);\n }\n if (pos + chunk.length > bufferSize) {\n reject(new Error(`Stream exceeds buffer size. Buffer size: ${bufferSize}`));\n return;\n }\n buffer.fill(chunk, pos, pos + chunk.length);\n pos += chunk.length;\n });\n stream.on(\"end\", () => {\n resolve(pos);\n });\n stream.on(\"error\", reject);\n });\n}\n/**\n * ONLY AVAILABLE IN NODE.JS RUNTIME.\n *\n * Writes the content of a readstream to a local file. Returns a Promise which is completed after the file handle is closed.\n *\n * @param rs - The read stream.\n * @param file - Destination file path.\n */\nasync function readStreamToLocalFile(rs, file) {\n return new Promise((resolve, reject) => {\n const ws = fs__namespace.createWriteStream(file);\n rs.on(\"error\", (err) => {\n reject(err);\n });\n ws.on(\"error\", (err) => {\n reject(err);\n });\n ws.on(\"close\", resolve);\n rs.pipe(ws);\n });\n}\n/**\n * ONLY AVAILABLE IN NODE.JS RUNTIME.\n *\n * Promisified version of fs.stat().\n */\nconst fsStat = util__namespace.promisify(fs__namespace.stat);\nconst fsCreateReadStream = fs__namespace.createReadStream;\n\n/**\n * A BlobClient represents a URL to an Azure Storage blob; the blob may be a block blob,\n * append blob, or page blob.\n */\nclass BlobClient extends StorageClient {\n constructor(urlOrConnectionString, credentialOrPipelineOrContainerName, blobNameOrOptions, \n // Legacy, no fix for eslint error without breaking. Disable it for this interface.\n /* eslint-disable-next-line @azure/azure-sdk/ts-naming-options*/\n options) {\n options = options || {};\n let pipeline;\n let url;\n if (isPipelineLike(credentialOrPipelineOrContainerName)) {\n // (url: string, pipeline: Pipeline)\n url = urlOrConnectionString;\n pipeline = credentialOrPipelineOrContainerName;\n }\n else if ((coreHttp.isNode && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential) ||\n credentialOrPipelineOrContainerName instanceof AnonymousCredential ||\n coreHttp.isTokenCredential(credentialOrPipelineOrContainerName)) {\n // (url: string, credential?: StorageSharedKeyCredential | AnonymousCredential | TokenCredential, options?: StoragePipelineOptions)\n url = urlOrConnectionString;\n options = blobNameOrOptions;\n pipeline = newPipeline(credentialOrPipelineOrContainerName, options);\n }\n else if (!credentialOrPipelineOrContainerName &&\n typeof credentialOrPipelineOrContainerName !== \"string\") {\n // (url: string, credential?: StorageSharedKeyCredential | AnonymousCredential | TokenCredential, options?: StoragePipelineOptions)\n // The second parameter is undefined. Use anonymous credential.\n url = urlOrConnectionString;\n pipeline = newPipeline(new AnonymousCredential(), options);\n }\n else if (credentialOrPipelineOrContainerName &&\n typeof credentialOrPipelineOrContainerName === \"string\" &&\n blobNameOrOptions &&\n typeof blobNameOrOptions === \"string\") {\n // (connectionString: string, containerName: string, blobName: string, options?: StoragePipelineOptions)\n const containerName = credentialOrPipelineOrContainerName;\n const blobName = blobNameOrOptions;\n const extractedCreds = extractConnectionStringParts(urlOrConnectionString);\n if (extractedCreds.kind === \"AccountConnString\") {\n if (coreHttp.isNode) {\n const sharedKeyCredential = new StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey);\n url = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName));\n if (!options.proxyOptions) {\n options.proxyOptions = coreHttp.getDefaultProxySettings(extractedCreds.proxyUri);\n }\n pipeline = newPipeline(sharedKeyCredential, options);\n }\n else {\n throw new Error(\"Account connection string is only supported in Node.js environment\");\n }\n }\n else if (extractedCreds.kind === \"SASConnString\") {\n url =\n appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)) +\n \"?\" +\n extractedCreds.accountSas;\n pipeline = newPipeline(new AnonymousCredential(), options);\n }\n else {\n throw new Error(\"Connection string must be either an Account connection string or a SAS connection string\");\n }\n }\n else {\n throw new Error(\"Expecting non-empty strings for containerName and blobName parameters\");\n }\n super(url, pipeline);\n ({ blobName: this._name, containerName: this._containerName } =\n this.getBlobAndContainerNamesFromUrl());\n this.blobContext = new Blob$1(this.storageClientContext);\n this._snapshot = getURLParameter(this.url, URLConstants.Parameters.SNAPSHOT);\n this._versionId = getURLParameter(this.url, URLConstants.Parameters.VERSIONID);\n }\n /**\n * The name of the blob.\n */\n get name() {\n return this._name;\n }\n /**\n * The name of the storage container the blob is associated with.\n */\n get containerName() {\n return this._containerName;\n }\n /**\n * Creates a new BlobClient object identical to the source but with the specified snapshot timestamp.\n * Provide \"\" will remove the snapshot and return a Client to the base blob.\n *\n * @param snapshot - The snapshot timestamp.\n * @returns A new BlobClient object identical to the source but with the specified snapshot timestamp\n */\n withSnapshot(snapshot) {\n return new BlobClient(setURLParameter(this.url, URLConstants.Parameters.SNAPSHOT, snapshot.length === 0 ? undefined : snapshot), this.pipeline);\n }\n /**\n * Creates a new BlobClient object pointing to a version of this blob.\n * Provide \"\" will remove the versionId and return a Client to the base blob.\n *\n * @param versionId - The versionId.\n * @returns A new BlobClient object pointing to the version of this blob.\n */\n withVersion(versionId) {\n return new BlobClient(setURLParameter(this.url, URLConstants.Parameters.VERSIONID, versionId.length === 0 ? undefined : versionId), this.pipeline);\n }\n /**\n * Creates a AppendBlobClient object.\n *\n */\n getAppendBlobClient() {\n return new AppendBlobClient(this.url, this.pipeline);\n }\n /**\n * Creates a BlockBlobClient object.\n *\n */\n getBlockBlobClient() {\n return new BlockBlobClient(this.url, this.pipeline);\n }\n /**\n * Creates a PageBlobClient object.\n *\n */\n getPageBlobClient() {\n return new PageBlobClient(this.url, this.pipeline);\n }\n /**\n * Reads or downloads a blob from the system, including its metadata and properties.\n * You can also call Get Blob to read a snapshot.\n *\n * * In Node.js, data returns in a Readable stream readableStreamBody\n * * In browsers, data returns in a promise blobBody\n *\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/get-blob\n *\n * @param offset - From which position of the blob to download, greater than or equal to 0\n * @param count - How much data to be downloaded, greater than 0. Will download to the end when undefined\n * @param options - Optional options to Blob Download operation.\n *\n *\n * Example usage (Node.js):\n *\n * ```js\n * // Download and convert a blob to a string\n * const downloadBlockBlobResponse = await blobClient.download();\n * const downloaded = await streamToBuffer(downloadBlockBlobResponse.readableStreamBody);\n * console.log(\"Downloaded blob content:\", downloaded.toString());\n *\n * async function streamToBuffer(readableStream) {\n * return new Promise((resolve, reject) => {\n * const chunks = [];\n * readableStream.on(\"data\", (data) => {\n * chunks.push(data instanceof Buffer ? data : Buffer.from(data));\n * });\n * readableStream.on(\"end\", () => {\n * resolve(Buffer.concat(chunks));\n * });\n * readableStream.on(\"error\", reject);\n * });\n * }\n * ```\n *\n * Example usage (browser):\n *\n * ```js\n * // Download and convert a blob to a string\n * const downloadBlockBlobResponse = await blobClient.download();\n * const downloaded = await blobToString(await downloadBlockBlobResponse.blobBody);\n * console.log(\n * \"Downloaded blob content\",\n * downloaded\n * );\n *\n * async function blobToString(blob: Blob): Promise {\n * const fileReader = new FileReader();\n * return new Promise((resolve, reject) => {\n * fileReader.onloadend = (ev: any) => {\n * resolve(ev.target!.result);\n * };\n * fileReader.onerror = reject;\n * fileReader.readAsText(blob);\n * });\n * }\n * ```\n */\n async download(offset = 0, count, options = {}) {\n var _a;\n options.conditions = options.conditions || {};\n options.conditions = options.conditions || {};\n ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps);\n const { span, updatedOptions } = createSpan(\"BlobClient-download\", options);\n try {\n const res = await this.blobContext.download(Object.assign({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), requestOptions: {\n onDownloadProgress: coreHttp.isNode ? undefined : options.onProgress, // for Node.js, progress is reported by RetriableReadableStream\n }, range: offset === 0 && !count ? undefined : rangeToString({ offset, count }), rangeGetContentMD5: options.rangeGetContentMD5, rangeGetContentCRC64: options.rangeGetContentCrc64, snapshot: options.snapshot, cpkInfo: options.customerProvidedKey }, convertTracingToRequestOptionsBase(updatedOptions)));\n const wrappedRes = Object.assign(Object.assign({}, res), { _response: res._response, objectReplicationDestinationPolicyId: res.objectReplicationPolicyId, objectReplicationSourceProperties: parseObjectReplicationRecord(res.objectReplicationRules) });\n // Return browser response immediately\n if (!coreHttp.isNode) {\n return wrappedRes;\n }\n // We support retrying when download stream unexpected ends in Node.js runtime\n // Following code shouldn't be bundled into browser build, however some\n // bundlers may try to bundle following code and \"FileReadResponse.ts\".\n // In this case, \"FileDownloadResponse.browser.ts\" will be used as a shim of \"FileDownloadResponse.ts\"\n // The config is in package.json \"browser\" field\n if (options.maxRetryRequests === undefined || options.maxRetryRequests < 0) {\n // TODO: Default value or make it a required parameter?\n options.maxRetryRequests = DEFAULT_MAX_DOWNLOAD_RETRY_REQUESTS;\n }\n if (res.contentLength === undefined) {\n throw new RangeError(`File download response doesn't contain valid content length header`);\n }\n if (!res.etag) {\n throw new RangeError(`File download response doesn't contain valid etag header`);\n }\n return new BlobDownloadResponse(wrappedRes, async (start) => {\n var _a;\n const updatedDownloadOptions = {\n leaseAccessConditions: options.conditions,\n modifiedAccessConditions: {\n ifMatch: options.conditions.ifMatch || res.etag,\n ifModifiedSince: options.conditions.ifModifiedSince,\n ifNoneMatch: options.conditions.ifNoneMatch,\n ifUnmodifiedSince: options.conditions.ifUnmodifiedSince,\n ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions,\n },\n range: rangeToString({\n count: offset + res.contentLength - start,\n offset: start,\n }),\n rangeGetContentMD5: options.rangeGetContentMD5,\n rangeGetContentCRC64: options.rangeGetContentCrc64,\n snapshot: options.snapshot,\n cpkInfo: options.customerProvidedKey,\n };\n // Debug purpose only\n // console.log(\n // `Read from internal stream, range: ${\n // updatedOptions.range\n // }, options: ${JSON.stringify(updatedOptions)}`\n // );\n return (await this.blobContext.download(Object.assign({ abortSignal: options.abortSignal }, updatedDownloadOptions))).readableStreamBody;\n }, offset, res.contentLength, {\n maxRetryRequests: options.maxRetryRequests,\n onProgress: options.onProgress,\n });\n }\n catch (e) {\n span.setStatus({\n code: coreTracing.SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n }\n finally {\n span.end();\n }\n }\n /**\n * Returns true if the Azure blob resource represented by this client exists; false otherwise.\n *\n * NOTE: use this function with care since an existing blob might be deleted by other clients or\n * applications. Vice versa new blobs might be added by other clients or applications after this\n * function completes.\n *\n * @param options - options to Exists operation.\n */\n async exists(options = {}) {\n const { span, updatedOptions } = createSpan(\"BlobClient-exists\", options);\n try {\n ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps);\n await this.getProperties({\n abortSignal: options.abortSignal,\n customerProvidedKey: options.customerProvidedKey,\n conditions: options.conditions,\n tracingOptions: updatedOptions.tracingOptions,\n });\n return true;\n }\n catch (e) {\n if (e.statusCode === 404) {\n // Expected exception when checking blob existence\n return false;\n }\n else if (e.statusCode === 409 &&\n (e.details.errorCode === BlobUsesCustomerSpecifiedEncryptionMsg ||\n e.details.errorCode === BlobDoesNotUseCustomerSpecifiedEncryption)) {\n // Expected exception when checking blob existence\n return true;\n }\n span.setStatus({\n code: coreTracing.SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n }\n finally {\n span.end();\n }\n }\n /**\n * Returns all user-defined metadata, standard HTTP properties, and system properties\n * for the blob. It does not return the content of the blob.\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/get-blob-properties\n *\n * WARNING: The `metadata` object returned in the response will have its keys in lowercase, even if\n * they originally contained uppercase characters. This differs from the metadata keys returned by\n * the methods of {@link ContainerClient} that list blobs using the `includeMetadata` option, which\n * will retain their original casing.\n *\n * @param options - Optional options to Get Properties operation.\n */\n async getProperties(options = {}) {\n var _a;\n const { span, updatedOptions } = createSpan(\"BlobClient-getProperties\", options);\n try {\n options.conditions = options.conditions || {};\n ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps);\n const res = await this.blobContext.getProperties(Object.assign({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), cpkInfo: options.customerProvidedKey }, convertTracingToRequestOptionsBase(updatedOptions)));\n return Object.assign(Object.assign({}, res), { _response: res._response, objectReplicationDestinationPolicyId: res.objectReplicationPolicyId, objectReplicationSourceProperties: parseObjectReplicationRecord(res.objectReplicationRules) });\n }\n catch (e) {\n span.setStatus({\n code: coreTracing.SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n }\n finally {\n span.end();\n }\n }\n /**\n * Marks the specified blob or snapshot for deletion. The blob is later deleted\n * during garbage collection. Note that in order to delete a blob, you must delete\n * all of its snapshots. You can delete both at the same time with the Delete\n * Blob operation.\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/delete-blob\n *\n * @param options - Optional options to Blob Delete operation.\n */\n async delete(options = {}) {\n var _a;\n const { span, updatedOptions } = createSpan(\"BlobClient-delete\", options);\n options.conditions = options.conditions || {};\n try {\n return await this.blobContext.delete(Object.assign({ abortSignal: options.abortSignal, deleteSnapshots: options.deleteSnapshots, leaseAccessConditions: options.conditions, modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }) }, convertTracingToRequestOptionsBase(updatedOptions)));\n }\n catch (e) {\n span.setStatus({\n code: coreTracing.SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n }\n finally {\n span.end();\n }\n }\n /**\n * Marks the specified blob or snapshot for deletion if it exists. The blob is later deleted\n * during garbage collection. Note that in order to delete a blob, you must delete\n * all of its snapshots. You can delete both at the same time with the Delete\n * Blob operation.\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/delete-blob\n *\n * @param options - Optional options to Blob Delete operation.\n */\n async deleteIfExists(options = {}) {\n var _a, _b;\n const { span, updatedOptions } = createSpan(\"BlobClient-deleteIfExists\", options);\n try {\n const res = await this.delete(updatedOptions);\n return Object.assign(Object.assign({ succeeded: true }, res), { _response: res._response });\n }\n catch (e) {\n if (((_a = e.details) === null || _a === void 0 ? void 0 : _a.errorCode) === \"BlobNotFound\") {\n span.setStatus({\n code: coreTracing.SpanStatusCode.ERROR,\n message: \"Expected exception when deleting a blob or snapshot only if it exists.\",\n });\n return Object.assign(Object.assign({ succeeded: false }, (_b = e.response) === null || _b === void 0 ? void 0 : _b.parsedHeaders), { _response: e.response });\n }\n span.setStatus({\n code: coreTracing.SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n }\n finally {\n span.end();\n }\n }\n /**\n * Restores the contents and metadata of soft deleted blob and any associated\n * soft deleted snapshots. Undelete Blob is supported only on version 2017-07-29\n * or later.\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/undelete-blob\n *\n * @param options - Optional options to Blob Undelete operation.\n */\n async undelete(options = {}) {\n const { span, updatedOptions } = createSpan(\"BlobClient-undelete\", options);\n try {\n return await this.blobContext.undelete(Object.assign({ abortSignal: options.abortSignal }, convertTracingToRequestOptionsBase(updatedOptions)));\n }\n catch (e) {\n span.setStatus({\n code: coreTracing.SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n }\n finally {\n span.end();\n }\n }\n /**\n * Sets system properties on the blob.\n *\n * If no value provided, or no value provided for the specified blob HTTP headers,\n * these blob HTTP headers without a value will be cleared.\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/set-blob-properties\n *\n * @param blobHTTPHeaders - If no value provided, or no value provided for\n * the specified blob HTTP headers, these blob HTTP\n * headers without a value will be cleared.\n * A common header to set is `blobContentType`\n * enabling the browser to provide functionality\n * based on file type.\n * @param options - Optional options to Blob Set HTTP Headers operation.\n */\n async setHTTPHeaders(blobHTTPHeaders, options = {}) {\n var _a;\n const { span, updatedOptions } = createSpan(\"BlobClient-setHTTPHeaders\", options);\n options.conditions = options.conditions || {};\n try {\n ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps);\n return await this.blobContext.setHttpHeaders(Object.assign({ abortSignal: options.abortSignal, blobHttpHeaders: blobHTTPHeaders, leaseAccessConditions: options.conditions, modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }) }, convertTracingToRequestOptionsBase(updatedOptions)));\n }\n catch (e) {\n span.setStatus({\n code: coreTracing.SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n }\n finally {\n span.end();\n }\n }\n /**\n * Sets user-defined metadata for the specified blob as one or more name-value pairs.\n *\n * If no option provided, or no metadata defined in the parameter, the blob\n * metadata will be removed.\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/set-blob-metadata\n *\n * @param metadata - Replace existing metadata with this value.\n * If no value provided the existing metadata will be removed.\n * @param options - Optional options to Set Metadata operation.\n */\n async setMetadata(metadata, options = {}) {\n var _a;\n const { span, updatedOptions } = createSpan(\"BlobClient-setMetadata\", options);\n options.conditions = options.conditions || {};\n try {\n ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps);\n return await this.blobContext.setMetadata(Object.assign({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, metadata, modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), cpkInfo: options.customerProvidedKey, encryptionScope: options.encryptionScope }, convertTracingToRequestOptionsBase(updatedOptions)));\n }\n catch (e) {\n span.setStatus({\n code: coreTracing.SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n }\n finally {\n span.end();\n }\n }\n /**\n * Sets tags on the underlying blob.\n * A blob can have up to 10 tags. Tag keys must be between 1 and 128 characters. Tag values must be between 0 and 256 characters.\n * Valid tag key and value characters include lower and upper case letters, digits (0-9),\n * space (' '), plus ('+'), minus ('-'), period ('.'), foward slash ('/'), colon (':'), equals ('='), and underscore ('_').\n *\n * @param tags -\n * @param options -\n */\n async setTags(tags, options = {}) {\n var _a;\n const { span, updatedOptions } = createSpan(\"BlobClient-setTags\", options);\n try {\n return await this.blobContext.setTags(Object.assign(Object.assign({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }) }, convertTracingToRequestOptionsBase(updatedOptions)), { tags: toBlobTags(tags) }));\n }\n catch (e) {\n span.setStatus({\n code: coreTracing.SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n }\n finally {\n span.end();\n }\n }\n /**\n * Gets the tags associated with the underlying blob.\n *\n * @param options -\n */\n async getTags(options = {}) {\n var _a;\n const { span, updatedOptions } = createSpan(\"BlobClient-getTags\", options);\n try {\n const response = await this.blobContext.getTags(Object.assign({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }) }, convertTracingToRequestOptionsBase(updatedOptions)));\n const wrappedResponse = Object.assign(Object.assign({}, response), { _response: response._response, tags: toTags({ blobTagSet: response.blobTagSet }) || {} });\n return wrappedResponse;\n }\n catch (e) {\n span.setStatus({\n code: coreTracing.SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n }\n finally {\n span.end();\n }\n }\n /**\n * Get a {@link BlobLeaseClient} that manages leases on the blob.\n *\n * @param proposeLeaseId - Initial proposed lease Id.\n * @returns A new BlobLeaseClient object for managing leases on the blob.\n */\n getBlobLeaseClient(proposeLeaseId) {\n return new BlobLeaseClient(this, proposeLeaseId);\n }\n /**\n * Creates a read-only snapshot of a blob.\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/snapshot-blob\n *\n * @param options - Optional options to the Blob Create Snapshot operation.\n */\n async createSnapshot(options = {}) {\n var _a;\n const { span, updatedOptions } = createSpan(\"BlobClient-createSnapshot\", options);\n options.conditions = options.conditions || {};\n try {\n ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps);\n return await this.blobContext.createSnapshot(Object.assign({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, metadata: options.metadata, modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), cpkInfo: options.customerProvidedKey, encryptionScope: options.encryptionScope }, convertTracingToRequestOptionsBase(updatedOptions)));\n }\n catch (e) {\n span.setStatus({\n code: coreTracing.SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n }\n finally {\n span.end();\n }\n }\n /**\n * Asynchronously copies a blob to a destination within the storage account.\n * This method returns a long running operation poller that allows you to wait\n * indefinitely until the copy is completed.\n * You can also cancel a copy before it is completed by calling `cancelOperation` on the poller.\n * Note that the onProgress callback will not be invoked if the operation completes in the first\n * request, and attempting to cancel a completed copy will result in an error being thrown.\n *\n * In version 2012-02-12 and later, the source for a Copy Blob operation can be\n * a committed blob in any Azure storage account.\n * Beginning with version 2015-02-21, the source for a Copy Blob operation can be\n * an Azure file in any Azure storage account.\n * Only storage accounts created on or after June 7th, 2012 allow the Copy Blob\n * operation to copy from another storage account.\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/copy-blob\n *\n * Example using automatic polling:\n *\n * ```js\n * const copyPoller = await blobClient.beginCopyFromURL('url');\n * const result = await copyPoller.pollUntilDone();\n * ```\n *\n * Example using manual polling:\n *\n * ```js\n * const copyPoller = await blobClient.beginCopyFromURL('url');\n * while (!poller.isDone()) {\n * await poller.poll();\n * }\n * const result = copyPoller.getResult();\n * ```\n *\n * Example using progress updates:\n *\n * ```js\n * const copyPoller = await blobClient.beginCopyFromURL('url', {\n * onProgress(state) {\n * console.log(`Progress: ${state.copyProgress}`);\n * }\n * });\n * const result = await copyPoller.pollUntilDone();\n * ```\n *\n * Example using a changing polling interval (default 15 seconds):\n *\n * ```js\n * const copyPoller = await blobClient.beginCopyFromURL('url', {\n * intervalInMs: 1000 // poll blob every 1 second for copy progress\n * });\n * const result = await copyPoller.pollUntilDone();\n * ```\n *\n * Example using copy cancellation:\n *\n * ```js\n * const copyPoller = await blobClient.beginCopyFromURL('url');\n * // cancel operation after starting it.\n * try {\n * await copyPoller.cancelOperation();\n * // calls to get the result now throw PollerCancelledError\n * await copyPoller.getResult();\n * } catch (err) {\n * if (err.name === 'PollerCancelledError') {\n * console.log('The copy was cancelled.');\n * }\n * }\n * ```\n *\n * @param copySource - url to the source Azure Blob/File.\n * @param options - Optional options to the Blob Start Copy From URL operation.\n */\n async beginCopyFromURL(copySource, options = {}) {\n const client = {\n abortCopyFromURL: (...args) => this.abortCopyFromURL(...args),\n getProperties: (...args) => this.getProperties(...args),\n startCopyFromURL: (...args) => this.startCopyFromURL(...args),\n };\n const poller = new BlobBeginCopyFromUrlPoller({\n blobClient: client,\n copySource,\n intervalInMs: options.intervalInMs,\n onProgress: options.onProgress,\n resumeFrom: options.resumeFrom,\n startCopyFromURLOptions: options,\n });\n // Trigger the startCopyFromURL call by calling poll.\n // Any errors from this method should be surfaced to the user.\n await poller.poll();\n return poller;\n }\n /**\n * Aborts a pending asynchronous Copy Blob operation, and leaves a destination blob with zero\n * length and full metadata. Version 2012-02-12 and newer.\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/abort-copy-blob\n *\n * @param copyId - Id of the Copy From URL operation.\n * @param options - Optional options to the Blob Abort Copy From URL operation.\n */\n async abortCopyFromURL(copyId, options = {}) {\n const { span, updatedOptions } = createSpan(\"BlobClient-abortCopyFromURL\", options);\n try {\n return await this.blobContext.abortCopyFromURL(copyId, Object.assign({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions }, convertTracingToRequestOptionsBase(updatedOptions)));\n }\n catch (e) {\n span.setStatus({\n code: coreTracing.SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n }\n finally {\n span.end();\n }\n }\n /**\n * The synchronous Copy From URL operation copies a blob or an internet resource to a new blob. It will not\n * return a response until the copy is complete.\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/copy-blob-from-url\n *\n * @param copySource - The source URL to copy from, Shared Access Signature(SAS) maybe needed for authentication\n * @param options -\n */\n async syncCopyFromURL(copySource, options = {}) {\n var _a, _b, _c;\n const { span, updatedOptions } = createSpan(\"BlobClient-syncCopyFromURL\", options);\n options.conditions = options.conditions || {};\n options.sourceConditions = options.sourceConditions || {};\n try {\n return await this.blobContext.copyFromURL(copySource, Object.assign({ abortSignal: options.abortSignal, metadata: options.metadata, leaseAccessConditions: options.conditions, modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), sourceModifiedAccessConditions: {\n sourceIfMatch: options.sourceConditions.ifMatch,\n sourceIfModifiedSince: options.sourceConditions.ifModifiedSince,\n sourceIfNoneMatch: options.sourceConditions.ifNoneMatch,\n sourceIfUnmodifiedSince: options.sourceConditions.ifUnmodifiedSince,\n }, sourceContentMD5: options.sourceContentMD5, copySourceAuthorization: httpAuthorizationToString(options.sourceAuthorization), blobTagsString: toBlobTagsString(options.tags), immutabilityPolicyExpiry: (_b = options.immutabilityPolicy) === null || _b === void 0 ? void 0 : _b.expiriesOn, immutabilityPolicyMode: (_c = options.immutabilityPolicy) === null || _c === void 0 ? void 0 : _c.policyMode, legalHold: options.legalHold, encryptionScope: options.encryptionScope, copySourceTags: options.copySourceTags }, convertTracingToRequestOptionsBase(updatedOptions)));\n }\n catch (e) {\n span.setStatus({\n code: coreTracing.SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n }\n finally {\n span.end();\n }\n }\n /**\n * Sets the tier on a blob. The operation is allowed on a page blob in a premium\n * storage account and on a block blob in a blob storage account (locally redundant\n * storage only). A premium page blob's tier determines the allowed size, IOPS,\n * and bandwidth of the blob. A block blob's tier determines Hot/Cool/Archive\n * storage type. This operation does not update the blob's ETag.\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/set-blob-tier\n *\n * @param tier - The tier to be set on the blob. Valid values are Hot, Cool, or Archive.\n * @param options - Optional options to the Blob Set Tier operation.\n */\n async setAccessTier(tier, options = {}) {\n var _a;\n const { span, updatedOptions } = createSpan(\"BlobClient-setAccessTier\", options);\n try {\n return await this.blobContext.setTier(toAccessTier(tier), Object.assign({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), rehydratePriority: options.rehydratePriority }, convertTracingToRequestOptionsBase(updatedOptions)));\n }\n catch (e) {\n span.setStatus({\n code: coreTracing.SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n }\n finally {\n span.end();\n }\n }\n async downloadToBuffer(param1, param2, param3, param4 = {}) {\n let buffer;\n let offset = 0;\n let count = 0;\n let options = param4;\n if (param1 instanceof Buffer) {\n buffer = param1;\n offset = param2 || 0;\n count = typeof param3 === \"number\" ? param3 : 0;\n }\n else {\n offset = typeof param1 === \"number\" ? param1 : 0;\n count = typeof param2 === \"number\" ? param2 : 0;\n options = param3 || {};\n }\n const { span, updatedOptions } = createSpan(\"BlobClient-downloadToBuffer\", options);\n try {\n if (!options.blockSize) {\n options.blockSize = 0;\n }\n if (options.blockSize < 0) {\n throw new RangeError(\"blockSize option must be >= 0\");\n }\n if (options.blockSize === 0) {\n options.blockSize = DEFAULT_BLOB_DOWNLOAD_BLOCK_BYTES;\n }\n if (offset < 0) {\n throw new RangeError(\"offset option must be >= 0\");\n }\n if (count && count <= 0) {\n throw new RangeError(\"count option must be greater than 0\");\n }\n if (!options.conditions) {\n options.conditions = {};\n }\n // Customer doesn't specify length, get it\n if (!count) {\n const response = await this.getProperties(Object.assign(Object.assign({}, options), { tracingOptions: Object.assign(Object.assign({}, options.tracingOptions), convertTracingToRequestOptionsBase(updatedOptions)) }));\n count = response.contentLength - offset;\n if (count < 0) {\n throw new RangeError(`offset ${offset} shouldn't be larger than blob size ${response.contentLength}`);\n }\n }\n // Allocate the buffer of size = count if the buffer is not provided\n if (!buffer) {\n try {\n buffer = Buffer.alloc(count);\n }\n catch (error) {\n throw new Error(`Unable to allocate the buffer of size: ${count}(in bytes). Please try passing your own buffer to the \"downloadToBuffer\" method or try using other methods like \"download\" or \"downloadToFile\".\\t ${error.message}`);\n }\n }\n if (buffer.length < count) {\n throw new RangeError(`The buffer's size should be equal to or larger than the request count of bytes: ${count}`);\n }\n let transferProgress = 0;\n const batch = new Batch(options.concurrency);\n for (let off = offset; off < offset + count; off = off + options.blockSize) {\n batch.addOperation(async () => {\n // Exclusive chunk end position\n let chunkEnd = offset + count;\n if (off + options.blockSize < chunkEnd) {\n chunkEnd = off + options.blockSize;\n }\n const response = await this.download(off, chunkEnd - off, {\n abortSignal: options.abortSignal,\n conditions: options.conditions,\n maxRetryRequests: options.maxRetryRequestsPerBlock,\n customerProvidedKey: options.customerProvidedKey,\n tracingOptions: Object.assign(Object.assign({}, options.tracingOptions), convertTracingToRequestOptionsBase(updatedOptions)),\n });\n const stream = response.readableStreamBody;\n await streamToBuffer(stream, buffer, off - offset, chunkEnd - offset);\n // Update progress after block is downloaded, in case of block trying\n // Could provide finer grained progress updating inside HTTP requests,\n // only if convenience layer download try is enabled\n transferProgress += chunkEnd - off;\n if (options.onProgress) {\n options.onProgress({ loadedBytes: transferProgress });\n }\n });\n }\n await batch.do();\n return buffer;\n }\n catch (e) {\n span.setStatus({\n code: coreTracing.SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n }\n finally {\n span.end();\n }\n }\n /**\n * ONLY AVAILABLE IN NODE.JS RUNTIME.\n *\n * Downloads an Azure Blob to a local file.\n * Fails if the the given file path already exits.\n * Offset and count are optional, pass 0 and undefined respectively to download the entire blob.\n *\n * @param filePath -\n * @param offset - From which position of the block blob to download.\n * @param count - How much data to be downloaded. Will download to the end when passing undefined.\n * @param options - Options to Blob download options.\n * @returns The response data for blob download operation,\n * but with readableStreamBody set to undefined since its\n * content is already read and written into a local file\n * at the specified path.\n */\n async downloadToFile(filePath, offset = 0, count, options = {}) {\n const { span, updatedOptions } = createSpan(\"BlobClient-downloadToFile\", options);\n try {\n const response = await this.download(offset, count, Object.assign(Object.assign({}, options), { tracingOptions: Object.assign(Object.assign({}, options.tracingOptions), convertTracingToRequestOptionsBase(updatedOptions)) }));\n if (response.readableStreamBody) {\n await readStreamToLocalFile(response.readableStreamBody, filePath);\n }\n // The stream is no longer accessible so setting it to undefined.\n response.blobDownloadStream = undefined;\n return response;\n }\n catch (e) {\n span.setStatus({\n code: coreTracing.SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n }\n finally {\n span.end();\n }\n }\n getBlobAndContainerNamesFromUrl() {\n let containerName;\n let blobName;\n try {\n // URL may look like the following\n // \"https://myaccount.blob.core.windows.net/mycontainer/blob?sasString\";\n // \"https://myaccount.blob.core.windows.net/mycontainer/blob\";\n // \"https://myaccount.blob.core.windows.net/mycontainer/blob/a.txt?sasString\";\n // \"https://myaccount.blob.core.windows.net/mycontainer/blob/a.txt\";\n // IPv4/IPv6 address hosts, Endpoints - `http://127.0.0.1:10000/devstoreaccount1/containername/blob`\n // http://localhost:10001/devstoreaccount1/containername/blob\n const parsedUrl = coreHttp.URLBuilder.parse(this.url);\n if (parsedUrl.getHost().split(\".\")[1] === \"blob\") {\n // \"https://myaccount.blob.core.windows.net/containername/blob\".\n // .getPath() -> /containername/blob\n const pathComponents = parsedUrl.getPath().match(\"/([^/]*)(/(.*))?\");\n containerName = pathComponents[1];\n blobName = pathComponents[3];\n }\n else if (isIpEndpointStyle(parsedUrl)) {\n // IPv4/IPv6 address hosts... Example - http://192.0.0.10:10001/devstoreaccount1/containername/blob\n // Single word domain without a [dot] in the endpoint... Example - http://localhost:10001/devstoreaccount1/containername/blob\n // .getPath() -> /devstoreaccount1/containername/blob\n const pathComponents = parsedUrl.getPath().match(\"/([^/]*)/([^/]*)(/(.*))?\");\n containerName = pathComponents[2];\n blobName = pathComponents[4];\n }\n else {\n // \"https://customdomain.com/containername/blob\".\n // .getPath() -> /containername/blob\n const pathComponents = parsedUrl.getPath().match(\"/([^/]*)(/(.*))?\");\n containerName = pathComponents[1];\n blobName = pathComponents[3];\n }\n // decode the encoded blobName, containerName - to get all the special characters that might be present in them\n containerName = decodeURIComponent(containerName);\n blobName = decodeURIComponent(blobName);\n // Azure Storage Server will replace \"\\\" with \"/\" in the blob names\n // doing the same in the SDK side so that the user doesn't have to replace \"\\\" instances in the blobName\n blobName = blobName.replace(/\\\\/g, \"/\");\n if (!containerName) {\n throw new Error(\"Provided containerName is invalid.\");\n }\n return { blobName, containerName };\n }\n catch (error) {\n throw new Error(\"Unable to extract blobName and containerName with provided information.\");\n }\n }\n /**\n * Asynchronously copies a blob to a destination within the storage account.\n * In version 2012-02-12 and later, the source for a Copy Blob operation can be\n * a committed blob in any Azure storage account.\n * Beginning with version 2015-02-21, the source for a Copy Blob operation can be\n * an Azure file in any Azure storage account.\n * Only storage accounts created on or after June 7th, 2012 allow the Copy Blob\n * operation to copy from another storage account.\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/copy-blob\n *\n * @param copySource - url to the source Azure Blob/File.\n * @param options - Optional options to the Blob Start Copy From URL operation.\n */\n async startCopyFromURL(copySource, options = {}) {\n var _a, _b, _c;\n const { span, updatedOptions } = createSpan(\"BlobClient-startCopyFromURL\", options);\n options.conditions = options.conditions || {};\n options.sourceConditions = options.sourceConditions || {};\n try {\n return await this.blobContext.startCopyFromURL(copySource, Object.assign({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, metadata: options.metadata, modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), sourceModifiedAccessConditions: {\n sourceIfMatch: options.sourceConditions.ifMatch,\n sourceIfModifiedSince: options.sourceConditions.ifModifiedSince,\n sourceIfNoneMatch: options.sourceConditions.ifNoneMatch,\n sourceIfUnmodifiedSince: options.sourceConditions.ifUnmodifiedSince,\n sourceIfTags: options.sourceConditions.tagConditions,\n }, immutabilityPolicyExpiry: (_b = options.immutabilityPolicy) === null || _b === void 0 ? void 0 : _b.expiriesOn, immutabilityPolicyMode: (_c = options.immutabilityPolicy) === null || _c === void 0 ? void 0 : _c.policyMode, legalHold: options.legalHold, rehydratePriority: options.rehydratePriority, tier: toAccessTier(options.tier), blobTagsString: toBlobTagsString(options.tags), sealBlob: options.sealBlob }, convertTracingToRequestOptionsBase(updatedOptions)));\n }\n catch (e) {\n span.setStatus({\n code: coreTracing.SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n }\n finally {\n span.end();\n }\n }\n /**\n * Only available for BlobClient constructed with a shared key credential.\n *\n * Generates a Blob Service Shared Access Signature (SAS) URI based on the client properties\n * and parameters passed in. The SAS is signed by the shared key credential of the client.\n *\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/constructing-a-service-sas\n *\n * @param options - Optional parameters.\n * @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token.\n */\n generateSasUrl(options) {\n return new Promise((resolve) => {\n if (!(this.credential instanceof StorageSharedKeyCredential)) {\n throw new RangeError(\"Can only generate the SAS when the client is initialized with a shared key credential\");\n }\n const sas = generateBlobSASQueryParameters(Object.assign({ containerName: this._containerName, blobName: this._name, snapshotTime: this._snapshot, versionId: this._versionId }, options), this.credential).toString();\n resolve(appendToURLQuery(this.url, sas));\n });\n }\n /**\n * Delete the immutablility policy on the blob.\n *\n * @param options - Optional options to delete immutability policy on the blob.\n */\n async deleteImmutabilityPolicy(options) {\n const { span, updatedOptions } = createSpan(\"BlobClient-deleteImmutabilityPolicy\", options);\n try {\n return await this.blobContext.deleteImmutabilityPolicy(Object.assign({ abortSignal: options === null || options === void 0 ? void 0 : options.abortSignal }, convertTracingToRequestOptionsBase(updatedOptions)));\n }\n catch (e) {\n span.setStatus({\n code: coreTracing.SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n }\n finally {\n span.end();\n }\n }\n /**\n * Set immutablility policy on the blob.\n *\n * @param options - Optional options to set immutability policy on the blob.\n */\n async setImmutabilityPolicy(immutabilityPolicy, options) {\n const { span, updatedOptions } = createSpan(\"BlobClient-setImmutabilityPolicy\", options);\n try {\n return await this.blobContext.setImmutabilityPolicy(Object.assign({ abortSignal: options === null || options === void 0 ? void 0 : options.abortSignal, immutabilityPolicyExpiry: immutabilityPolicy.expiriesOn, immutabilityPolicyMode: immutabilityPolicy.policyMode, modifiedAccessConditions: options === null || options === void 0 ? void 0 : options.modifiedAccessCondition }, convertTracingToRequestOptionsBase(updatedOptions)));\n }\n catch (e) {\n span.setStatus({\n code: coreTracing.SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n }\n finally {\n span.end();\n }\n }\n /**\n * Set legal hold on the blob.\n *\n * @param options - Optional options to set legal hold on the blob.\n */\n async setLegalHold(legalHoldEnabled, options) {\n const { span, updatedOptions } = createSpan(\"BlobClient-setLegalHold\", options);\n try {\n return await this.blobContext.setLegalHold(legalHoldEnabled, Object.assign({ abortSignal: options === null || options === void 0 ? void 0 : options.abortSignal }, convertTracingToRequestOptionsBase(updatedOptions)));\n }\n catch (e) {\n span.setStatus({\n code: coreTracing.SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n }\n finally {\n span.end();\n }\n }\n}\n/**\n * AppendBlobClient defines a set of operations applicable to append blobs.\n */\nclass AppendBlobClient extends BlobClient {\n constructor(urlOrConnectionString, credentialOrPipelineOrContainerName, blobNameOrOptions, \n // Legacy, no fix for eslint error without breaking. Disable it for this interface.\n /* eslint-disable-next-line @azure/azure-sdk/ts-naming-options*/\n options) {\n // In TypeScript we cannot simply pass all parameters to super() like below so have to duplicate the code instead.\n // super(s, credentialOrPipelineOrContainerNameOrOptions, blobNameOrOptions, options);\n let pipeline;\n let url;\n options = options || {};\n if (isPipelineLike(credentialOrPipelineOrContainerName)) {\n // (url: string, pipeline: Pipeline)\n url = urlOrConnectionString;\n pipeline = credentialOrPipelineOrContainerName;\n }\n else if ((coreHttp.isNode && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential) ||\n credentialOrPipelineOrContainerName instanceof AnonymousCredential ||\n coreHttp.isTokenCredential(credentialOrPipelineOrContainerName)) {\n // (url: string, credential?: StorageSharedKeyCredential | AnonymousCredential | TokenCredential, options?: StoragePipelineOptions) url = urlOrConnectionString;\n url = urlOrConnectionString;\n options = blobNameOrOptions;\n pipeline = newPipeline(credentialOrPipelineOrContainerName, options);\n }\n else if (!credentialOrPipelineOrContainerName &&\n typeof credentialOrPipelineOrContainerName !== \"string\") {\n // (url: string, credential?: StorageSharedKeyCredential | AnonymousCredential | TokenCredential, options?: StoragePipelineOptions)\n url = urlOrConnectionString;\n // The second parameter is undefined. Use anonymous credential.\n pipeline = newPipeline(new AnonymousCredential(), options);\n }\n else if (credentialOrPipelineOrContainerName &&\n typeof credentialOrPipelineOrContainerName === \"string\" &&\n blobNameOrOptions &&\n typeof blobNameOrOptions === \"string\") {\n // (connectionString: string, containerName: string, blobName: string, options?: StoragePipelineOptions)\n const containerName = credentialOrPipelineOrContainerName;\n const blobName = blobNameOrOptions;\n const extractedCreds = extractConnectionStringParts(urlOrConnectionString);\n if (extractedCreds.kind === \"AccountConnString\") {\n if (coreHttp.isNode) {\n const sharedKeyCredential = new StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey);\n url = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName));\n if (!options.proxyOptions) {\n options.proxyOptions = coreHttp.getDefaultProxySettings(extractedCreds.proxyUri);\n }\n pipeline = newPipeline(sharedKeyCredential, options);\n }\n else {\n throw new Error(\"Account connection string is only supported in Node.js environment\");\n }\n }\n else if (extractedCreds.kind === \"SASConnString\") {\n url =\n appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)) +\n \"?\" +\n extractedCreds.accountSas;\n pipeline = newPipeline(new AnonymousCredential(), options);\n }\n else {\n throw new Error(\"Connection string must be either an Account connection string or a SAS connection string\");\n }\n }\n else {\n throw new Error(\"Expecting non-empty strings for containerName and blobName parameters\");\n }\n super(url, pipeline);\n this.appendBlobContext = new AppendBlob(this.storageClientContext);\n }\n /**\n * Creates a new AppendBlobClient object identical to the source but with the\n * specified snapshot timestamp.\n * Provide \"\" will remove the snapshot and return a Client to the base blob.\n *\n * @param snapshot - The snapshot timestamp.\n * @returns A new AppendBlobClient object identical to the source but with the specified snapshot timestamp.\n */\n withSnapshot(snapshot) {\n return new AppendBlobClient(setURLParameter(this.url, URLConstants.Parameters.SNAPSHOT, snapshot.length === 0 ? undefined : snapshot), this.pipeline);\n }\n /**\n * Creates a 0-length append blob. Call AppendBlock to append data to an append blob.\n * @see https://docs.microsoft.com/rest/api/storageservices/put-blob\n *\n * @param options - Options to the Append Block Create operation.\n *\n *\n * Example usage:\n *\n * ```js\n * const appendBlobClient = containerClient.getAppendBlobClient(\"\");\n * await appendBlobClient.create();\n * ```\n */\n async create(options = {}) {\n var _a, _b, _c;\n const { span, updatedOptions } = createSpan(\"AppendBlobClient-create\", options);\n options.conditions = options.conditions || {};\n try {\n ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps);\n return await this.appendBlobContext.create(0, Object.assign({ abortSignal: options.abortSignal, blobHttpHeaders: options.blobHTTPHeaders, leaseAccessConditions: options.conditions, metadata: options.metadata, modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), cpkInfo: options.customerProvidedKey, encryptionScope: options.encryptionScope, immutabilityPolicyExpiry: (_b = options.immutabilityPolicy) === null || _b === void 0 ? void 0 : _b.expiriesOn, immutabilityPolicyMode: (_c = options.immutabilityPolicy) === null || _c === void 0 ? void 0 : _c.policyMode, legalHold: options.legalHold, blobTagsString: toBlobTagsString(options.tags) }, convertTracingToRequestOptionsBase(updatedOptions)));\n }\n catch (e) {\n span.setStatus({\n code: coreTracing.SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n }\n finally {\n span.end();\n }\n }\n /**\n * Creates a 0-length append blob. Call AppendBlock to append data to an append blob.\n * If the blob with the same name already exists, the content of the existing blob will remain unchanged.\n * @see https://docs.microsoft.com/rest/api/storageservices/put-blob\n *\n * @param options -\n */\n async createIfNotExists(options = {}) {\n var _a, _b;\n const { span, updatedOptions } = createSpan(\"AppendBlobClient-createIfNotExists\", options);\n const conditions = { ifNoneMatch: ETagAny };\n try {\n const res = await this.create(Object.assign(Object.assign({}, updatedOptions), { conditions }));\n return Object.assign(Object.assign({ succeeded: true }, res), { _response: res._response });\n }\n catch (e) {\n if (((_a = e.details) === null || _a === void 0 ? void 0 : _a.errorCode) === \"BlobAlreadyExists\") {\n span.setStatus({\n code: coreTracing.SpanStatusCode.ERROR,\n message: \"Expected exception when creating a blob only if it does not already exist.\",\n });\n return Object.assign(Object.assign({ succeeded: false }, (_b = e.response) === null || _b === void 0 ? void 0 : _b.parsedHeaders), { _response: e.response });\n }\n span.setStatus({\n code: coreTracing.SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n }\n finally {\n span.end();\n }\n }\n /**\n * Seals the append blob, making it read only.\n *\n * @param options -\n */\n async seal(options = {}) {\n var _a;\n const { span, updatedOptions } = createSpan(\"AppendBlobClient-seal\", options);\n options.conditions = options.conditions || {};\n try {\n return await this.appendBlobContext.seal(Object.assign({ abortSignal: options.abortSignal, appendPositionAccessConditions: options.conditions, leaseAccessConditions: options.conditions, modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }) }, convertTracingToRequestOptionsBase(updatedOptions)));\n }\n catch (e) {\n span.setStatus({\n code: coreTracing.SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n }\n finally {\n span.end();\n }\n }\n /**\n * Commits a new block of data to the end of the existing append blob.\n * @see https://docs.microsoft.com/rest/api/storageservices/append-block\n *\n * @param body - Data to be appended.\n * @param contentLength - Length of the body in bytes.\n * @param options - Options to the Append Block operation.\n *\n *\n * Example usage:\n *\n * ```js\n * const content = \"Hello World!\";\n *\n * // Create a new append blob and append data to the blob.\n * const newAppendBlobClient = containerClient.getAppendBlobClient(\"\");\n * await newAppendBlobClient.create();\n * await newAppendBlobClient.appendBlock(content, content.length);\n *\n * // Append data to an existing append blob.\n * const existingAppendBlobClient = containerClient.getAppendBlobClient(\"\");\n * await existingAppendBlobClient.appendBlock(content, content.length);\n * ```\n */\n async appendBlock(body, contentLength, options = {}) {\n var _a;\n const { span, updatedOptions } = createSpan(\"AppendBlobClient-appendBlock\", options);\n options.conditions = options.conditions || {};\n try {\n ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps);\n return await this.appendBlobContext.appendBlock(contentLength, body, Object.assign({ abortSignal: options.abortSignal, appendPositionAccessConditions: options.conditions, leaseAccessConditions: options.conditions, modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), requestOptions: {\n onUploadProgress: options.onProgress,\n }, transactionalContentMD5: options.transactionalContentMD5, transactionalContentCrc64: options.transactionalContentCrc64, cpkInfo: options.customerProvidedKey, encryptionScope: options.encryptionScope }, convertTracingToRequestOptionsBase(updatedOptions)));\n }\n catch (e) {\n span.setStatus({\n code: coreTracing.SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n }\n finally {\n span.end();\n }\n }\n /**\n * The Append Block operation commits a new block of data to the end of an existing append blob\n * where the contents are read from a source url.\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/append-block-from-url\n *\n * @param sourceURL -\n * The url to the blob that will be the source of the copy. A source blob in the same storage account can\n * be authenticated via Shared Key. However, if the source is a blob in another account, the source blob\n * must either be public or must be authenticated via a shared access signature. If the source blob is\n * public, no authentication is required to perform the operation.\n * @param sourceOffset - Offset in source to be appended\n * @param count - Number of bytes to be appended as a block\n * @param options -\n */\n async appendBlockFromURL(sourceURL, sourceOffset, count, options = {}) {\n var _a;\n const { span, updatedOptions } = createSpan(\"AppendBlobClient-appendBlockFromURL\", options);\n options.conditions = options.conditions || {};\n options.sourceConditions = options.sourceConditions || {};\n try {\n ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps);\n return await this.appendBlobContext.appendBlockFromUrl(sourceURL, 0, Object.assign({ abortSignal: options.abortSignal, sourceRange: rangeToString({ offset: sourceOffset, count }), sourceContentMD5: options.sourceContentMD5, sourceContentCrc64: options.sourceContentCrc64, leaseAccessConditions: options.conditions, appendPositionAccessConditions: options.conditions, modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), sourceModifiedAccessConditions: {\n sourceIfMatch: options.sourceConditions.ifMatch,\n sourceIfModifiedSince: options.sourceConditions.ifModifiedSince,\n sourceIfNoneMatch: options.sourceConditions.ifNoneMatch,\n sourceIfUnmodifiedSince: options.sourceConditions.ifUnmodifiedSince,\n }, copySourceAuthorization: httpAuthorizationToString(options.sourceAuthorization), cpkInfo: options.customerProvidedKey, encryptionScope: options.encryptionScope }, convertTracingToRequestOptionsBase(updatedOptions)));\n }\n catch (e) {\n span.setStatus({\n code: coreTracing.SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n }\n finally {\n span.end();\n }\n }\n}\n/**\n * BlockBlobClient defines a set of operations applicable to block blobs.\n */\nclass BlockBlobClient extends BlobClient {\n constructor(urlOrConnectionString, credentialOrPipelineOrContainerName, blobNameOrOptions, \n // Legacy, no fix for eslint error without breaking. Disable it for this interface.\n /* eslint-disable-next-line @azure/azure-sdk/ts-naming-options*/\n options) {\n // In TypeScript we cannot simply pass all parameters to super() like below so have to duplicate the code instead.\n // super(s, credentialOrPipelineOrContainerNameOrOptions, blobNameOrOptions, options);\n let pipeline;\n let url;\n options = options || {};\n if (isPipelineLike(credentialOrPipelineOrContainerName)) {\n // (url: string, pipeline: Pipeline)\n url = urlOrConnectionString;\n pipeline = credentialOrPipelineOrContainerName;\n }\n else if ((coreHttp.isNode && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential) ||\n credentialOrPipelineOrContainerName instanceof AnonymousCredential ||\n coreHttp.isTokenCredential(credentialOrPipelineOrContainerName)) {\n // (url: string, credential?: StorageSharedKeyCredential | AnonymousCredential | TokenCredential, options?: StoragePipelineOptions)\n url = urlOrConnectionString;\n options = blobNameOrOptions;\n pipeline = newPipeline(credentialOrPipelineOrContainerName, options);\n }\n else if (!credentialOrPipelineOrContainerName &&\n typeof credentialOrPipelineOrContainerName !== \"string\") {\n // (url: string, credential?: StorageSharedKeyCredential | AnonymousCredential | TokenCredential, options?: StoragePipelineOptions)\n // The second parameter is undefined. Use anonymous credential.\n url = urlOrConnectionString;\n pipeline = newPipeline(new AnonymousCredential(), options);\n }\n else if (credentialOrPipelineOrContainerName &&\n typeof credentialOrPipelineOrContainerName === \"string\" &&\n blobNameOrOptions &&\n typeof blobNameOrOptions === \"string\") {\n // (connectionString: string, containerName: string, blobName: string, options?: StoragePipelineOptions)\n const containerName = credentialOrPipelineOrContainerName;\n const blobName = blobNameOrOptions;\n const extractedCreds = extractConnectionStringParts(urlOrConnectionString);\n if (extractedCreds.kind === \"AccountConnString\") {\n if (coreHttp.isNode) {\n const sharedKeyCredential = new StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey);\n url = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName));\n if (!options.proxyOptions) {\n options.proxyOptions = coreHttp.getDefaultProxySettings(extractedCreds.proxyUri);\n }\n pipeline = newPipeline(sharedKeyCredential, options);\n }\n else {\n throw new Error(\"Account connection string is only supported in Node.js environment\");\n }\n }\n else if (extractedCreds.kind === \"SASConnString\") {\n url =\n appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)) +\n \"?\" +\n extractedCreds.accountSas;\n pipeline = newPipeline(new AnonymousCredential(), options);\n }\n else {\n throw new Error(\"Connection string must be either an Account connection string or a SAS connection string\");\n }\n }\n else {\n throw new Error(\"Expecting non-empty strings for containerName and blobName parameters\");\n }\n super(url, pipeline);\n this.blockBlobContext = new BlockBlob(this.storageClientContext);\n this._blobContext = new Blob$1(this.storageClientContext);\n }\n /**\n * Creates a new BlockBlobClient object identical to the source but with the\n * specified snapshot timestamp.\n * Provide \"\" will remove the snapshot and return a URL to the base blob.\n *\n * @param snapshot - The snapshot timestamp.\n * @returns A new BlockBlobClient object identical to the source but with the specified snapshot timestamp.\n */\n withSnapshot(snapshot) {\n return new BlockBlobClient(setURLParameter(this.url, URLConstants.Parameters.SNAPSHOT, snapshot.length === 0 ? undefined : snapshot), this.pipeline);\n }\n /**\n * ONLY AVAILABLE IN NODE.JS RUNTIME.\n *\n * Quick query for a JSON or CSV formatted blob.\n *\n * Example usage (Node.js):\n *\n * ```js\n * // Query and convert a blob to a string\n * const queryBlockBlobResponse = await blockBlobClient.query(\"select * from BlobStorage\");\n * const downloaded = (await streamToBuffer(queryBlockBlobResponse.readableStreamBody)).toString();\n * console.log(\"Query blob content:\", downloaded);\n *\n * async function streamToBuffer(readableStream) {\n * return new Promise((resolve, reject) => {\n * const chunks = [];\n * readableStream.on(\"data\", (data) => {\n * chunks.push(data instanceof Buffer ? data : Buffer.from(data));\n * });\n * readableStream.on(\"end\", () => {\n * resolve(Buffer.concat(chunks));\n * });\n * readableStream.on(\"error\", reject);\n * });\n * }\n * ```\n *\n * @param query -\n * @param options -\n */\n async query(query, options = {}) {\n var _a;\n ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps);\n const { span, updatedOptions } = createSpan(\"BlockBlobClient-query\", options);\n try {\n if (!coreHttp.isNode) {\n throw new Error(\"This operation currently is only supported in Node.js.\");\n }\n ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps);\n const response = await this._blobContext.query(Object.assign({ abortSignal: options.abortSignal, queryRequest: {\n queryType: \"SQL\",\n expression: query,\n inputSerialization: toQuerySerialization(options.inputTextConfiguration),\n outputSerialization: toQuerySerialization(options.outputTextConfiguration),\n }, leaseAccessConditions: options.conditions, modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), cpkInfo: options.customerProvidedKey }, convertTracingToRequestOptionsBase(updatedOptions)));\n return new BlobQueryResponse(response, {\n abortSignal: options.abortSignal,\n onProgress: options.onProgress,\n onError: options.onError,\n });\n }\n catch (e) {\n span.setStatus({\n code: coreTracing.SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n }\n finally {\n span.end();\n }\n }\n /**\n * Creates a new block blob, or updates the content of an existing block blob.\n * Updating an existing block blob overwrites any existing metadata on the blob.\n * Partial updates are not supported; the content of the existing blob is\n * overwritten with the new content. To perform a partial update of a block blob's,\n * use {@link stageBlock} and {@link commitBlockList}.\n *\n * This is a non-parallel uploading method, please use {@link uploadFile},\n * {@link uploadStream} or {@link uploadBrowserData} for better performance\n * with concurrency uploading.\n *\n * @see https://docs.microsoft.com/rest/api/storageservices/put-blob\n *\n * @param body - Blob, string, ArrayBuffer, ArrayBufferView or a function\n * which returns a new Readable stream whose offset is from data source beginning.\n * @param contentLength - Length of body in bytes. Use Buffer.byteLength() to calculate body length for a\n * string including non non-Base64/Hex-encoded characters.\n * @param options - Options to the Block Blob Upload operation.\n * @returns Response data for the Block Blob Upload operation.\n *\n * Example usage:\n *\n * ```js\n * const content = \"Hello world!\";\n * const uploadBlobResponse = await blockBlobClient.upload(content, content.length);\n * ```\n */\n async upload(body, contentLength, options = {}) {\n var _a, _b, _c;\n options.conditions = options.conditions || {};\n const { span, updatedOptions } = createSpan(\"BlockBlobClient-upload\", options);\n try {\n ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps);\n return await this.blockBlobContext.upload(contentLength, body, Object.assign({ abortSignal: options.abortSignal, blobHttpHeaders: options.blobHTTPHeaders, leaseAccessConditions: options.conditions, metadata: options.metadata, modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), requestOptions: {\n onUploadProgress: options.onProgress,\n }, cpkInfo: options.customerProvidedKey, encryptionScope: options.encryptionScope, immutabilityPolicyExpiry: (_b = options.immutabilityPolicy) === null || _b === void 0 ? void 0 : _b.expiriesOn, immutabilityPolicyMode: (_c = options.immutabilityPolicy) === null || _c === void 0 ? void 0 : _c.policyMode, legalHold: options.legalHold, tier: toAccessTier(options.tier), blobTagsString: toBlobTagsString(options.tags) }, convertTracingToRequestOptionsBase(updatedOptions)));\n }\n catch (e) {\n span.setStatus({\n code: coreTracing.SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n }\n finally {\n span.end();\n }\n }\n /**\n * Creates a new Block Blob where the contents of the blob are read from a given URL.\n * This API is supported beginning with the 2020-04-08 version. Partial updates\n * are not supported with Put Blob from URL; the content of an existing blob is overwritten with\n * the content of the new blob. To perform partial updates to a block blob’s contents using a\n * source URL, use {@link stageBlockFromURL} and {@link commitBlockList}.\n *\n * @param sourceURL - Specifies the URL of the blob. The value\n * may be a URL of up to 2 KB in length that specifies a blob.\n * The value should be URL-encoded as it would appear\n * in a request URI. The source blob must either be public\n * or must be authenticated via a shared access signature.\n * If the source blob is public, no authentication is required\n * to perform the operation. Here are some examples of source object URLs:\n * - https://myaccount.blob.core.windows.net/mycontainer/myblob\n * - https://myaccount.blob.core.windows.net/mycontainer/myblob?snapshot=\n * @param options - Optional parameters.\n */\n async syncUploadFromURL(sourceURL, options = {}) {\n var _a, _b, _c, _d, _e;\n options.conditions = options.conditions || {};\n const { span, updatedOptions } = createSpan(\"BlockBlobClient-syncUploadFromURL\", options);\n try {\n ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps);\n return await this.blockBlobContext.putBlobFromUrl(0, sourceURL, Object.assign(Object.assign(Object.assign({}, options), { blobHttpHeaders: options.blobHTTPHeaders, leaseAccessConditions: options.conditions, modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: options.conditions.tagConditions }), sourceModifiedAccessConditions: {\n sourceIfMatch: (_a = options.sourceConditions) === null || _a === void 0 ? void 0 : _a.ifMatch,\n sourceIfModifiedSince: (_b = options.sourceConditions) === null || _b === void 0 ? void 0 : _b.ifModifiedSince,\n sourceIfNoneMatch: (_c = options.sourceConditions) === null || _c === void 0 ? void 0 : _c.ifNoneMatch,\n sourceIfUnmodifiedSince: (_d = options.sourceConditions) === null || _d === void 0 ? void 0 : _d.ifUnmodifiedSince,\n sourceIfTags: (_e = options.sourceConditions) === null || _e === void 0 ? void 0 : _e.tagConditions,\n }, cpkInfo: options.customerProvidedKey, copySourceAuthorization: httpAuthorizationToString(options.sourceAuthorization), tier: toAccessTier(options.tier), blobTagsString: toBlobTagsString(options.tags), copySourceTags: options.copySourceTags }), convertTracingToRequestOptionsBase(updatedOptions)));\n }\n catch (e) {\n span.setStatus({\n code: coreTracing.SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n }\n finally {\n span.end();\n }\n }\n /**\n * Uploads the specified block to the block blob's \"staging area\" to be later\n * committed by a call to commitBlockList.\n * @see https://docs.microsoft.com/rest/api/storageservices/put-block\n *\n * @param blockId - A 64-byte value that is base64-encoded\n * @param body - Data to upload to the staging area.\n * @param contentLength - Number of bytes to upload.\n * @param options - Options to the Block Blob Stage Block operation.\n * @returns Response data for the Block Blob Stage Block operation.\n */\n async stageBlock(blockId, body, contentLength, options = {}) {\n const { span, updatedOptions } = createSpan(\"BlockBlobClient-stageBlock\", options);\n try {\n ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps);\n return await this.blockBlobContext.stageBlock(blockId, contentLength, body, Object.assign({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, requestOptions: {\n onUploadProgress: options.onProgress,\n }, transactionalContentMD5: options.transactionalContentMD5, transactionalContentCrc64: options.transactionalContentCrc64, cpkInfo: options.customerProvidedKey, encryptionScope: options.encryptionScope }, convertTracingToRequestOptionsBase(updatedOptions)));\n }\n catch (e) {\n span.setStatus({\n code: coreTracing.SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n }\n finally {\n span.end();\n }\n }\n /**\n * The Stage Block From URL operation creates a new block to be committed as part\n * of a blob where the contents are read from a URL.\n * This API is available starting in version 2018-03-28.\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/put-block-from-url\n *\n * @param blockId - A 64-byte value that is base64-encoded\n * @param sourceURL - Specifies the URL of the blob. The value\n * may be a URL of up to 2 KB in length that specifies a blob.\n * The value should be URL-encoded as it would appear\n * in a request URI. The source blob must either be public\n * or must be authenticated via a shared access signature.\n * If the source blob is public, no authentication is required\n * to perform the operation. Here are some examples of source object URLs:\n * - https://myaccount.blob.core.windows.net/mycontainer/myblob\n * - https://myaccount.blob.core.windows.net/mycontainer/myblob?snapshot=\n * @param offset - From which position of the blob to download, greater than or equal to 0\n * @param count - How much data to be downloaded, greater than 0. Will download to the end when undefined\n * @param options - Options to the Block Blob Stage Block From URL operation.\n * @returns Response data for the Block Blob Stage Block From URL operation.\n */\n async stageBlockFromURL(blockId, sourceURL, offset = 0, count, options = {}) {\n const { span, updatedOptions } = createSpan(\"BlockBlobClient-stageBlockFromURL\", options);\n try {\n ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps);\n return await this.blockBlobContext.stageBlockFromURL(blockId, 0, sourceURL, Object.assign({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, sourceContentMD5: options.sourceContentMD5, sourceContentCrc64: options.sourceContentCrc64, sourceRange: offset === 0 && !count ? undefined : rangeToString({ offset, count }), cpkInfo: options.customerProvidedKey, encryptionScope: options.encryptionScope, copySourceAuthorization: httpAuthorizationToString(options.sourceAuthorization) }, convertTracingToRequestOptionsBase(updatedOptions)));\n }\n catch (e) {\n span.setStatus({\n code: coreTracing.SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n }\n finally {\n span.end();\n }\n }\n /**\n * Writes a blob by specifying the list of block IDs that make up the blob.\n * In order to be written as part of a blob, a block must have been successfully written\n * to the server in a prior {@link stageBlock} operation. You can call {@link commitBlockList} to\n * update a blob by uploading only those blocks that have changed, then committing the new and existing\n * blocks together. Any blocks not specified in the block list and permanently deleted.\n * @see https://docs.microsoft.com/rest/api/storageservices/put-block-list\n *\n * @param blocks - Array of 64-byte value that is base64-encoded\n * @param options - Options to the Block Blob Commit Block List operation.\n * @returns Response data for the Block Blob Commit Block List operation.\n */\n async commitBlockList(blocks, options = {}) {\n var _a, _b, _c;\n options.conditions = options.conditions || {};\n const { span, updatedOptions } = createSpan(\"BlockBlobClient-commitBlockList\", options);\n try {\n ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps);\n return await this.blockBlobContext.commitBlockList({ latest: blocks }, Object.assign({ abortSignal: options.abortSignal, blobHttpHeaders: options.blobHTTPHeaders, leaseAccessConditions: options.conditions, metadata: options.metadata, modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), cpkInfo: options.customerProvidedKey, encryptionScope: options.encryptionScope, immutabilityPolicyExpiry: (_b = options.immutabilityPolicy) === null || _b === void 0 ? void 0 : _b.expiriesOn, immutabilityPolicyMode: (_c = options.immutabilityPolicy) === null || _c === void 0 ? void 0 : _c.policyMode, legalHold: options.legalHold, tier: toAccessTier(options.tier), blobTagsString: toBlobTagsString(options.tags) }, convertTracingToRequestOptionsBase(updatedOptions)));\n }\n catch (e) {\n span.setStatus({\n code: coreTracing.SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n }\n finally {\n span.end();\n }\n }\n /**\n * Returns the list of blocks that have been uploaded as part of a block blob\n * using the specified block list filter.\n * @see https://docs.microsoft.com/rest/api/storageservices/get-block-list\n *\n * @param listType - Specifies whether to return the list of committed blocks,\n * the list of uncommitted blocks, or both lists together.\n * @param options - Options to the Block Blob Get Block List operation.\n * @returns Response data for the Block Blob Get Block List operation.\n */\n async getBlockList(listType, options = {}) {\n var _a;\n const { span, updatedOptions } = createSpan(\"BlockBlobClient-getBlockList\", options);\n try {\n const res = await this.blockBlobContext.getBlockList(listType, Object.assign({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }) }, convertTracingToRequestOptionsBase(updatedOptions)));\n if (!res.committedBlocks) {\n res.committedBlocks = [];\n }\n if (!res.uncommittedBlocks) {\n res.uncommittedBlocks = [];\n }\n return res;\n }\n catch (e) {\n span.setStatus({\n code: coreTracing.SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n }\n finally {\n span.end();\n }\n }\n // High level functions\n /**\n * Uploads a Buffer(Node.js)/Blob(browsers)/ArrayBuffer/ArrayBufferView object to a BlockBlob.\n *\n * When data length is no more than the specifiled {@link BlockBlobParallelUploadOptions.maxSingleShotSize} (default is\n * {@link BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES}), this method will use 1 {@link upload} call to finish the upload.\n * Otherwise, this method will call {@link stageBlock} to upload blocks, and finally call {@link commitBlockList}\n * to commit the block list.\n *\n * A common {@link BlockBlobParallelUploadOptions.blobHTTPHeaders} option to set is\n * `blobContentType`, enabling the browser to provide\n * functionality based on file type.\n *\n * @param data - Buffer(Node.js), Blob, ArrayBuffer or ArrayBufferView\n * @param options -\n */\n async uploadData(data, options = {}) {\n const { span, updatedOptions } = createSpan(\"BlockBlobClient-uploadData\", options);\n try {\n if (coreHttp.isNode) {\n let buffer;\n if (data instanceof Buffer) {\n buffer = data;\n }\n else if (data instanceof ArrayBuffer) {\n buffer = Buffer.from(data);\n }\n else {\n data = data;\n buffer = Buffer.from(data.buffer, data.byteOffset, data.byteLength);\n }\n return this.uploadSeekableInternal((offset, size) => buffer.slice(offset, offset + size), buffer.byteLength, updatedOptions);\n }\n else {\n const browserBlob = new Blob([data]);\n return this.uploadSeekableInternal((offset, size) => browserBlob.slice(offset, offset + size), browserBlob.size, updatedOptions);\n }\n }\n catch (e) {\n span.setStatus({\n code: coreTracing.SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n }\n finally {\n span.end();\n }\n }\n /**\n * ONLY AVAILABLE IN BROWSERS.\n *\n * Uploads a browser Blob/File/ArrayBuffer/ArrayBufferView object to block blob.\n *\n * When buffer length lesser than or equal to 256MB, this method will use 1 upload call to finish the upload.\n * Otherwise, this method will call {@link stageBlock} to upload blocks, and finally call\n * {@link commitBlockList} to commit the block list.\n *\n * A common {@link BlockBlobParallelUploadOptions.blobHTTPHeaders} option to set is\n * `blobContentType`, enabling the browser to provide\n * functionality based on file type.\n *\n * @deprecated Use {@link uploadData} instead.\n *\n * @param browserData - Blob, File, ArrayBuffer or ArrayBufferView\n * @param options - Options to upload browser data.\n * @returns Response data for the Blob Upload operation.\n */\n async uploadBrowserData(browserData, options = {}) {\n const { span, updatedOptions } = createSpan(\"BlockBlobClient-uploadBrowserData\", options);\n try {\n const browserBlob = new Blob([browserData]);\n return await this.uploadSeekableInternal((offset, size) => browserBlob.slice(offset, offset + size), browserBlob.size, updatedOptions);\n }\n catch (e) {\n span.setStatus({\n code: coreTracing.SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n }\n finally {\n span.end();\n }\n }\n /**\n *\n * Uploads data to block blob. Requires a bodyFactory as the data source,\n * which need to return a {@link HttpRequestBody} object with the offset and size provided.\n *\n * When data length is no more than the specified {@link BlockBlobParallelUploadOptions.maxSingleShotSize} (default is\n * {@link BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES}), this method will use 1 {@link upload} call to finish the upload.\n * Otherwise, this method will call {@link stageBlock} to upload blocks, and finally call {@link commitBlockList}\n * to commit the block list.\n *\n * @param bodyFactory -\n * @param size - size of the data to upload.\n * @param options - Options to Upload to Block Blob operation.\n * @returns Response data for the Blob Upload operation.\n */\n async uploadSeekableInternal(bodyFactory, size, options = {}) {\n if (!options.blockSize) {\n options.blockSize = 0;\n }\n if (options.blockSize < 0 || options.blockSize > BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES) {\n throw new RangeError(`blockSize option must be >= 0 and <= ${BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES}`);\n }\n if (options.maxSingleShotSize !== 0 && !options.maxSingleShotSize) {\n options.maxSingleShotSize = BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES;\n }\n if (options.maxSingleShotSize < 0 ||\n options.maxSingleShotSize > BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES) {\n throw new RangeError(`maxSingleShotSize option must be >= 0 and <= ${BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES}`);\n }\n if (options.blockSize === 0) {\n if (size > BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES * BLOCK_BLOB_MAX_BLOCKS) {\n throw new RangeError(`${size} is too larger to upload to a block blob.`);\n }\n if (size > options.maxSingleShotSize) {\n options.blockSize = Math.ceil(size / BLOCK_BLOB_MAX_BLOCKS);\n if (options.blockSize < DEFAULT_BLOB_DOWNLOAD_BLOCK_BYTES) {\n options.blockSize = DEFAULT_BLOB_DOWNLOAD_BLOCK_BYTES;\n }\n }\n }\n if (!options.blobHTTPHeaders) {\n options.blobHTTPHeaders = {};\n }\n if (!options.conditions) {\n options.conditions = {};\n }\n const { span, updatedOptions } = createSpan(\"BlockBlobClient-uploadSeekableInternal\", options);\n try {\n if (size <= options.maxSingleShotSize) {\n return await this.upload(bodyFactory(0, size), size, updatedOptions);\n }\n const numBlocks = Math.floor((size - 1) / options.blockSize) + 1;\n if (numBlocks > BLOCK_BLOB_MAX_BLOCKS) {\n throw new RangeError(`The buffer's size is too big or the BlockSize is too small;` +\n `the number of blocks must be <= ${BLOCK_BLOB_MAX_BLOCKS}`);\n }\n const blockList = [];\n const blockIDPrefix = coreHttp.generateUuid();\n let transferProgress = 0;\n const batch = new Batch(options.concurrency);\n for (let i = 0; i < numBlocks; i++) {\n batch.addOperation(async () => {\n const blockID = generateBlockID(blockIDPrefix, i);\n const start = options.blockSize * i;\n const end = i === numBlocks - 1 ? size : start + options.blockSize;\n const contentLength = end - start;\n blockList.push(blockID);\n await this.stageBlock(blockID, bodyFactory(start, contentLength), contentLength, {\n abortSignal: options.abortSignal,\n conditions: options.conditions,\n encryptionScope: options.encryptionScope,\n tracingOptions: updatedOptions.tracingOptions,\n });\n // Update progress after block is successfully uploaded to server, in case of block trying\n // TODO: Hook with convenience layer progress event in finer level\n transferProgress += contentLength;\n if (options.onProgress) {\n options.onProgress({\n loadedBytes: transferProgress,\n });\n }\n });\n }\n await batch.do();\n return this.commitBlockList(blockList, updatedOptions);\n }\n catch (e) {\n span.setStatus({\n code: coreTracing.SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n }\n finally {\n span.end();\n }\n }\n /**\n * ONLY AVAILABLE IN NODE.JS RUNTIME.\n *\n * Uploads a local file in blocks to a block blob.\n *\n * When file size lesser than or equal to 256MB, this method will use 1 upload call to finish the upload.\n * Otherwise, this method will call stageBlock to upload blocks, and finally call commitBlockList\n * to commit the block list.\n *\n * @param filePath - Full path of local file\n * @param options - Options to Upload to Block Blob operation.\n * @returns Response data for the Blob Upload operation.\n */\n async uploadFile(filePath, options = {}) {\n const { span, updatedOptions } = createSpan(\"BlockBlobClient-uploadFile\", options);\n try {\n const size = (await fsStat(filePath)).size;\n return await this.uploadSeekableInternal((offset, count) => {\n return () => fsCreateReadStream(filePath, {\n autoClose: true,\n end: count ? offset + count - 1 : Infinity,\n start: offset,\n });\n }, size, Object.assign(Object.assign({}, options), { tracingOptions: Object.assign(Object.assign({}, options.tracingOptions), convertTracingToRequestOptionsBase(updatedOptions)) }));\n }\n catch (e) {\n span.setStatus({\n code: coreTracing.SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n }\n finally {\n span.end();\n }\n }\n /**\n * ONLY AVAILABLE IN NODE.JS RUNTIME.\n *\n * Uploads a Node.js Readable stream into block blob.\n *\n * PERFORMANCE IMPROVEMENT TIPS:\n * * Input stream highWaterMark is better to set a same value with bufferSize\n * parameter, which will avoid Buffer.concat() operations.\n *\n * @param stream - Node.js Readable stream\n * @param bufferSize - Size of every buffer allocated, also the block size in the uploaded block blob. Default value is 8MB\n * @param maxConcurrency - Max concurrency indicates the max number of buffers that can be allocated,\n * positive correlation with max uploading concurrency. Default value is 5\n * @param options - Options to Upload Stream to Block Blob operation.\n * @returns Response data for the Blob Upload operation.\n */\n async uploadStream(stream, bufferSize = DEFAULT_BLOCK_BUFFER_SIZE_BYTES, maxConcurrency = 5, options = {}) {\n if (!options.blobHTTPHeaders) {\n options.blobHTTPHeaders = {};\n }\n if (!options.conditions) {\n options.conditions = {};\n }\n const { span, updatedOptions } = createSpan(\"BlockBlobClient-uploadStream\", options);\n try {\n let blockNum = 0;\n const blockIDPrefix = coreHttp.generateUuid();\n let transferProgress = 0;\n const blockList = [];\n const scheduler = new BufferScheduler(stream, bufferSize, maxConcurrency, async (body, length) => {\n const blockID = generateBlockID(blockIDPrefix, blockNum);\n blockList.push(blockID);\n blockNum++;\n await this.stageBlock(blockID, body, length, {\n conditions: options.conditions,\n encryptionScope: options.encryptionScope,\n tracingOptions: updatedOptions.tracingOptions,\n });\n // Update progress after block is successfully uploaded to server, in case of block trying\n transferProgress += length;\n if (options.onProgress) {\n options.onProgress({ loadedBytes: transferProgress });\n }\n }, \n // concurrency should set a smaller value than maxConcurrency, which is helpful to\n // reduce the possibility when a outgoing handler waits for stream data, in\n // this situation, outgoing handlers are blocked.\n // Outgoing queue shouldn't be empty.\n Math.ceil((maxConcurrency / 4) * 3));\n await scheduler.do();\n return await this.commitBlockList(blockList, Object.assign(Object.assign({}, options), { tracingOptions: Object.assign(Object.assign({}, options.tracingOptions), convertTracingToRequestOptionsBase(updatedOptions)) }));\n }\n catch (e) {\n span.setStatus({\n code: coreTracing.SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n }\n finally {\n span.end();\n }\n }\n}\n/**\n * PageBlobClient defines a set of operations applicable to page blobs.\n */\nclass PageBlobClient extends BlobClient {\n constructor(urlOrConnectionString, credentialOrPipelineOrContainerName, blobNameOrOptions, \n // Legacy, no fix for eslint error without breaking. Disable it for this interface.\n /* eslint-disable-next-line @azure/azure-sdk/ts-naming-options*/\n options) {\n // In TypeScript we cannot simply pass all parameters to super() like below so have to duplicate the code instead.\n // super(s, credentialOrPipelineOrContainerNameOrOptions, blobNameOrOptions, options);\n let pipeline;\n let url;\n options = options || {};\n if (isPipelineLike(credentialOrPipelineOrContainerName)) {\n // (url: string, pipeline: Pipeline)\n url = urlOrConnectionString;\n pipeline = credentialOrPipelineOrContainerName;\n }\n else if ((coreHttp.isNode && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential) ||\n credentialOrPipelineOrContainerName instanceof AnonymousCredential ||\n coreHttp.isTokenCredential(credentialOrPipelineOrContainerName)) {\n // (url: string, credential?: StorageSharedKeyCredential | AnonymousCredential | TokenCredential, options?: StoragePipelineOptions)\n url = urlOrConnectionString;\n options = blobNameOrOptions;\n pipeline = newPipeline(credentialOrPipelineOrContainerName, options);\n }\n else if (!credentialOrPipelineOrContainerName &&\n typeof credentialOrPipelineOrContainerName !== \"string\") {\n // (url: string, credential?: StorageSharedKeyCredential | AnonymousCredential | TokenCredential, options?: StoragePipelineOptions)\n // The second parameter is undefined. Use anonymous credential.\n url = urlOrConnectionString;\n pipeline = newPipeline(new AnonymousCredential(), options);\n }\n else if (credentialOrPipelineOrContainerName &&\n typeof credentialOrPipelineOrContainerName === \"string\" &&\n blobNameOrOptions &&\n typeof blobNameOrOptions === \"string\") {\n // (connectionString: string, containerName: string, blobName: string, options?: StoragePipelineOptions)\n const containerName = credentialOrPipelineOrContainerName;\n const blobName = blobNameOrOptions;\n const extractedCreds = extractConnectionStringParts(urlOrConnectionString);\n if (extractedCreds.kind === \"AccountConnString\") {\n if (coreHttp.isNode) {\n const sharedKeyCredential = new StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey);\n url = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName));\n if (!options.proxyOptions) {\n options.proxyOptions = coreHttp.getDefaultProxySettings(extractedCreds.proxyUri);\n }\n pipeline = newPipeline(sharedKeyCredential, options);\n }\n else {\n throw new Error(\"Account connection string is only supported in Node.js environment\");\n }\n }\n else if (extractedCreds.kind === \"SASConnString\") {\n url =\n appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)) +\n \"?\" +\n extractedCreds.accountSas;\n pipeline = newPipeline(new AnonymousCredential(), options);\n }\n else {\n throw new Error(\"Connection string must be either an Account connection string or a SAS connection string\");\n }\n }\n else {\n throw new Error(\"Expecting non-empty strings for containerName and blobName parameters\");\n }\n super(url, pipeline);\n this.pageBlobContext = new PageBlob(this.storageClientContext);\n }\n /**\n * Creates a new PageBlobClient object identical to the source but with the\n * specified snapshot timestamp.\n * Provide \"\" will remove the snapshot and return a Client to the base blob.\n *\n * @param snapshot - The snapshot timestamp.\n * @returns A new PageBlobClient object identical to the source but with the specified snapshot timestamp.\n */\n withSnapshot(snapshot) {\n return new PageBlobClient(setURLParameter(this.url, URLConstants.Parameters.SNAPSHOT, snapshot.length === 0 ? undefined : snapshot), this.pipeline);\n }\n /**\n * Creates a page blob of the specified length. Call uploadPages to upload data\n * data to a page blob.\n * @see https://docs.microsoft.com/rest/api/storageservices/put-blob\n *\n * @param size - size of the page blob.\n * @param options - Options to the Page Blob Create operation.\n * @returns Response data for the Page Blob Create operation.\n */\n async create(size, options = {}) {\n var _a, _b, _c;\n options.conditions = options.conditions || {};\n const { span, updatedOptions } = createSpan(\"PageBlobClient-create\", options);\n try {\n ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps);\n return await this.pageBlobContext.create(0, size, Object.assign({ abortSignal: options.abortSignal, blobHttpHeaders: options.blobHTTPHeaders, blobSequenceNumber: options.blobSequenceNumber, leaseAccessConditions: options.conditions, metadata: options.metadata, modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), cpkInfo: options.customerProvidedKey, encryptionScope: options.encryptionScope, immutabilityPolicyExpiry: (_b = options.immutabilityPolicy) === null || _b === void 0 ? void 0 : _b.expiriesOn, immutabilityPolicyMode: (_c = options.immutabilityPolicy) === null || _c === void 0 ? void 0 : _c.policyMode, legalHold: options.legalHold, tier: toAccessTier(options.tier), blobTagsString: toBlobTagsString(options.tags) }, convertTracingToRequestOptionsBase(updatedOptions)));\n }\n catch (e) {\n span.setStatus({\n code: coreTracing.SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n }\n finally {\n span.end();\n }\n }\n /**\n * Creates a page blob of the specified length. Call uploadPages to upload data\n * data to a page blob. If the blob with the same name already exists, the content\n * of the existing blob will remain unchanged.\n * @see https://docs.microsoft.com/rest/api/storageservices/put-blob\n *\n * @param size - size of the page blob.\n * @param options -\n */\n async createIfNotExists(size, options = {}) {\n var _a, _b;\n const { span, updatedOptions } = createSpan(\"PageBlobClient-createIfNotExists\", options);\n try {\n const conditions = { ifNoneMatch: ETagAny };\n const res = await this.create(size, Object.assign(Object.assign({}, options), { conditions, tracingOptions: updatedOptions.tracingOptions }));\n return Object.assign(Object.assign({ succeeded: true }, res), { _response: res._response });\n }\n catch (e) {\n if (((_a = e.details) === null || _a === void 0 ? void 0 : _a.errorCode) === \"BlobAlreadyExists\") {\n span.setStatus({\n code: coreTracing.SpanStatusCode.ERROR,\n message: \"Expected exception when creating a blob only if it does not already exist.\",\n });\n return Object.assign(Object.assign({ succeeded: false }, (_b = e.response) === null || _b === void 0 ? void 0 : _b.parsedHeaders), { _response: e.response });\n }\n span.setStatus({\n code: coreTracing.SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n }\n finally {\n span.end();\n }\n }\n /**\n * Writes 1 or more pages to the page blob. The start and end offsets must be a multiple of 512.\n * @see https://docs.microsoft.com/rest/api/storageservices/put-page\n *\n * @param body - Data to upload\n * @param offset - Offset of destination page blob\n * @param count - Content length of the body, also number of bytes to be uploaded\n * @param options - Options to the Page Blob Upload Pages operation.\n * @returns Response data for the Page Blob Upload Pages operation.\n */\n async uploadPages(body, offset, count, options = {}) {\n var _a;\n options.conditions = options.conditions || {};\n const { span, updatedOptions } = createSpan(\"PageBlobClient-uploadPages\", options);\n try {\n ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps);\n return await this.pageBlobContext.uploadPages(count, body, Object.assign({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), requestOptions: {\n onUploadProgress: options.onProgress,\n }, range: rangeToString({ offset, count }), sequenceNumberAccessConditions: options.conditions, transactionalContentMD5: options.transactionalContentMD5, transactionalContentCrc64: options.transactionalContentCrc64, cpkInfo: options.customerProvidedKey, encryptionScope: options.encryptionScope }, convertTracingToRequestOptionsBase(updatedOptions)));\n }\n catch (e) {\n span.setStatus({\n code: coreTracing.SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n }\n finally {\n span.end();\n }\n }\n /**\n * The Upload Pages operation writes a range of pages to a page blob where the\n * contents are read from a URL.\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/put-page-from-url\n *\n * @param sourceURL - Specify a URL to the copy source, Shared Access Signature(SAS) maybe needed for authentication\n * @param sourceOffset - The source offset to copy from. Pass 0 to copy from the beginning of source page blob\n * @param destOffset - Offset of destination page blob\n * @param count - Number of bytes to be uploaded from source page blob\n * @param options -\n */\n async uploadPagesFromURL(sourceURL, sourceOffset, destOffset, count, options = {}) {\n var _a;\n options.conditions = options.conditions || {};\n options.sourceConditions = options.sourceConditions || {};\n const { span, updatedOptions } = createSpan(\"PageBlobClient-uploadPagesFromURL\", options);\n try {\n ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps);\n return await this.pageBlobContext.uploadPagesFromURL(sourceURL, rangeToString({ offset: sourceOffset, count }), 0, rangeToString({ offset: destOffset, count }), Object.assign({ abortSignal: options.abortSignal, sourceContentMD5: options.sourceContentMD5, sourceContentCrc64: options.sourceContentCrc64, leaseAccessConditions: options.conditions, sequenceNumberAccessConditions: options.conditions, modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), sourceModifiedAccessConditions: {\n sourceIfMatch: options.sourceConditions.ifMatch,\n sourceIfModifiedSince: options.sourceConditions.ifModifiedSince,\n sourceIfNoneMatch: options.sourceConditions.ifNoneMatch,\n sourceIfUnmodifiedSince: options.sourceConditions.ifUnmodifiedSince,\n }, cpkInfo: options.customerProvidedKey, encryptionScope: options.encryptionScope, copySourceAuthorization: httpAuthorizationToString(options.sourceAuthorization) }, convertTracingToRequestOptionsBase(updatedOptions)));\n }\n catch (e) {\n span.setStatus({\n code: coreTracing.SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n }\n finally {\n span.end();\n }\n }\n /**\n * Frees the specified pages from the page blob.\n * @see https://docs.microsoft.com/rest/api/storageservices/put-page\n *\n * @param offset - Starting byte position of the pages to clear.\n * @param count - Number of bytes to clear.\n * @param options - Options to the Page Blob Clear Pages operation.\n * @returns Response data for the Page Blob Clear Pages operation.\n */\n async clearPages(offset = 0, count, options = {}) {\n var _a;\n options.conditions = options.conditions || {};\n const { span, updatedOptions } = createSpan(\"PageBlobClient-clearPages\", options);\n try {\n return await this.pageBlobContext.clearPages(0, Object.assign({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), range: rangeToString({ offset, count }), sequenceNumberAccessConditions: options.conditions, cpkInfo: options.customerProvidedKey, encryptionScope: options.encryptionScope }, convertTracingToRequestOptionsBase(updatedOptions)));\n }\n catch (e) {\n span.setStatus({\n code: coreTracing.SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n }\n finally {\n span.end();\n }\n }\n /**\n * Returns the list of valid page ranges for a page blob or snapshot of a page blob.\n * @see https://docs.microsoft.com/rest/api/storageservices/get-page-ranges\n *\n * @param offset - Starting byte position of the page ranges.\n * @param count - Number of bytes to get.\n * @param options - Options to the Page Blob Get Ranges operation.\n * @returns Response data for the Page Blob Get Ranges operation.\n */\n async getPageRanges(offset = 0, count, options = {}) {\n var _a;\n options.conditions = options.conditions || {};\n const { span, updatedOptions } = createSpan(\"PageBlobClient-getPageRanges\", options);\n try {\n return await this.pageBlobContext\n .getPageRanges(Object.assign({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), range: rangeToString({ offset, count }) }, convertTracingToRequestOptionsBase(updatedOptions)))\n .then(rangeResponseFromModel);\n }\n catch (e) {\n span.setStatus({\n code: coreTracing.SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n }\n finally {\n span.end();\n }\n }\n /**\n * getPageRangesSegment returns a single segment of page ranges starting from the\n * specified Marker. Use an empty Marker to start enumeration from the beginning.\n * After getting a segment, process it, and then call getPageRangesSegment again\n * (passing the the previously-returned Marker) to get the next segment.\n * @see https://docs.microsoft.com/rest/api/storageservices/get-page-ranges\n *\n * @param offset - Starting byte position of the page ranges.\n * @param count - Number of bytes to get.\n * @param marker - A string value that identifies the portion of the list to be returned with the next list operation.\n * @param options - Options to PageBlob Get Page Ranges Segment operation.\n */\n async listPageRangesSegment(offset = 0, count, marker, options = {}) {\n var _a;\n const { span, updatedOptions } = createSpan(\"PageBlobClient-getPageRangesSegment\", options);\n try {\n return await this.pageBlobContext.getPageRanges(Object.assign({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), range: rangeToString({ offset, count }), marker: marker, maxPageSize: options.maxPageSize }, convertTracingToRequestOptionsBase(updatedOptions)));\n }\n catch (e) {\n span.setStatus({\n code: coreTracing.SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n }\n finally {\n span.end();\n }\n }\n /**\n * Returns an AsyncIterableIterator for {@link PageBlobGetPageRangesResponseModel}\n *\n * @param offset - Starting byte position of the page ranges.\n * @param count - Number of bytes to get.\n * @param marker - A string value that identifies the portion of\n * the get of page ranges to be returned with the next getting operation. The\n * operation returns the ContinuationToken value within the response body if the\n * getting operation did not return all page ranges remaining within the current page.\n * The ContinuationToken value can be used as the value for\n * the marker parameter in a subsequent call to request the next page of get\n * items. The marker value is opaque to the client.\n * @param options - Options to List Page Ranges operation.\n */\n listPageRangeItemSegments(offset = 0, count, marker, options = {}) {\n return tslib.__asyncGenerator(this, arguments, function* listPageRangeItemSegments_1() {\n let getPageRangeItemSegmentsResponse;\n if (!!marker || marker === undefined) {\n do {\n getPageRangeItemSegmentsResponse = yield tslib.__await(this.listPageRangesSegment(offset, count, marker, options));\n marker = getPageRangeItemSegmentsResponse.continuationToken;\n yield yield tslib.__await(yield tslib.__await(getPageRangeItemSegmentsResponse));\n } while (marker);\n }\n });\n }\n /**\n * Returns an AsyncIterableIterator of {@link PageRangeInfo} objects\n *\n * @param offset - Starting byte position of the page ranges.\n * @param count - Number of bytes to get.\n * @param options - Options to List Page Ranges operation.\n */\n listPageRangeItems(offset = 0, count, options = {}) {\n return tslib.__asyncGenerator(this, arguments, function* listPageRangeItems_1() {\n var e_1, _a;\n let marker;\n try {\n for (var _b = tslib.__asyncValues(this.listPageRangeItemSegments(offset, count, marker, options)), _c; _c = yield tslib.__await(_b.next()), !_c.done;) {\n const getPageRangesSegment = _c.value;\n yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(ExtractPageRangeInfoItems(getPageRangesSegment))));\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (_c && !_c.done && (_a = _b.return)) yield tslib.__await(_a.call(_b));\n }\n finally { if (e_1) throw e_1.error; }\n }\n });\n }\n /**\n * Returns an async iterable iterator to list of page ranges for a page blob.\n * @see https://docs.microsoft.com/rest/api/storageservices/get-page-ranges\n *\n * .byPage() returns an async iterable iterator to list of page ranges for a page blob.\n *\n * Example using `for await` syntax:\n *\n * ```js\n * // Get the pageBlobClient before you run these snippets,\n * // Can be obtained from `blobServiceClient.getContainerClient(\"\").getPageBlobClient(\"\");`\n * let i = 1;\n * for await (const pageRange of pageBlobClient.listPageRanges()) {\n * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`);\n * }\n * ```\n *\n * Example using `iter.next()`:\n *\n * ```js\n * let i = 1;\n * let iter = pageBlobClient.listPageRanges();\n * let pageRangeItem = await iter.next();\n * while (!pageRangeItem.done) {\n * console.log(`Page range ${i++}: ${pageRangeItem.value.start} - ${pageRangeItem.value.end}, IsClear: ${pageRangeItem.value.isClear}`);\n * pageRangeItem = await iter.next();\n * }\n * ```\n *\n * Example using `byPage()`:\n *\n * ```js\n * // passing optional maxPageSize in the page settings\n * let i = 1;\n * for await (const response of pageBlobClient.listPageRanges().byPage({ maxPageSize: 20 })) {\n * for (const pageRange of response) {\n * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`);\n * }\n * }\n * ```\n *\n * Example using paging with a marker:\n *\n * ```js\n * let i = 1;\n * let iterator = pageBlobClient.listPageRanges().byPage({ maxPageSize: 2 });\n * let response = (await iterator.next()).value;\n *\n * // Prints 2 page ranges\n * for (const pageRange of response) {\n * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`);\n * }\n *\n * // Gets next marker\n * let marker = response.continuationToken;\n *\n * // Passing next marker as continuationToken\n *\n * iterator = pageBlobClient.listPageRanges().byPage({ continuationToken: marker, maxPageSize: 10 });\n * response = (await iterator.next()).value;\n *\n * // Prints 10 page ranges\n * for (const blob of response) {\n * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`);\n * }\n * ```\n * @param offset - Starting byte position of the page ranges.\n * @param count - Number of bytes to get.\n * @param options - Options to the Page Blob Get Ranges operation.\n * @returns An asyncIterableIterator that supports paging.\n */\n listPageRanges(offset = 0, count, options = {}) {\n options.conditions = options.conditions || {};\n // AsyncIterableIterator to iterate over blobs\n const iter = this.listPageRangeItems(offset, count, options);\n return {\n /**\n * The next method, part of the iteration protocol\n */\n next() {\n return iter.next();\n },\n /**\n * The connection to the async iterator, part of the iteration protocol\n */\n [Symbol.asyncIterator]() {\n return this;\n },\n /**\n * Return an AsyncIterableIterator that works a page at a time\n */\n byPage: (settings = {}) => {\n return this.listPageRangeItemSegments(offset, count, settings.continuationToken, Object.assign({ maxPageSize: settings.maxPageSize }, options));\n },\n };\n }\n /**\n * Gets the collection of page ranges that differ between a specified snapshot and this page blob.\n * @see https://docs.microsoft.com/rest/api/storageservices/get-page-ranges\n *\n * @param offset - Starting byte position of the page blob\n * @param count - Number of bytes to get ranges diff.\n * @param prevSnapshot - Timestamp of snapshot to retrieve the difference.\n * @param options - Options to the Page Blob Get Page Ranges Diff operation.\n * @returns Response data for the Page Blob Get Page Range Diff operation.\n */\n async getPageRangesDiff(offset, count, prevSnapshot, options = {}) {\n var _a;\n options.conditions = options.conditions || {};\n const { span, updatedOptions } = createSpan(\"PageBlobClient-getPageRangesDiff\", options);\n try {\n return await this.pageBlobContext\n .getPageRangesDiff(Object.assign({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), prevsnapshot: prevSnapshot, range: rangeToString({ offset, count }) }, convertTracingToRequestOptionsBase(updatedOptions)))\n .then(rangeResponseFromModel);\n }\n catch (e) {\n span.setStatus({\n code: coreTracing.SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n }\n finally {\n span.end();\n }\n }\n /**\n * getPageRangesDiffSegment returns a single segment of page ranges starting from the\n * specified Marker for difference between previous snapshot and the target page blob.\n * Use an empty Marker to start enumeration from the beginning.\n * After getting a segment, process it, and then call getPageRangesDiffSegment again\n * (passing the the previously-returned Marker) to get the next segment.\n * @see https://docs.microsoft.com/rest/api/storageservices/get-page-ranges\n *\n * @param offset - Starting byte position of the page ranges.\n * @param count - Number of bytes to get.\n * @param prevSnapshotOrUrl - Timestamp of snapshot to retrieve the difference or URL of snapshot to retrieve the difference.\n * @param marker - A string value that identifies the portion of the get to be returned with the next get operation.\n * @param options - Options to the Page Blob Get Page Ranges Diff operation.\n */\n async listPageRangesDiffSegment(offset, count, prevSnapshotOrUrl, marker, options) {\n var _a;\n const { span, updatedOptions } = createSpan(\"PageBlobClient-getPageRangesDiffSegment\", options);\n try {\n return await this.pageBlobContext.getPageRangesDiff(Object.assign({ abortSignal: options === null || options === void 0 ? void 0 : options.abortSignal, leaseAccessConditions: options === null || options === void 0 ? void 0 : options.conditions, modifiedAccessConditions: Object.assign(Object.assign({}, options === null || options === void 0 ? void 0 : options.conditions), { ifTags: (_a = options === null || options === void 0 ? void 0 : options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), prevsnapshot: prevSnapshotOrUrl, range: rangeToString({\n offset: offset,\n count: count,\n }), marker: marker, maxPageSize: options === null || options === void 0 ? void 0 : options.maxPageSize }, convertTracingToRequestOptionsBase(updatedOptions)));\n }\n catch (e) {\n span.setStatus({\n code: coreTracing.SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n }\n finally {\n span.end();\n }\n }\n /**\n * Returns an AsyncIterableIterator for {@link PageBlobGetPageRangesDiffResponseModel}\n *\n *\n * @param offset - Starting byte position of the page ranges.\n * @param count - Number of bytes to get.\n * @param prevSnapshotOrUrl - Timestamp of snapshot to retrieve the difference or URL of snapshot to retrieve the difference.\n * @param marker - A string value that identifies the portion of\n * the get of page ranges to be returned with the next getting operation. The\n * operation returns the ContinuationToken value within the response body if the\n * getting operation did not return all page ranges remaining within the current page.\n * The ContinuationToken value can be used as the value for\n * the marker parameter in a subsequent call to request the next page of get\n * items. The marker value is opaque to the client.\n * @param options - Options to the Page Blob Get Page Ranges Diff operation.\n */\n listPageRangeDiffItemSegments(offset, count, prevSnapshotOrUrl, marker, options) {\n return tslib.__asyncGenerator(this, arguments, function* listPageRangeDiffItemSegments_1() {\n let getPageRangeItemSegmentsResponse;\n if (!!marker || marker === undefined) {\n do {\n getPageRangeItemSegmentsResponse = yield tslib.__await(this.listPageRangesDiffSegment(offset, count, prevSnapshotOrUrl, marker, options));\n marker = getPageRangeItemSegmentsResponse.continuationToken;\n yield yield tslib.__await(yield tslib.__await(getPageRangeItemSegmentsResponse));\n } while (marker);\n }\n });\n }\n /**\n * Returns an AsyncIterableIterator of {@link PageRangeInfo} objects\n *\n * @param offset - Starting byte position of the page ranges.\n * @param count - Number of bytes to get.\n * @param prevSnapshotOrUrl - Timestamp of snapshot to retrieve the difference or URL of snapshot to retrieve the difference.\n * @param options - Options to the Page Blob Get Page Ranges Diff operation.\n */\n listPageRangeDiffItems(offset, count, prevSnapshotOrUrl, options) {\n return tslib.__asyncGenerator(this, arguments, function* listPageRangeDiffItems_1() {\n var e_2, _a;\n let marker;\n try {\n for (var _b = tslib.__asyncValues(this.listPageRangeDiffItemSegments(offset, count, prevSnapshotOrUrl, marker, options)), _c; _c = yield tslib.__await(_b.next()), !_c.done;) {\n const getPageRangesSegment = _c.value;\n yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(ExtractPageRangeInfoItems(getPageRangesSegment))));\n }\n }\n catch (e_2_1) { e_2 = { error: e_2_1 }; }\n finally {\n try {\n if (_c && !_c.done && (_a = _b.return)) yield tslib.__await(_a.call(_b));\n }\n finally { if (e_2) throw e_2.error; }\n }\n });\n }\n /**\n * Returns an async iterable iterator to list of page ranges that differ between a specified snapshot and this page blob.\n * @see https://docs.microsoft.com/rest/api/storageservices/get-page-ranges\n *\n * .byPage() returns an async iterable iterator to list of page ranges that differ between a specified snapshot and this page blob.\n *\n * Example using `for await` syntax:\n *\n * ```js\n * // Get the pageBlobClient before you run these snippets,\n * // Can be obtained from `blobServiceClient.getContainerClient(\"\").getPageBlobClient(\"\");`\n * let i = 1;\n * for await (const pageRange of pageBlobClient.listPageRangesDiff()) {\n * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`);\n * }\n * ```\n *\n * Example using `iter.next()`:\n *\n * ```js\n * let i = 1;\n * let iter = pageBlobClient.listPageRangesDiff();\n * let pageRangeItem = await iter.next();\n * while (!pageRangeItem.done) {\n * console.log(`Page range ${i++}: ${pageRangeItem.value.start} - ${pageRangeItem.value.end}, IsClear: ${pageRangeItem.value.isClear}`);\n * pageRangeItem = await iter.next();\n * }\n * ```\n *\n * Example using `byPage()`:\n *\n * ```js\n * // passing optional maxPageSize in the page settings\n * let i = 1;\n * for await (const response of pageBlobClient.listPageRangesDiff().byPage({ maxPageSize: 20 })) {\n * for (const pageRange of response) {\n * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`);\n * }\n * }\n * ```\n *\n * Example using paging with a marker:\n *\n * ```js\n * let i = 1;\n * let iterator = pageBlobClient.listPageRangesDiff().byPage({ maxPageSize: 2 });\n * let response = (await iterator.next()).value;\n *\n * // Prints 2 page ranges\n * for (const pageRange of response) {\n * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`);\n * }\n *\n * // Gets next marker\n * let marker = response.continuationToken;\n *\n * // Passing next marker as continuationToken\n *\n * iterator = pageBlobClient.listPageRangesDiff().byPage({ continuationToken: marker, maxPageSize: 10 });\n * response = (await iterator.next()).value;\n *\n * // Prints 10 page ranges\n * for (const blob of response) {\n * console.log(`Page range ${i++}: ${pageRange.start} - ${pageRange.end}`);\n * }\n * ```\n * @param offset - Starting byte position of the page ranges.\n * @param count - Number of bytes to get.\n * @param prevSnapshot - Timestamp of snapshot to retrieve the difference.\n * @param options - Options to the Page Blob Get Ranges operation.\n * @returns An asyncIterableIterator that supports paging.\n */\n listPageRangesDiff(offset, count, prevSnapshot, options = {}) {\n options.conditions = options.conditions || {};\n // AsyncIterableIterator to iterate over blobs\n const iter = this.listPageRangeDiffItems(offset, count, prevSnapshot, Object.assign({}, options));\n return {\n /**\n * The next method, part of the iteration protocol\n */\n next() {\n return iter.next();\n },\n /**\n * The connection to the async iterator, part of the iteration protocol\n */\n [Symbol.asyncIterator]() {\n return this;\n },\n /**\n * Return an AsyncIterableIterator that works a page at a time\n */\n byPage: (settings = {}) => {\n return this.listPageRangeDiffItemSegments(offset, count, prevSnapshot, settings.continuationToken, Object.assign({ maxPageSize: settings.maxPageSize }, options));\n },\n };\n }\n /**\n * Gets the collection of page ranges that differ between a specified snapshot and this page blob for managed disks.\n * @see https://docs.microsoft.com/rest/api/storageservices/get-page-ranges\n *\n * @param offset - Starting byte position of the page blob\n * @param count - Number of bytes to get ranges diff.\n * @param prevSnapshotUrl - URL of snapshot to retrieve the difference.\n * @param options - Options to the Page Blob Get Page Ranges Diff operation.\n * @returns Response data for the Page Blob Get Page Range Diff operation.\n */\n async getPageRangesDiffForManagedDisks(offset, count, prevSnapshotUrl, options = {}) {\n var _a;\n options.conditions = options.conditions || {};\n const { span, updatedOptions } = createSpan(\"PageBlobClient-GetPageRangesDiffForManagedDisks\", options);\n try {\n return await this.pageBlobContext\n .getPageRangesDiff(Object.assign({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), prevSnapshotUrl, range: rangeToString({ offset, count }) }, convertTracingToRequestOptionsBase(updatedOptions)))\n .then(rangeResponseFromModel);\n }\n catch (e) {\n span.setStatus({\n code: coreTracing.SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n }\n finally {\n span.end();\n }\n }\n /**\n * Resizes the page blob to the specified size (which must be a multiple of 512).\n * @see https://docs.microsoft.com/rest/api/storageservices/set-blob-properties\n *\n * @param size - Target size\n * @param options - Options to the Page Blob Resize operation.\n * @returns Response data for the Page Blob Resize operation.\n */\n async resize(size, options = {}) {\n var _a;\n options.conditions = options.conditions || {};\n const { span, updatedOptions } = createSpan(\"PageBlobClient-resize\", options);\n try {\n return await this.pageBlobContext.resize(size, Object.assign({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), encryptionScope: options.encryptionScope }, convertTracingToRequestOptionsBase(updatedOptions)));\n }\n catch (e) {\n span.setStatus({\n code: coreTracing.SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n }\n finally {\n span.end();\n }\n }\n /**\n * Sets a page blob's sequence number.\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/set-blob-properties\n *\n * @param sequenceNumberAction - Indicates how the service should modify the blob's sequence number.\n * @param sequenceNumber - Required if sequenceNumberAction is max or update\n * @param options - Options to the Page Blob Update Sequence Number operation.\n * @returns Response data for the Page Blob Update Sequence Number operation.\n */\n async updateSequenceNumber(sequenceNumberAction, sequenceNumber, options = {}) {\n var _a;\n options.conditions = options.conditions || {};\n const { span, updatedOptions } = createSpan(\"PageBlobClient-updateSequenceNumber\", options);\n try {\n return await this.pageBlobContext.updateSequenceNumber(sequenceNumberAction, Object.assign({ abortSignal: options.abortSignal, blobSequenceNumber: sequenceNumber, leaseAccessConditions: options.conditions, modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }) }, convertTracingToRequestOptionsBase(updatedOptions)));\n }\n catch (e) {\n span.setStatus({\n code: coreTracing.SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n }\n finally {\n span.end();\n }\n }\n /**\n * Begins an operation to start an incremental copy from one page blob's snapshot to this page blob.\n * The snapshot is copied such that only the differential changes between the previously\n * copied snapshot are transferred to the destination.\n * The copied snapshots are complete copies of the original snapshot and can be read or copied from as usual.\n * @see https://docs.microsoft.com/rest/api/storageservices/incremental-copy-blob\n * @see https://docs.microsoft.com/en-us/azure/virtual-machines/windows/incremental-snapshots\n *\n * @param copySource - Specifies the name of the source page blob snapshot. For example,\n * https://myaccount.blob.core.windows.net/mycontainer/myblob?snapshot=\n * @param options - Options to the Page Blob Copy Incremental operation.\n * @returns Response data for the Page Blob Copy Incremental operation.\n */\n async startCopyIncremental(copySource, options = {}) {\n var _a;\n const { span, updatedOptions } = createSpan(\"PageBlobClient-startCopyIncremental\", options);\n try {\n return await this.pageBlobContext.copyIncremental(copySource, Object.assign({ abortSignal: options.abortSignal, modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }) }, convertTracingToRequestOptionsBase(updatedOptions)));\n }\n catch (e) {\n span.setStatus({\n code: coreTracing.SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n }\n finally {\n span.end();\n }\n }\n}\n\n// Copyright (c) Microsoft Corporation.\nasync function getBodyAsText(batchResponse) {\n let buffer = Buffer.alloc(BATCH_MAX_PAYLOAD_IN_BYTES);\n const responseLength = await streamToBuffer2(batchResponse.readableStreamBody, buffer);\n // Slice the buffer to trim the empty ending.\n buffer = buffer.slice(0, responseLength);\n return buffer.toString();\n}\nfunction utf8ByteLength(str) {\n return Buffer.byteLength(str);\n}\n\n// Copyright (c) Microsoft Corporation.\nconst HTTP_HEADER_DELIMITER = \": \";\nconst SPACE_DELIMITER = \" \";\nconst NOT_FOUND = -1;\n/**\n * Util class for parsing batch response.\n */\nclass BatchResponseParser {\n constructor(batchResponse, subRequests) {\n if (!batchResponse || !batchResponse.contentType) {\n // In special case(reported), server may return invalid content-type which could not be parsed.\n throw new RangeError(\"batchResponse is malformed or doesn't contain valid content-type.\");\n }\n if (!subRequests || subRequests.size === 0) {\n // This should be prevent during coding.\n throw new RangeError(\"Invalid state: subRequests is not provided or size is 0.\");\n }\n this.batchResponse = batchResponse;\n this.subRequests = subRequests;\n this.responseBatchBoundary = this.batchResponse.contentType.split(\"=\")[1];\n this.perResponsePrefix = `--${this.responseBatchBoundary}${HTTP_LINE_ENDING}`;\n this.batchResponseEnding = `--${this.responseBatchBoundary}--`;\n }\n // For example of response, please refer to https://docs.microsoft.com/en-us/rest/api/storageservices/blob-batch#response\n async parseBatchResponse() {\n // When logic reach here, suppose batch request has already succeeded with 202, so we can further parse\n // sub request's response.\n if (this.batchResponse._response.status !== HTTPURLConnection.HTTP_ACCEPTED) {\n throw new Error(`Invalid state: batch request failed with status: '${this.batchResponse._response.status}'.`);\n }\n const responseBodyAsText = await getBodyAsText(this.batchResponse);\n const subResponses = responseBodyAsText\n .split(this.batchResponseEnding)[0] // string after ending is useless\n .split(this.perResponsePrefix)\n .slice(1); // string before first response boundary is useless\n const subResponseCount = subResponses.length;\n // Defensive coding in case of potential error parsing.\n // Note: subResponseCount == 1 is special case where sub request is invalid.\n // We try to prevent such cases through early validation, e.g. validate sub request count >= 1.\n // While in unexpected sub request invalid case, we allow sub response to be parsed and return to user.\n if (subResponseCount !== this.subRequests.size && subResponseCount !== 1) {\n throw new Error(\"Invalid state: sub responses' count is not equal to sub requests' count.\");\n }\n const deserializedSubResponses = new Array(subResponseCount);\n let subResponsesSucceededCount = 0;\n let subResponsesFailedCount = 0;\n // Parse sub subResponses.\n for (let index = 0; index < subResponseCount; index++) {\n const subResponse = subResponses[index];\n const deserializedSubResponse = {};\n deserializedSubResponse.headers = new coreHttp.HttpHeaders();\n const responseLines = subResponse.split(`${HTTP_LINE_ENDING}`);\n let subRespHeaderStartFound = false;\n let subRespHeaderEndFound = false;\n let subRespFailed = false;\n let contentId = NOT_FOUND;\n for (const responseLine of responseLines) {\n if (!subRespHeaderStartFound) {\n // Convention line to indicate content ID\n if (responseLine.startsWith(HeaderConstants.CONTENT_ID)) {\n contentId = parseInt(responseLine.split(HTTP_HEADER_DELIMITER)[1]);\n }\n // Http version line with status code indicates the start of sub request's response.\n // Example: HTTP/1.1 202 Accepted\n if (responseLine.startsWith(HTTP_VERSION_1_1)) {\n subRespHeaderStartFound = true;\n const tokens = responseLine.split(SPACE_DELIMITER);\n deserializedSubResponse.status = parseInt(tokens[1]);\n deserializedSubResponse.statusMessage = tokens.slice(2).join(SPACE_DELIMITER);\n }\n continue; // Skip convention headers not specifically for sub request i.e. Content-Type: application/http and Content-ID: *\n }\n if (responseLine.trim() === \"\") {\n // Sub response's header start line already found, and the first empty line indicates header end line found.\n if (!subRespHeaderEndFound) {\n subRespHeaderEndFound = true;\n }\n continue; // Skip empty line\n }\n // Note: when code reach here, it indicates subRespHeaderStartFound == true\n if (!subRespHeaderEndFound) {\n if (responseLine.indexOf(HTTP_HEADER_DELIMITER) === -1) {\n // Defensive coding to prevent from missing valuable lines.\n throw new Error(`Invalid state: find non-empty line '${responseLine}' without HTTP header delimiter '${HTTP_HEADER_DELIMITER}'.`);\n }\n // Parse headers of sub response.\n const tokens = responseLine.split(HTTP_HEADER_DELIMITER);\n deserializedSubResponse.headers.set(tokens[0], tokens[1]);\n if (tokens[0] === HeaderConstants.X_MS_ERROR_CODE) {\n deserializedSubResponse.errorCode = tokens[1];\n subRespFailed = true;\n }\n }\n else {\n // Assemble body of sub response.\n if (!deserializedSubResponse.bodyAsText) {\n deserializedSubResponse.bodyAsText = \"\";\n }\n deserializedSubResponse.bodyAsText += responseLine;\n }\n } // Inner for end\n // The response will contain the Content-ID header for each corresponding subrequest response to use for tracking.\n // The Content-IDs are set to a valid index in the subrequests we sent. In the status code 202 path, we could expect it\n // to be 1-1 mapping from the [0, subRequests.size) to the Content-IDs returned. If not, we simply don't return that\n // unexpected subResponse in the parsed reponse and we can always look it up in the raw response for debugging purpose.\n if (contentId !== NOT_FOUND &&\n Number.isInteger(contentId) &&\n contentId >= 0 &&\n contentId < this.subRequests.size &&\n deserializedSubResponses[contentId] === undefined) {\n deserializedSubResponse._request = this.subRequests.get(contentId);\n deserializedSubResponses[contentId] = deserializedSubResponse;\n }\n else {\n logger.error(`subResponses[${index}] is dropped as the Content-ID is not found or invalid, Content-ID: ${contentId}`);\n }\n if (subRespFailed) {\n subResponsesFailedCount++;\n }\n else {\n subResponsesSucceededCount++;\n }\n }\n return {\n subResponses: deserializedSubResponses,\n subResponsesSucceededCount: subResponsesSucceededCount,\n subResponsesFailedCount: subResponsesFailedCount,\n };\n }\n}\n\n// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nvar MutexLockStatus;\n(function (MutexLockStatus) {\n MutexLockStatus[MutexLockStatus[\"LOCKED\"] = 0] = \"LOCKED\";\n MutexLockStatus[MutexLockStatus[\"UNLOCKED\"] = 1] = \"UNLOCKED\";\n})(MutexLockStatus || (MutexLockStatus = {}));\n/**\n * An async mutex lock.\n */\nclass Mutex {\n /**\n * Lock for a specific key. If the lock has been acquired by another customer, then\n * will wait until getting the lock.\n *\n * @param key - lock key\n */\n static async lock(key) {\n return new Promise((resolve) => {\n if (this.keys[key] === undefined || this.keys[key] === MutexLockStatus.UNLOCKED) {\n this.keys[key] = MutexLockStatus.LOCKED;\n resolve();\n }\n else {\n this.onUnlockEvent(key, () => {\n this.keys[key] = MutexLockStatus.LOCKED;\n resolve();\n });\n }\n });\n }\n /**\n * Unlock a key.\n *\n * @param key -\n */\n static async unlock(key) {\n return new Promise((resolve) => {\n if (this.keys[key] === MutexLockStatus.LOCKED) {\n this.emitUnlockEvent(key);\n }\n delete this.keys[key];\n resolve();\n });\n }\n static onUnlockEvent(key, handler) {\n if (this.listeners[key] === undefined) {\n this.listeners[key] = [handler];\n }\n else {\n this.listeners[key].push(handler);\n }\n }\n static emitUnlockEvent(key) {\n if (this.listeners[key] !== undefined && this.listeners[key].length > 0) {\n const handler = this.listeners[key].shift();\n setImmediate(() => {\n handler.call(this);\n });\n }\n }\n}\nMutex.keys = {};\nMutex.listeners = {};\n\n// Copyright (c) Microsoft Corporation.\n/**\n * A BlobBatch represents an aggregated set of operations on blobs.\n * Currently, only `delete` and `setAccessTier` are supported.\n */\nclass BlobBatch {\n constructor() {\n this.batch = \"batch\";\n this.batchRequest = new InnerBatchRequest();\n }\n /**\n * Get the value of Content-Type for a batch request.\n * The value must be multipart/mixed with a batch boundary.\n * Example: multipart/mixed; boundary=batch_a81786c8-e301-4e42-a729-a32ca24ae252\n */\n getMultiPartContentType() {\n return this.batchRequest.getMultipartContentType();\n }\n /**\n * Get assembled HTTP request body for sub requests.\n */\n getHttpRequestBody() {\n return this.batchRequest.getHttpRequestBody();\n }\n /**\n * Get sub requests that are added into the batch request.\n */\n getSubRequests() {\n return this.batchRequest.getSubRequests();\n }\n async addSubRequestInternal(subRequest, assembleSubRequestFunc) {\n await Mutex.lock(this.batch);\n try {\n this.batchRequest.preAddSubRequest(subRequest);\n await assembleSubRequestFunc();\n this.batchRequest.postAddSubRequest(subRequest);\n }\n finally {\n await Mutex.unlock(this.batch);\n }\n }\n setBatchType(batchType) {\n if (!this.batchType) {\n this.batchType = batchType;\n }\n if (this.batchType !== batchType) {\n throw new RangeError(`BlobBatch only supports one operation type per batch and it already is being used for ${this.batchType} operations.`);\n }\n }\n async deleteBlob(urlOrBlobClient, credentialOrOptions, options) {\n let url;\n let credential;\n if (typeof urlOrBlobClient === \"string\" &&\n ((coreHttp.isNode && credentialOrOptions instanceof StorageSharedKeyCredential) ||\n credentialOrOptions instanceof AnonymousCredential ||\n coreHttp.isTokenCredential(credentialOrOptions))) {\n // First overload\n url = urlOrBlobClient;\n credential = credentialOrOptions;\n }\n else if (urlOrBlobClient instanceof BlobClient) {\n // Second overload\n url = urlOrBlobClient.url;\n credential = urlOrBlobClient.credential;\n options = credentialOrOptions;\n }\n else {\n throw new RangeError(\"Invalid arguments. Either url and credential, or BlobClient need be provided.\");\n }\n if (!options) {\n options = {};\n }\n const { span, updatedOptions } = createSpan(\"BatchDeleteRequest-addSubRequest\", options);\n try {\n this.setBatchType(\"delete\");\n await this.addSubRequestInternal({\n url: url,\n credential: credential,\n }, async () => {\n await new BlobClient(url, this.batchRequest.createPipeline(credential)).delete(updatedOptions);\n });\n }\n catch (e) {\n span.setStatus({\n code: coreTracing.SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n }\n finally {\n span.end();\n }\n }\n async setBlobAccessTier(urlOrBlobClient, credentialOrTier, tierOrOptions, options) {\n let url;\n let credential;\n let tier;\n if (typeof urlOrBlobClient === \"string\" &&\n ((coreHttp.isNode && credentialOrTier instanceof StorageSharedKeyCredential) ||\n credentialOrTier instanceof AnonymousCredential ||\n coreHttp.isTokenCredential(credentialOrTier))) {\n // First overload\n url = urlOrBlobClient;\n credential = credentialOrTier;\n tier = tierOrOptions;\n }\n else if (urlOrBlobClient instanceof BlobClient) {\n // Second overload\n url = urlOrBlobClient.url;\n credential = urlOrBlobClient.credential;\n tier = credentialOrTier;\n options = tierOrOptions;\n }\n else {\n throw new RangeError(\"Invalid arguments. Either url and credential, or BlobClient need be provided.\");\n }\n if (!options) {\n options = {};\n }\n const { span, updatedOptions } = createSpan(\"BatchSetTierRequest-addSubRequest\", options);\n try {\n this.setBatchType(\"setAccessTier\");\n await this.addSubRequestInternal({\n url: url,\n credential: credential,\n }, async () => {\n await new BlobClient(url, this.batchRequest.createPipeline(credential)).setAccessTier(tier, updatedOptions);\n });\n }\n catch (e) {\n span.setStatus({\n code: coreTracing.SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n }\n finally {\n span.end();\n }\n }\n}\n/**\n * Inner batch request class which is responsible for assembling and serializing sub requests.\n * See https://docs.microsoft.com/en-us/rest/api/storageservices/blob-batch#request-body for how requests are assembled.\n */\nclass InnerBatchRequest {\n constructor() {\n this.operationCount = 0;\n this.body = \"\";\n const tempGuid = coreHttp.generateUuid();\n // batch_{batchid}\n this.boundary = `batch_${tempGuid}`;\n // --batch_{batchid}\n // Content-Type: application/http\n // Content-Transfer-Encoding: binary\n this.subRequestPrefix = `--${this.boundary}${HTTP_LINE_ENDING}${HeaderConstants.CONTENT_TYPE}: application/http${HTTP_LINE_ENDING}${HeaderConstants.CONTENT_TRANSFER_ENCODING}: binary`;\n // multipart/mixed; boundary=batch_{batchid}\n this.multipartContentType = `multipart/mixed; boundary=${this.boundary}`;\n // --batch_{batchid}--\n this.batchRequestEnding = `--${this.boundary}--`;\n this.subRequests = new Map();\n }\n /**\n * Create pipeline to assemble sub requests. The idea here is to use existing\n * credential and serialization/deserialization components, with additional policies to\n * filter unnecessary headers, assemble sub requests into request's body\n * and intercept request from going to wire.\n * @param credential - Such as AnonymousCredential, StorageSharedKeyCredential or any credential from the `@azure/identity` package to authenticate requests to the service. You can also provide an object that implements the TokenCredential interface. If not specified, AnonymousCredential is used.\n */\n createPipeline(credential) {\n const isAnonymousCreds = credential instanceof AnonymousCredential;\n const policyFactoryLength = 3 + (isAnonymousCreds ? 0 : 1); // [deserializationPolicy, BatchHeaderFilterPolicyFactory, (Optional)Credential, BatchRequestAssemblePolicyFactory]\n const factories = new Array(policyFactoryLength);\n factories[0] = coreHttp.deserializationPolicy(); // Default deserializationPolicy is provided by protocol layer\n factories[1] = new BatchHeaderFilterPolicyFactory(); // Use batch header filter policy to exclude unnecessary headers\n if (!isAnonymousCreds) {\n factories[2] = coreHttp.isTokenCredential(credential)\n ? attachCredential(coreHttp.bearerTokenAuthenticationPolicy(credential, StorageOAuthScopes), credential)\n : credential;\n }\n factories[policyFactoryLength - 1] = new BatchRequestAssemblePolicyFactory(this); // Use batch assemble policy to assemble request and intercept request from going to wire\n return new Pipeline(factories, {});\n }\n appendSubRequestToBody(request) {\n // Start to assemble sub request\n this.body += [\n this.subRequestPrefix,\n `${HeaderConstants.CONTENT_ID}: ${this.operationCount}`,\n \"\",\n `${request.method.toString()} ${getURLPathAndQuery(request.url)} ${HTTP_VERSION_1_1}${HTTP_LINE_ENDING}`, // sub request start line with method\n ].join(HTTP_LINE_ENDING);\n for (const header of request.headers.headersArray()) {\n this.body += `${header.name}: ${header.value}${HTTP_LINE_ENDING}`;\n }\n this.body += HTTP_LINE_ENDING; // sub request's headers need be ending with an empty line\n // No body to assemble for current batch request support\n // End to assemble sub request\n }\n preAddSubRequest(subRequest) {\n if (this.operationCount >= BATCH_MAX_REQUEST) {\n throw new RangeError(`Cannot exceed ${BATCH_MAX_REQUEST} sub requests in a single batch`);\n }\n // Fast fail if url for sub request is invalid\n const path = getURLPath(subRequest.url);\n if (!path || path === \"\") {\n throw new RangeError(`Invalid url for sub request: '${subRequest.url}'`);\n }\n }\n postAddSubRequest(subRequest) {\n this.subRequests.set(this.operationCount, subRequest);\n this.operationCount++;\n }\n // Return the http request body with assembling the ending line to the sub request body.\n getHttpRequestBody() {\n return `${this.body}${this.batchRequestEnding}${HTTP_LINE_ENDING}`;\n }\n getMultipartContentType() {\n return this.multipartContentType;\n }\n getSubRequests() {\n return this.subRequests;\n }\n}\nclass BatchRequestAssemblePolicy extends coreHttp.BaseRequestPolicy {\n constructor(batchRequest, nextPolicy, options) {\n super(nextPolicy, options);\n this.dummyResponse = {\n request: new coreHttp.WebResource(),\n status: 200,\n headers: new coreHttp.HttpHeaders(),\n };\n this.batchRequest = batchRequest;\n }\n async sendRequest(request) {\n await this.batchRequest.appendSubRequestToBody(request);\n return this.dummyResponse; // Intercept request from going to wire\n }\n}\nclass BatchRequestAssemblePolicyFactory {\n constructor(batchRequest) {\n this.batchRequest = batchRequest;\n }\n create(nextPolicy, options) {\n return new BatchRequestAssemblePolicy(this.batchRequest, nextPolicy, options);\n }\n}\nclass BatchHeaderFilterPolicy extends coreHttp.BaseRequestPolicy {\n // The base class has a protected constructor. Adding a public one to enable constructing of this class.\n /* eslint-disable-next-line @typescript-eslint/no-useless-constructor*/\n constructor(nextPolicy, options) {\n super(nextPolicy, options);\n }\n async sendRequest(request) {\n let xMsHeaderName = \"\";\n for (const header of request.headers.headersArray()) {\n if (iEqual(header.name, HeaderConstants.X_MS_VERSION)) {\n xMsHeaderName = header.name;\n }\n }\n if (xMsHeaderName !== \"\") {\n request.headers.remove(xMsHeaderName); // The subrequests should not have the x-ms-version header.\n }\n return this._nextPolicy.sendRequest(request);\n }\n}\nclass BatchHeaderFilterPolicyFactory {\n create(nextPolicy, options) {\n return new BatchHeaderFilterPolicy(nextPolicy, options);\n }\n}\n\n// Copyright (c) Microsoft Corporation.\n/**\n * A BlobBatchClient allows you to make batched requests to the Azure Storage Blob service.\n *\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/blob-batch\n */\nclass BlobBatchClient {\n constructor(url, credentialOrPipeline, \n // Legacy, no fix for eslint error without breaking. Disable it for this interface.\n /* eslint-disable-next-line @azure/azure-sdk/ts-naming-options*/\n options) {\n let pipeline;\n if (isPipelineLike(credentialOrPipeline)) {\n pipeline = credentialOrPipeline;\n }\n else if (!credentialOrPipeline) {\n // no credential provided\n pipeline = newPipeline(new AnonymousCredential(), options);\n }\n else {\n pipeline = newPipeline(credentialOrPipeline, options);\n }\n const storageClientContext = new StorageClientContext(url, pipeline.toServiceClientOptions());\n const path = getURLPath(url);\n if (path && path !== \"/\") {\n // Container scoped.\n this.serviceOrContainerContext = new Container(storageClientContext);\n }\n else {\n this.serviceOrContainerContext = new Service(storageClientContext);\n }\n }\n /**\n * Creates a {@link BlobBatch}.\n * A BlobBatch represents an aggregated set of operations on blobs.\n */\n createBatch() {\n return new BlobBatch();\n }\n async deleteBlobs(urlsOrBlobClients, credentialOrOptions, \n // Legacy, no fix for eslint error without breaking. Disable it for this interface.\n /* eslint-disable-next-line @azure/azure-sdk/ts-naming-options*/\n options) {\n const batch = new BlobBatch();\n for (const urlOrBlobClient of urlsOrBlobClients) {\n if (typeof urlOrBlobClient === \"string\") {\n await batch.deleteBlob(urlOrBlobClient, credentialOrOptions, options);\n }\n else {\n await batch.deleteBlob(urlOrBlobClient, credentialOrOptions);\n }\n }\n return this.submitBatch(batch);\n }\n async setBlobsAccessTier(urlsOrBlobClients, credentialOrTier, tierOrOptions, \n // Legacy, no fix for eslint error without breaking. Disable it for this interface.\n /* eslint-disable-next-line @azure/azure-sdk/ts-naming-options*/\n options) {\n const batch = new BlobBatch();\n for (const urlOrBlobClient of urlsOrBlobClients) {\n if (typeof urlOrBlobClient === \"string\") {\n await batch.setBlobAccessTier(urlOrBlobClient, credentialOrTier, tierOrOptions, options);\n }\n else {\n await batch.setBlobAccessTier(urlOrBlobClient, credentialOrTier, tierOrOptions);\n }\n }\n return this.submitBatch(batch);\n }\n /**\n * Submit batch request which consists of multiple subrequests.\n *\n * Get `blobBatchClient` and other details before running the snippets.\n * `blobServiceClient.getBlobBatchClient()` gives the `blobBatchClient`\n *\n * Example usage:\n *\n * ```js\n * let batchRequest = new BlobBatch();\n * await batchRequest.deleteBlob(urlInString0, credential0);\n * await batchRequest.deleteBlob(urlInString1, credential1, {\n * deleteSnapshots: \"include\"\n * });\n * const batchResp = await blobBatchClient.submitBatch(batchRequest);\n * console.log(batchResp.subResponsesSucceededCount);\n * ```\n *\n * Example using a lease:\n *\n * ```js\n * let batchRequest = new BlobBatch();\n * await batchRequest.setBlobAccessTier(blockBlobClient0, \"Cool\");\n * await batchRequest.setBlobAccessTier(blockBlobClient1, \"Cool\", {\n * conditions: { leaseId: leaseId }\n * });\n * const batchResp = await blobBatchClient.submitBatch(batchRequest);\n * console.log(batchResp.subResponsesSucceededCount);\n * ```\n *\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/blob-batch\n *\n * @param batchRequest - A set of Delete or SetTier operations.\n * @param options -\n */\n async submitBatch(batchRequest, options = {}) {\n if (!batchRequest || batchRequest.getSubRequests().size === 0) {\n throw new RangeError(\"Batch request should contain one or more sub requests.\");\n }\n const { span, updatedOptions } = createSpan(\"BlobBatchClient-submitBatch\", options);\n try {\n const batchRequestBody = batchRequest.getHttpRequestBody();\n // ServiceSubmitBatchResponseModel and ContainerSubmitBatchResponse are compatible for now.\n const rawBatchResponse = await this.serviceOrContainerContext.submitBatch(utf8ByteLength(batchRequestBody), batchRequest.getMultiPartContentType(), batchRequestBody, Object.assign(Object.assign({}, options), convertTracingToRequestOptionsBase(updatedOptions)));\n // Parse the sub responses result, if logic reaches here(i.e. the batch request succeeded with status code 202).\n const batchResponseParser = new BatchResponseParser(rawBatchResponse, batchRequest.getSubRequests());\n const responseSummary = await batchResponseParser.parseBatchResponse();\n const res = {\n _response: rawBatchResponse._response,\n contentType: rawBatchResponse.contentType,\n errorCode: rawBatchResponse.errorCode,\n requestId: rawBatchResponse.requestId,\n clientRequestId: rawBatchResponse.clientRequestId,\n version: rawBatchResponse.version,\n subResponses: responseSummary.subResponses,\n subResponsesSucceededCount: responseSummary.subResponsesSucceededCount,\n subResponsesFailedCount: responseSummary.subResponsesFailedCount,\n };\n return res;\n }\n catch (e) {\n span.setStatus({\n code: coreTracing.SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n }\n finally {\n span.end();\n }\n }\n}\n\n/**\n * A ContainerClient represents a URL to the Azure Storage container allowing you to manipulate its blobs.\n */\nclass ContainerClient extends StorageClient {\n constructor(urlOrConnectionString, credentialOrPipelineOrContainerName, \n // Legacy, no fix for eslint error without breaking. Disable it for this interface.\n /* eslint-disable-next-line @azure/azure-sdk/ts-naming-options*/\n options) {\n let pipeline;\n let url;\n options = options || {};\n if (isPipelineLike(credentialOrPipelineOrContainerName)) {\n // (url: string, pipeline: Pipeline)\n url = urlOrConnectionString;\n pipeline = credentialOrPipelineOrContainerName;\n }\n else if ((coreHttp.isNode && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential) ||\n credentialOrPipelineOrContainerName instanceof AnonymousCredential ||\n coreHttp.isTokenCredential(credentialOrPipelineOrContainerName)) {\n // (url: string, credential?: StorageSharedKeyCredential | AnonymousCredential | TokenCredential, options?: StoragePipelineOptions)\n url = urlOrConnectionString;\n pipeline = newPipeline(credentialOrPipelineOrContainerName, options);\n }\n else if (!credentialOrPipelineOrContainerName &&\n typeof credentialOrPipelineOrContainerName !== \"string\") {\n // (url: string, credential?: StorageSharedKeyCredential | AnonymousCredential | TokenCredential, options?: StoragePipelineOptions)\n // The second parameter is undefined. Use anonymous credential.\n url = urlOrConnectionString;\n pipeline = newPipeline(new AnonymousCredential(), options);\n }\n else if (credentialOrPipelineOrContainerName &&\n typeof credentialOrPipelineOrContainerName === \"string\") {\n // (connectionString: string, containerName: string, blobName: string, options?: StoragePipelineOptions)\n const containerName = credentialOrPipelineOrContainerName;\n const extractedCreds = extractConnectionStringParts(urlOrConnectionString);\n if (extractedCreds.kind === \"AccountConnString\") {\n if (coreHttp.isNode) {\n const sharedKeyCredential = new StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey);\n url = appendToURLPath(extractedCreds.url, encodeURIComponent(containerName));\n if (!options.proxyOptions) {\n options.proxyOptions = coreHttp.getDefaultProxySettings(extractedCreds.proxyUri);\n }\n pipeline = newPipeline(sharedKeyCredential, options);\n }\n else {\n throw new Error(\"Account connection string is only supported in Node.js environment\");\n }\n }\n else if (extractedCreds.kind === \"SASConnString\") {\n url =\n appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)) +\n \"?\" +\n extractedCreds.accountSas;\n pipeline = newPipeline(new AnonymousCredential(), options);\n }\n else {\n throw new Error(\"Connection string must be either an Account connection string or a SAS connection string\");\n }\n }\n else {\n throw new Error(\"Expecting non-empty strings for containerName parameter\");\n }\n super(url, pipeline);\n this._containerName = this.getContainerNameFromUrl();\n this.containerContext = new Container(this.storageClientContext);\n }\n /**\n * The name of the container.\n */\n get containerName() {\n return this._containerName;\n }\n /**\n * Creates a new container under the specified account. If the container with\n * the same name already exists, the operation fails.\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/create-container\n *\n * @param options - Options to Container Create operation.\n *\n *\n * Example usage:\n *\n * ```js\n * const containerClient = blobServiceClient.getContainerClient(\"\");\n * const createContainerResponse = await containerClient.create();\n * console.log(\"Container was created successfully\", createContainerResponse.requestId);\n * ```\n */\n async create(options = {}) {\n const { span, updatedOptions } = createSpan(\"ContainerClient-create\", options);\n try {\n // Spread operator in destructuring assignments,\n // this will filter out unwanted properties from the response object into result object\n return await this.containerContext.create(Object.assign(Object.assign({}, options), convertTracingToRequestOptionsBase(updatedOptions)));\n }\n catch (e) {\n span.setStatus({\n code: coreTracing.SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n }\n finally {\n span.end();\n }\n }\n /**\n * Creates a new container under the specified account. If the container with\n * the same name already exists, it is not changed.\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/create-container\n *\n * @param options -\n */\n async createIfNotExists(options = {}) {\n var _a, _b;\n const { span, updatedOptions } = createSpan(\"ContainerClient-createIfNotExists\", options);\n try {\n const res = await this.create(updatedOptions);\n return Object.assign(Object.assign({ succeeded: true }, res), { _response: res._response });\n }\n catch (e) {\n if (((_a = e.details) === null || _a === void 0 ? void 0 : _a.errorCode) === \"ContainerAlreadyExists\") {\n span.setStatus({\n code: coreTracing.SpanStatusCode.ERROR,\n message: \"Expected exception when creating a container only if it does not already exist.\",\n });\n return Object.assign(Object.assign({ succeeded: false }, (_b = e.response) === null || _b === void 0 ? void 0 : _b.parsedHeaders), { _response: e.response });\n }\n span.setStatus({\n code: coreTracing.SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n }\n finally {\n span.end();\n }\n }\n /**\n * Returns true if the Azure container resource represented by this client exists; false otherwise.\n *\n * NOTE: use this function with care since an existing container might be deleted by other clients or\n * applications. Vice versa new containers with the same name might be added by other clients or\n * applications after this function completes.\n *\n * @param options -\n */\n async exists(options = {}) {\n const { span, updatedOptions } = createSpan(\"ContainerClient-exists\", options);\n try {\n await this.getProperties({\n abortSignal: options.abortSignal,\n tracingOptions: updatedOptions.tracingOptions,\n });\n return true;\n }\n catch (e) {\n if (e.statusCode === 404) {\n span.setStatus({\n code: coreTracing.SpanStatusCode.ERROR,\n message: \"Expected exception when checking container existence\",\n });\n return false;\n }\n span.setStatus({\n code: coreTracing.SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n }\n finally {\n span.end();\n }\n }\n /**\n * Creates a {@link BlobClient}\n *\n * @param blobName - A blob name\n * @returns A new BlobClient object for the given blob name.\n */\n getBlobClient(blobName) {\n return new BlobClient(appendToURLPath(this.url, EscapePath(blobName)), this.pipeline);\n }\n /**\n * Creates an {@link AppendBlobClient}\n *\n * @param blobName - An append blob name\n */\n getAppendBlobClient(blobName) {\n return new AppendBlobClient(appendToURLPath(this.url, EscapePath(blobName)), this.pipeline);\n }\n /**\n * Creates a {@link BlockBlobClient}\n *\n * @param blobName - A block blob name\n *\n *\n * Example usage:\n *\n * ```js\n * const content = \"Hello world!\";\n *\n * const blockBlobClient = containerClient.getBlockBlobClient(\"\");\n * const uploadBlobResponse = await blockBlobClient.upload(content, content.length);\n * ```\n */\n getBlockBlobClient(blobName) {\n return new BlockBlobClient(appendToURLPath(this.url, EscapePath(blobName)), this.pipeline);\n }\n /**\n * Creates a {@link PageBlobClient}\n *\n * @param blobName - A page blob name\n */\n getPageBlobClient(blobName) {\n return new PageBlobClient(appendToURLPath(this.url, EscapePath(blobName)), this.pipeline);\n }\n /**\n * Returns all user-defined metadata and system properties for the specified\n * container. The data returned does not include the container's list of blobs.\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/get-container-properties\n *\n * WARNING: The `metadata` object returned in the response will have its keys in lowercase, even if\n * they originally contained uppercase characters. This differs from the metadata keys returned by\n * the `listContainers` method of {@link BlobServiceClient} using the `includeMetadata` option, which\n * will retain their original casing.\n *\n * @param options - Options to Container Get Properties operation.\n */\n async getProperties(options = {}) {\n if (!options.conditions) {\n options.conditions = {};\n }\n const { span, updatedOptions } = createSpan(\"ContainerClient-getProperties\", options);\n try {\n return await this.containerContext.getProperties(Object.assign(Object.assign({ abortSignal: options.abortSignal }, options.conditions), convertTracingToRequestOptionsBase(updatedOptions)));\n }\n catch (e) {\n span.setStatus({\n code: coreTracing.SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n }\n finally {\n span.end();\n }\n }\n /**\n * Marks the specified container for deletion. The container and any blobs\n * contained within it are later deleted during garbage collection.\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/delete-container\n *\n * @param options - Options to Container Delete operation.\n */\n async delete(options = {}) {\n if (!options.conditions) {\n options.conditions = {};\n }\n const { span, updatedOptions } = createSpan(\"ContainerClient-delete\", options);\n try {\n return await this.containerContext.delete(Object.assign({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, modifiedAccessConditions: options.conditions }, convertTracingToRequestOptionsBase(updatedOptions)));\n }\n catch (e) {\n span.setStatus({\n code: coreTracing.SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n }\n finally {\n span.end();\n }\n }\n /**\n * Marks the specified container for deletion if it exists. The container and any blobs\n * contained within it are later deleted during garbage collection.\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/delete-container\n *\n * @param options - Options to Container Delete operation.\n */\n async deleteIfExists(options = {}) {\n var _a, _b;\n const { span, updatedOptions } = createSpan(\"ContainerClient-deleteIfExists\", options);\n try {\n const res = await this.delete(updatedOptions);\n return Object.assign(Object.assign({ succeeded: true }, res), { _response: res._response });\n }\n catch (e) {\n if (((_a = e.details) === null || _a === void 0 ? void 0 : _a.errorCode) === \"ContainerNotFound\") {\n span.setStatus({\n code: coreTracing.SpanStatusCode.ERROR,\n message: \"Expected exception when deleting a container only if it exists.\",\n });\n return Object.assign(Object.assign({ succeeded: false }, (_b = e.response) === null || _b === void 0 ? void 0 : _b.parsedHeaders), { _response: e.response });\n }\n span.setStatus({\n code: coreTracing.SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n }\n finally {\n span.end();\n }\n }\n /**\n * Sets one or more user-defined name-value pairs for the specified container.\n *\n * If no option provided, or no metadata defined in the parameter, the container\n * metadata will be removed.\n *\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/set-container-metadata\n *\n * @param metadata - Replace existing metadata with this value.\n * If no value provided the existing metadata will be removed.\n * @param options - Options to Container Set Metadata operation.\n */\n async setMetadata(metadata, options = {}) {\n if (!options.conditions) {\n options.conditions = {};\n }\n if (options.conditions.ifUnmodifiedSince) {\n throw new RangeError(\"the IfUnmodifiedSince must have their default values because they are ignored by the blob service\");\n }\n const { span, updatedOptions } = createSpan(\"ContainerClient-setMetadata\", options);\n try {\n return await this.containerContext.setMetadata(Object.assign({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, metadata, modifiedAccessConditions: options.conditions }, convertTracingToRequestOptionsBase(updatedOptions)));\n }\n catch (e) {\n span.setStatus({\n code: coreTracing.SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n }\n finally {\n span.end();\n }\n }\n /**\n * Gets the permissions for the specified container. The permissions indicate\n * whether container data may be accessed publicly.\n *\n * WARNING: JavaScript Date will potentially lose precision when parsing startsOn and expiresOn strings.\n * For example, new Date(\"2018-12-31T03:44:23.8827891Z\").toISOString() will get \"2018-12-31T03:44:23.882Z\".\n *\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/get-container-acl\n *\n * @param options - Options to Container Get Access Policy operation.\n */\n async getAccessPolicy(options = {}) {\n if (!options.conditions) {\n options.conditions = {};\n }\n const { span, updatedOptions } = createSpan(\"ContainerClient-getAccessPolicy\", options);\n try {\n const response = await this.containerContext.getAccessPolicy(Object.assign({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions }, convertTracingToRequestOptionsBase(updatedOptions)));\n const res = {\n _response: response._response,\n blobPublicAccess: response.blobPublicAccess,\n date: response.date,\n etag: response.etag,\n errorCode: response.errorCode,\n lastModified: response.lastModified,\n requestId: response.requestId,\n clientRequestId: response.clientRequestId,\n signedIdentifiers: [],\n version: response.version,\n };\n for (const identifier of response) {\n let accessPolicy = undefined;\n if (identifier.accessPolicy) {\n accessPolicy = {\n permissions: identifier.accessPolicy.permissions,\n };\n if (identifier.accessPolicy.expiresOn) {\n accessPolicy.expiresOn = new Date(identifier.accessPolicy.expiresOn);\n }\n if (identifier.accessPolicy.startsOn) {\n accessPolicy.startsOn = new Date(identifier.accessPolicy.startsOn);\n }\n }\n res.signedIdentifiers.push({\n accessPolicy,\n id: identifier.id,\n });\n }\n return res;\n }\n catch (e) {\n span.setStatus({\n code: coreTracing.SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n }\n finally {\n span.end();\n }\n }\n /**\n * Sets the permissions for the specified container. The permissions indicate\n * whether blobs in a container may be accessed publicly.\n *\n * When you set permissions for a container, the existing permissions are replaced.\n * If no access or containerAcl provided, the existing container ACL will be\n * removed.\n *\n * When you establish a stored access policy on a container, it may take up to 30 seconds to take effect.\n * During this interval, a shared access signature that is associated with the stored access policy will\n * fail with status code 403 (Forbidden), until the access policy becomes active.\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/set-container-acl\n *\n * @param access - The level of public access to data in the container.\n * @param containerAcl - Array of elements each having a unique Id and details of the access policy.\n * @param options - Options to Container Set Access Policy operation.\n */\n async setAccessPolicy(access, containerAcl, options = {}) {\n options.conditions = options.conditions || {};\n const { span, updatedOptions } = createSpan(\"ContainerClient-setAccessPolicy\", options);\n try {\n const acl = [];\n for (const identifier of containerAcl || []) {\n acl.push({\n accessPolicy: {\n expiresOn: identifier.accessPolicy.expiresOn\n ? truncatedISO8061Date(identifier.accessPolicy.expiresOn)\n : \"\",\n permissions: identifier.accessPolicy.permissions,\n startsOn: identifier.accessPolicy.startsOn\n ? truncatedISO8061Date(identifier.accessPolicy.startsOn)\n : \"\",\n },\n id: identifier.id,\n });\n }\n return await this.containerContext.setAccessPolicy(Object.assign({ abortSignal: options.abortSignal, access, containerAcl: acl, leaseAccessConditions: options.conditions, modifiedAccessConditions: options.conditions }, convertTracingToRequestOptionsBase(updatedOptions)));\n }\n catch (e) {\n span.setStatus({\n code: coreTracing.SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n }\n finally {\n span.end();\n }\n }\n /**\n * Get a {@link BlobLeaseClient} that manages leases on the container.\n *\n * @param proposeLeaseId - Initial proposed lease Id.\n * @returns A new BlobLeaseClient object for managing leases on the container.\n */\n getBlobLeaseClient(proposeLeaseId) {\n return new BlobLeaseClient(this, proposeLeaseId);\n }\n /**\n * Creates a new block blob, or updates the content of an existing block blob.\n *\n * Updating an existing block blob overwrites any existing metadata on the blob.\n * Partial updates are not supported; the content of the existing blob is\n * overwritten with the new content. To perform a partial update of a block blob's,\n * use {@link BlockBlobClient.stageBlock} and {@link BlockBlobClient.commitBlockList}.\n *\n * This is a non-parallel uploading method, please use {@link BlockBlobClient.uploadFile},\n * {@link BlockBlobClient.uploadStream} or {@link BlockBlobClient.uploadBrowserData} for better\n * performance with concurrency uploading.\n *\n * @see https://docs.microsoft.com/rest/api/storageservices/put-blob\n *\n * @param blobName - Name of the block blob to create or update.\n * @param body - Blob, string, ArrayBuffer, ArrayBufferView or a function\n * which returns a new Readable stream whose offset is from data source beginning.\n * @param contentLength - Length of body in bytes. Use Buffer.byteLength() to calculate body length for a\n * string including non non-Base64/Hex-encoded characters.\n * @param options - Options to configure the Block Blob Upload operation.\n * @returns Block Blob upload response data and the corresponding BlockBlobClient instance.\n */\n async uploadBlockBlob(blobName, body, contentLength, options = {}) {\n const { span, updatedOptions } = createSpan(\"ContainerClient-uploadBlockBlob\", options);\n try {\n const blockBlobClient = this.getBlockBlobClient(blobName);\n const response = await blockBlobClient.upload(body, contentLength, updatedOptions);\n return {\n blockBlobClient,\n response,\n };\n }\n catch (e) {\n span.setStatus({\n code: coreTracing.SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n }\n finally {\n span.end();\n }\n }\n /**\n * Marks the specified blob or snapshot for deletion. The blob is later deleted\n * during garbage collection. Note that in order to delete a blob, you must delete\n * all of its snapshots. You can delete both at the same time with the Delete\n * Blob operation.\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/delete-blob\n *\n * @param blobName -\n * @param options - Options to Blob Delete operation.\n * @returns Block blob deletion response data.\n */\n async deleteBlob(blobName, options = {}) {\n const { span, updatedOptions } = createSpan(\"ContainerClient-deleteBlob\", options);\n try {\n let blobClient = this.getBlobClient(blobName);\n if (options.versionId) {\n blobClient = blobClient.withVersion(options.versionId);\n }\n return await blobClient.delete(updatedOptions);\n }\n catch (e) {\n span.setStatus({\n code: coreTracing.SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n }\n finally {\n span.end();\n }\n }\n /**\n * listBlobFlatSegment returns a single segment of blobs starting from the\n * specified Marker. Use an empty Marker to start enumeration from the beginning.\n * After getting a segment, process it, and then call listBlobsFlatSegment again\n * (passing the the previously-returned Marker) to get the next segment.\n * @see https://docs.microsoft.com/rest/api/storageservices/list-blobs\n *\n * @param marker - A string value that identifies the portion of the list to be returned with the next list operation.\n * @param options - Options to Container List Blob Flat Segment operation.\n */\n async listBlobFlatSegment(marker, options = {}) {\n const { span, updatedOptions } = createSpan(\"ContainerClient-listBlobFlatSegment\", options);\n try {\n const response = await this.containerContext.listBlobFlatSegment(Object.assign(Object.assign({ marker }, options), convertTracingToRequestOptionsBase(updatedOptions)));\n response.segment.blobItems = [];\n if (response.segment[\"Blob\"] !== undefined) {\n response.segment.blobItems = ProcessBlobItems(response.segment[\"Blob\"]);\n }\n const wrappedResponse = Object.assign(Object.assign({}, response), { _response: Object.assign(Object.assign({}, response._response), { parsedBody: ConvertInternalResponseOfListBlobFlat(response._response.parsedBody) }), segment: Object.assign(Object.assign({}, response.segment), { blobItems: response.segment.blobItems.map((blobItemInteral) => {\n const blobItem = Object.assign(Object.assign({}, blobItemInteral), { name: BlobNameToString(blobItemInteral.name), tags: toTags(blobItemInteral.blobTags), objectReplicationSourceProperties: parseObjectReplicationRecord(blobItemInteral.objectReplicationMetadata) });\n return blobItem;\n }) }) });\n return wrappedResponse;\n }\n catch (e) {\n span.setStatus({\n code: coreTracing.SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n }\n finally {\n span.end();\n }\n }\n /**\n * listBlobHierarchySegment returns a single segment of blobs starting from\n * the specified Marker. Use an empty Marker to start enumeration from the\n * beginning. After getting a segment, process it, and then call listBlobsHierarchicalSegment\n * again (passing the the previously-returned Marker) to get the next segment.\n * @see https://docs.microsoft.com/rest/api/storageservices/list-blobs\n *\n * @param delimiter - The character or string used to define the virtual hierarchy\n * @param marker - A string value that identifies the portion of the list to be returned with the next list operation.\n * @param options - Options to Container List Blob Hierarchy Segment operation.\n */\n async listBlobHierarchySegment(delimiter, marker, options = {}) {\n var _a;\n const { span, updatedOptions } = createSpan(\"ContainerClient-listBlobHierarchySegment\", options);\n try {\n const response = await this.containerContext.listBlobHierarchySegment(delimiter, Object.assign(Object.assign({ marker }, options), convertTracingToRequestOptionsBase(updatedOptions)));\n response.segment.blobItems = [];\n if (response.segment[\"Blob\"] !== undefined) {\n response.segment.blobItems = ProcessBlobItems(response.segment[\"Blob\"]);\n }\n response.segment.blobPrefixes = [];\n if (response.segment[\"BlobPrefix\"] !== undefined) {\n response.segment.blobPrefixes = ProcessBlobPrefixes(response.segment[\"BlobPrefix\"]);\n }\n const wrappedResponse = Object.assign(Object.assign({}, response), { _response: Object.assign(Object.assign({}, response._response), { parsedBody: ConvertInternalResponseOfListBlobHierarchy(response._response.parsedBody) }), segment: Object.assign(Object.assign({}, response.segment), { blobItems: response.segment.blobItems.map((blobItemInteral) => {\n const blobItem = Object.assign(Object.assign({}, blobItemInteral), { name: BlobNameToString(blobItemInteral.name), tags: toTags(blobItemInteral.blobTags), objectReplicationSourceProperties: parseObjectReplicationRecord(blobItemInteral.objectReplicationMetadata) });\n return blobItem;\n }), blobPrefixes: (_a = response.segment.blobPrefixes) === null || _a === void 0 ? void 0 : _a.map((blobPrefixInternal) => {\n const blobPrefix = {\n name: BlobNameToString(blobPrefixInternal.name),\n };\n return blobPrefix;\n }) }) });\n return wrappedResponse;\n }\n catch (e) {\n span.setStatus({\n code: coreTracing.SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n }\n finally {\n span.end();\n }\n }\n /**\n * Returns an AsyncIterableIterator for ContainerListBlobFlatSegmentResponse\n *\n * @param marker - A string value that identifies the portion of\n * the list of blobs to be returned with the next listing operation. The\n * operation returns the ContinuationToken value within the response body if the\n * listing operation did not return all blobs remaining to be listed\n * with the current page. The ContinuationToken value can be used as the value for\n * the marker parameter in a subsequent call to request the next page of list\n * items. The marker value is opaque to the client.\n * @param options - Options to list blobs operation.\n */\n listSegments(marker, options = {}) {\n return tslib.__asyncGenerator(this, arguments, function* listSegments_1() {\n let listBlobsFlatSegmentResponse;\n if (!!marker || marker === undefined) {\n do {\n listBlobsFlatSegmentResponse = yield tslib.__await(this.listBlobFlatSegment(marker, options));\n marker = listBlobsFlatSegmentResponse.continuationToken;\n yield yield tslib.__await(yield tslib.__await(listBlobsFlatSegmentResponse));\n } while (marker);\n }\n });\n }\n /**\n * Returns an AsyncIterableIterator of {@link BlobItem} objects\n *\n * @param options - Options to list blobs operation.\n */\n listItems(options = {}) {\n return tslib.__asyncGenerator(this, arguments, function* listItems_1() {\n var e_1, _a;\n let marker;\n try {\n for (var _b = tslib.__asyncValues(this.listSegments(marker, options)), _c; _c = yield tslib.__await(_b.next()), !_c.done;) {\n const listBlobsFlatSegmentResponse = _c.value;\n yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(listBlobsFlatSegmentResponse.segment.blobItems)));\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (_c && !_c.done && (_a = _b.return)) yield tslib.__await(_a.call(_b));\n }\n finally { if (e_1) throw e_1.error; }\n }\n });\n }\n /**\n * Returns an async iterable iterator to list all the blobs\n * under the specified account.\n *\n * .byPage() returns an async iterable iterator to list the blobs in pages.\n *\n * Example using `for await` syntax:\n *\n * ```js\n * // Get the containerClient before you run these snippets,\n * // Can be obtained from `blobServiceClient.getContainerClient(\"\");`\n * let i = 1;\n * for await (const blob of containerClient.listBlobsFlat()) {\n * console.log(`Blob ${i++}: ${blob.name}`);\n * }\n * ```\n *\n * Example using `iter.next()`:\n *\n * ```js\n * let i = 1;\n * let iter = containerClient.listBlobsFlat();\n * let blobItem = await iter.next();\n * while (!blobItem.done) {\n * console.log(`Blob ${i++}: ${blobItem.value.name}`);\n * blobItem = await iter.next();\n * }\n * ```\n *\n * Example using `byPage()`:\n *\n * ```js\n * // passing optional maxPageSize in the page settings\n * let i = 1;\n * for await (const response of containerClient.listBlobsFlat().byPage({ maxPageSize: 20 })) {\n * for (const blob of response.segment.blobItems) {\n * console.log(`Blob ${i++}: ${blob.name}`);\n * }\n * }\n * ```\n *\n * Example using paging with a marker:\n *\n * ```js\n * let i = 1;\n * let iterator = containerClient.listBlobsFlat().byPage({ maxPageSize: 2 });\n * let response = (await iterator.next()).value;\n *\n * // Prints 2 blob names\n * for (const blob of response.segment.blobItems) {\n * console.log(`Blob ${i++}: ${blob.name}`);\n * }\n *\n * // Gets next marker\n * let marker = response.continuationToken;\n *\n * // Passing next marker as continuationToken\n *\n * iterator = containerClient.listBlobsFlat().byPage({ continuationToken: marker, maxPageSize: 10 });\n * response = (await iterator.next()).value;\n *\n * // Prints 10 blob names\n * for (const blob of response.segment.blobItems) {\n * console.log(`Blob ${i++}: ${blob.name}`);\n * }\n * ```\n *\n * @param options - Options to list blobs.\n * @returns An asyncIterableIterator that supports paging.\n */\n listBlobsFlat(options = {}) {\n const include = [];\n if (options.includeCopy) {\n include.push(\"copy\");\n }\n if (options.includeDeleted) {\n include.push(\"deleted\");\n }\n if (options.includeMetadata) {\n include.push(\"metadata\");\n }\n if (options.includeSnapshots) {\n include.push(\"snapshots\");\n }\n if (options.includeVersions) {\n include.push(\"versions\");\n }\n if (options.includeUncommitedBlobs) {\n include.push(\"uncommittedblobs\");\n }\n if (options.includeTags) {\n include.push(\"tags\");\n }\n if (options.includeDeletedWithVersions) {\n include.push(\"deletedwithversions\");\n }\n if (options.includeImmutabilityPolicy) {\n include.push(\"immutabilitypolicy\");\n }\n if (options.includeLegalHold) {\n include.push(\"legalhold\");\n }\n if (options.prefix === \"\") {\n options.prefix = undefined;\n }\n const updatedOptions = Object.assign(Object.assign({}, options), (include.length > 0 ? { include: include } : {}));\n // AsyncIterableIterator to iterate over blobs\n const iter = this.listItems(updatedOptions);\n return {\n /**\n * The next method, part of the iteration protocol\n */\n next() {\n return iter.next();\n },\n /**\n * The connection to the async iterator, part of the iteration protocol\n */\n [Symbol.asyncIterator]() {\n return this;\n },\n /**\n * Return an AsyncIterableIterator that works a page at a time\n */\n byPage: (settings = {}) => {\n return this.listSegments(settings.continuationToken, Object.assign({ maxPageSize: settings.maxPageSize }, updatedOptions));\n },\n };\n }\n /**\n * Returns an AsyncIterableIterator for ContainerListBlobHierarchySegmentResponse\n *\n * @param delimiter - The character or string used to define the virtual hierarchy\n * @param marker - A string value that identifies the portion of\n * the list of blobs to be returned with the next listing operation. The\n * operation returns the ContinuationToken value within the response body if the\n * listing operation did not return all blobs remaining to be listed\n * with the current page. The ContinuationToken value can be used as the value for\n * the marker parameter in a subsequent call to request the next page of list\n * items. The marker value is opaque to the client.\n * @param options - Options to list blobs operation.\n */\n listHierarchySegments(delimiter, marker, options = {}) {\n return tslib.__asyncGenerator(this, arguments, function* listHierarchySegments_1() {\n let listBlobsHierarchySegmentResponse;\n if (!!marker || marker === undefined) {\n do {\n listBlobsHierarchySegmentResponse = yield tslib.__await(this.listBlobHierarchySegment(delimiter, marker, options));\n marker = listBlobsHierarchySegmentResponse.continuationToken;\n yield yield tslib.__await(yield tslib.__await(listBlobsHierarchySegmentResponse));\n } while (marker);\n }\n });\n }\n /**\n * Returns an AsyncIterableIterator for {@link BlobPrefix} and {@link BlobItem} objects.\n *\n * @param delimiter - The character or string used to define the virtual hierarchy\n * @param options - Options to list blobs operation.\n */\n listItemsByHierarchy(delimiter, options = {}) {\n return tslib.__asyncGenerator(this, arguments, function* listItemsByHierarchy_1() {\n var e_2, _a;\n let marker;\n try {\n for (var _b = tslib.__asyncValues(this.listHierarchySegments(delimiter, marker, options)), _c; _c = yield tslib.__await(_b.next()), !_c.done;) {\n const listBlobsHierarchySegmentResponse = _c.value;\n const segment = listBlobsHierarchySegmentResponse.segment;\n if (segment.blobPrefixes) {\n for (const prefix of segment.blobPrefixes) {\n yield yield tslib.__await(Object.assign({ kind: \"prefix\" }, prefix));\n }\n }\n for (const blob of segment.blobItems) {\n yield yield tslib.__await(Object.assign({ kind: \"blob\" }, blob));\n }\n }\n }\n catch (e_2_1) { e_2 = { error: e_2_1 }; }\n finally {\n try {\n if (_c && !_c.done && (_a = _b.return)) yield tslib.__await(_a.call(_b));\n }\n finally { if (e_2) throw e_2.error; }\n }\n });\n }\n /**\n * Returns an async iterable iterator to list all the blobs by hierarchy.\n * under the specified account.\n *\n * .byPage() returns an async iterable iterator to list the blobs by hierarchy in pages.\n *\n * Example using `for await` syntax:\n *\n * ```js\n * for await (const item of containerClient.listBlobsByHierarchy(\"/\")) {\n * if (item.kind === \"prefix\") {\n * console.log(`\\tBlobPrefix: ${item.name}`);\n * } else {\n * console.log(`\\tBlobItem: name - ${item.name}`);\n * }\n * }\n * ```\n *\n * Example using `iter.next()`:\n *\n * ```js\n * let iter = containerClient.listBlobsByHierarchy(\"/\", { prefix: \"prefix1/\" });\n * let entity = await iter.next();\n * while (!entity.done) {\n * let item = entity.value;\n * if (item.kind === \"prefix\") {\n * console.log(`\\tBlobPrefix: ${item.name}`);\n * } else {\n * console.log(`\\tBlobItem: name - ${item.name}`);\n * }\n * entity = await iter.next();\n * }\n * ```\n *\n * Example using `byPage()`:\n *\n * ```js\n * console.log(\"Listing blobs by hierarchy by page\");\n * for await (const response of containerClient.listBlobsByHierarchy(\"/\").byPage()) {\n * const segment = response.segment;\n * if (segment.blobPrefixes) {\n * for (const prefix of segment.blobPrefixes) {\n * console.log(`\\tBlobPrefix: ${prefix.name}`);\n * }\n * }\n * for (const blob of response.segment.blobItems) {\n * console.log(`\\tBlobItem: name - ${blob.name}`);\n * }\n * }\n * ```\n *\n * Example using paging with a max page size:\n *\n * ```js\n * console.log(\"Listing blobs by hierarchy by page, specifying a prefix and a max page size\");\n *\n * let i = 1;\n * for await (const response of containerClient\n * .listBlobsByHierarchy(\"/\", { prefix: \"prefix2/sub1/\" })\n * .byPage({ maxPageSize: 2 })) {\n * console.log(`Page ${i++}`);\n * const segment = response.segment;\n *\n * if (segment.blobPrefixes) {\n * for (const prefix of segment.blobPrefixes) {\n * console.log(`\\tBlobPrefix: ${prefix.name}`);\n * }\n * }\n *\n * for (const blob of response.segment.blobItems) {\n * console.log(`\\tBlobItem: name - ${blob.name}`);\n * }\n * }\n * ```\n *\n * @param delimiter - The character or string used to define the virtual hierarchy\n * @param options - Options to list blobs operation.\n */\n listBlobsByHierarchy(delimiter, options = {}) {\n if (delimiter === \"\") {\n throw new RangeError(\"delimiter should contain one or more characters\");\n }\n const include = [];\n if (options.includeCopy) {\n include.push(\"copy\");\n }\n if (options.includeDeleted) {\n include.push(\"deleted\");\n }\n if (options.includeMetadata) {\n include.push(\"metadata\");\n }\n if (options.includeSnapshots) {\n include.push(\"snapshots\");\n }\n if (options.includeVersions) {\n include.push(\"versions\");\n }\n if (options.includeUncommitedBlobs) {\n include.push(\"uncommittedblobs\");\n }\n if (options.includeTags) {\n include.push(\"tags\");\n }\n if (options.includeDeletedWithVersions) {\n include.push(\"deletedwithversions\");\n }\n if (options.includeImmutabilityPolicy) {\n include.push(\"immutabilitypolicy\");\n }\n if (options.includeLegalHold) {\n include.push(\"legalhold\");\n }\n if (options.prefix === \"\") {\n options.prefix = undefined;\n }\n const updatedOptions = Object.assign(Object.assign({}, options), (include.length > 0 ? { include: include } : {}));\n // AsyncIterableIterator to iterate over blob prefixes and blobs\n const iter = this.listItemsByHierarchy(delimiter, updatedOptions);\n return {\n /**\n * The next method, part of the iteration protocol\n */\n async next() {\n return iter.next();\n },\n /**\n * The connection to the async iterator, part of the iteration protocol\n */\n [Symbol.asyncIterator]() {\n return this;\n },\n /**\n * Return an AsyncIterableIterator that works a page at a time\n */\n byPage: (settings = {}) => {\n return this.listHierarchySegments(delimiter, settings.continuationToken, Object.assign({ maxPageSize: settings.maxPageSize }, updatedOptions));\n },\n };\n }\n /**\n * The Filter Blobs operation enables callers to list blobs in the container whose tags\n * match a given search expression.\n *\n * @param tagFilterSqlExpression - The where parameter enables the caller to query blobs whose tags match a given expression.\n * The given expression must evaluate to true for a blob to be returned in the results.\n * The[OData - ABNF] filter syntax rule defines the formal grammar for the value of the where query parameter;\n * however, only a subset of the OData filter syntax is supported in the Blob service.\n * @param marker - A string value that identifies the portion of\n * the list of blobs to be returned with the next listing operation. The\n * operation returns the continuationToken value within the response body if the\n * listing operation did not return all blobs remaining to be listed\n * with the current page. The continuationToken value can be used as the value for\n * the marker parameter in a subsequent call to request the next page of list\n * items. The marker value is opaque to the client.\n * @param options - Options to find blobs by tags.\n */\n async findBlobsByTagsSegment(tagFilterSqlExpression, marker, options = {}) {\n const { span, updatedOptions } = createSpan(\"ContainerClient-findBlobsByTagsSegment\", options);\n try {\n const response = await this.containerContext.filterBlobs(Object.assign({ abortSignal: options.abortSignal, where: tagFilterSqlExpression, marker, maxPageSize: options.maxPageSize }, convertTracingToRequestOptionsBase(updatedOptions)));\n const wrappedResponse = Object.assign(Object.assign({}, response), { _response: response._response, blobs: response.blobs.map((blob) => {\n var _a;\n let tagValue = \"\";\n if (((_a = blob.tags) === null || _a === void 0 ? void 0 : _a.blobTagSet.length) === 1) {\n tagValue = blob.tags.blobTagSet[0].value;\n }\n return Object.assign(Object.assign({}, blob), { tags: toTags(blob.tags), tagValue });\n }) });\n return wrappedResponse;\n }\n catch (e) {\n span.setStatus({\n code: coreTracing.SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n }\n finally {\n span.end();\n }\n }\n /**\n * Returns an AsyncIterableIterator for ContainerFindBlobsByTagsSegmentResponse.\n *\n * @param tagFilterSqlExpression - The where parameter enables the caller to query blobs whose tags match a given expression.\n * The given expression must evaluate to true for a blob to be returned in the results.\n * The[OData - ABNF] filter syntax rule defines the formal grammar for the value of the where query parameter;\n * however, only a subset of the OData filter syntax is supported in the Blob service.\n * @param marker - A string value that identifies the portion of\n * the list of blobs to be returned with the next listing operation. The\n * operation returns the continuationToken value within the response body if the\n * listing operation did not return all blobs remaining to be listed\n * with the current page. The continuationToken value can be used as the value for\n * the marker parameter in a subsequent call to request the next page of list\n * items. The marker value is opaque to the client.\n * @param options - Options to find blobs by tags.\n */\n findBlobsByTagsSegments(tagFilterSqlExpression, marker, options = {}) {\n return tslib.__asyncGenerator(this, arguments, function* findBlobsByTagsSegments_1() {\n let response;\n if (!!marker || marker === undefined) {\n do {\n response = yield tslib.__await(this.findBlobsByTagsSegment(tagFilterSqlExpression, marker, options));\n response.blobs = response.blobs || [];\n marker = response.continuationToken;\n yield yield tslib.__await(response);\n } while (marker);\n }\n });\n }\n /**\n * Returns an AsyncIterableIterator for blobs.\n *\n * @param tagFilterSqlExpression - The where parameter enables the caller to query blobs whose tags match a given expression.\n * The given expression must evaluate to true for a blob to be returned in the results.\n * The[OData - ABNF] filter syntax rule defines the formal grammar for the value of the where query parameter;\n * however, only a subset of the OData filter syntax is supported in the Blob service.\n * @param options - Options to findBlobsByTagsItems.\n */\n findBlobsByTagsItems(tagFilterSqlExpression, options = {}) {\n return tslib.__asyncGenerator(this, arguments, function* findBlobsByTagsItems_1() {\n var e_3, _a;\n let marker;\n try {\n for (var _b = tslib.__asyncValues(this.findBlobsByTagsSegments(tagFilterSqlExpression, marker, options)), _c; _c = yield tslib.__await(_b.next()), !_c.done;) {\n const segment = _c.value;\n yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(segment.blobs)));\n }\n }\n catch (e_3_1) { e_3 = { error: e_3_1 }; }\n finally {\n try {\n if (_c && !_c.done && (_a = _b.return)) yield tslib.__await(_a.call(_b));\n }\n finally { if (e_3) throw e_3.error; }\n }\n });\n }\n /**\n * Returns an async iterable iterator to find all blobs with specified tag\n * under the specified container.\n *\n * .byPage() returns an async iterable iterator to list the blobs in pages.\n *\n * Example using `for await` syntax:\n *\n * ```js\n * let i = 1;\n * for await (const blob of containerClient.findBlobsByTags(\"tagkey='tagvalue'\")) {\n * console.log(`Blob ${i++}: ${blob.name}`);\n * }\n * ```\n *\n * Example using `iter.next()`:\n *\n * ```js\n * let i = 1;\n * const iter = containerClient.findBlobsByTags(\"tagkey='tagvalue'\");\n * let blobItem = await iter.next();\n * while (!blobItem.done) {\n * console.log(`Blob ${i++}: ${blobItem.value.name}`);\n * blobItem = await iter.next();\n * }\n * ```\n *\n * Example using `byPage()`:\n *\n * ```js\n * // passing optional maxPageSize in the page settings\n * let i = 1;\n * for await (const response of containerClient.findBlobsByTags(\"tagkey='tagvalue'\").byPage({ maxPageSize: 20 })) {\n * if (response.blobs) {\n * for (const blob of response.blobs) {\n * console.log(`Blob ${i++}: ${blob.name}`);\n * }\n * }\n * }\n * ```\n *\n * Example using paging with a marker:\n *\n * ```js\n * let i = 1;\n * let iterator = containerClient.findBlobsByTags(\"tagkey='tagvalue'\").byPage({ maxPageSize: 2 });\n * let response = (await iterator.next()).value;\n *\n * // Prints 2 blob names\n * if (response.blobs) {\n * for (const blob of response.blobs) {\n * console.log(`Blob ${i++}: ${blob.name}`);\n * }\n * }\n *\n * // Gets next marker\n * let marker = response.continuationToken;\n * // Passing next marker as continuationToken\n * iterator = containerClient\n * .findBlobsByTags(\"tagkey='tagvalue'\")\n * .byPage({ continuationToken: marker, maxPageSize: 10 });\n * response = (await iterator.next()).value;\n *\n * // Prints blob names\n * if (response.blobs) {\n * for (const blob of response.blobs) {\n * console.log(`Blob ${i++}: ${blob.name}`);\n * }\n * }\n * ```\n *\n * @param tagFilterSqlExpression - The where parameter enables the caller to query blobs whose tags match a given expression.\n * The given expression must evaluate to true for a blob to be returned in the results.\n * The[OData - ABNF] filter syntax rule defines the formal grammar for the value of the where query parameter;\n * however, only a subset of the OData filter syntax is supported in the Blob service.\n * @param options - Options to find blobs by tags.\n */\n findBlobsByTags(tagFilterSqlExpression, options = {}) {\n // AsyncIterableIterator to iterate over blobs\n const listSegmentOptions = Object.assign({}, options);\n const iter = this.findBlobsByTagsItems(tagFilterSqlExpression, listSegmentOptions);\n return {\n /**\n * The next method, part of the iteration protocol\n */\n next() {\n return iter.next();\n },\n /**\n * The connection to the async iterator, part of the iteration protocol\n */\n [Symbol.asyncIterator]() {\n return this;\n },\n /**\n * Return an AsyncIterableIterator that works a page at a time\n */\n byPage: (settings = {}) => {\n return this.findBlobsByTagsSegments(tagFilterSqlExpression, settings.continuationToken, Object.assign({ maxPageSize: settings.maxPageSize }, listSegmentOptions));\n },\n };\n }\n getContainerNameFromUrl() {\n let containerName;\n try {\n // URL may look like the following\n // \"https://myaccount.blob.core.windows.net/mycontainer?sasString\";\n // \"https://myaccount.blob.core.windows.net/mycontainer\";\n // IPv4/IPv6 address hosts, Endpoints - `http://127.0.0.1:10000/devstoreaccount1/containername`\n // http://localhost:10001/devstoreaccount1/containername\n const parsedUrl = coreHttp.URLBuilder.parse(this.url);\n if (parsedUrl.getHost().split(\".\")[1] === \"blob\") {\n // \"https://myaccount.blob.core.windows.net/containername\".\n // \"https://customdomain.com/containername\".\n // .getPath() -> /containername\n containerName = parsedUrl.getPath().split(\"/\")[1];\n }\n else if (isIpEndpointStyle(parsedUrl)) {\n // IPv4/IPv6 address hosts... Example - http://192.0.0.10:10001/devstoreaccount1/containername\n // Single word domain without a [dot] in the endpoint... Example - http://localhost:10001/devstoreaccount1/containername\n // .getPath() -> /devstoreaccount1/containername\n containerName = parsedUrl.getPath().split(\"/\")[2];\n }\n else {\n // \"https://customdomain.com/containername\".\n // .getPath() -> /containername\n containerName = parsedUrl.getPath().split(\"/\")[1];\n }\n // decode the encoded containerName - to get all the special characters that might be present in it\n containerName = decodeURIComponent(containerName);\n if (!containerName) {\n throw new Error(\"Provided containerName is invalid.\");\n }\n return containerName;\n }\n catch (error) {\n throw new Error(\"Unable to extract containerName with provided information.\");\n }\n }\n /**\n * Only available for ContainerClient constructed with a shared key credential.\n *\n * Generates a Blob Container Service Shared Access Signature (SAS) URI based on the client properties\n * and parameters passed in. The SAS is signed by the shared key credential of the client.\n *\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/constructing-a-service-sas\n *\n * @param options - Optional parameters.\n * @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token.\n */\n generateSasUrl(options) {\n return new Promise((resolve) => {\n if (!(this.credential instanceof StorageSharedKeyCredential)) {\n throw new RangeError(\"Can only generate the SAS when the client is initialized with a shared key credential\");\n }\n const sas = generateBlobSASQueryParameters(Object.assign({ containerName: this._containerName }, options), this.credential).toString();\n resolve(appendToURLQuery(this.url, sas));\n });\n }\n /**\n * Creates a BlobBatchClient object to conduct batch operations.\n *\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/blob-batch\n *\n * @returns A new BlobBatchClient object for this container.\n */\n getBlobBatchClient() {\n return new BlobBatchClient(this.url, this.pipeline);\n }\n}\n\n// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n/**\n * ONLY AVAILABLE IN NODE.JS RUNTIME.\n *\n * This is a helper class to construct a string representing the permissions granted by an AccountSAS. Setting a value\n * to true means that any SAS which uses these permissions will grant permissions for that operation. Once all the\n * values are set, this should be serialized with toString and set as the permissions field on an\n * {@link AccountSASSignatureValues} object. It is possible to construct the permissions string without this class, but\n * the order of the permissions is particular and this class guarantees correctness.\n */\nclass AccountSASPermissions {\n constructor() {\n /**\n * Permission to read resources and list queues and tables granted.\n */\n this.read = false;\n /**\n * Permission to write resources granted.\n */\n this.write = false;\n /**\n * Permission to create blobs and files granted.\n */\n this.delete = false;\n /**\n * Permission to delete versions granted.\n */\n this.deleteVersion = false;\n /**\n * Permission to list blob containers, blobs, shares, directories, and files granted.\n */\n this.list = false;\n /**\n * Permission to add messages, table entities, and append to blobs granted.\n */\n this.add = false;\n /**\n * Permission to create blobs and files granted.\n */\n this.create = false;\n /**\n * Permissions to update messages and table entities granted.\n */\n this.update = false;\n /**\n * Permission to get and delete messages granted.\n */\n this.process = false;\n /**\n * Specfies Tag access granted.\n */\n this.tag = false;\n /**\n * Permission to filter blobs.\n */\n this.filter = false;\n /**\n * Permission to set immutability policy.\n */\n this.setImmutabilityPolicy = false;\n /**\n * Specifies that Permanent Delete is permitted.\n */\n this.permanentDelete = false;\n }\n /**\n * Parse initializes the AccountSASPermissions fields from a string.\n *\n * @param permissions -\n */\n static parse(permissions) {\n const accountSASPermissions = new AccountSASPermissions();\n for (const c of permissions) {\n switch (c) {\n case \"r\":\n accountSASPermissions.read = true;\n break;\n case \"w\":\n accountSASPermissions.write = true;\n break;\n case \"d\":\n accountSASPermissions.delete = true;\n break;\n case \"x\":\n accountSASPermissions.deleteVersion = true;\n break;\n case \"l\":\n accountSASPermissions.list = true;\n break;\n case \"a\":\n accountSASPermissions.add = true;\n break;\n case \"c\":\n accountSASPermissions.create = true;\n break;\n case \"u\":\n accountSASPermissions.update = true;\n break;\n case \"p\":\n accountSASPermissions.process = true;\n break;\n case \"t\":\n accountSASPermissions.tag = true;\n break;\n case \"f\":\n accountSASPermissions.filter = true;\n break;\n case \"i\":\n accountSASPermissions.setImmutabilityPolicy = true;\n break;\n case \"y\":\n accountSASPermissions.permanentDelete = true;\n break;\n default:\n throw new RangeError(`Invalid permission character: ${c}`);\n }\n }\n return accountSASPermissions;\n }\n /**\n * Creates a {@link AccountSASPermissions} from a raw object which contains same keys as it\n * and boolean values for them.\n *\n * @param permissionLike -\n */\n static from(permissionLike) {\n const accountSASPermissions = new AccountSASPermissions();\n if (permissionLike.read) {\n accountSASPermissions.read = true;\n }\n if (permissionLike.write) {\n accountSASPermissions.write = true;\n }\n if (permissionLike.delete) {\n accountSASPermissions.delete = true;\n }\n if (permissionLike.deleteVersion) {\n accountSASPermissions.deleteVersion = true;\n }\n if (permissionLike.filter) {\n accountSASPermissions.filter = true;\n }\n if (permissionLike.tag) {\n accountSASPermissions.tag = true;\n }\n if (permissionLike.list) {\n accountSASPermissions.list = true;\n }\n if (permissionLike.add) {\n accountSASPermissions.add = true;\n }\n if (permissionLike.create) {\n accountSASPermissions.create = true;\n }\n if (permissionLike.update) {\n accountSASPermissions.update = true;\n }\n if (permissionLike.process) {\n accountSASPermissions.process = true;\n }\n if (permissionLike.setImmutabilityPolicy) {\n accountSASPermissions.setImmutabilityPolicy = true;\n }\n if (permissionLike.permanentDelete) {\n accountSASPermissions.permanentDelete = true;\n }\n return accountSASPermissions;\n }\n /**\n * Produces the SAS permissions string for an Azure Storage account.\n * Call this method to set AccountSASSignatureValues Permissions field.\n *\n * Using this method will guarantee the resource types are in\n * an order accepted by the service.\n *\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/constructing-an-account-sas\n *\n */\n toString() {\n // The order of the characters should be as specified here to ensure correctness:\n // https://docs.microsoft.com/en-us/rest/api/storageservices/constructing-an-account-sas\n // Use a string array instead of string concatenating += operator for performance\n const permissions = [];\n if (this.read) {\n permissions.push(\"r\");\n }\n if (this.write) {\n permissions.push(\"w\");\n }\n if (this.delete) {\n permissions.push(\"d\");\n }\n if (this.deleteVersion) {\n permissions.push(\"x\");\n }\n if (this.filter) {\n permissions.push(\"f\");\n }\n if (this.tag) {\n permissions.push(\"t\");\n }\n if (this.list) {\n permissions.push(\"l\");\n }\n if (this.add) {\n permissions.push(\"a\");\n }\n if (this.create) {\n permissions.push(\"c\");\n }\n if (this.update) {\n permissions.push(\"u\");\n }\n if (this.process) {\n permissions.push(\"p\");\n }\n if (this.setImmutabilityPolicy) {\n permissions.push(\"i\");\n }\n if (this.permanentDelete) {\n permissions.push(\"y\");\n }\n return permissions.join(\"\");\n }\n}\n\n// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n/**\n * ONLY AVAILABLE IN NODE.JS RUNTIME.\n *\n * This is a helper class to construct a string representing the resources accessible by an AccountSAS. Setting a value\n * to true means that any SAS which uses these permissions will grant access to that resource type. Once all the\n * values are set, this should be serialized with toString and set as the resources field on an\n * {@link AccountSASSignatureValues} object. It is possible to construct the resources string without this class, but\n * the order of the resources is particular and this class guarantees correctness.\n */\nclass AccountSASResourceTypes {\n constructor() {\n /**\n * Permission to access service level APIs granted.\n */\n this.service = false;\n /**\n * Permission to access container level APIs (Blob Containers, Tables, Queues, File Shares) granted.\n */\n this.container = false;\n /**\n * Permission to access object level APIs (Blobs, Table Entities, Queue Messages, Files) granted.\n */\n this.object = false;\n }\n /**\n * Creates an {@link AccountSASResourceTypes} from the specified resource types string. This method will throw an\n * Error if it encounters a character that does not correspond to a valid resource type.\n *\n * @param resourceTypes -\n */\n static parse(resourceTypes) {\n const accountSASResourceTypes = new AccountSASResourceTypes();\n for (const c of resourceTypes) {\n switch (c) {\n case \"s\":\n accountSASResourceTypes.service = true;\n break;\n case \"c\":\n accountSASResourceTypes.container = true;\n break;\n case \"o\":\n accountSASResourceTypes.object = true;\n break;\n default:\n throw new RangeError(`Invalid resource type: ${c}`);\n }\n }\n return accountSASResourceTypes;\n }\n /**\n * Converts the given resource types to a string.\n *\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/constructing-an-account-sas\n *\n */\n toString() {\n const resourceTypes = [];\n if (this.service) {\n resourceTypes.push(\"s\");\n }\n if (this.container) {\n resourceTypes.push(\"c\");\n }\n if (this.object) {\n resourceTypes.push(\"o\");\n }\n return resourceTypes.join(\"\");\n }\n}\n\n// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n/**\n * ONLY AVAILABLE IN NODE.JS RUNTIME.\n *\n * This is a helper class to construct a string representing the services accessible by an AccountSAS. Setting a value\n * to true means that any SAS which uses these permissions will grant access to that service. Once all the\n * values are set, this should be serialized with toString and set as the services field on an\n * {@link AccountSASSignatureValues} object. It is possible to construct the services string without this class, but\n * the order of the services is particular and this class guarantees correctness.\n */\nclass AccountSASServices {\n constructor() {\n /**\n * Permission to access blob resources granted.\n */\n this.blob = false;\n /**\n * Permission to access file resources granted.\n */\n this.file = false;\n /**\n * Permission to access queue resources granted.\n */\n this.queue = false;\n /**\n * Permission to access table resources granted.\n */\n this.table = false;\n }\n /**\n * Creates an {@link AccountSASServices} from the specified services string. This method will throw an\n * Error if it encounters a character that does not correspond to a valid service.\n *\n * @param services -\n */\n static parse(services) {\n const accountSASServices = new AccountSASServices();\n for (const c of services) {\n switch (c) {\n case \"b\":\n accountSASServices.blob = true;\n break;\n case \"f\":\n accountSASServices.file = true;\n break;\n case \"q\":\n accountSASServices.queue = true;\n break;\n case \"t\":\n accountSASServices.table = true;\n break;\n default:\n throw new RangeError(`Invalid service character: ${c}`);\n }\n }\n return accountSASServices;\n }\n /**\n * Converts the given services to a string.\n *\n */\n toString() {\n const services = [];\n if (this.blob) {\n services.push(\"b\");\n }\n if (this.table) {\n services.push(\"t\");\n }\n if (this.queue) {\n services.push(\"q\");\n }\n if (this.file) {\n services.push(\"f\");\n }\n return services.join(\"\");\n }\n}\n\n// Copyright (c) Microsoft Corporation.\n/**\n * ONLY AVAILABLE IN NODE.JS RUNTIME.\n *\n * Generates a {@link SASQueryParameters} object which contains all SAS query parameters needed to make an actual\n * REST request.\n *\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/constructing-an-account-sas\n *\n * @param accountSASSignatureValues -\n * @param sharedKeyCredential -\n */\nfunction generateAccountSASQueryParameters(accountSASSignatureValues, sharedKeyCredential) {\n const version = accountSASSignatureValues.version\n ? accountSASSignatureValues.version\n : SERVICE_VERSION;\n if (accountSASSignatureValues.permissions &&\n accountSASSignatureValues.permissions.setImmutabilityPolicy &&\n version < \"2020-08-04\") {\n throw RangeError(\"'version' must be >= '2020-08-04' when provided 'i' permission.\");\n }\n if (accountSASSignatureValues.permissions &&\n accountSASSignatureValues.permissions.deleteVersion &&\n version < \"2019-10-10\") {\n throw RangeError(\"'version' must be >= '2019-10-10' when provided 'x' permission.\");\n }\n if (accountSASSignatureValues.permissions &&\n accountSASSignatureValues.permissions.permanentDelete &&\n version < \"2019-10-10\") {\n throw RangeError(\"'version' must be >= '2019-10-10' when provided 'y' permission.\");\n }\n if (accountSASSignatureValues.permissions &&\n accountSASSignatureValues.permissions.tag &&\n version < \"2019-12-12\") {\n throw RangeError(\"'version' must be >= '2019-12-12' when provided 't' permission.\");\n }\n if (accountSASSignatureValues.permissions &&\n accountSASSignatureValues.permissions.filter &&\n version < \"2019-12-12\") {\n throw RangeError(\"'version' must be >= '2019-12-12' when provided 'f' permission.\");\n }\n if (accountSASSignatureValues.encryptionScope && version < \"2020-12-06\") {\n throw RangeError(\"'version' must be >= '2020-12-06' when provided 'encryptionScope' in SAS.\");\n }\n const parsedPermissions = AccountSASPermissions.parse(accountSASSignatureValues.permissions.toString());\n const parsedServices = AccountSASServices.parse(accountSASSignatureValues.services).toString();\n const parsedResourceTypes = AccountSASResourceTypes.parse(accountSASSignatureValues.resourceTypes).toString();\n let stringToSign;\n if (version >= \"2020-12-06\") {\n stringToSign = [\n sharedKeyCredential.accountName,\n parsedPermissions,\n parsedServices,\n parsedResourceTypes,\n accountSASSignatureValues.startsOn\n ? truncatedISO8061Date(accountSASSignatureValues.startsOn, false)\n : \"\",\n truncatedISO8061Date(accountSASSignatureValues.expiresOn, false),\n accountSASSignatureValues.ipRange ? ipRangeToString(accountSASSignatureValues.ipRange) : \"\",\n accountSASSignatureValues.protocol ? accountSASSignatureValues.protocol : \"\",\n version,\n accountSASSignatureValues.encryptionScope ? accountSASSignatureValues.encryptionScope : \"\",\n \"\", // Account SAS requires an additional newline character\n ].join(\"\\n\");\n }\n else {\n stringToSign = [\n sharedKeyCredential.accountName,\n parsedPermissions,\n parsedServices,\n parsedResourceTypes,\n accountSASSignatureValues.startsOn\n ? truncatedISO8061Date(accountSASSignatureValues.startsOn, false)\n : \"\",\n truncatedISO8061Date(accountSASSignatureValues.expiresOn, false),\n accountSASSignatureValues.ipRange ? ipRangeToString(accountSASSignatureValues.ipRange) : \"\",\n accountSASSignatureValues.protocol ? accountSASSignatureValues.protocol : \"\",\n version,\n \"\", // Account SAS requires an additional newline character\n ].join(\"\\n\");\n }\n const signature = sharedKeyCredential.computeHMACSHA256(stringToSign);\n return new SASQueryParameters(version, signature, parsedPermissions.toString(), parsedServices, parsedResourceTypes, accountSASSignatureValues.protocol, accountSASSignatureValues.startsOn, accountSASSignatureValues.expiresOn, accountSASSignatureValues.ipRange, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, accountSASSignatureValues.encryptionScope);\n}\n\n/**\n * A BlobServiceClient represents a Client to the Azure Storage Blob service allowing you\n * to manipulate blob containers.\n */\nclass BlobServiceClient extends StorageClient {\n constructor(url, credentialOrPipeline, \n // Legacy, no fix for eslint error without breaking. Disable it for this interface.\n /* eslint-disable-next-line @azure/azure-sdk/ts-naming-options*/\n options) {\n let pipeline;\n if (isPipelineLike(credentialOrPipeline)) {\n pipeline = credentialOrPipeline;\n }\n else if ((coreHttp.isNode && credentialOrPipeline instanceof StorageSharedKeyCredential) ||\n credentialOrPipeline instanceof AnonymousCredential ||\n coreHttp.isTokenCredential(credentialOrPipeline)) {\n pipeline = newPipeline(credentialOrPipeline, options);\n }\n else {\n // The second parameter is undefined. Use anonymous credential\n pipeline = newPipeline(new AnonymousCredential(), options);\n }\n super(url, pipeline);\n this.serviceContext = new Service(this.storageClientContext);\n }\n /**\n *\n * Creates an instance of BlobServiceClient from connection string.\n *\n * @param connectionString - Account connection string or a SAS connection string of an Azure storage account.\n * [ Note - Account connection string can only be used in NODE.JS runtime. ]\n * Account connection string example -\n * `DefaultEndpointsProtocol=https;AccountName=myaccount;AccountKey=accountKey;EndpointSuffix=core.windows.net`\n * SAS connection string example -\n * `BlobEndpoint=https://myaccount.blob.core.windows.net/;QueueEndpoint=https://myaccount.queue.core.windows.net/;FileEndpoint=https://myaccount.file.core.windows.net/;TableEndpoint=https://myaccount.table.core.windows.net/;SharedAccessSignature=sasString`\n * @param options - Optional. Options to configure the HTTP pipeline.\n */\n static fromConnectionString(connectionString, \n // Legacy, no fix for eslint error without breaking. Disable it for this interface.\n /* eslint-disable-next-line @azure/azure-sdk/ts-naming-options*/\n options) {\n options = options || {};\n const extractedCreds = extractConnectionStringParts(connectionString);\n if (extractedCreds.kind === \"AccountConnString\") {\n if (coreHttp.isNode) {\n const sharedKeyCredential = new StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey);\n if (!options.proxyOptions) {\n options.proxyOptions = coreHttp.getDefaultProxySettings(extractedCreds.proxyUri);\n }\n const pipeline = newPipeline(sharedKeyCredential, options);\n return new BlobServiceClient(extractedCreds.url, pipeline);\n }\n else {\n throw new Error(\"Account connection string is only supported in Node.js environment\");\n }\n }\n else if (extractedCreds.kind === \"SASConnString\") {\n const pipeline = newPipeline(new AnonymousCredential(), options);\n return new BlobServiceClient(extractedCreds.url + \"?\" + extractedCreds.accountSas, pipeline);\n }\n else {\n throw new Error(\"Connection string must be either an Account connection string or a SAS connection string\");\n }\n }\n /**\n * Creates a {@link ContainerClient} object\n *\n * @param containerName - A container name\n * @returns A new ContainerClient object for the given container name.\n *\n * Example usage:\n *\n * ```js\n * const containerClient = blobServiceClient.getContainerClient(\"\");\n * ```\n */\n getContainerClient(containerName) {\n return new ContainerClient(appendToURLPath(this.url, encodeURIComponent(containerName)), this.pipeline);\n }\n /**\n * Create a Blob container.\n *\n * @param containerName - Name of the container to create.\n * @param options - Options to configure Container Create operation.\n * @returns Container creation response and the corresponding container client.\n */\n async createContainer(containerName, options = {}) {\n const { span, updatedOptions } = createSpan(\"BlobServiceClient-createContainer\", options);\n try {\n const containerClient = this.getContainerClient(containerName);\n const containerCreateResponse = await containerClient.create(updatedOptions);\n return {\n containerClient,\n containerCreateResponse,\n };\n }\n catch (e) {\n span.setStatus({\n code: coreTracing.SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n }\n finally {\n span.end();\n }\n }\n /**\n * Deletes a Blob container.\n *\n * @param containerName - Name of the container to delete.\n * @param options - Options to configure Container Delete operation.\n * @returns Container deletion response.\n */\n async deleteContainer(containerName, options = {}) {\n const { span, updatedOptions } = createSpan(\"BlobServiceClient-deleteContainer\", options);\n try {\n const containerClient = this.getContainerClient(containerName);\n return await containerClient.delete(updatedOptions);\n }\n catch (e) {\n span.setStatus({\n code: coreTracing.SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n }\n finally {\n span.end();\n }\n }\n /**\n * Restore a previously deleted Blob container.\n * This API is only functional if Container Soft Delete is enabled for the storage account associated with the container.\n *\n * @param deletedContainerName - Name of the previously deleted container.\n * @param deletedContainerVersion - Version of the previously deleted container, used to uniquely identify the deleted container.\n * @param options - Options to configure Container Restore operation.\n * @returns Container deletion response.\n */\n async undeleteContainer(deletedContainerName, deletedContainerVersion, options = {}) {\n const { span, updatedOptions } = createSpan(\"BlobServiceClient-undeleteContainer\", options);\n try {\n const containerClient = this.getContainerClient(options.destinationContainerName || deletedContainerName);\n // Hack to access a protected member.\n const containerContext = new Container(containerClient[\"storageClientContext\"]);\n const containerUndeleteResponse = await containerContext.restore(Object.assign({ deletedContainerName,\n deletedContainerVersion }, updatedOptions));\n return { containerClient, containerUndeleteResponse };\n }\n catch (e) {\n span.setStatus({\n code: coreTracing.SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n }\n finally {\n span.end();\n }\n }\n /**\n * Rename an existing Blob Container.\n *\n * @param sourceContainerName - The name of the source container.\n * @param destinationContainerName - The new name of the container.\n * @param options - Options to configure Container Rename operation.\n */\n /* eslint-disable-next-line @typescript-eslint/ban-ts-comment */\n // @ts-ignore Need to hide this interface for now. Make it public and turn on the live tests for it when the service is ready.\n async renameContainer(sourceContainerName, destinationContainerName, options = {}) {\n var _a;\n const { span, updatedOptions } = createSpan(\"BlobServiceClient-renameContainer\", options);\n try {\n const containerClient = this.getContainerClient(destinationContainerName);\n // Hack to access a protected member.\n const containerContext = new Container(containerClient[\"storageClientContext\"]);\n const containerRenameResponse = await containerContext.rename(sourceContainerName, Object.assign(Object.assign({}, updatedOptions), { sourceLeaseId: (_a = options.sourceCondition) === null || _a === void 0 ? void 0 : _a.leaseId }));\n return { containerClient, containerRenameResponse };\n }\n catch (e) {\n span.setStatus({\n code: coreTracing.SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n }\n finally {\n span.end();\n }\n }\n /**\n * Gets the properties of a storage account’s Blob service, including properties\n * for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules.\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/get-blob-service-properties\n *\n * @param options - Options to the Service Get Properties operation.\n * @returns Response data for the Service Get Properties operation.\n */\n async getProperties(options = {}) {\n const { span, updatedOptions } = createSpan(\"BlobServiceClient-getProperties\", options);\n try {\n return await this.serviceContext.getProperties(Object.assign({ abortSignal: options.abortSignal }, convertTracingToRequestOptionsBase(updatedOptions)));\n }\n catch (e) {\n span.setStatus({\n code: coreTracing.SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n }\n finally {\n span.end();\n }\n }\n /**\n * Sets properties for a storage account’s Blob service endpoint, including properties\n * for Storage Analytics, CORS (Cross-Origin Resource Sharing) rules and soft delete settings.\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/set-blob-service-properties\n *\n * @param properties -\n * @param options - Options to the Service Set Properties operation.\n * @returns Response data for the Service Set Properties operation.\n */\n async setProperties(properties, options = {}) {\n const { span, updatedOptions } = createSpan(\"BlobServiceClient-setProperties\", options);\n try {\n return await this.serviceContext.setProperties(properties, Object.assign({ abortSignal: options.abortSignal }, convertTracingToRequestOptionsBase(updatedOptions)));\n }\n catch (e) {\n span.setStatus({\n code: coreTracing.SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n }\n finally {\n span.end();\n }\n }\n /**\n * Retrieves statistics related to replication for the Blob service. It is only\n * available on the secondary location endpoint when read-access geo-redundant\n * replication is enabled for the storage account.\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/get-blob-service-stats\n *\n * @param options - Options to the Service Get Statistics operation.\n * @returns Response data for the Service Get Statistics operation.\n */\n async getStatistics(options = {}) {\n const { span, updatedOptions } = createSpan(\"BlobServiceClient-getStatistics\", options);\n try {\n return await this.serviceContext.getStatistics(Object.assign({ abortSignal: options.abortSignal }, convertTracingToRequestOptionsBase(updatedOptions)));\n }\n catch (e) {\n span.setStatus({\n code: coreTracing.SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n }\n finally {\n span.end();\n }\n }\n /**\n * The Get Account Information operation returns the sku name and account kind\n * for the specified account.\n * The Get Account Information operation is available on service versions beginning\n * with version 2018-03-28.\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/get-account-information\n *\n * @param options - Options to the Service Get Account Info operation.\n * @returns Response data for the Service Get Account Info operation.\n */\n async getAccountInfo(options = {}) {\n const { span, updatedOptions } = createSpan(\"BlobServiceClient-getAccountInfo\", options);\n try {\n return await this.serviceContext.getAccountInfo(Object.assign({ abortSignal: options.abortSignal }, convertTracingToRequestOptionsBase(updatedOptions)));\n }\n catch (e) {\n span.setStatus({\n code: coreTracing.SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n }\n finally {\n span.end();\n }\n }\n /**\n * Returns a list of the containers under the specified account.\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/list-containers2\n *\n * @param marker - A string value that identifies the portion of\n * the list of containers to be returned with the next listing operation. The\n * operation returns the continuationToken value within the response body if the\n * listing operation did not return all containers remaining to be listed\n * with the current page. The continuationToken value can be used as the value for\n * the marker parameter in a subsequent call to request the next page of list\n * items. The marker value is opaque to the client.\n * @param options - Options to the Service List Container Segment operation.\n * @returns Response data for the Service List Container Segment operation.\n */\n async listContainersSegment(marker, options = {}) {\n const { span, updatedOptions } = createSpan(\"BlobServiceClient-listContainersSegment\", options);\n try {\n return await this.serviceContext.listContainersSegment(Object.assign(Object.assign(Object.assign({ abortSignal: options.abortSignal, marker }, options), { include: typeof options.include === \"string\" ? [options.include] : options.include }), convertTracingToRequestOptionsBase(updatedOptions)));\n }\n catch (e) {\n span.setStatus({\n code: coreTracing.SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n }\n finally {\n span.end();\n }\n }\n /**\n * The Filter Blobs operation enables callers to list blobs across all containers whose tags\n * match a given search expression. Filter blobs searches across all containers within a\n * storage account but can be scoped within the expression to a single container.\n *\n * @param tagFilterSqlExpression - The where parameter enables the caller to query blobs whose tags match a given expression.\n * The given expression must evaluate to true for a blob to be returned in the results.\n * The[OData - ABNF] filter syntax rule defines the formal grammar for the value of the where query parameter;\n * however, only a subset of the OData filter syntax is supported in the Blob service.\n * @param marker - A string value that identifies the portion of\n * the list of blobs to be returned with the next listing operation. The\n * operation returns the continuationToken value within the response body if the\n * listing operation did not return all blobs remaining to be listed\n * with the current page. The continuationToken value can be used as the value for\n * the marker parameter in a subsequent call to request the next page of list\n * items. The marker value is opaque to the client.\n * @param options - Options to find blobs by tags.\n */\n async findBlobsByTagsSegment(tagFilterSqlExpression, marker, options = {}) {\n const { span, updatedOptions } = createSpan(\"BlobServiceClient-findBlobsByTagsSegment\", options);\n try {\n const response = await this.serviceContext.filterBlobs(Object.assign({ abortSignal: options.abortSignal, where: tagFilterSqlExpression, marker, maxPageSize: options.maxPageSize }, convertTracingToRequestOptionsBase(updatedOptions)));\n const wrappedResponse = Object.assign(Object.assign({}, response), { _response: response._response, blobs: response.blobs.map((blob) => {\n var _a;\n let tagValue = \"\";\n if (((_a = blob.tags) === null || _a === void 0 ? void 0 : _a.blobTagSet.length) === 1) {\n tagValue = blob.tags.blobTagSet[0].value;\n }\n return Object.assign(Object.assign({}, blob), { tags: toTags(blob.tags), tagValue });\n }) });\n return wrappedResponse;\n }\n catch (e) {\n span.setStatus({\n code: coreTracing.SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n }\n finally {\n span.end();\n }\n }\n /**\n * Returns an AsyncIterableIterator for ServiceFindBlobsByTagsSegmentResponse.\n *\n * @param tagFilterSqlExpression - The where parameter enables the caller to query blobs whose tags match a given expression.\n * The given expression must evaluate to true for a blob to be returned in the results.\n * The[OData - ABNF] filter syntax rule defines the formal grammar for the value of the where query parameter;\n * however, only a subset of the OData filter syntax is supported in the Blob service.\n * @param marker - A string value that identifies the portion of\n * the list of blobs to be returned with the next listing operation. The\n * operation returns the continuationToken value within the response body if the\n * listing operation did not return all blobs remaining to be listed\n * with the current page. The continuationToken value can be used as the value for\n * the marker parameter in a subsequent call to request the next page of list\n * items. The marker value is opaque to the client.\n * @param options - Options to find blobs by tags.\n */\n findBlobsByTagsSegments(tagFilterSqlExpression, marker, options = {}) {\n return tslib.__asyncGenerator(this, arguments, function* findBlobsByTagsSegments_1() {\n let response;\n if (!!marker || marker === undefined) {\n do {\n response = yield tslib.__await(this.findBlobsByTagsSegment(tagFilterSqlExpression, marker, options));\n response.blobs = response.blobs || [];\n marker = response.continuationToken;\n yield yield tslib.__await(response);\n } while (marker);\n }\n });\n }\n /**\n * Returns an AsyncIterableIterator for blobs.\n *\n * @param tagFilterSqlExpression - The where parameter enables the caller to query blobs whose tags match a given expression.\n * The given expression must evaluate to true for a blob to be returned in the results.\n * The[OData - ABNF] filter syntax rule defines the formal grammar for the value of the where query parameter;\n * however, only a subset of the OData filter syntax is supported in the Blob service.\n * @param options - Options to findBlobsByTagsItems.\n */\n findBlobsByTagsItems(tagFilterSqlExpression, options = {}) {\n return tslib.__asyncGenerator(this, arguments, function* findBlobsByTagsItems_1() {\n var e_1, _a;\n let marker;\n try {\n for (var _b = tslib.__asyncValues(this.findBlobsByTagsSegments(tagFilterSqlExpression, marker, options)), _c; _c = yield tslib.__await(_b.next()), !_c.done;) {\n const segment = _c.value;\n yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(segment.blobs)));\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (_c && !_c.done && (_a = _b.return)) yield tslib.__await(_a.call(_b));\n }\n finally { if (e_1) throw e_1.error; }\n }\n });\n }\n /**\n * Returns an async iterable iterator to find all blobs with specified tag\n * under the specified account.\n *\n * .byPage() returns an async iterable iterator to list the blobs in pages.\n *\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/get-blob-service-properties\n *\n * Example using `for await` syntax:\n *\n * ```js\n * let i = 1;\n * for await (const blob of blobServiceClient.findBlobsByTags(\"tagkey='tagvalue'\")) {\n * console.log(`Blob ${i++}: ${container.name}`);\n * }\n * ```\n *\n * Example using `iter.next()`:\n *\n * ```js\n * let i = 1;\n * const iter = blobServiceClient.findBlobsByTags(\"tagkey='tagvalue'\");\n * let blobItem = await iter.next();\n * while (!blobItem.done) {\n * console.log(`Blob ${i++}: ${blobItem.value.name}`);\n * blobItem = await iter.next();\n * }\n * ```\n *\n * Example using `byPage()`:\n *\n * ```js\n * // passing optional maxPageSize in the page settings\n * let i = 1;\n * for await (const response of blobServiceClient.findBlobsByTags(\"tagkey='tagvalue'\").byPage({ maxPageSize: 20 })) {\n * if (response.blobs) {\n * for (const blob of response.blobs) {\n * console.log(`Blob ${i++}: ${blob.name}`);\n * }\n * }\n * }\n * ```\n *\n * Example using paging with a marker:\n *\n * ```js\n * let i = 1;\n * let iterator = blobServiceClient.findBlobsByTags(\"tagkey='tagvalue'\").byPage({ maxPageSize: 2 });\n * let response = (await iterator.next()).value;\n *\n * // Prints 2 blob names\n * if (response.blobs) {\n * for (const blob of response.blobs) {\n * console.log(`Blob ${i++}: ${blob.name}`);\n * }\n * }\n *\n * // Gets next marker\n * let marker = response.continuationToken;\n * // Passing next marker as continuationToken\n * iterator = blobServiceClient\n * .findBlobsByTags(\"tagkey='tagvalue'\")\n * .byPage({ continuationToken: marker, maxPageSize: 10 });\n * response = (await iterator.next()).value;\n *\n * // Prints blob names\n * if (response.blobs) {\n * for (const blob of response.blobs) {\n * console.log(`Blob ${i++}: ${blob.name}`);\n * }\n * }\n * ```\n *\n * @param tagFilterSqlExpression - The where parameter enables the caller to query blobs whose tags match a given expression.\n * The given expression must evaluate to true for a blob to be returned in the results.\n * The[OData - ABNF] filter syntax rule defines the formal grammar for the value of the where query parameter;\n * however, only a subset of the OData filter syntax is supported in the Blob service.\n * @param options - Options to find blobs by tags.\n */\n findBlobsByTags(tagFilterSqlExpression, options = {}) {\n // AsyncIterableIterator to iterate over blobs\n const listSegmentOptions = Object.assign({}, options);\n const iter = this.findBlobsByTagsItems(tagFilterSqlExpression, listSegmentOptions);\n return {\n /**\n * The next method, part of the iteration protocol\n */\n next() {\n return iter.next();\n },\n /**\n * The connection to the async iterator, part of the iteration protocol\n */\n [Symbol.asyncIterator]() {\n return this;\n },\n /**\n * Return an AsyncIterableIterator that works a page at a time\n */\n byPage: (settings = {}) => {\n return this.findBlobsByTagsSegments(tagFilterSqlExpression, settings.continuationToken, Object.assign({ maxPageSize: settings.maxPageSize }, listSegmentOptions));\n },\n };\n }\n /**\n * Returns an AsyncIterableIterator for ServiceListContainersSegmentResponses\n *\n * @param marker - A string value that identifies the portion of\n * the list of containers to be returned with the next listing operation. The\n * operation returns the continuationToken value within the response body if the\n * listing operation did not return all containers remaining to be listed\n * with the current page. The continuationToken value can be used as the value for\n * the marker parameter in a subsequent call to request the next page of list\n * items. The marker value is opaque to the client.\n * @param options - Options to list containers operation.\n */\n listSegments(marker, options = {}) {\n return tslib.__asyncGenerator(this, arguments, function* listSegments_1() {\n let listContainersSegmentResponse;\n if (!!marker || marker === undefined) {\n do {\n listContainersSegmentResponse = yield tslib.__await(this.listContainersSegment(marker, options));\n listContainersSegmentResponse.containerItems =\n listContainersSegmentResponse.containerItems || [];\n marker = listContainersSegmentResponse.continuationToken;\n yield yield tslib.__await(yield tslib.__await(listContainersSegmentResponse));\n } while (marker);\n }\n });\n }\n /**\n * Returns an AsyncIterableIterator for Container Items\n *\n * @param options - Options to list containers operation.\n */\n listItems(options = {}) {\n return tslib.__asyncGenerator(this, arguments, function* listItems_1() {\n var e_2, _a;\n let marker;\n try {\n for (var _b = tslib.__asyncValues(this.listSegments(marker, options)), _c; _c = yield tslib.__await(_b.next()), !_c.done;) {\n const segment = _c.value;\n yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(segment.containerItems)));\n }\n }\n catch (e_2_1) { e_2 = { error: e_2_1 }; }\n finally {\n try {\n if (_c && !_c.done && (_a = _b.return)) yield tslib.__await(_a.call(_b));\n }\n finally { if (e_2) throw e_2.error; }\n }\n });\n }\n /**\n * Returns an async iterable iterator to list all the containers\n * under the specified account.\n *\n * .byPage() returns an async iterable iterator to list the containers in pages.\n *\n * Example using `for await` syntax:\n *\n * ```js\n * let i = 1;\n * for await (const container of blobServiceClient.listContainers()) {\n * console.log(`Container ${i++}: ${container.name}`);\n * }\n * ```\n *\n * Example using `iter.next()`:\n *\n * ```js\n * let i = 1;\n * const iter = blobServiceClient.listContainers();\n * let containerItem = await iter.next();\n * while (!containerItem.done) {\n * console.log(`Container ${i++}: ${containerItem.value.name}`);\n * containerItem = await iter.next();\n * }\n * ```\n *\n * Example using `byPage()`:\n *\n * ```js\n * // passing optional maxPageSize in the page settings\n * let i = 1;\n * for await (const response of blobServiceClient.listContainers().byPage({ maxPageSize: 20 })) {\n * if (response.containerItems) {\n * for (const container of response.containerItems) {\n * console.log(`Container ${i++}: ${container.name}`);\n * }\n * }\n * }\n * ```\n *\n * Example using paging with a marker:\n *\n * ```js\n * let i = 1;\n * let iterator = blobServiceClient.listContainers().byPage({ maxPageSize: 2 });\n * let response = (await iterator.next()).value;\n *\n * // Prints 2 container names\n * if (response.containerItems) {\n * for (const container of response.containerItems) {\n * console.log(`Container ${i++}: ${container.name}`);\n * }\n * }\n *\n * // Gets next marker\n * let marker = response.continuationToken;\n * // Passing next marker as continuationToken\n * iterator = blobServiceClient\n * .listContainers()\n * .byPage({ continuationToken: marker, maxPageSize: 10 });\n * response = (await iterator.next()).value;\n *\n * // Prints 10 container names\n * if (response.containerItems) {\n * for (const container of response.containerItems) {\n * console.log(`Container ${i++}: ${container.name}`);\n * }\n * }\n * ```\n *\n * @param options - Options to list containers.\n * @returns An asyncIterableIterator that supports paging.\n */\n listContainers(options = {}) {\n if (options.prefix === \"\") {\n options.prefix = undefined;\n }\n const include = [];\n if (options.includeDeleted) {\n include.push(\"deleted\");\n }\n if (options.includeMetadata) {\n include.push(\"metadata\");\n }\n if (options.includeSystem) {\n include.push(\"system\");\n }\n // AsyncIterableIterator to iterate over containers\n const listSegmentOptions = Object.assign(Object.assign({}, options), (include.length > 0 ? { include } : {}));\n const iter = this.listItems(listSegmentOptions);\n return {\n /**\n * The next method, part of the iteration protocol\n */\n next() {\n return iter.next();\n },\n /**\n * The connection to the async iterator, part of the iteration protocol\n */\n [Symbol.asyncIterator]() {\n return this;\n },\n /**\n * Return an AsyncIterableIterator that works a page at a time\n */\n byPage: (settings = {}) => {\n return this.listSegments(settings.continuationToken, Object.assign({ maxPageSize: settings.maxPageSize }, listSegmentOptions));\n },\n };\n }\n /**\n * ONLY AVAILABLE WHEN USING BEARER TOKEN AUTHENTICATION (TokenCredential).\n *\n * Retrieves a user delegation key for the Blob service. This is only a valid operation when using\n * bearer token authentication.\n *\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/get-user-delegation-key\n *\n * @param startsOn - The start time for the user delegation SAS. Must be within 7 days of the current time\n * @param expiresOn - The end time for the user delegation SAS. Must be within 7 days of the current time\n */\n async getUserDelegationKey(startsOn, expiresOn, options = {}) {\n const { span, updatedOptions } = createSpan(\"BlobServiceClient-getUserDelegationKey\", options);\n try {\n const response = await this.serviceContext.getUserDelegationKey({\n startsOn: truncatedISO8061Date(startsOn, false),\n expiresOn: truncatedISO8061Date(expiresOn, false),\n }, Object.assign({ abortSignal: options.abortSignal }, convertTracingToRequestOptionsBase(updatedOptions)));\n const userDelegationKey = {\n signedObjectId: response.signedObjectId,\n signedTenantId: response.signedTenantId,\n signedStartsOn: new Date(response.signedStartsOn),\n signedExpiresOn: new Date(response.signedExpiresOn),\n signedService: response.signedService,\n signedVersion: response.signedVersion,\n value: response.value,\n };\n const res = Object.assign({ _response: response._response, requestId: response.requestId, clientRequestId: response.clientRequestId, version: response.version, date: response.date, errorCode: response.errorCode }, userDelegationKey);\n return res;\n }\n catch (e) {\n span.setStatus({\n code: coreTracing.SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n }\n finally {\n span.end();\n }\n }\n /**\n * Creates a BlobBatchClient object to conduct batch operations.\n *\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/blob-batch\n *\n * @returns A new BlobBatchClient object for this service.\n */\n getBlobBatchClient() {\n return new BlobBatchClient(this.url, this.pipeline);\n }\n /**\n * Only available for BlobServiceClient constructed with a shared key credential.\n *\n * Generates a Blob account Shared Access Signature (SAS) URI based on the client properties\n * and parameters passed in. The SAS is signed by the shared key credential of the client.\n *\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/create-account-sas\n *\n * @param expiresOn - Optional. The time at which the shared access signature becomes invalid. Default to an hour later if not provided.\n * @param permissions - Specifies the list of permissions to be associated with the SAS.\n * @param resourceTypes - Specifies the resource types associated with the shared access signature.\n * @param options - Optional parameters.\n * @returns An account SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token.\n */\n generateAccountSasUrl(expiresOn, permissions = AccountSASPermissions.parse(\"r\"), resourceTypes = \"sco\", options = {}) {\n if (!(this.credential instanceof StorageSharedKeyCredential)) {\n throw RangeError(\"Can only generate the account SAS when the client is initialized with a shared key credential\");\n }\n if (expiresOn === undefined) {\n const now = new Date();\n expiresOn = new Date(now.getTime() + 3600 * 1000);\n }\n const sas = generateAccountSASQueryParameters(Object.assign({ permissions,\n expiresOn,\n resourceTypes, services: AccountSASServices.parse(\"b\").toString() }, options), this.credential).toString();\n return appendToURLQuery(this.url, sas);\n }\n}\n\nObject.defineProperty(exports, 'BaseRequestPolicy', {\n enumerable: true,\n get: function () { return coreHttp.BaseRequestPolicy; }\n});\nObject.defineProperty(exports, 'HttpHeaders', {\n enumerable: true,\n get: function () { return coreHttp.HttpHeaders; }\n});\nObject.defineProperty(exports, 'RequestPolicyOptions', {\n enumerable: true,\n get: function () { return coreHttp.RequestPolicyOptions; }\n});\nObject.defineProperty(exports, 'RestError', {\n enumerable: true,\n get: function () { return coreHttp.RestError; }\n});\nObject.defineProperty(exports, 'WebResource', {\n enumerable: true,\n get: function () { return coreHttp.WebResource; }\n});\nObject.defineProperty(exports, 'deserializationPolicy', {\n enumerable: true,\n get: function () { return coreHttp.deserializationPolicy; }\n});\nexports.AccountSASPermissions = AccountSASPermissions;\nexports.AccountSASResourceTypes = AccountSASResourceTypes;\nexports.AccountSASServices = AccountSASServices;\nexports.AnonymousCredential = AnonymousCredential;\nexports.AnonymousCredentialPolicy = AnonymousCredentialPolicy;\nexports.AppendBlobClient = AppendBlobClient;\nexports.BlobBatch = BlobBatch;\nexports.BlobBatchClient = BlobBatchClient;\nexports.BlobClient = BlobClient;\nexports.BlobLeaseClient = BlobLeaseClient;\nexports.BlobSASPermissions = BlobSASPermissions;\nexports.BlobServiceClient = BlobServiceClient;\nexports.BlockBlobClient = BlockBlobClient;\nexports.ContainerClient = ContainerClient;\nexports.ContainerSASPermissions = ContainerSASPermissions;\nexports.Credential = Credential;\nexports.CredentialPolicy = CredentialPolicy;\nexports.PageBlobClient = PageBlobClient;\nexports.Pipeline = Pipeline;\nexports.SASQueryParameters = SASQueryParameters;\nexports.StorageBrowserPolicy = StorageBrowserPolicy;\nexports.StorageBrowserPolicyFactory = StorageBrowserPolicyFactory;\nexports.StorageOAuthScopes = StorageOAuthScopes;\nexports.StorageRetryPolicy = StorageRetryPolicy;\nexports.StorageRetryPolicyFactory = StorageRetryPolicyFactory;\nexports.StorageSharedKeyCredential = StorageSharedKeyCredential;\nexports.StorageSharedKeyCredentialPolicy = StorageSharedKeyCredentialPolicy;\nexports.generateAccountSASQueryParameters = generateAccountSASQueryParameters;\nexports.generateBlobSASQueryParameters = generateBlobSASQueryParameters;\nexports.isPipelineLike = isPipelineLike;\nexports.logger = logger;\nexports.newPipeline = newPipeline;\n//# sourceMappingURL=index.js.map\n","\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.testDefinitions = void 0;\r\n/** Reference to the array that `Deno.test` calls insert their definition into. */\r\nexports.testDefinitions = [];\r\n","\"use strict\";\r\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n var desc = Object.getOwnPropertyDescriptor(m, k);\r\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\r\n desc = { enumerable: true, get: function() { return m[k]; } };\r\n }\r\n Object.defineProperty(o, k2, desc);\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n}));\r\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\r\n};\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.testDefinitions = exports.Deno = void 0;\r\nexports.Deno = require(\"./test.js\");\r\n__exportStar(require(\"./test.js\"), exports);\r\nvar definitions_js_1 = require(\"./definitions.js\");\r\nObject.defineProperty(exports, \"testDefinitions\", { enumerable: true, get: function () { return definitions_js_1.testDefinitions; } });\r\n","\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.test = void 0;\r\nconst definitions_js_1 = require(\"./definitions.js\");\r\nconst test = function test() {\r\n var _a, _b;\r\n let testDef;\r\n const firstArg = arguments[0];\r\n const secondArg = arguments[1];\r\n const thirdArg = arguments[2];\r\n if (typeof firstArg === \"string\") {\r\n if (typeof secondArg === \"object\") {\r\n if (typeof thirdArg === \"function\") {\r\n if (secondArg.fn != null) {\r\n throw new TypeError(\"Unexpected 'fn' field in options, test function is already provided as the third argument.\");\r\n }\r\n }\r\n if (secondArg.name != null) {\r\n throw new TypeError(\"Unexpected 'name' field in options, test name is already provided as the first argument.\");\r\n }\r\n // name, options, fn\r\n testDef = { name: firstArg, fn: thirdArg, ...secondArg };\r\n }\r\n else {\r\n // name, fn\r\n testDef = { name: firstArg, fn: secondArg };\r\n }\r\n }\r\n else if (firstArg instanceof Function) {\r\n // function only\r\n if (firstArg.name.length === 0) {\r\n throw new TypeError(\"The test function must have a name\");\r\n }\r\n testDef = { fn: firstArg, name: firstArg.name };\r\n if (secondArg != null) {\r\n throw new TypeError(\"Unexpected second argument to Deno.test()\");\r\n }\r\n }\r\n else if (typeof firstArg === \"object\") {\r\n testDef = { ...firstArg };\r\n if (typeof secondArg === \"function\") {\r\n // options, fn\r\n testDef.fn = secondArg;\r\n if (firstArg.fn != null) {\r\n throw new TypeError(\"Unexpected 'fn' field in options, test function is already provided as the second argument.\");\r\n }\r\n if (testDef.name == null) {\r\n if (secondArg.name.length === 0) {\r\n throw new TypeError(\"The test function must have a name\");\r\n }\r\n // options without name, fn\r\n testDef.name = secondArg.name;\r\n }\r\n }\r\n else {\r\n if (typeof firstArg.fn !== \"function\") {\r\n throw new TypeError(\"Expected 'fn' field in the first argument to be a test function.\");\r\n }\r\n }\r\n }\r\n else {\r\n throw new TypeError(\"Unknown test overload\");\r\n }\r\n if (typeof testDef.fn !== \"function\") {\r\n throw new TypeError(\"Missing test function\");\r\n }\r\n if (((_b = (_a = testDef.name) === null || _a === void 0 ? void 0 : _a.length) !== null && _b !== void 0 ? _b : 0) === 0) {\r\n throw new TypeError(\"The test name can't be empty\");\r\n }\r\n definitions_js_1.testDefinitions.push(testDef);\r\n};\r\nexports.test = test;\r\n","\"use strict\";\r\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n var desc = Object.getOwnPropertyDescriptor(m, k);\r\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\r\n desc = { enumerable: true, get: function() { return m[k]; } };\r\n }\r\n Object.defineProperty(o, k2, desc);\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n}));\r\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\r\n};\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\n__exportStar(require(\"./deno/stable/main.js\"), exports);\r\n__exportStar(require(\"./deno/unstable/main.js\"), exports);\r\n","\"use strict\";\r\n///\r\nvar __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {\r\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\r\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\r\n};\r\nvar __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\r\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\r\n};\r\nvar _Conn_socket;\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.TlsConn = exports.Conn = void 0;\r\nconst net_1 = require(\"net\");\r\nconst FsFile_js_1 = require(\"../stable/classes/FsFile.js\");\r\nclass Conn extends FsFile_js_1.FsFile {\r\n constructor(rid, localAddr, remoteAddr, socket) {\r\n super(rid);\r\n this.rid = rid;\r\n this.localAddr = localAddr;\r\n this.remoteAddr = remoteAddr;\r\n _Conn_socket.set(this, void 0);\r\n __classPrivateFieldSet(this, _Conn_socket, socket || new net_1.Socket({ fd: rid }), \"f\");\r\n }\r\n async closeWrite() {\r\n await new Promise((resolve) => __classPrivateFieldGet(this, _Conn_socket, \"f\").end(resolve));\r\n }\r\n setNoDelay(enable) {\r\n __classPrivateFieldGet(this, _Conn_socket, \"f\").setNoDelay(enable);\r\n }\r\n setKeepAlive(enable) {\r\n __classPrivateFieldGet(this, _Conn_socket, \"f\").setKeepAlive(enable);\r\n }\r\n}\r\nexports.Conn = Conn;\r\n_Conn_socket = new WeakMap();\r\nclass TlsConn extends Conn {\r\n handshake() {\r\n console.warn(\"@deno/shim-deno: Handshake is not supported.\");\r\n return Promise.resolve({\r\n alpnProtocol: null,\r\n });\r\n }\r\n}\r\nexports.TlsConn = TlsConn;\r\n","\"use strict\";\r\n///\r\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n var desc = Object.getOwnPropertyDescriptor(m, k);\r\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\r\n desc = { enumerable: true, get: function() { return m[k]; } };\r\n }\r\n Object.defineProperty(o, k2, desc);\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n}));\r\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n});\r\nvar __importStar = (this && this.__importStar) || function (mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n};\r\nvar __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {\r\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\r\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\r\n};\r\nvar __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\r\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\r\n};\r\nvar _Listener_listener;\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.Listener = void 0;\r\nconst close_js_1 = require(\"../stable/functions/close.js\");\r\nconst errors = __importStar(require(\"../stable/variables/errors.js\"));\r\nclass Listener {\r\n constructor(rid, addr, listener) {\r\n this.rid = rid;\r\n this.addr = addr;\r\n _Listener_listener.set(this, void 0);\r\n __classPrivateFieldSet(this, _Listener_listener, listener, \"f\");\r\n }\r\n async accept() {\r\n if (!__classPrivateFieldGet(this, _Listener_listener, \"f\")) {\r\n throw new errors.BadResource(\"Listener not initialised\");\r\n }\r\n const result = await __classPrivateFieldGet(this, _Listener_listener, \"f\").next();\r\n if (result.done) {\r\n throw new errors.BadResource(\"Server not listening\");\r\n }\r\n return result.value;\r\n }\r\n async next() {\r\n let conn;\r\n try {\r\n conn = await this.accept();\r\n }\r\n catch (error) {\r\n if (error instanceof errors.BadResource) {\r\n return { value: undefined, done: true };\r\n }\r\n throw error;\r\n }\r\n return { value: conn, done: false };\r\n }\r\n return(value) {\r\n this.close();\r\n return Promise.resolve({ value, done: true });\r\n }\r\n close() {\r\n (0, close_js_1.close)(this.rid);\r\n }\r\n ref() {\r\n throw new Error(\"Not implemented\");\r\n }\r\n unref() {\r\n throw new Error(\"Not implemented\");\r\n }\r\n [(_Listener_listener = new WeakMap(), Symbol.asyncIterator)]() {\r\n return this;\r\n }\r\n}\r\nexports.Listener = Listener;\r\n","\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.DEFAULT_BUFFER_SIZE = void 0;\r\nexports.DEFAULT_BUFFER_SIZE = 32 * 1024;\r\n","\"use strict\";\r\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n var desc = Object.getOwnPropertyDescriptor(m, k);\r\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\r\n desc = { enumerable: true, get: function() { return m[k]; } };\r\n }\r\n Object.defineProperty(o, k2, desc);\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n}));\r\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n});\r\nvar __importStar = (this && this.__importStar) || function (mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n};\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nconst errors = __importStar(require(\"../stable/variables/errors.js\"));\r\nconst mapper = (Ctor) => (err) => Object.assign(new Ctor(err.message), {\r\n stack: err.stack,\r\n});\r\nconst map = {\r\n EEXIST: mapper(errors.AlreadyExists),\r\n ENOENT: mapper(errors.NotFound),\r\n};\r\nconst isNodeErr = (e) => {\r\n return e instanceof Error && \"code\" in e;\r\n};\r\nfunction mapError(e) {\r\n var _a;\r\n if (!isNodeErr(e))\r\n return e;\r\n return ((_a = map[e.code]) === null || _a === void 0 ? void 0 : _a.call(map, e)) || e;\r\n}\r\nexports.default = mapError;\r\n","\"use strict\";\r\n// getAccessFlag and getCreationFlag adapted from the original in Rust's std::fs\r\n// \r\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n var desc = Object.getOwnPropertyDescriptor(m, k);\r\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\r\n desc = { enumerable: true, get: function() { return m[k]; } };\r\n }\r\n Object.defineProperty(o, k2, desc);\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n}));\r\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n});\r\nvar __importStar = (this && this.__importStar) || function (mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n};\r\nvar __importDefault = (this && this.__importDefault) || function (mod) {\r\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\r\n};\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.getFsFlag = exports.getCreationFlag = exports.getAccessFlag = void 0;\r\nconst errors = __importStar(require(\"../stable/variables/errors.js\"));\r\nconst fs_1 = require(\"fs\");\r\nconst os_1 = __importDefault(require(\"os\"));\r\nconst { O_APPEND, O_CREAT, O_EXCL, O_RDONLY, O_RDWR, O_TRUNC, O_WRONLY } = fs_1.constants;\r\nfunction getAccessFlag(opts) {\r\n if (opts.read && !opts.write && !opts.append)\r\n return O_RDONLY;\r\n if (!opts.read && opts.write && !opts.append)\r\n return O_WRONLY;\r\n if (opts.read && opts.write && !opts.append)\r\n return O_RDWR;\r\n if (!opts.read && opts.append)\r\n return O_WRONLY | O_APPEND;\r\n if (opts.read && opts.append)\r\n return O_RDWR | O_APPEND;\r\n if (!opts.read && !opts.write && !opts.append) {\r\n throw new errors.BadResource(\"EINVAL: One of 'read', 'write', 'append' is required to open file.\");\r\n }\r\n throw new errors.BadResource(\"EINVAL: Invalid fs flags.\");\r\n}\r\nexports.getAccessFlag = getAccessFlag;\r\nfunction getCreationFlag(opts) {\r\n if (!opts.write && !opts.append) {\r\n if (opts.truncate || opts.create || opts.createNew) {\r\n throw new errors.BadResource(\"EINVAL: One of 'write', 'append' is required to 'truncate', 'create' or 'createNew' file.\");\r\n }\r\n }\r\n if (opts.append) {\r\n if (opts.truncate && !opts.createNew) {\r\n throw new errors.BadResource(\"EINVAL: unexpected 'truncate': true and 'createNew': false when 'append' is true.\");\r\n }\r\n }\r\n if (!opts.create && !opts.truncate && !opts.createNew)\r\n return 0;\r\n if (opts.create && !opts.truncate && !opts.createNew)\r\n return O_CREAT;\r\n if (!opts.create && opts.truncate && !opts.createNew) {\r\n if (os_1.default.platform() === \"win32\") {\r\n // for some reason only providing O_TRUNC on windows will\r\n // throw a \"EINVAL: invalid argument\", so to work around this\r\n // we relax the restriction here to also create the file if it\r\n // doesn't exist\r\n return O_CREAT | O_TRUNC;\r\n }\r\n else {\r\n return O_TRUNC;\r\n }\r\n }\r\n if (opts.create && opts.truncate && !opts.createNew) {\r\n return O_CREAT | O_TRUNC;\r\n }\r\n if (opts.createNew)\r\n return O_CREAT | O_EXCL;\r\n throw new errors.BadResource(\"EINVAL: Invalid fs flags.\");\r\n}\r\nexports.getCreationFlag = getCreationFlag;\r\nfunction getFsFlag(flags) {\r\n return getAccessFlag(flags) | getCreationFlag(flags);\r\n}\r\nexports.getFsFlag = getFsFlag;\r\n","\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.merge = exports.mapAsync = exports.map = void 0;\r\nfunction* map(iter, f) {\r\n for (const i of iter) {\r\n yield f(i);\r\n }\r\n}\r\nexports.map = map;\r\nasync function* mapAsync(iter, f) {\r\n for await (const i of iter) {\r\n yield f(i);\r\n }\r\n}\r\nexports.mapAsync = mapAsync;\r\nasync function* merge(iterables) {\r\n const racers = new Map(map(map(iterables, (iter) => iter[Symbol.asyncIterator]()), (iter) => [iter, iter.next()]));\r\n while (racers.size > 0) {\r\n const winner = await Promise.race(map(racers.entries(), ([iter, prom]) => prom.then((result) => ({ result, iter }))));\r\n if (winner.result.done) {\r\n racers.delete(winner.iter);\r\n }\r\n else {\r\n yield await winner.result.value;\r\n racers.set(winner.iter, winner.iter.next());\r\n }\r\n }\r\n}\r\nexports.merge = merge;\r\n","\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.randomId = void 0;\r\nconst randomId = () => {\r\n const n = (Math.random() * 0xfffff * 1000000).toString(16);\r\n return \"\" + n.slice(0, 6);\r\n};\r\nexports.randomId = randomId;\r\n","\"use strict\";\r\n/// \r\nvar __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {\r\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\r\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\r\n};\r\nvar __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\r\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\r\n};\r\nvar _BufferStreamReader_instances, _BufferStreamReader_stream, _BufferStreamReader_error, _BufferStreamReader_ended, _BufferStreamReader_pendingActions, _BufferStreamReader_runPendingActions, _StreamWriter_stream;\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.StreamWriter = exports.BufferStreamReader = void 0;\r\nclass BufferStreamReader {\r\n constructor(stream) {\r\n _BufferStreamReader_instances.add(this);\r\n _BufferStreamReader_stream.set(this, void 0);\r\n _BufferStreamReader_error.set(this, void 0);\r\n _BufferStreamReader_ended.set(this, false);\r\n _BufferStreamReader_pendingActions.set(this, []);\r\n __classPrivateFieldSet(this, _BufferStreamReader_stream, stream, \"f\");\r\n __classPrivateFieldGet(this, _BufferStreamReader_stream, \"f\").pause();\r\n __classPrivateFieldGet(this, _BufferStreamReader_stream, \"f\").on(\"error\", (error) => {\r\n __classPrivateFieldSet(this, _BufferStreamReader_error, error, \"f\");\r\n __classPrivateFieldGet(this, _BufferStreamReader_instances, \"m\", _BufferStreamReader_runPendingActions).call(this);\r\n });\r\n __classPrivateFieldGet(this, _BufferStreamReader_stream, \"f\").on(\"readable\", () => {\r\n __classPrivateFieldGet(this, _BufferStreamReader_instances, \"m\", _BufferStreamReader_runPendingActions).call(this);\r\n });\r\n __classPrivateFieldGet(this, _BufferStreamReader_stream, \"f\").on(\"end\", () => {\r\n __classPrivateFieldSet(this, _BufferStreamReader_ended, true, \"f\");\r\n __classPrivateFieldGet(this, _BufferStreamReader_instances, \"m\", _BufferStreamReader_runPendingActions).call(this);\r\n });\r\n }\r\n readAll() {\r\n return new Promise((resolve, reject) => {\r\n const chunks = [];\r\n const action = () => {\r\n if (__classPrivateFieldGet(this, _BufferStreamReader_error, \"f\")) {\r\n reject(__classPrivateFieldGet(this, _BufferStreamReader_error, \"f\"));\r\n return;\r\n }\r\n const buffer = __classPrivateFieldGet(this, _BufferStreamReader_stream, \"f\").read();\r\n if (buffer != null) {\r\n chunks.push(buffer);\r\n __classPrivateFieldGet(this, _BufferStreamReader_pendingActions, \"f\").push(action);\r\n }\r\n else if (__classPrivateFieldGet(this, _BufferStreamReader_ended, \"f\")) {\r\n const result = Buffer.concat(chunks);\r\n resolve(result);\r\n }\r\n else {\r\n __classPrivateFieldGet(this, _BufferStreamReader_pendingActions, \"f\").push(action);\r\n }\r\n };\r\n action();\r\n });\r\n }\r\n read(p) {\r\n return new Promise((resolve, reject) => {\r\n const action = () => {\r\n if (__classPrivateFieldGet(this, _BufferStreamReader_error, \"f\")) {\r\n reject(__classPrivateFieldGet(this, _BufferStreamReader_error, \"f\"));\r\n return;\r\n }\r\n const readBuffer = __classPrivateFieldGet(this, _BufferStreamReader_stream, \"f\").read(p.byteLength);\r\n if (readBuffer && readBuffer.byteLength > 0) {\r\n readBuffer.copy(p, 0, 0, readBuffer.byteLength);\r\n resolve(readBuffer.byteLength);\r\n return;\r\n }\r\n if (__classPrivateFieldGet(this, _BufferStreamReader_ended, \"f\")) {\r\n resolve(null);\r\n }\r\n else {\r\n __classPrivateFieldGet(this, _BufferStreamReader_pendingActions, \"f\").push(action);\r\n }\r\n };\r\n action();\r\n });\r\n }\r\n}\r\nexports.BufferStreamReader = BufferStreamReader;\r\n_BufferStreamReader_stream = new WeakMap(), _BufferStreamReader_error = new WeakMap(), _BufferStreamReader_ended = new WeakMap(), _BufferStreamReader_pendingActions = new WeakMap(), _BufferStreamReader_instances = new WeakSet(), _BufferStreamReader_runPendingActions = function _BufferStreamReader_runPendingActions() {\r\n const errors = [];\r\n for (const action of __classPrivateFieldGet(this, _BufferStreamReader_pendingActions, \"f\").splice(0)) {\r\n try {\r\n action();\r\n }\r\n catch (err) {\r\n errors.push(err);\r\n }\r\n }\r\n if (errors.length > 0) {\r\n throw (errors.length > 1 ? new AggregateError(errors) : errors[0]);\r\n }\r\n};\r\nclass StreamWriter {\r\n constructor(stream) {\r\n _StreamWriter_stream.set(this, void 0);\r\n __classPrivateFieldSet(this, _StreamWriter_stream, stream, \"f\");\r\n }\r\n write(p) {\r\n return new Promise((resolve, reject) => {\r\n __classPrivateFieldGet(this, _StreamWriter_stream, \"f\").write(p, (err) => {\r\n if (err) {\r\n reject(err);\r\n }\r\n else {\r\n resolve(p.byteLength);\r\n }\r\n });\r\n });\r\n }\r\n}\r\nexports.StreamWriter = StreamWriter;\r\n_StreamWriter_stream = new WeakMap();\r\n","\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.typescript = exports.deno = void 0;\r\nexports.deno = \"1.22.1\";\r\nexports.typescript = \"4.6.2\";\r\n","\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.PermissionStatus = exports.Permissions = exports.FsFile = exports.File = void 0;\r\nvar FsFile_js_1 = require(\"./classes/FsFile.js\");\r\nObject.defineProperty(exports, \"File\", { enumerable: true, get: function () { return FsFile_js_1.File; } });\r\nObject.defineProperty(exports, \"FsFile\", { enumerable: true, get: function () { return FsFile_js_1.FsFile; } });\r\nvar Permissions_js_1 = require(\"./classes/Permissions.js\");\r\nObject.defineProperty(exports, \"Permissions\", { enumerable: true, get: function () { return Permissions_js_1.Permissions; } });\r\nvar PermissionStatus_js_1 = require(\"./classes/PermissionStatus.js\");\r\nObject.defineProperty(exports, \"PermissionStatus\", { enumerable: true, get: function () { return PermissionStatus_js_1.PermissionStatus; } });\r\n","\"use strict\";\r\n///\r\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n var desc = Object.getOwnPropertyDescriptor(m, k);\r\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\r\n desc = { enumerable: true, get: function() { return m[k]; } };\r\n }\r\n Object.defineProperty(o, k2, desc);\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n}));\r\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n});\r\nvar __importStar = (this && this.__importStar) || function (mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n};\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.File = exports.FsFile = void 0;\r\nconst fs = __importStar(require(\"fs\"));\r\nconst fstat_js_1 = require(\"../functions/fstat.js\");\r\nconst fstatSync_js_1 = require(\"../functions/fstatSync.js\");\r\nconst ftruncate_js_1 = require(\"../functions/ftruncate.js\");\r\nconst ftruncateSync_js_1 = require(\"../functions/ftruncateSync.js\");\r\nconst read_js_1 = require(\"../functions/read.js\");\r\nconst readSync_js_1 = require(\"../functions/readSync.js\");\r\nconst write_js_1 = require(\"../functions/write.js\");\r\nconst writeSync_js_1 = require(\"../functions/writeSync.js\");\r\nclass FsFile {\r\n constructor(rid) {\r\n this.rid = rid;\r\n }\r\n async write(p) {\r\n return await (0, write_js_1.write)(this.rid, p);\r\n }\r\n writeSync(p) {\r\n return (0, writeSync_js_1.writeSync)(this.rid, p);\r\n }\r\n async truncate(len) {\r\n await (0, ftruncate_js_1.ftruncate)(this.rid, len);\r\n }\r\n truncateSync(len) {\r\n return (0, ftruncateSync_js_1.ftruncateSync)(this.rid, len);\r\n }\r\n read(p) {\r\n return (0, read_js_1.read)(this.rid, p);\r\n }\r\n readSync(p) {\r\n return (0, readSync_js_1.readSync)(this.rid, p);\r\n }\r\n seek(_offset, _whence) {\r\n throw new Error(\"Method not implemented.\");\r\n }\r\n seekSync(_offset, _whence) {\r\n throw new Error(\"Method not implemented.\");\r\n }\r\n async stat() {\r\n return await (0, fstat_js_1.fstat)(this.rid);\r\n }\r\n statSync() {\r\n return (0, fstatSync_js_1.fstatSync)(this.rid);\r\n }\r\n close() {\r\n fs.closeSync(this.rid);\r\n }\r\n get readable() {\r\n throw new Error(\"Not implemented.\");\r\n }\r\n get writable() {\r\n throw new Error(\"Not implemented.\");\r\n }\r\n}\r\nexports.FsFile = FsFile;\r\nconst File = FsFile;\r\nexports.File = File;\r\n","\"use strict\";\r\n///\r\nvar _a, _b;\r\nvar _c;\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.PermissionStatus = void 0;\r\n// The listeners don't actually matter because the state of these permissions\r\n// is constant and mocked as Node.js has all doors open.\r\n(_a = (_c = globalThis).EventTarget) !== null && _a !== void 0 ? _a : (_c.EventTarget = (_b = require(\"events\").EventTarget) !== null && _b !== void 0 ? _b : null);\r\nclass PermissionStatus extends EventTarget {\r\n /** @internal */\r\n constructor(state) {\r\n super();\r\n this.state = state;\r\n this.onchange = null;\r\n }\r\n}\r\nexports.PermissionStatus = PermissionStatus;\r\n","\"use strict\";\r\n///\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.Permissions = void 0;\r\nconst PermissionStatus_js_1 = require(\"../classes/PermissionStatus.js\");\r\nclass Permissions {\r\n query(_desc) {\r\n return Promise.resolve(new PermissionStatus_js_1.PermissionStatus(\"granted\"));\r\n }\r\n revoke(_desc) {\r\n return Promise.resolve(new PermissionStatus_js_1.PermissionStatus(\"denied\"));\r\n }\r\n request(desc) {\r\n return this.query(desc);\r\n }\r\n}\r\nexports.Permissions = Permissions;\r\n","\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.SeekMode = void 0;\r\nvar SeekMode_js_1 = require(\"./enums/SeekMode.js\");\r\nObject.defineProperty(exports, \"SeekMode\", { enumerable: true, get: function () { return SeekMode_js_1.SeekMode; } });\r\n","\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.SeekMode = void 0;\r\nvar SeekMode;\r\n(function (SeekMode) {\r\n SeekMode[SeekMode[\"Start\"] = 0] = \"Start\";\r\n SeekMode[SeekMode[\"Current\"] = 1] = \"Current\";\r\n SeekMode[SeekMode[\"End\"] = 2] = \"End\";\r\n})(SeekMode = exports.SeekMode || (exports.SeekMode = {}));\r\n","\"use strict\";\r\n// Command palette -> Organize imports\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.readSync = exports.readLinkSync = exports.readLink = exports.readFileSync = exports.readFile = exports.readDirSync = exports.readDir = exports.read = exports.openSync = exports.open = exports.mkdirSync = exports.mkdir = exports.memoryUsage = exports.makeTempFileSync = exports.makeTempFile = exports.makeTempDirSync = exports.makeTempDir = exports.lstatSync = exports.lstat = exports.listenTls = exports.listen = exports.linkSync = exports.link = exports.kill = exports.inspect = exports.ftruncateSync = exports.ftruncate = exports.fsyncSync = exports.fsync = exports.fstatSync = exports.fstat = exports.fdatasyncSync = exports.fdatasync = exports.exit = exports.execPath = exports.cwd = exports.createSync = exports.create = exports.copyFileSync = exports.copyFile = exports.copy = exports.connectTls = exports.connect = exports.close = exports.chownSync = exports.chown = exports.chmodSync = exports.chmod = exports.chdir = exports.isatty = void 0;\r\nexports.args = exports.writeTextFileSync = exports.writeTextFile = exports.writeSync = exports.writeFileSync = exports.writeFile = exports.write = exports.watchFs = exports.truncateSync = exports.truncate = exports.test = exports.symlinkSync = exports.symlink = exports.statSync = exports.stat = exports.shutdown = exports.run = exports.Process = exports.renameSync = exports.rename = exports.removeSync = exports.remove = exports.realPathSync = exports.realPath = exports.readTextFileSync = exports.readTextFile = void 0;\r\nvar tty_1 = require(\"tty\");\r\nObject.defineProperty(exports, \"isatty\", { enumerable: true, get: function () { return tty_1.isatty; } });\r\nvar chdir_js_1 = require(\"./functions/chdir.js\");\r\nObject.defineProperty(exports, \"chdir\", { enumerable: true, get: function () { return chdir_js_1.chdir; } });\r\nvar chmod_js_1 = require(\"./functions/chmod.js\");\r\nObject.defineProperty(exports, \"chmod\", { enumerable: true, get: function () { return chmod_js_1.chmod; } });\r\nvar chmodSync_js_1 = require(\"./functions/chmodSync.js\");\r\nObject.defineProperty(exports, \"chmodSync\", { enumerable: true, get: function () { return chmodSync_js_1.chmodSync; } });\r\nvar chown_js_1 = require(\"./functions/chown.js\");\r\nObject.defineProperty(exports, \"chown\", { enumerable: true, get: function () { return chown_js_1.chown; } });\r\nvar chownSync_js_1 = require(\"./functions/chownSync.js\");\r\nObject.defineProperty(exports, \"chownSync\", { enumerable: true, get: function () { return chownSync_js_1.chownSync; } });\r\nvar close_js_1 = require(\"./functions/close.js\");\r\nObject.defineProperty(exports, \"close\", { enumerable: true, get: function () { return close_js_1.close; } });\r\nvar connect_js_1 = require(\"./functions/connect.js\");\r\nObject.defineProperty(exports, \"connect\", { enumerable: true, get: function () { return connect_js_1.connect; } });\r\nvar connectTls_js_1 = require(\"./functions/connectTls.js\");\r\nObject.defineProperty(exports, \"connectTls\", { enumerable: true, get: function () { return connectTls_js_1.connectTls; } });\r\nvar copy_js_1 = require(\"./functions/copy.js\");\r\nObject.defineProperty(exports, \"copy\", { enumerable: true, get: function () { return copy_js_1.copy; } });\r\nvar copyFile_js_1 = require(\"./functions/copyFile.js\");\r\nObject.defineProperty(exports, \"copyFile\", { enumerable: true, get: function () { return copyFile_js_1.copyFile; } });\r\nvar copyFileSync_js_1 = require(\"./functions/copyFileSync.js\");\r\nObject.defineProperty(exports, \"copyFileSync\", { enumerable: true, get: function () { return copyFileSync_js_1.copyFileSync; } });\r\nvar create_js_1 = require(\"./functions/create.js\");\r\nObject.defineProperty(exports, \"create\", { enumerable: true, get: function () { return create_js_1.create; } });\r\nvar createSync_js_1 = require(\"./functions/createSync.js\");\r\nObject.defineProperty(exports, \"createSync\", { enumerable: true, get: function () { return createSync_js_1.createSync; } });\r\nvar cwd_js_1 = require(\"./functions/cwd.js\");\r\nObject.defineProperty(exports, \"cwd\", { enumerable: true, get: function () { return cwd_js_1.cwd; } });\r\nvar execPath_js_1 = require(\"./functions/execPath.js\");\r\nObject.defineProperty(exports, \"execPath\", { enumerable: true, get: function () { return execPath_js_1.execPath; } });\r\nvar exit_js_1 = require(\"./functions/exit.js\");\r\nObject.defineProperty(exports, \"exit\", { enumerable: true, get: function () { return exit_js_1.exit; } });\r\nvar fdatasync_js_1 = require(\"./functions/fdatasync.js\");\r\nObject.defineProperty(exports, \"fdatasync\", { enumerable: true, get: function () { return fdatasync_js_1.fdatasync; } });\r\nvar fdatasyncSync_js_1 = require(\"./functions/fdatasyncSync.js\");\r\nObject.defineProperty(exports, \"fdatasyncSync\", { enumerable: true, get: function () { return fdatasyncSync_js_1.fdatasyncSync; } });\r\nvar fstat_js_1 = require(\"./functions/fstat.js\");\r\nObject.defineProperty(exports, \"fstat\", { enumerable: true, get: function () { return fstat_js_1.fstat; } });\r\nvar fstatSync_js_1 = require(\"./functions/fstatSync.js\");\r\nObject.defineProperty(exports, \"fstatSync\", { enumerable: true, get: function () { return fstatSync_js_1.fstatSync; } });\r\nvar fsync_js_1 = require(\"./functions/fsync.js\");\r\nObject.defineProperty(exports, \"fsync\", { enumerable: true, get: function () { return fsync_js_1.fsync; } });\r\nvar fsyncSync_js_1 = require(\"./functions/fsyncSync.js\");\r\nObject.defineProperty(exports, \"fsyncSync\", { enumerable: true, get: function () { return fsyncSync_js_1.fsyncSync; } });\r\nvar ftruncate_js_1 = require(\"./functions/ftruncate.js\");\r\nObject.defineProperty(exports, \"ftruncate\", { enumerable: true, get: function () { return ftruncate_js_1.ftruncate; } });\r\nvar ftruncateSync_js_1 = require(\"./functions/ftruncateSync.js\");\r\nObject.defineProperty(exports, \"ftruncateSync\", { enumerable: true, get: function () { return ftruncateSync_js_1.ftruncateSync; } });\r\nvar inspect_js_1 = require(\"./functions/inspect.js\");\r\nObject.defineProperty(exports, \"inspect\", { enumerable: true, get: function () { return inspect_js_1.inspect; } });\r\nvar kill_js_1 = require(\"./functions/kill.js\");\r\nObject.defineProperty(exports, \"kill\", { enumerable: true, get: function () { return kill_js_1.kill; } });\r\nvar link_js_1 = require(\"./functions/link.js\");\r\nObject.defineProperty(exports, \"link\", { enumerable: true, get: function () { return link_js_1.link; } });\r\nvar linkSync_js_1 = require(\"./functions/linkSync.js\");\r\nObject.defineProperty(exports, \"linkSync\", { enumerable: true, get: function () { return linkSync_js_1.linkSync; } });\r\nvar listen_js_1 = require(\"./functions/listen.js\");\r\nObject.defineProperty(exports, \"listen\", { enumerable: true, get: function () { return listen_js_1.listen; } });\r\nvar listenTls_js_1 = require(\"./functions/listenTls.js\");\r\nObject.defineProperty(exports, \"listenTls\", { enumerable: true, get: function () { return listenTls_js_1.listenTls; } });\r\nvar lstat_js_1 = require(\"./functions/lstat.js\");\r\nObject.defineProperty(exports, \"lstat\", { enumerable: true, get: function () { return lstat_js_1.lstat; } });\r\nvar lstatSync_js_1 = require(\"./functions/lstatSync.js\");\r\nObject.defineProperty(exports, \"lstatSync\", { enumerable: true, get: function () { return lstatSync_js_1.lstatSync; } });\r\nvar makeTempDir_js_1 = require(\"./functions/makeTempDir.js\");\r\nObject.defineProperty(exports, \"makeTempDir\", { enumerable: true, get: function () { return makeTempDir_js_1.makeTempDir; } });\r\nvar makeTempDirSync_js_1 = require(\"./functions/makeTempDirSync.js\");\r\nObject.defineProperty(exports, \"makeTempDirSync\", { enumerable: true, get: function () { return makeTempDirSync_js_1.makeTempDirSync; } });\r\nvar makeTempFile_js_1 = require(\"./functions/makeTempFile.js\");\r\nObject.defineProperty(exports, \"makeTempFile\", { enumerable: true, get: function () { return makeTempFile_js_1.makeTempFile; } });\r\nvar makeTempFileSync_js_1 = require(\"./functions/makeTempFileSync.js\");\r\nObject.defineProperty(exports, \"makeTempFileSync\", { enumerable: true, get: function () { return makeTempFileSync_js_1.makeTempFileSync; } });\r\nvar memoryUsage_js_1 = require(\"./functions/memoryUsage.js\");\r\nObject.defineProperty(exports, \"memoryUsage\", { enumerable: true, get: function () { return memoryUsage_js_1.memoryUsage; } });\r\nvar mkdir_js_1 = require(\"./functions/mkdir.js\");\r\nObject.defineProperty(exports, \"mkdir\", { enumerable: true, get: function () { return mkdir_js_1.mkdir; } });\r\nvar mkdirSync_js_1 = require(\"./functions/mkdirSync.js\");\r\nObject.defineProperty(exports, \"mkdirSync\", { enumerable: true, get: function () { return mkdirSync_js_1.mkdirSync; } });\r\nvar open_js_1 = require(\"./functions/open.js\");\r\nObject.defineProperty(exports, \"open\", { enumerable: true, get: function () { return open_js_1.open; } });\r\nvar openSync_js_1 = require(\"./functions/openSync.js\");\r\nObject.defineProperty(exports, \"openSync\", { enumerable: true, get: function () { return openSync_js_1.openSync; } });\r\nvar read_js_1 = require(\"./functions/read.js\");\r\nObject.defineProperty(exports, \"read\", { enumerable: true, get: function () { return read_js_1.read; } });\r\nvar readDir_js_1 = require(\"./functions/readDir.js\");\r\nObject.defineProperty(exports, \"readDir\", { enumerable: true, get: function () { return readDir_js_1.readDir; } });\r\nvar readDirSync_js_1 = require(\"./functions/readDirSync.js\");\r\nObject.defineProperty(exports, \"readDirSync\", { enumerable: true, get: function () { return readDirSync_js_1.readDirSync; } });\r\nvar readFile_js_1 = require(\"./functions/readFile.js\");\r\nObject.defineProperty(exports, \"readFile\", { enumerable: true, get: function () { return readFile_js_1.readFile; } });\r\nvar readFileSync_js_1 = require(\"./functions/readFileSync.js\");\r\nObject.defineProperty(exports, \"readFileSync\", { enumerable: true, get: function () { return readFileSync_js_1.readFileSync; } });\r\nvar readLink_js_1 = require(\"./functions/readLink.js\");\r\nObject.defineProperty(exports, \"readLink\", { enumerable: true, get: function () { return readLink_js_1.readLink; } });\r\nvar readLinkSync_js_1 = require(\"./functions/readLinkSync.js\");\r\nObject.defineProperty(exports, \"readLinkSync\", { enumerable: true, get: function () { return readLinkSync_js_1.readLinkSync; } });\r\nvar readSync_js_1 = require(\"./functions/readSync.js\");\r\nObject.defineProperty(exports, \"readSync\", { enumerable: true, get: function () { return readSync_js_1.readSync; } });\r\nvar readTextFile_js_1 = require(\"./functions/readTextFile.js\");\r\nObject.defineProperty(exports, \"readTextFile\", { enumerable: true, get: function () { return readTextFile_js_1.readTextFile; } });\r\nvar readTextFileSync_js_1 = require(\"./functions/readTextFileSync.js\");\r\nObject.defineProperty(exports, \"readTextFileSync\", { enumerable: true, get: function () { return readTextFileSync_js_1.readTextFileSync; } });\r\nvar realPath_js_1 = require(\"./functions/realPath.js\");\r\nObject.defineProperty(exports, \"realPath\", { enumerable: true, get: function () { return realPath_js_1.realPath; } });\r\nvar realPathSync_js_1 = require(\"./functions/realPathSync.js\");\r\nObject.defineProperty(exports, \"realPathSync\", { enumerable: true, get: function () { return realPathSync_js_1.realPathSync; } });\r\nvar remove_js_1 = require(\"./functions/remove.js\");\r\nObject.defineProperty(exports, \"remove\", { enumerable: true, get: function () { return remove_js_1.remove; } });\r\nvar removeSync_js_1 = require(\"./functions/removeSync.js\");\r\nObject.defineProperty(exports, \"removeSync\", { enumerable: true, get: function () { return removeSync_js_1.removeSync; } });\r\nvar rename_js_1 = require(\"./functions/rename.js\");\r\nObject.defineProperty(exports, \"rename\", { enumerable: true, get: function () { return rename_js_1.rename; } });\r\nvar renameSync_js_1 = require(\"./functions/renameSync.js\");\r\nObject.defineProperty(exports, \"renameSync\", { enumerable: true, get: function () { return renameSync_js_1.renameSync; } });\r\nvar run_js_1 = require(\"./functions/run.js\");\r\nObject.defineProperty(exports, \"Process\", { enumerable: true, get: function () { return run_js_1.Process; } });\r\nObject.defineProperty(exports, \"run\", { enumerable: true, get: function () { return run_js_1.run; } });\r\nvar shutdown_js_1 = require(\"./functions/shutdown.js\");\r\nObject.defineProperty(exports, \"shutdown\", { enumerable: true, get: function () { return shutdown_js_1.shutdown; } });\r\nvar stat_js_1 = require(\"./functions/stat.js\");\r\nObject.defineProperty(exports, \"stat\", { enumerable: true, get: function () { return stat_js_1.stat; } });\r\nvar statSync_js_1 = require(\"./functions/statSync.js\");\r\nObject.defineProperty(exports, \"statSync\", { enumerable: true, get: function () { return statSync_js_1.statSync; } });\r\nvar symlink_js_1 = require(\"./functions/symlink.js\");\r\nObject.defineProperty(exports, \"symlink\", { enumerable: true, get: function () { return symlink_js_1.symlink; } });\r\nvar symlinkSync_js_1 = require(\"./functions/symlinkSync.js\");\r\nObject.defineProperty(exports, \"symlinkSync\", { enumerable: true, get: function () { return symlinkSync_js_1.symlinkSync; } });\r\nvar test_js_1 = require(\"./functions/test.js\");\r\nObject.defineProperty(exports, \"test\", { enumerable: true, get: function () { return test_js_1.test; } });\r\nvar truncate_js_1 = require(\"./functions/truncate.js\");\r\nObject.defineProperty(exports, \"truncate\", { enumerable: true, get: function () { return truncate_js_1.truncate; } });\r\nvar truncateSync_js_1 = require(\"./functions/truncateSync.js\");\r\nObject.defineProperty(exports, \"truncateSync\", { enumerable: true, get: function () { return truncateSync_js_1.truncateSync; } });\r\nvar watchFs_js_1 = require(\"./functions/watchFs.js\");\r\nObject.defineProperty(exports, \"watchFs\", { enumerable: true, get: function () { return watchFs_js_1.watchFs; } });\r\nvar write_js_1 = require(\"./functions/write.js\");\r\nObject.defineProperty(exports, \"write\", { enumerable: true, get: function () { return write_js_1.write; } });\r\nvar writeFile_js_1 = require(\"./functions/writeFile.js\");\r\nObject.defineProperty(exports, \"writeFile\", { enumerable: true, get: function () { return writeFile_js_1.writeFile; } });\r\nvar writeFileSync_js_1 = require(\"./functions/writeFileSync.js\");\r\nObject.defineProperty(exports, \"writeFileSync\", { enumerable: true, get: function () { return writeFileSync_js_1.writeFileSync; } });\r\nvar writeSync_js_1 = require(\"./functions/writeSync.js\");\r\nObject.defineProperty(exports, \"writeSync\", { enumerable: true, get: function () { return writeSync_js_1.writeSync; } });\r\nvar writeTextFile_js_1 = require(\"./functions/writeTextFile.js\");\r\nObject.defineProperty(exports, \"writeTextFile\", { enumerable: true, get: function () { return writeTextFile_js_1.writeTextFile; } });\r\nvar writeTextFileSync_js_1 = require(\"./functions/writeTextFileSync.js\");\r\nObject.defineProperty(exports, \"writeTextFileSync\", { enumerable: true, get: function () { return writeTextFileSync_js_1.writeTextFileSync; } });\r\nvar args_js_1 = require(\"./variables/args.js\");\r\nObject.defineProperty(exports, \"args\", { enumerable: true, get: function () { return args_js_1.args; } });\r\n","\"use strict\";\r\n///\r\nvar __importDefault = (this && this.__importDefault) || function (mod) {\r\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\r\n};\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.chdir = void 0;\r\nconst url_1 = require(\"url\");\r\nconst errorMap_js_1 = __importDefault(require(\"../../internal/errorMap.js\"));\r\nconst variables_js_1 = require(\"../variables.js\");\r\nconst chdir = function (path) {\r\n try {\r\n return process.chdir(path instanceof URL ? (0, url_1.fileURLToPath)(path) : path);\r\n }\r\n catch (error) {\r\n if ((error === null || error === void 0 ? void 0 : error.code) === \"ENOENT\") {\r\n throw new variables_js_1.errors.NotFound(`No such file or directory (os error 2), chdir '${path}'`);\r\n }\r\n throw (0, errorMap_js_1.default)(error);\r\n }\r\n};\r\nexports.chdir = chdir;\r\n","\"use strict\";\r\n///\r\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n var desc = Object.getOwnPropertyDescriptor(m, k);\r\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\r\n desc = { enumerable: true, get: function() { return m[k]; } };\r\n }\r\n Object.defineProperty(o, k2, desc);\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n}));\r\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n});\r\nvar __importStar = (this && this.__importStar) || function (mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n};\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.chmod = void 0;\r\nconst fs = __importStar(require(\"fs/promises\"));\r\nexports.chmod = fs.chmod;\r\n","\"use strict\";\r\n///\r\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n var desc = Object.getOwnPropertyDescriptor(m, k);\r\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\r\n desc = { enumerable: true, get: function() { return m[k]; } };\r\n }\r\n Object.defineProperty(o, k2, desc);\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n}));\r\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n});\r\nvar __importStar = (this && this.__importStar) || function (mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n};\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.chmodSync = void 0;\r\nconst fs = __importStar(require(\"fs\"));\r\nexports.chmodSync = fs.chmodSync;\r\n","\"use strict\";\r\n///\r\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n var desc = Object.getOwnPropertyDescriptor(m, k);\r\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\r\n desc = { enumerable: true, get: function() { return m[k]; } };\r\n }\r\n Object.defineProperty(o, k2, desc);\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n}));\r\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n});\r\nvar __importStar = (this && this.__importStar) || function (mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n};\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.chown = void 0;\r\nconst fs = __importStar(require(\"fs/promises\"));\r\nconst chown = async (path, uid, gid) => await fs.chown(path, uid !== null && uid !== void 0 ? uid : -1, gid !== null && gid !== void 0 ? gid : -1);\r\nexports.chown = chown;\r\n","\"use strict\";\r\n///\r\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n var desc = Object.getOwnPropertyDescriptor(m, k);\r\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\r\n desc = { enumerable: true, get: function() { return m[k]; } };\r\n }\r\n Object.defineProperty(o, k2, desc);\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n}));\r\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n});\r\nvar __importStar = (this && this.__importStar) || function (mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n};\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.chownSync = void 0;\r\nconst fs = __importStar(require(\"fs\"));\r\nconst chownSync = (path, uid, gid) => fs.chownSync(path, uid !== null && uid !== void 0 ? uid : -1, gid !== null && gid !== void 0 ? gid : -1);\r\nexports.chownSync = chownSync;\r\n","\"use strict\";\r\n///\r\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n var desc = Object.getOwnPropertyDescriptor(m, k);\r\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\r\n desc = { enumerable: true, get: function() { return m[k]; } };\r\n }\r\n Object.defineProperty(o, k2, desc);\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n}));\r\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n});\r\nvar __importStar = (this && this.__importStar) || function (mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n};\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.close = void 0;\r\nconst fs = __importStar(require(\"fs\"));\r\nexports.close = fs.closeSync;\r\n","\"use strict\";\r\n///\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.connect = void 0;\r\nconst net_1 = require(\"net\");\r\nconst Conn_js_1 = require(\"../../internal/Conn.js\");\r\nconst connect = function connect(options) {\r\n if (options.transport === \"unix\") {\r\n throw new Error(\"Unstable UnixConnectOptions is not implemented\");\r\n }\r\n const { transport = \"tcp\", hostname = \"127.0.0.1\", port } = options;\r\n if (transport !== \"tcp\") {\r\n throw new Error(\"Deno.connect is only implemented for transport: tcp\");\r\n }\r\n const socket = (0, net_1.createConnection)({ port, host: hostname });\r\n socket.on(\"error\", (err) => console.error(err));\r\n return new Promise((resolve) => {\r\n socket.once(\"connect\", () => {\r\n // @ts-expect-error undocumented socket._handle property\r\n const rid = socket._handle.fd;\r\n const localAddr = {\r\n // cannot be undefined while socket is connected\r\n hostname: socket.localAddress,\r\n port: socket.localPort,\r\n transport: \"tcp\",\r\n };\r\n const remoteAddr = {\r\n // cannot be undefined while socket is connected\r\n hostname: socket.remoteAddress,\r\n port: socket.remotePort,\r\n transport: \"tcp\",\r\n };\r\n resolve(new Conn_js_1.Conn(rid, localAddr, remoteAddr, socket));\r\n });\r\n });\r\n};\r\nexports.connect = connect;\r\n","\"use strict\";\r\n///\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.connectTls = void 0;\r\nconst tls_1 = require(\"tls\");\r\nconst Conn_js_1 = require(\"../../internal/Conn.js\");\r\nconst readTextFile_js_1 = require(\"./readTextFile.js\");\r\nconst connectTls = async function connectTls({ port, hostname = \"127.0.0.1\", certFile }) {\r\n const cert = certFile && await (0, readTextFile_js_1.readTextFile)(certFile);\r\n const socket = (0, tls_1.connect)({ port, host: hostname, cert });\r\n return new Promise((resolve) => {\r\n socket.on(\"connect\", () => {\r\n // @ts-expect-error undocumented socket._handle property\r\n const rid = socket._handle.fd;\r\n const localAddr = {\r\n // cannot be undefined while socket is connected\r\n hostname: socket.localAddress,\r\n port: socket.localPort,\r\n transport: \"tcp\",\r\n };\r\n const remoteAddr = {\r\n // cannot be undefined while socket is connected\r\n hostname: socket.remoteAddress,\r\n port: socket.remotePort,\r\n transport: \"tcp\",\r\n };\r\n resolve(new Conn_js_1.TlsConn(rid, localAddr, remoteAddr, socket));\r\n });\r\n });\r\n};\r\nexports.connectTls = connectTls;\r\n","\"use strict\";\r\n///\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.copy = void 0;\r\nconst consts_js_1 = require(\"../../internal/consts.js\");\r\nconst copy = async function copy(src, dst, options) {\r\n var _a;\r\n let n = 0;\r\n const bufSize = (_a = options === null || options === void 0 ? void 0 : options.bufSize) !== null && _a !== void 0 ? _a : consts_js_1.DEFAULT_BUFFER_SIZE;\r\n const b = new Uint8Array(bufSize);\r\n let gotEOF = false;\r\n while (gotEOF === false) {\r\n const result = await src.read(b);\r\n if (result === null) {\r\n gotEOF = true;\r\n }\r\n else {\r\n let nwritten = 0;\r\n while (nwritten < result) {\r\n nwritten += await dst.write(b.subarray(nwritten, result));\r\n }\r\n n += nwritten;\r\n }\r\n }\r\n return n;\r\n};\r\nexports.copy = copy;\r\n","\"use strict\";\r\n///\r\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n var desc = Object.getOwnPropertyDescriptor(m, k);\r\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\r\n desc = { enumerable: true, get: function() { return m[k]; } };\r\n }\r\n Object.defineProperty(o, k2, desc);\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n}));\r\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n});\r\nvar __importStar = (this && this.__importStar) || function (mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n};\r\nvar __importDefault = (this && this.__importDefault) || function (mod) {\r\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\r\n};\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.copyFile = void 0;\r\nconst fs = __importStar(require(\"fs/promises\"));\r\nconst errorMap_js_1 = __importDefault(require(\"../../internal/errorMap.js\"));\r\nconst errors = __importStar(require(\"../variables/errors.js\"));\r\nconst copyFile = async (src, dest) => {\r\n try {\r\n await fs.copyFile(src, dest);\r\n }\r\n catch (error) {\r\n if ((error === null || error === void 0 ? void 0 : error.code) === \"ENOENT\") {\r\n throw new errors.NotFound(`File not found, copy '${src}' -> '${dest}'`);\r\n }\r\n throw (0, errorMap_js_1.default)(error);\r\n }\r\n};\r\nexports.copyFile = copyFile;\r\n","\"use strict\";\r\n///\r\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n var desc = Object.getOwnPropertyDescriptor(m, k);\r\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\r\n desc = { enumerable: true, get: function() { return m[k]; } };\r\n }\r\n Object.defineProperty(o, k2, desc);\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n}));\r\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n});\r\nvar __importStar = (this && this.__importStar) || function (mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n};\r\nvar __importDefault = (this && this.__importDefault) || function (mod) {\r\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\r\n};\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.copyFileSync = void 0;\r\nconst fs = __importStar(require(\"fs\"));\r\nconst errorMap_js_1 = __importDefault(require(\"../../internal/errorMap.js\"));\r\nconst errors = __importStar(require(\"../variables/errors.js\"));\r\nconst copyFileSync = (src, dest) => {\r\n try {\r\n fs.copyFileSync(src, dest);\r\n }\r\n catch (error) {\r\n if ((error === null || error === void 0 ? void 0 : error.code) === \"ENOENT\") {\r\n throw new errors.NotFound(`File not found, copy '${src}' -> '${dest}'`);\r\n }\r\n throw (0, errorMap_js_1.default)(error);\r\n }\r\n};\r\nexports.copyFileSync = copyFileSync;\r\n","\"use strict\";\r\n///\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.create = void 0;\r\nconst open_js_1 = require(\"./open.js\");\r\nconst create = async function create(path) {\r\n return await (0, open_js_1.open)(path, { write: true, create: true, truncate: true });\r\n};\r\nexports.create = create;\r\n","\"use strict\";\r\n///\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.createSync = void 0;\r\nconst openSync_js_1 = require(\"./openSync.js\");\r\nconst createSync = function createSync(path) {\r\n return (0, openSync_js_1.openSync)(path, {\r\n create: true,\r\n truncate: true,\r\n read: true,\r\n write: true,\r\n });\r\n};\r\nexports.createSync = createSync;\r\n","\"use strict\";\r\n///\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.cwd = void 0;\r\nexports.cwd = process.cwd;\r\n","\"use strict\";\r\n///\r\nvar __importDefault = (this && this.__importDefault) || function (mod) {\r\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\r\n};\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.execPath = void 0;\r\nconst which_1 = __importDefault(require(\"which\"));\r\nconst execPath = () => which_1.default.sync(\"deno\");\r\nexports.execPath = execPath;\r\n","\"use strict\";\r\n///\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.exit = void 0;\r\nconst exit = function exit(code) {\r\n return process.exit(code);\r\n};\r\nexports.exit = exit;\r\n","\"use strict\";\r\n///\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.fdatasync = void 0;\r\nconst fs_1 = require(\"fs\");\r\nconst util_1 = require(\"util\");\r\nconst _fdatasync = (0, util_1.promisify)(fs_1.fdatasync);\r\nexports.fdatasync = _fdatasync;\r\n","\"use strict\";\r\n///\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.fdatasyncSync = void 0;\r\nconst fs_1 = require(\"fs\");\r\nexports.fdatasyncSync = fs_1.fdatasyncSync;\r\n","\"use strict\";\r\n///\r\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n var desc = Object.getOwnPropertyDescriptor(m, k);\r\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\r\n desc = { enumerable: true, get: function() { return m[k]; } };\r\n }\r\n Object.defineProperty(o, k2, desc);\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n}));\r\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n});\r\nvar __importStar = (this && this.__importStar) || function (mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n};\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.fstat = void 0;\r\nconst fs = __importStar(require(\"fs\"));\r\nconst util_1 = require(\"util\");\r\nconst stat_js_1 = require(\"./stat.js\");\r\nconst nodeFstat = (0, util_1.promisify)(fs.fstat);\r\nconst fstat = async function (fd) {\r\n return (0, stat_js_1.denoifyFileInfo)(await nodeFstat(fd));\r\n};\r\nexports.fstat = fstat;\r\n","\"use strict\";\r\n///\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.fstatSync = void 0;\r\nconst fs_1 = require(\"fs\");\r\nconst stat_js_1 = require(\"./stat.js\");\r\nconst fstatSync = function fstatSync(fd) {\r\n return (0, stat_js_1.denoifyFileInfo)((0, fs_1.fstatSync)(fd));\r\n};\r\nexports.fstatSync = fstatSync;\r\n","\"use strict\";\r\n///\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.fsync = void 0;\r\nconst fs_1 = require(\"fs\");\r\nconst util_1 = require(\"util\");\r\nconst fsync = function fsync(rid) {\r\n return (0, util_1.promisify)(fs_1.fsync)(rid);\r\n};\r\nexports.fsync = fsync;\r\n","\"use strict\";\r\n///\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.fsyncSync = void 0;\r\nconst fs_1 = require(\"fs\");\r\nconst fsyncSync = function fsyncSync(rid) {\r\n return (0, fs_1.fsyncSync)(rid);\r\n};\r\nexports.fsyncSync = fsyncSync;\r\n","\"use strict\";\r\n///\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.ftruncate = void 0;\r\nconst fs_1 = require(\"fs\");\r\nconst util_1 = require(\"util\");\r\nconst _ftruncate = (0, util_1.promisify)(fs_1.ftruncate);\r\nexports.ftruncate = _ftruncate;\r\n","\"use strict\";\r\n///\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.ftruncateSync = void 0;\r\nconst fs_1 = require(\"fs\");\r\nexports.ftruncateSync = fs_1.ftruncateSync;\r\n","\"use strict\";\r\n///\r\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n var desc = Object.getOwnPropertyDescriptor(m, k);\r\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\r\n desc = { enumerable: true, get: function() { return m[k]; } };\r\n }\r\n Object.defineProperty(o, k2, desc);\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n}));\r\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n});\r\nvar __importStar = (this && this.__importStar) || function (mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n};\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.inspect = void 0;\r\nconst util = __importStar(require(\"util\"));\r\nconst inspect = (value, options = {}) => util.inspect(value, options);\r\nexports.inspect = inspect;\r\n","\"use strict\";\r\n/// \r\nvar __importDefault = (this && this.__importDefault) || function (mod) {\r\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\r\n};\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.kill = void 0;\r\nconst os_1 = __importDefault(require(\"os\"));\r\nconst process_1 = __importDefault(require(\"process\"));\r\nconst kill = function (pid, signo) {\r\n if (pid < 0 && os_1.default.platform() === \"win32\") {\r\n throw new TypeError(\"Invalid pid\");\r\n }\r\n process_1.default.kill(pid, signo);\r\n};\r\nexports.kill = kill;\r\n","\"use strict\";\r\n///\r\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n var desc = Object.getOwnPropertyDescriptor(m, k);\r\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\r\n desc = { enumerable: true, get: function() { return m[k]; } };\r\n }\r\n Object.defineProperty(o, k2, desc);\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n}));\r\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n});\r\nvar __importStar = (this && this.__importStar) || function (mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n};\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.link = void 0;\r\nconst fs = __importStar(require(\"fs/promises\"));\r\nexports.link = fs.link;\r\n","\"use strict\";\r\n///\r\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n var desc = Object.getOwnPropertyDescriptor(m, k);\r\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\r\n desc = { enumerable: true, get: function() { return m[k]; } };\r\n }\r\n Object.defineProperty(o, k2, desc);\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n}));\r\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n});\r\nvar __importStar = (this && this.__importStar) || function (mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n};\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.linkSync = void 0;\r\nconst fs = __importStar(require(\"fs\"));\r\nexports.linkSync = fs.linkSync;\r\n","\"use strict\";\r\n///\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.listen = void 0;\r\nconst net_1 = require(\"net\");\r\nconst Conn_js_1 = require(\"../../internal/Conn.js\");\r\nconst Listener_js_1 = require(\"../../internal/Listener.js\");\r\nasync function* _listen(server, waitFor) {\r\n await waitFor;\r\n while (server.listening) {\r\n yield new Promise((resolve) => server.once(\"connection\", (socket) => {\r\n socket.on(\"error\", (err) => console.error(err));\r\n // @ts-expect-error undocumented socket._handle property\r\n const rid = socket._handle.fd;\r\n const localAddr = {\r\n // cannot be undefined while socket is connected\r\n hostname: socket.localAddress,\r\n port: socket.localPort,\r\n transport: \"tcp\",\r\n };\r\n const remoteAddr = {\r\n // cannot be undefined while socket is connected\r\n hostname: socket.remoteAddress,\r\n port: socket.remotePort,\r\n transport: \"tcp\",\r\n };\r\n resolve(new Conn_js_1.Conn(rid, localAddr, remoteAddr));\r\n }));\r\n }\r\n}\r\nconst listen = function listen(options) {\r\n if (options.transport === \"unix\") {\r\n throw new Error(\"Unstable UnixListenOptions is not implemented\");\r\n }\r\n const { port, hostname = \"0.0.0.0\", transport = \"tcp\" } = options;\r\n if (transport !== \"tcp\") {\r\n throw new Error(\"Deno.listen is only implemented for transport: tcp\");\r\n }\r\n const server = (0, net_1.createServer)();\r\n const waitFor = new Promise((resolve) => \r\n // server._handle.fd is assigned immediately on .listen()\r\n server.listen(port, hostname, resolve));\r\n // @ts-expect-error undocumented socket._handle property\r\n const listener = new Listener_js_1.Listener(server._handle.fd, {\r\n hostname,\r\n port,\r\n transport: \"tcp\",\r\n }, _listen(server, waitFor));\r\n return listener;\r\n};\r\nexports.listen = listen;\r\n","\"use strict\";\r\n///\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.listenTls = void 0;\r\nconst tls_1 = require(\"tls\");\r\nconst Conn_js_1 = require(\"../../internal/Conn.js\");\r\nconst Listener_js_1 = require(\"../../internal/Listener.js\");\r\nconst readTextFileSync_js_1 = require(\"./readTextFileSync.js\");\r\nasync function* _listen(server, waitFor) {\r\n await waitFor;\r\n while (server.listening) {\r\n yield new Promise((resolve) => server.once(\"secureConnection\", (socket) => {\r\n socket.on(\"error\", (err) => console.error(err));\r\n // @ts-expect-error undocumented socket._handle property\r\n const rid = socket._handle.fd;\r\n const localAddr = {\r\n // cannot be undefined while socket is connected\r\n hostname: socket.localAddress,\r\n port: socket.localPort,\r\n transport: \"tcp\",\r\n };\r\n const remoteAddr = {\r\n // cannot be undefined while socket is connected\r\n hostname: socket.remoteAddress,\r\n port: socket.remotePort,\r\n transport: \"tcp\",\r\n };\r\n resolve(new Conn_js_1.TlsConn(rid, localAddr, remoteAddr));\r\n }));\r\n }\r\n}\r\nconst listenTls = function listen({ port, hostname = \"0.0.0.0\", transport = \"tcp\", certFile, keyFile }) {\r\n if (transport !== \"tcp\") {\r\n throw new Error(\"Deno.listen is only implemented for transport: tcp\");\r\n }\r\n const [cert, key] = [certFile, keyFile].map((f) => f == null ? undefined : (0, readTextFileSync_js_1.readTextFileSync)(f));\r\n const server = (0, tls_1.createServer)({ cert, key });\r\n const waitFor = new Promise((resolve) => \r\n // server._handle.fd is assigned immediately on .listen()\r\n server.listen(port, hostname, resolve));\r\n // @ts-expect-error undocumented socket._handle property\r\n const listener = new Listener_js_1.Listener(server._handle.fd, {\r\n hostname,\r\n port,\r\n transport: \"tcp\",\r\n }, _listen(server, waitFor));\r\n return listener;\r\n};\r\nexports.listenTls = listenTls;\r\n","\"use strict\";\r\n///\r\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n var desc = Object.getOwnPropertyDescriptor(m, k);\r\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\r\n desc = { enumerable: true, get: function() { return m[k]; } };\r\n }\r\n Object.defineProperty(o, k2, desc);\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n}));\r\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n});\r\nvar __importStar = (this && this.__importStar) || function (mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n};\r\nvar __importDefault = (this && this.__importDefault) || function (mod) {\r\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\r\n};\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.lstat = void 0;\r\nconst fs = __importStar(require(\"fs/promises\"));\r\nconst stat_js_1 = require(\"./stat.js\");\r\nconst errorMap_js_1 = __importDefault(require(\"../../internal/errorMap.js\"));\r\nconst lstat = async (path) => {\r\n try {\r\n return (0, stat_js_1.denoifyFileInfo)(await fs.lstat(path));\r\n }\r\n catch (e) {\r\n throw (0, errorMap_js_1.default)(e);\r\n }\r\n};\r\nexports.lstat = lstat;\r\n","\"use strict\";\r\n///\r\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n var desc = Object.getOwnPropertyDescriptor(m, k);\r\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\r\n desc = { enumerable: true, get: function() { return m[k]; } };\r\n }\r\n Object.defineProperty(o, k2, desc);\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n}));\r\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n});\r\nvar __importStar = (this && this.__importStar) || function (mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n};\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.lstatSync = void 0;\r\nconst fs = __importStar(require(\"fs\"));\r\nconst stat_js_1 = require(\"./stat.js\");\r\nconst lstatSync = (path) => (0, stat_js_1.denoifyFileInfo)(fs.lstatSync(path));\r\nexports.lstatSync = lstatSync;\r\n","\"use strict\";\r\n///\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.makeTempDir = void 0;\r\nconst promises_1 = require(\"fs/promises\");\r\nconst path_1 = require(\"path\");\r\nconst os_1 = require(\"os\");\r\nconst makeTempDir = function makeTempDir({ prefix = \"\" } = {}) {\r\n return (0, promises_1.mkdtemp)((0, path_1.join)((0, os_1.tmpdir)(), prefix || \"/\"));\r\n};\r\nexports.makeTempDir = makeTempDir;\r\n","\"use strict\";\r\n///\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.makeTempDirSync = void 0;\r\nconst fs_1 = require(\"fs\");\r\nconst path_1 = require(\"path\");\r\nconst os_1 = require(\"os\");\r\nconst makeTempDirSync = function makeTempDirSync({ prefix = \"\" } = {}) {\r\n return (0, fs_1.mkdtempSync)((0, path_1.join)((0, os_1.tmpdir)(), prefix || \"/\"));\r\n};\r\nexports.makeTempDirSync = makeTempDirSync;\r\n","\"use strict\";\r\n///\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.makeTempFile = void 0;\r\nconst os_1 = require(\"os\");\r\nconst path_1 = require(\"path\");\r\nconst random_id_js_1 = require(\"../../internal/random_id.js\");\r\nconst writeTextFile_js_1 = require(\"./writeTextFile.js\");\r\nconst makeTempFile = async function makeTempFile({ prefix = \"\" } = {}) {\r\n const name = (0, path_1.join)((0, os_1.tmpdir)(), prefix, (0, random_id_js_1.randomId)());\r\n await (0, writeTextFile_js_1.writeTextFile)(name, \"\");\r\n return name;\r\n};\r\nexports.makeTempFile = makeTempFile;\r\n","\"use strict\";\r\n///\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.makeTempFileSync = void 0;\r\nconst os_1 = require(\"os\");\r\nconst path_1 = require(\"path\");\r\nconst random_id_js_1 = require(\"../../internal/random_id.js\");\r\nconst writeTextFileSync_js_1 = require(\"./writeTextFileSync.js\");\r\nconst makeTempFileSync = function makeTempFileSync({ prefix = \"\" } = {}) {\r\n const name = (0, path_1.join)((0, os_1.tmpdir)(), prefix, (0, random_id_js_1.randomId)());\r\n (0, writeTextFileSync_js_1.writeTextFileSync)(name, \"\");\r\n return name;\r\n};\r\nexports.makeTempFileSync = makeTempFileSync;\r\n","\"use strict\";\r\n///\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.memoryUsage = void 0;\r\nexports.memoryUsage = process.memoryUsage;\r\n","\"use strict\";\r\n///\r\nvar __importDefault = (this && this.__importDefault) || function (mod) {\r\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\r\n};\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.mkdir = void 0;\r\nconst promises_1 = require(\"fs/promises\");\r\nconst errorMap_js_1 = __importDefault(require(\"../../internal/errorMap.js\"));\r\nconst variables_js_1 = require(\"../variables.js\");\r\nconst mkdir = async function mkdir(path, options) {\r\n try {\r\n await (0, promises_1.mkdir)(path, options);\r\n }\r\n catch (error) {\r\n if ((error === null || error === void 0 ? void 0 : error.code) === \"EEXIST\") {\r\n throw new variables_js_1.errors.AlreadyExists(`File exists (os error 17), mkdir '${path}'`);\r\n }\r\n throw (0, errorMap_js_1.default)(error);\r\n }\r\n};\r\nexports.mkdir = mkdir;\r\n","\"use strict\";\r\n///\r\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n var desc = Object.getOwnPropertyDescriptor(m, k);\r\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\r\n desc = { enumerable: true, get: function() { return m[k]; } };\r\n }\r\n Object.defineProperty(o, k2, desc);\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n}));\r\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n});\r\nvar __importStar = (this && this.__importStar) || function (mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n};\r\nvar __importDefault = (this && this.__importDefault) || function (mod) {\r\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\r\n};\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.mkdirSync = void 0;\r\nconst fs = __importStar(require(\"fs\"));\r\nconst errorMap_js_1 = __importDefault(require(\"../../internal/errorMap.js\"));\r\nconst variables_js_1 = require(\"../variables.js\");\r\nconst mkdirSync = (path, options) => {\r\n try {\r\n fs.mkdirSync(path, options);\r\n }\r\n catch (error) {\r\n if ((error === null || error === void 0 ? void 0 : error.code) === \"EEXIST\") {\r\n throw new variables_js_1.errors.AlreadyExists(`File exists (os error 17), mkdir '${path}'`);\r\n }\r\n throw (0, errorMap_js_1.default)(error);\r\n }\r\n};\r\nexports.mkdirSync = mkdirSync;\r\n","\"use strict\";\r\n///\r\nvar __importDefault = (this && this.__importDefault) || function (mod) {\r\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\r\n};\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.open = void 0;\r\nconst fs_1 = require(\"fs\");\r\nconst util_1 = require(\"util\");\r\nconst FsFile_js_1 = require(\"../classes/FsFile.js\");\r\nconst fs_flags_js_1 = require(\"../../internal/fs_flags.js\");\r\nconst errorMap_js_1 = __importDefault(require(\"../../internal/errorMap.js\"));\r\nconst nodeOpen = (0, util_1.promisify)(fs_1.open);\r\nconst open = async function open(path, { read, write, append, truncate, create, createNew, mode = 0o666 } = {\r\n read: true,\r\n}) {\r\n const flagMode = (0, fs_flags_js_1.getFsFlag)({\r\n read,\r\n write,\r\n append,\r\n truncate,\r\n create,\r\n createNew,\r\n });\r\n try {\r\n const fd = await nodeOpen(path, flagMode, mode);\r\n return new FsFile_js_1.File(fd);\r\n }\r\n catch (err) {\r\n throw (0, errorMap_js_1.default)(err);\r\n }\r\n};\r\nexports.open = open;\r\n","\"use strict\";\r\n///\r\nvar __importDefault = (this && this.__importDefault) || function (mod) {\r\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\r\n};\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.openSync = void 0;\r\nconst fs_1 = require(\"fs\");\r\nconst FsFile_js_1 = require(\"../classes/FsFile.js\");\r\nconst fs_flags_js_1 = require(\"../../internal/fs_flags.js\");\r\nconst errorMap_js_1 = __importDefault(require(\"../../internal/errorMap.js\"));\r\nconst openSync = function openSync(path, { read, write, append, truncate, create, createNew, mode = 0o666 } = {\r\n read: true,\r\n}) {\r\n const flagMode = (0, fs_flags_js_1.getFsFlag)({\r\n read,\r\n write,\r\n append,\r\n truncate,\r\n create,\r\n createNew,\r\n });\r\n try {\r\n const fd = (0, fs_1.openSync)(path, flagMode, mode);\r\n return new FsFile_js_1.File(fd);\r\n }\r\n catch (err) {\r\n throw (0, errorMap_js_1.default)(err);\r\n }\r\n};\r\nexports.openSync = openSync;\r\n","\"use strict\";\r\n///\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.read = void 0;\r\nconst util_1 = require(\"util\");\r\nconst fs_1 = require(\"fs\");\r\nconst _read = (0, util_1.promisify)(fs_1.read);\r\nconst read = async function read(rid, buffer) {\r\n if (buffer == null) {\r\n throw new TypeError(\"Buffer must not be null.\");\r\n }\r\n if (buffer.length === 0) {\r\n return 0;\r\n }\r\n const { bytesRead } = await _read(rid, buffer, 0, buffer.length, null);\r\n // node returns 0 on EOF, Deno expects null\r\n return bytesRead === 0 ? null : bytesRead;\r\n};\r\nexports.read = read;\r\n","\"use strict\";\r\n///\r\nvar __importDefault = (this && this.__importDefault) || function (mod) {\r\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\r\n};\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.readDir = void 0;\r\nconst promises_1 = require(\"fs/promises\");\r\nconst errorMap_js_1 = __importDefault(require(\"../../internal/errorMap.js\"));\r\nconst readDir = async function* readDir(path) {\r\n try {\r\n for await (const e of await (0, promises_1.opendir)(String(path))) {\r\n const ent = {\r\n name: e.name,\r\n isFile: e.isFile(),\r\n isDirectory: e.isDirectory(),\r\n isSymlink: e.isSymbolicLink(),\r\n };\r\n yield ent;\r\n }\r\n }\r\n catch (e) {\r\n throw (0, errorMap_js_1.default)(e);\r\n }\r\n};\r\nexports.readDir = readDir;\r\n","\"use strict\";\r\n///\r\nvar __importDefault = (this && this.__importDefault) || function (mod) {\r\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\r\n};\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.readDirSync = void 0;\r\nconst fs_1 = require(\"fs\");\r\nconst errorMap_js_1 = __importDefault(require(\"../../internal/errorMap.js\"));\r\nconst readDirSync = function* readDir(path) {\r\n try {\r\n for (const e of (0, fs_1.readdirSync)(String(path), { withFileTypes: true })) {\r\n const ent = {\r\n name: e.name,\r\n isFile: e.isFile(),\r\n isDirectory: e.isDirectory(),\r\n isSymlink: e.isSymbolicLink(),\r\n };\r\n yield ent;\r\n }\r\n }\r\n catch (e) {\r\n throw (0, errorMap_js_1.default)(e);\r\n }\r\n};\r\nexports.readDirSync = readDirSync;\r\n","\"use strict\";\r\n///\r\nvar __importDefault = (this && this.__importDefault) || function (mod) {\r\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\r\n};\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.readFile = void 0;\r\nconst promises_1 = require(\"fs/promises\");\r\nconst errorMap_js_1 = __importDefault(require(\"../../internal/errorMap.js\"));\r\nconst readFile = async function readFile(path, { signal } = {}) {\r\n try {\r\n const buf = await (0, promises_1.readFile)(path, { signal });\r\n return new Uint8Array(buf.buffer, buf.byteOffset, buf.length);\r\n }\r\n catch (e) {\r\n throw (0, errorMap_js_1.default)(e);\r\n }\r\n};\r\nexports.readFile = readFile;\r\n","\"use strict\";\r\n///\r\nvar __importDefault = (this && this.__importDefault) || function (mod) {\r\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\r\n};\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.readFileSync = void 0;\r\nconst fs_1 = require(\"fs\");\r\nconst errorMap_js_1 = __importDefault(require(\"../../internal/errorMap.js\"));\r\nconst readFileSync = function readFileSync(path) {\r\n try {\r\n const buf = (0, fs_1.readFileSync)(path);\r\n return new Uint8Array(buf.buffer, buf.byteOffset, buf.length);\r\n }\r\n catch (e) {\r\n throw (0, errorMap_js_1.default)(e);\r\n }\r\n};\r\nexports.readFileSync = readFileSync;\r\n","\"use strict\";\r\n///\r\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n var desc = Object.getOwnPropertyDescriptor(m, k);\r\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\r\n desc = { enumerable: true, get: function() { return m[k]; } };\r\n }\r\n Object.defineProperty(o, k2, desc);\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n}));\r\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n});\r\nvar __importStar = (this && this.__importStar) || function (mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n};\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.readLink = void 0;\r\nconst fs = __importStar(require(\"fs/promises\"));\r\nexports.readLink = fs.readlink;\r\n","\"use strict\";\r\n///\r\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n var desc = Object.getOwnPropertyDescriptor(m, k);\r\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\r\n desc = { enumerable: true, get: function() { return m[k]; } };\r\n }\r\n Object.defineProperty(o, k2, desc);\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n}));\r\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n});\r\nvar __importStar = (this && this.__importStar) || function (mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n};\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.readLinkSync = void 0;\r\nconst fs = __importStar(require(\"fs\"));\r\nexports.readLinkSync = fs.readlinkSync;\r\n","\"use strict\";\r\n///\r\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n var desc = Object.getOwnPropertyDescriptor(m, k);\r\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\r\n desc = { enumerable: true, get: function() { return m[k]; } };\r\n }\r\n Object.defineProperty(o, k2, desc);\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n}));\r\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n});\r\nvar __importStar = (this && this.__importStar) || function (mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n};\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.readSync = void 0;\r\nconst fs = __importStar(require(\"fs\"));\r\nconst readSync = (fd, buffer) => {\r\n const bytesRead = fs.readSync(fd, buffer);\r\n // node returns 0 on EOF, Deno expects null\r\n return bytesRead === 0 ? null : bytesRead;\r\n};\r\nexports.readSync = readSync;\r\n","\"use strict\";\r\n///\r\nvar __importDefault = (this && this.__importDefault) || function (mod) {\r\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\r\n};\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.readTextFile = void 0;\r\nconst promises_1 = require(\"fs/promises\");\r\nconst errorMap_js_1 = __importDefault(require(\"../../internal/errorMap.js\"));\r\nconst readTextFile = async (path, { signal } = {}) => {\r\n try {\r\n return await (0, promises_1.readFile)(path, { encoding: \"utf8\", signal });\r\n }\r\n catch (e) {\r\n throw (0, errorMap_js_1.default)(e);\r\n }\r\n};\r\nexports.readTextFile = readTextFile;\r\n","\"use strict\";\r\n///\r\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n var desc = Object.getOwnPropertyDescriptor(m, k);\r\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\r\n desc = { enumerable: true, get: function() { return m[k]; } };\r\n }\r\n Object.defineProperty(o, k2, desc);\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n}));\r\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n});\r\nvar __importStar = (this && this.__importStar) || function (mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n};\r\nvar __importDefault = (this && this.__importDefault) || function (mod) {\r\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\r\n};\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.readTextFileSync = void 0;\r\nconst fs = __importStar(require(\"fs\"));\r\nconst errorMap_js_1 = __importDefault(require(\"../../internal/errorMap.js\"));\r\nconst readTextFileSync = function (path) {\r\n try {\r\n return fs.readFileSync(path, \"utf8\");\r\n }\r\n catch (e) {\r\n throw (0, errorMap_js_1.default)(e);\r\n }\r\n};\r\nexports.readTextFileSync = readTextFileSync;\r\n","\"use strict\";\r\n///\r\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n var desc = Object.getOwnPropertyDescriptor(m, k);\r\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\r\n desc = { enumerable: true, get: function() { return m[k]; } };\r\n }\r\n Object.defineProperty(o, k2, desc);\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n}));\r\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n});\r\nvar __importStar = (this && this.__importStar) || function (mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n};\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.realPath = void 0;\r\nconst fs = __importStar(require(\"fs/promises\"));\r\nexports.realPath = fs.realpath;\r\n","\"use strict\";\r\n///\r\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n var desc = Object.getOwnPropertyDescriptor(m, k);\r\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\r\n desc = { enumerable: true, get: function() { return m[k]; } };\r\n }\r\n Object.defineProperty(o, k2, desc);\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n}));\r\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n});\r\nvar __importStar = (this && this.__importStar) || function (mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n};\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.realPathSync = void 0;\r\nconst fs = __importStar(require(\"fs\"));\r\nexports.realPathSync = fs.realpathSync;\r\n","\"use strict\";\r\n///\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.remove = void 0;\r\nconst promises_1 = require(\"fs/promises\");\r\nconst remove = async function remove(path, options = {}) {\r\n const innerOptions = options.recursive\r\n ? { recursive: true, force: true }\r\n : {};\r\n try {\r\n return await (0, promises_1.rm)(path, innerOptions);\r\n }\r\n catch (err) {\r\n if (err.code === \"ERR_FS_EISDIR\") {\r\n return await (0, promises_1.rmdir)(path, innerOptions);\r\n }\r\n else {\r\n throw err;\r\n }\r\n }\r\n};\r\nexports.remove = remove;\r\n","\"use strict\";\r\n///\r\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n var desc = Object.getOwnPropertyDescriptor(m, k);\r\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\r\n desc = { enumerable: true, get: function() { return m[k]; } };\r\n }\r\n Object.defineProperty(o, k2, desc);\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n}));\r\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n});\r\nvar __importStar = (this && this.__importStar) || function (mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n};\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.removeSync = void 0;\r\nconst fs = __importStar(require(\"fs\"));\r\nconst removeSync = (path, options = {}) => {\r\n const innerOptions = options.recursive\r\n ? { recursive: true, force: true }\r\n : {};\r\n try {\r\n fs.rmSync(path, innerOptions);\r\n }\r\n catch (err) {\r\n if (err.code === \"ERR_FS_EISDIR\") {\r\n fs.rmdirSync(path, innerOptions);\r\n }\r\n else {\r\n throw err;\r\n }\r\n }\r\n};\r\nexports.removeSync = removeSync;\r\n","\"use strict\";\r\n///\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.rename = void 0;\r\nconst promises_1 = require(\"fs/promises\");\r\nconst rename = function rename(oldpath, newpath) {\r\n return (0, promises_1.rename)(oldpath, newpath);\r\n};\r\nexports.rename = rename;\r\n","\"use strict\";\r\n///\r\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n var desc = Object.getOwnPropertyDescriptor(m, k);\r\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\r\n desc = { enumerable: true, get: function() { return m[k]; } };\r\n }\r\n Object.defineProperty(o, k2, desc);\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n}));\r\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n});\r\nvar __importStar = (this && this.__importStar) || function (mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n};\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.renameSync = void 0;\r\nconst fs = __importStar(require(\"fs\"));\r\nexports.renameSync = fs.renameSync;\r\n","\"use strict\";\r\n/// \r\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n var desc = Object.getOwnPropertyDescriptor(m, k);\r\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\r\n desc = { enumerable: true, get: function() { return m[k]; } };\r\n }\r\n Object.defineProperty(o, k2, desc);\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n}));\r\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n});\r\nvar __importStar = (this && this.__importStar) || function (mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n};\r\nvar __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {\r\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\r\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\r\n};\r\nvar __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\r\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\r\n};\r\nvar __importDefault = (this && this.__importDefault) || function (mod) {\r\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\r\n};\r\nvar _Process_process, _Process_stderr, _Process_stdout, _Process_stdin, _Process_status, _Process_receivedStatus, _ProcessReadStream_stream, _ProcessReadStream_bufferStreamReader, _ProcessReadStream_closed, _ProcessWriteStream_stream, _ProcessWriteStream_streamWriter, _ProcessWriteStream_closed;\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.Process = exports.run = void 0;\r\nconst child_process_1 = __importDefault(require(\"child_process\"));\r\nconst fs_1 = __importDefault(require(\"fs\"));\r\nconst os_1 = __importDefault(require(\"os\"));\r\nconst url_1 = __importDefault(require(\"url\"));\r\nconst events_1 = require(\"events\");\r\nconst which_1 = __importDefault(require(\"which\"));\r\nconst streams_js_1 = require(\"../../internal/streams.js\");\r\nconst errors = __importStar(require(\"../variables/errors.js\"));\r\nconst run = function run(options) {\r\n const [cmd, ...args] = options.cmd;\r\n if (options.cwd && !fs_1.default.existsSync(options.cwd)) {\r\n throw new Error(\"The directory name is invalid.\");\r\n }\r\n // childProcess.spawn will asynchronously check if the command exists, but\r\n // we need to do this synchronously\r\n const commandName = getCmd(cmd);\r\n if (!which_1.default.sync(commandName, { nothrow: true })) {\r\n throw new errors.NotFound(\"The system cannot find the file specified.\");\r\n }\r\n const process = child_process_1.default.spawn(commandName, args, {\r\n cwd: options.cwd,\r\n env: getEnv(options),\r\n uid: options.uid,\r\n gid: options.gid,\r\n shell: false,\r\n stdio: [\r\n getStdio(options.stdin, \"in\"),\r\n getStdio(options.stdout, \"out\"),\r\n getStdio(options.stderr, \"out\"),\r\n ],\r\n });\r\n return new Process(process);\r\n};\r\nexports.run = run;\r\nfunction getStdio(value, kind) {\r\n if (value === \"inherit\" || value == null) {\r\n return \"inherit\"; // default\r\n }\r\n else if (value === \"piped\") {\r\n return \"pipe\";\r\n }\r\n else if (value === \"null\") {\r\n return \"ignore\";\r\n }\r\n else if (typeof value === \"number\") {\r\n switch (kind) {\r\n case \"in\":\r\n return fs_1.default.createReadStream(null, { fd: value });\r\n case \"out\":\r\n return fs_1.default.createWriteStream(null, { fd: value });\r\n default: {\r\n const _assertNever = kind;\r\n throw new Error(\"Unreachable.\");\r\n }\r\n }\r\n }\r\n else {\r\n const _assertNever = value;\r\n throw new Error(\"Unknown value.\");\r\n }\r\n}\r\nfunction getCmd(firstArg) {\r\n if (firstArg instanceof URL) {\r\n return url_1.default.fileURLToPath(firstArg);\r\n }\r\n else {\r\n return firstArg;\r\n }\r\n}\r\nfunction getEnv(options) {\r\n var _a;\r\n const env = (_a = options.env) !== null && _a !== void 0 ? _a : {};\r\n for (const name in process.env) {\r\n if (!Object.prototype.hasOwnProperty.call(env, name)) {\r\n if (options.clearEnv) {\r\n if (os_1.default.platform() === \"win32\") {\r\n env[name] = \"\";\r\n }\r\n else {\r\n delete env[name];\r\n }\r\n }\r\n else {\r\n env[name] = process.env[name];\r\n }\r\n }\r\n }\r\n return env;\r\n}\r\nclass Process {\r\n /** @internal */\r\n constructor(process) {\r\n var _a, _b, _c;\r\n _Process_process.set(this, void 0);\r\n _Process_stderr.set(this, void 0);\r\n _Process_stdout.set(this, void 0);\r\n _Process_stdin.set(this, void 0);\r\n _Process_status.set(this, void 0);\r\n _Process_receivedStatus.set(this, false);\r\n __classPrivateFieldSet(this, _Process_process, process, \"f\");\r\n __classPrivateFieldSet(this, _Process_stdout, (_a = ProcessReadStream.fromNullable(__classPrivateFieldGet(this, _Process_process, \"f\").stdout)) !== null && _a !== void 0 ? _a : null, \"f\");\r\n __classPrivateFieldSet(this, _Process_stderr, (_b = ProcessReadStream.fromNullable(__classPrivateFieldGet(this, _Process_process, \"f\").stderr)) !== null && _b !== void 0 ? _b : null, \"f\");\r\n __classPrivateFieldSet(this, _Process_stdin, (_c = ProcessWriteStream.fromNullable(__classPrivateFieldGet(this, _Process_process, \"f\").stdin)) !== null && _c !== void 0 ? _c : null, \"f\");\r\n __classPrivateFieldSet(this, _Process_status, (0, events_1.once)(process, \"exit\"), \"f\");\r\n }\r\n get rid() {\r\n // todo: useful to return something?\r\n return NaN;\r\n }\r\n get pid() {\r\n // only undefined when the process doesn't spawn, in which case this\r\n // will never be reached\r\n return __classPrivateFieldGet(this, _Process_process, \"f\").pid;\r\n }\r\n get stdin() {\r\n return __classPrivateFieldGet(this, _Process_stdin, \"f\");\r\n }\r\n get stdout() {\r\n return __classPrivateFieldGet(this, _Process_stdout, \"f\");\r\n }\r\n get stderr() {\r\n return __classPrivateFieldGet(this, _Process_stderr, \"f\");\r\n }\r\n async status() {\r\n const [receivedCode, signalName] = await __classPrivateFieldGet(this, _Process_status, \"f\");\r\n // when there is a signal, the exit code is 128 + signal code\r\n const signal = signalName\r\n ? os_1.default.constants.signals[signalName]\r\n : receivedCode > 128\r\n ? receivedCode - 128\r\n : undefined;\r\n const code = receivedCode != null\r\n ? receivedCode\r\n : signal != null\r\n ? 128 + signal\r\n : undefined;\r\n const success = code === 0;\r\n __classPrivateFieldSet(this, _Process_receivedStatus, true, \"f\");\r\n return { code, signal, success };\r\n }\r\n async output() {\r\n if (!__classPrivateFieldGet(this, _Process_stdout, \"f\")) {\r\n throw new TypeError(\"stdout was not piped\");\r\n }\r\n const result = await __classPrivateFieldGet(this, _Process_stdout, \"f\").readAll();\r\n __classPrivateFieldGet(this, _Process_stdout, \"f\").close();\r\n return result;\r\n }\r\n async stderrOutput() {\r\n if (!__classPrivateFieldGet(this, _Process_stderr, \"f\")) {\r\n throw new TypeError(\"stderr was not piped\");\r\n }\r\n const result = await __classPrivateFieldGet(this, _Process_stderr, \"f\").readAll();\r\n __classPrivateFieldGet(this, _Process_stderr, \"f\").close();\r\n return result;\r\n }\r\n close() {\r\n // Deno doesn't close any stdio streams here\r\n __classPrivateFieldGet(this, _Process_process, \"f\").unref();\r\n __classPrivateFieldGet(this, _Process_process, \"f\").kill();\r\n }\r\n kill(signo) {\r\n if (__classPrivateFieldGet(this, _Process_receivedStatus, \"f\")) {\r\n throw new errors.NotFound(\"entity not found\");\r\n }\r\n __classPrivateFieldGet(this, _Process_process, \"f\").kill(signo);\r\n }\r\n}\r\nexports.Process = Process;\r\n_Process_process = new WeakMap(), _Process_stderr = new WeakMap(), _Process_stdout = new WeakMap(), _Process_stdin = new WeakMap(), _Process_status = new WeakMap(), _Process_receivedStatus = new WeakMap();\r\nclass ProcessReadStream {\r\n constructor(stream) {\r\n _ProcessReadStream_stream.set(this, void 0);\r\n _ProcessReadStream_bufferStreamReader.set(this, void 0);\r\n _ProcessReadStream_closed.set(this, false);\r\n __classPrivateFieldSet(this, _ProcessReadStream_stream, stream, \"f\");\r\n __classPrivateFieldSet(this, _ProcessReadStream_bufferStreamReader, new streams_js_1.BufferStreamReader(stream), \"f\");\r\n }\r\n static fromNullable(stream) {\r\n return stream ? new ProcessReadStream(stream) : undefined;\r\n }\r\n readAll() {\r\n if (__classPrivateFieldGet(this, _ProcessReadStream_closed, \"f\")) {\r\n return Promise.resolve(new Uint8Array(0));\r\n }\r\n else {\r\n return __classPrivateFieldGet(this, _ProcessReadStream_bufferStreamReader, \"f\").readAll();\r\n }\r\n }\r\n read(p) {\r\n if (__classPrivateFieldGet(this, _ProcessReadStream_closed, \"f\")) {\r\n return Promise.resolve(null);\r\n }\r\n else {\r\n return __classPrivateFieldGet(this, _ProcessReadStream_bufferStreamReader, \"f\").read(p);\r\n }\r\n }\r\n close() {\r\n __classPrivateFieldSet(this, _ProcessReadStream_closed, true, \"f\");\r\n __classPrivateFieldGet(this, _ProcessReadStream_stream, \"f\").destroy();\r\n }\r\n get readable() {\r\n throw new Error(\"Not implemented.\");\r\n }\r\n get writable() {\r\n throw new Error(\"Not implemented.\");\r\n }\r\n}\r\n_ProcessReadStream_stream = new WeakMap(), _ProcessReadStream_bufferStreamReader = new WeakMap(), _ProcessReadStream_closed = new WeakMap();\r\nclass ProcessWriteStream {\r\n constructor(stream) {\r\n _ProcessWriteStream_stream.set(this, void 0);\r\n _ProcessWriteStream_streamWriter.set(this, void 0);\r\n _ProcessWriteStream_closed.set(this, false);\r\n __classPrivateFieldSet(this, _ProcessWriteStream_stream, stream, \"f\");\r\n __classPrivateFieldSet(this, _ProcessWriteStream_streamWriter, new streams_js_1.StreamWriter(stream), \"f\");\r\n }\r\n static fromNullable(stream) {\r\n return stream ? new ProcessWriteStream(stream) : undefined;\r\n }\r\n write(p) {\r\n if (__classPrivateFieldGet(this, _ProcessWriteStream_closed, \"f\")) {\r\n return Promise.resolve(0);\r\n }\r\n else {\r\n return __classPrivateFieldGet(this, _ProcessWriteStream_streamWriter, \"f\").write(p);\r\n }\r\n }\r\n close() {\r\n __classPrivateFieldSet(this, _ProcessWriteStream_closed, true, \"f\");\r\n __classPrivateFieldGet(this, _ProcessWriteStream_stream, \"f\").end();\r\n }\r\n}\r\n_ProcessWriteStream_stream = new WeakMap(), _ProcessWriteStream_streamWriter = new WeakMap(), _ProcessWriteStream_closed = new WeakMap();\r\n","\"use strict\";\r\n///\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.shutdown = void 0;\r\nconst net_1 = require(\"net\");\r\nconst shutdown = async function shutdown(rid) {\r\n await new Promise((resolve) => new net_1.Socket({ fd: rid }).end(resolve));\r\n};\r\nexports.shutdown = shutdown;\r\n","\"use strict\";\r\n///\r\nvar __importDefault = (this && this.__importDefault) || function (mod) {\r\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\r\n};\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.stat = exports.denoifyFileInfo = void 0;\r\nconst promises_1 = require(\"fs/promises\");\r\nconst errorMap_js_1 = __importDefault(require(\"../../internal/errorMap.js\"));\r\nfunction denoifyFileInfo(s) {\r\n return {\r\n atime: s.atime,\r\n birthtime: s.birthtime,\r\n blksize: s.blksize,\r\n blocks: s.blocks,\r\n dev: s.dev,\r\n gid: s.gid,\r\n ino: s.ino,\r\n isDirectory: s.isDirectory(),\r\n isFile: s.isFile(),\r\n isSymlink: s.isSymbolicLink(),\r\n mode: s.mode,\r\n mtime: s.mtime,\r\n nlink: s.nlink,\r\n rdev: s.rdev,\r\n size: s.size,\r\n uid: s.uid,\r\n };\r\n}\r\nexports.denoifyFileInfo = denoifyFileInfo;\r\nconst stat = async (path) => {\r\n try {\r\n return denoifyFileInfo(await (0, promises_1.stat)(path));\r\n }\r\n catch (e) {\r\n throw (0, errorMap_js_1.default)(e);\r\n }\r\n};\r\nexports.stat = stat;\r\n","\"use strict\";\r\n///\r\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n var desc = Object.getOwnPropertyDescriptor(m, k);\r\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\r\n desc = { enumerable: true, get: function() { return m[k]; } };\r\n }\r\n Object.defineProperty(o, k2, desc);\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n}));\r\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n});\r\nvar __importStar = (this && this.__importStar) || function (mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n};\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.statSync = void 0;\r\nconst fs = __importStar(require(\"fs\"));\r\nconst stat_js_1 = require(\"./stat.js\");\r\nconst statSync = (path) => (0, stat_js_1.denoifyFileInfo)(fs.statSync(path));\r\nexports.statSync = statSync;\r\n","\"use strict\";\r\n///\r\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n var desc = Object.getOwnPropertyDescriptor(m, k);\r\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\r\n desc = { enumerable: true, get: function() { return m[k]; } };\r\n }\r\n Object.defineProperty(o, k2, desc);\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n}));\r\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n});\r\nvar __importStar = (this && this.__importStar) || function (mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n};\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.symlink = void 0;\r\nconst fs = __importStar(require(\"fs/promises\"));\r\nconst symlink = async (oldpath, newpath, options) => await fs.symlink(oldpath, newpath, options === null || options === void 0 ? void 0 : options.type);\r\nexports.symlink = symlink;\r\n","\"use strict\";\r\n///\r\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n var desc = Object.getOwnPropertyDescriptor(m, k);\r\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\r\n desc = { enumerable: true, get: function() { return m[k]; } };\r\n }\r\n Object.defineProperty(o, k2, desc);\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n}));\r\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n});\r\nvar __importStar = (this && this.__importStar) || function (mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n};\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.symlinkSync = void 0;\r\nconst fs = __importStar(require(\"fs\"));\r\nconst symlinkSync = (oldpath, newpath, options) => fs.symlinkSync(oldpath, newpath, options === null || options === void 0 ? void 0 : options.type);\r\nexports.symlinkSync = symlinkSync;\r\n","\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.test = void 0;\r\nvar shim_deno_test_1 = require(\"@deno/shim-deno-test\");\r\nObject.defineProperty(exports, \"test\", { enumerable: true, get: function () { return shim_deno_test_1.test; } });\r\n","\"use strict\";\r\n///\r\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n var desc = Object.getOwnPropertyDescriptor(m, k);\r\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\r\n desc = { enumerable: true, get: function() { return m[k]; } };\r\n }\r\n Object.defineProperty(o, k2, desc);\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n}));\r\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n});\r\nvar __importStar = (this && this.__importStar) || function (mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n};\r\nvar __importDefault = (this && this.__importDefault) || function (mod) {\r\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\r\n};\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.truncate = void 0;\r\nconst fs = __importStar(require(\"fs/promises\"));\r\nconst errorMap_js_1 = __importDefault(require(\"../../internal/errorMap.js\"));\r\nconst variables_js_1 = require(\"../variables.js\");\r\nconst truncate = async (name, len) => {\r\n try {\r\n return await fs.truncate(name, len);\r\n }\r\n catch (error) {\r\n if ((error === null || error === void 0 ? void 0 : error.code) === \"ENOENT\") {\r\n throw new variables_js_1.errors.NotFound(`No such file or directory (os error 2), truncate '${name}'`);\r\n }\r\n throw (0, errorMap_js_1.default)(error);\r\n }\r\n};\r\nexports.truncate = truncate;\r\n","\"use strict\";\r\n///\r\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n var desc = Object.getOwnPropertyDescriptor(m, k);\r\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\r\n desc = { enumerable: true, get: function() { return m[k]; } };\r\n }\r\n Object.defineProperty(o, k2, desc);\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n}));\r\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n});\r\nvar __importStar = (this && this.__importStar) || function (mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n};\r\nvar __importDefault = (this && this.__importDefault) || function (mod) {\r\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\r\n};\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.truncateSync = void 0;\r\nconst fs = __importStar(require(\"fs\"));\r\nconst errorMap_js_1 = __importDefault(require(\"../../internal/errorMap.js\"));\r\nconst variables_js_1 = require(\"../variables.js\");\r\nconst truncateSync = (name, len) => {\r\n try {\r\n return fs.truncateSync(name, len);\r\n }\r\n catch (error) {\r\n if ((error === null || error === void 0 ? void 0 : error.code) === \"ENOENT\") {\r\n throw new variables_js_1.errors.NotFound(`No such file or directory (os error 2), truncate '${name}'`);\r\n }\r\n throw (0, errorMap_js_1.default)(error);\r\n }\r\n};\r\nexports.truncateSync = truncateSync;\r\n","\"use strict\";\r\n///\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.watchFs = void 0;\r\nconst promises_1 = require(\"fs/promises\");\r\nconst path_1 = require(\"path\");\r\nconst iterutil_js_1 = require(\"../../internal/iterutil.js\");\r\nconst watchFs = function watchFs(paths, options = { recursive: true }) {\r\n paths = Array.isArray(paths) ? paths : [paths];\r\n const ac = new AbortController();\r\n const { signal } = ac;\r\n // TODO(mkr): create valid rids for watchers\r\n const rid = -1;\r\n const masterWatcher = (0, iterutil_js_1.merge)(paths.map((path) => (0, iterutil_js_1.mapAsync)((0, promises_1.watch)(path, { recursive: options === null || options === void 0 ? void 0 : options.recursive, signal }), (info) => ({\r\n kind: \"modify\",\r\n paths: [(0, path_1.resolve)(path, info.filename)],\r\n }))));\r\n function close() {\r\n ac.abort();\r\n }\r\n return Object.assign(masterWatcher, { rid, close });\r\n};\r\nexports.watchFs = watchFs;\r\n","\"use strict\";\r\n///\r\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n var desc = Object.getOwnPropertyDescriptor(m, k);\r\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\r\n desc = { enumerable: true, get: function() { return m[k]; } };\r\n }\r\n Object.defineProperty(o, k2, desc);\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n}));\r\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n});\r\nvar __importStar = (this && this.__importStar) || function (mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n};\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.write = void 0;\r\nconst fs = __importStar(require(\"fs\"));\r\nconst util_1 = require(\"util\");\r\nconst nodeWrite = (0, util_1.promisify)(fs.write);\r\nconst write = async (fd, data) => {\r\n const { bytesWritten } = await nodeWrite(fd, data);\r\n return bytesWritten;\r\n};\r\nexports.write = write;\r\n","\"use strict\";\r\n///\r\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n var desc = Object.getOwnPropertyDescriptor(m, k);\r\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\r\n desc = { enumerable: true, get: function() { return m[k]; } };\r\n }\r\n Object.defineProperty(o, k2, desc);\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n}));\r\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n});\r\nvar __importStar = (this && this.__importStar) || function (mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n};\r\nvar __importDefault = (this && this.__importDefault) || function (mod) {\r\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\r\n};\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.writeFile = void 0;\r\nconst fs = __importStar(require(\"fs/promises\"));\r\nconst errorMap_js_1 = __importDefault(require(\"../../internal/errorMap.js\"));\r\nconst fs_flags_js_1 = require(\"../../internal/fs_flags.js\");\r\nconst writeFile = async function writeFile(path, data, { append = false, create = true, mode, signal } = {}) {\r\n const truncate = create && !append;\r\n const flag = (0, fs_flags_js_1.getFsFlag)({ append, create, truncate, write: true });\r\n try {\r\n await fs.writeFile(path, data, { flag, signal });\r\n if (mode !== undefined)\r\n await fs.chmod(path, mode);\r\n }\r\n catch (error) {\r\n throw (0, errorMap_js_1.default)(error);\r\n }\r\n};\r\nexports.writeFile = writeFile;\r\n","\"use strict\";\r\n///\r\nvar __importDefault = (this && this.__importDefault) || function (mod) {\r\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\r\n};\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.writeFileSync = void 0;\r\nconst os_1 = require(\"os\");\r\nconst openSync_js_1 = require(\"./openSync.js\");\r\nconst errorMap_js_1 = __importDefault(require(\"../../internal/errorMap.js\"));\r\nconst statSync_js_1 = require(\"./statSync.js\");\r\nconst chmodSync_js_1 = require(\"./chmodSync.js\");\r\nconst writeFileSync = function writeFileSync(path, data, options = {}) {\r\n try {\r\n if (options.create !== undefined) {\r\n const create = !!options.create;\r\n if (!create) {\r\n // verify that file exists\r\n (0, statSync_js_1.statSync)(path);\r\n }\r\n }\r\n const openOptions = options.append\r\n ? { write: true, create: true, append: true }\r\n : { write: true, create: true, truncate: true };\r\n const file = (0, openSync_js_1.openSync)(path, openOptions);\r\n if (options.mode !== undefined &&\r\n options.mode !== null &&\r\n (0, os_1.platform)() !== \"win32\") {\r\n (0, chmodSync_js_1.chmodSync)(path, options.mode);\r\n }\r\n let nwritten = 0;\r\n while (nwritten < data.length) {\r\n nwritten += file.writeSync(data.subarray(nwritten));\r\n }\r\n file.close();\r\n }\r\n catch (e) {\r\n throw (0, errorMap_js_1.default)(e);\r\n }\r\n};\r\nexports.writeFileSync = writeFileSync;\r\n","\"use strict\";\r\n///\r\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n var desc = Object.getOwnPropertyDescriptor(m, k);\r\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\r\n desc = { enumerable: true, get: function() { return m[k]; } };\r\n }\r\n Object.defineProperty(o, k2, desc);\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n}));\r\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n});\r\nvar __importStar = (this && this.__importStar) || function (mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n};\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.writeSync = void 0;\r\nconst fs = __importStar(require(\"fs\"));\r\nexports.writeSync = fs.writeSync;\r\n","\"use strict\";\r\n///\r\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n var desc = Object.getOwnPropertyDescriptor(m, k);\r\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\r\n desc = { enumerable: true, get: function() { return m[k]; } };\r\n }\r\n Object.defineProperty(o, k2, desc);\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n}));\r\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n});\r\nvar __importStar = (this && this.__importStar) || function (mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n};\r\nvar __importDefault = (this && this.__importDefault) || function (mod) {\r\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\r\n};\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.writeTextFile = void 0;\r\nconst fs = __importStar(require(\"fs/promises\"));\r\nconst errorMap_js_1 = __importDefault(require(\"../../internal/errorMap.js\"));\r\nconst fs_flags_js_1 = require(\"../../internal/fs_flags.js\");\r\nconst writeTextFile = async function writeTextFile(path, data, { append = false, create = true, mode, signal } = {}) {\r\n const truncate = create && !append;\r\n const flag = (0, fs_flags_js_1.getFsFlag)({ append, create, truncate, write: true });\r\n try {\r\n await fs.writeFile(path, data, { flag, mode, signal });\r\n if (mode !== undefined)\r\n await fs.chmod(path, mode);\r\n }\r\n catch (error) {\r\n throw (0, errorMap_js_1.default)(error);\r\n }\r\n};\r\nexports.writeTextFile = writeTextFile;\r\n","\"use strict\";\r\n///\r\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n var desc = Object.getOwnPropertyDescriptor(m, k);\r\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\r\n desc = { enumerable: true, get: function() { return m[k]; } };\r\n }\r\n Object.defineProperty(o, k2, desc);\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n}));\r\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n});\r\nvar __importStar = (this && this.__importStar) || function (mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n};\r\nvar __importDefault = (this && this.__importDefault) || function (mod) {\r\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\r\n};\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.writeTextFileSync = void 0;\r\nconst fs = __importStar(require(\"fs\"));\r\nconst errorMap_js_1 = __importDefault(require(\"../../internal/errorMap.js\"));\r\nconst writeTextFileSync = (path, data, { append = false, create = true, mode } = {}) => {\r\n const flag = create ? (append ? \"a\" : \"w\") : \"r+\";\r\n try {\r\n fs.writeFileSync(path, data, { flag, mode });\r\n if (mode !== undefined)\r\n fs.chmodSync(path, mode);\r\n }\r\n catch (error) {\r\n throw (0, errorMap_js_1.default)(error);\r\n }\r\n};\r\nexports.writeTextFileSync = writeTextFileSync;\r\n","\"use strict\";\r\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n var desc = Object.getOwnPropertyDescriptor(m, k);\r\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\r\n desc = { enumerable: true, get: function() { return m[k]; } };\r\n }\r\n Object.defineProperty(o, k2, desc);\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n}));\r\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\r\n};\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\n__exportStar(require(\"./classes.js\"), exports);\r\n__exportStar(require(\"./enums.js\"), exports);\r\n__exportStar(require(\"./functions.js\"), exports);\r\n__exportStar(require(\"./types.js\"), exports);\r\n__exportStar(require(\"./variables.js\"), exports);\r\n","\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\n///\r\n","\"use strict\";\r\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n var desc = Object.getOwnPropertyDescriptor(m, k);\r\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\r\n desc = { enumerable: true, get: function() { return m[k]; } };\r\n }\r\n Object.defineProperty(o, k2, desc);\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n}));\r\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n});\r\nvar __importStar = (this && this.__importStar) || function (mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n};\r\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\r\n};\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.version = exports.resources = exports.ppid = exports.pid = exports.permissions = exports.noColor = exports.metrics = exports.mainModule = exports.errors = exports.env = exports.customInspect = exports.build = void 0;\r\nvar build_js_1 = require(\"./variables/build.js\");\r\nObject.defineProperty(exports, \"build\", { enumerable: true, get: function () { return build_js_1.build; } });\r\nvar customInspect_js_1 = require(\"./variables/customInspect.js\");\r\nObject.defineProperty(exports, \"customInspect\", { enumerable: true, get: function () { return customInspect_js_1.customInspect; } });\r\nvar env_js_1 = require(\"./variables/env.js\");\r\nObject.defineProperty(exports, \"env\", { enumerable: true, get: function () { return env_js_1.env; } });\r\nexports.errors = __importStar(require(\"./variables/errors.js\"));\r\nvar mainModule_js_1 = require(\"./variables/mainModule.js\");\r\nObject.defineProperty(exports, \"mainModule\", { enumerable: true, get: function () { return mainModule_js_1.mainModule; } });\r\nvar metrics_js_1 = require(\"./variables/metrics.js\");\r\nObject.defineProperty(exports, \"metrics\", { enumerable: true, get: function () { return metrics_js_1.metrics; } });\r\nvar noColor_js_1 = require(\"./variables/noColor.js\");\r\nObject.defineProperty(exports, \"noColor\", { enumerable: true, get: function () { return noColor_js_1.noColor; } });\r\nvar permissions_js_1 = require(\"./variables/permissions.js\");\r\nObject.defineProperty(exports, \"permissions\", { enumerable: true, get: function () { return permissions_js_1.permissions; } });\r\nvar pid_js_1 = require(\"./variables/pid.js\");\r\nObject.defineProperty(exports, \"pid\", { enumerable: true, get: function () { return pid_js_1.pid; } });\r\nvar ppid_js_1 = require(\"./variables/ppid.js\");\r\nObject.defineProperty(exports, \"ppid\", { enumerable: true, get: function () { return ppid_js_1.ppid; } });\r\nvar resources_js_1 = require(\"./variables/resources.js\");\r\nObject.defineProperty(exports, \"resources\", { enumerable: true, get: function () { return resources_js_1.resources; } });\r\n__exportStar(require(\"./variables/std.js\"), exports);\r\nvar version_js_1 = require(\"./variables/version.js\");\r\nObject.defineProperty(exports, \"version\", { enumerable: true, get: function () { return version_js_1.version; } });\r\n","\"use strict\";\r\n///\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.args = void 0;\r\nexports.args = process.argv.slice(2);\r\n","\"use strict\";\r\n///\r\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n var desc = Object.getOwnPropertyDescriptor(m, k);\r\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\r\n desc = { enumerable: true, get: function() { return m[k]; } };\r\n }\r\n Object.defineProperty(o, k2, desc);\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n}));\r\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n});\r\nvar __importStar = (this && this.__importStar) || function (mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n};\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.build = void 0;\r\nconst os = __importStar(require(\"os\"));\r\nexports.build = {\r\n arch: \"x86_64\",\r\n os: ((p) => p === \"win32\" ? \"windows\" : p === \"darwin\" ? \"darwin\" : \"linux\")(os.platform()),\r\n vendor: \"pc\",\r\n target: ((p) => p === \"win32\"\r\n ? \"x86_64-pc-windows-msvc\"\r\n : p === \"darwin\"\r\n ? \"x86_64-apple-darwin\"\r\n : \"x86_64-unknown-linux-gnu\")(os.platform()),\r\n};\r\n","\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.customInspect = void 0;\r\nexports.customInspect = Symbol.for(\"nodejs.util.inspect.custom\");\r\n","\"use strict\";\r\n///\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.env = void 0;\r\nexports.env = {\r\n get(key) {\r\n return process.env[key];\r\n },\r\n set(key, value) {\r\n process.env[key] = value;\r\n },\r\n delete(key) {\r\n delete process.env[key];\r\n },\r\n // @ts-expect-error https://github.com/denoland/deno/issues/10267\r\n toObject() {\r\n return { ...process.env };\r\n },\r\n};\r\n","\"use strict\";\r\n///\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.WriteZero = exports.UnexpectedEof = exports.TimedOut = exports.PermissionDenied = exports.NotFound = exports.NotConnected = exports.InvalidData = exports.Interrupted = exports.Http = exports.ConnectionReset = exports.ConnectionRefused = exports.ConnectionAborted = exports.Busy = exports.BrokenPipe = exports.BadResource = exports.AlreadyExists = exports.AddrNotAvailable = exports.AddrInUse = void 0;\r\n// please keep sorted\r\nclass AddrInUse extends Error {\r\n}\r\nexports.AddrInUse = AddrInUse;\r\nclass AddrNotAvailable extends Error {\r\n}\r\nexports.AddrNotAvailable = AddrNotAvailable;\r\nclass AlreadyExists extends Error {\r\n}\r\nexports.AlreadyExists = AlreadyExists;\r\nclass BadResource extends Error {\r\n}\r\nexports.BadResource = BadResource;\r\nclass BrokenPipe extends Error {\r\n}\r\nexports.BrokenPipe = BrokenPipe;\r\nclass Busy extends Error {\r\n}\r\nexports.Busy = Busy;\r\nclass ConnectionAborted extends Error {\r\n}\r\nexports.ConnectionAborted = ConnectionAborted;\r\nclass ConnectionRefused extends Error {\r\n}\r\nexports.ConnectionRefused = ConnectionRefused;\r\nclass ConnectionReset extends Error {\r\n}\r\nexports.ConnectionReset = ConnectionReset;\r\nclass Http extends Error {\r\n}\r\nexports.Http = Http;\r\nclass Interrupted extends Error {\r\n}\r\nexports.Interrupted = Interrupted;\r\nclass InvalidData extends Error {\r\n}\r\nexports.InvalidData = InvalidData;\r\nclass NotConnected extends Error {\r\n}\r\nexports.NotConnected = NotConnected;\r\nclass NotFound extends Error {\r\n}\r\nexports.NotFound = NotFound;\r\nclass PermissionDenied extends Error {\r\n}\r\nexports.PermissionDenied = PermissionDenied;\r\nclass TimedOut extends Error {\r\n}\r\nexports.TimedOut = TimedOut;\r\nclass UnexpectedEof extends Error {\r\n}\r\nexports.UnexpectedEof = UnexpectedEof;\r\nclass WriteZero extends Error {\r\n}\r\nexports.WriteZero = WriteZero;\r\n",null,"\"use strict\";\r\n///\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.metrics = void 0;\r\nconst metrics = function metrics() {\r\n return {\r\n opsDispatched: 0,\r\n opsDispatchedSync: 0,\r\n opsDispatchedAsync: 0,\r\n opsDispatchedAsyncUnref: 0,\r\n opsCompleted: 0,\r\n opsCompletedSync: 0,\r\n opsCompletedAsync: 0,\r\n opsCompletedAsyncUnref: 0,\r\n bytesSentControl: 0,\r\n bytesSentData: 0,\r\n bytesReceived: 0,\r\n ops: {},\r\n };\r\n};\r\nexports.metrics = metrics;\r\n","\"use strict\";\r\n///\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.noColor = void 0;\r\nexports.noColor = process.env.NO_COLOR !== undefined;\r\n","\"use strict\";\r\n///\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.permissions = void 0;\r\nconst Permissions_js_1 = require(\"../classes/Permissions.js\");\r\nexports.permissions = new Permissions_js_1.Permissions();\r\n","\"use strict\";\r\n///\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.pid = void 0;\r\nexports.pid = process.pid;\r\n","\"use strict\";\r\n///\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.ppid = void 0;\r\nexports.ppid = process.ppid;\r\n","\"use strict\";\r\n///\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.resources = void 0;\r\nconst resources = function resources() {\r\n console.warn([\r\n \"Deno.resources() shim returns a dummy object that does not update.\",\r\n \"If you think this is a mistake, raise an issue at https://github.com/denoland/node_deno_shims/issues\",\r\n ].join(\"\\n\"));\r\n return {};\r\n};\r\nexports.resources = resources;\r\n","\"use strict\";\r\n///\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.stderr = exports.stdout = exports.stdin = void 0;\r\nfunction chain(fn, cleanup) {\r\n let prev;\r\n return function _fn(...args) {\r\n const curr = (prev || Promise.resolve())\r\n .then(() => fn(...args))\r\n .finally(cleanup || (() => { }))\r\n .then((result) => {\r\n if (prev === curr)\r\n prev = undefined;\r\n return result;\r\n });\r\n return (prev = curr);\r\n };\r\n}\r\nexports.stdin = {\r\n rid: 0,\r\n read: chain((p) => {\r\n return new Promise((resolve, reject) => {\r\n process.stdin.resume();\r\n process.stdin.on(\"error\", onerror);\r\n process.stdin.once(\"readable\", () => {\r\n var _a;\r\n process.stdin.off(\"error\", onerror);\r\n const data = (_a = process.stdin.read(p.length)) !== null && _a !== void 0 ? _a : process.stdin.read();\r\n if (data) {\r\n p.set(data);\r\n resolve(data.length > 0 ? data.length : null);\r\n }\r\n else {\r\n resolve(null);\r\n }\r\n });\r\n function onerror(error) {\r\n reject(error);\r\n process.stdin.off(\"error\", onerror);\r\n }\r\n });\r\n }, () => process.stdin.pause()),\r\n get readable() {\r\n throw new Error(\"Not implemented.\");\r\n },\r\n readSync() {\r\n // Node.js doesn't support readSync for stdin\r\n throw new Error(\"Not implemented.\");\r\n },\r\n close() {\r\n process.stdin.destroy();\r\n },\r\n};\r\nexports.stdout = {\r\n rid: 1,\r\n write: chain((p) => {\r\n return new Promise((resolve) => {\r\n const result = process.stdout.write(p);\r\n if (!result) {\r\n process.stdout.once(\"drain\", () => resolve(p.length));\r\n }\r\n else {\r\n resolve(p.length);\r\n }\r\n });\r\n }),\r\n get writable() {\r\n throw new Error(\"Not implemented.\");\r\n },\r\n writeSync() {\r\n // Node.js doesn't support writeSync for stdout\r\n throw new Error(\"Not implemented\");\r\n },\r\n close() {\r\n process.stdout.destroy();\r\n },\r\n};\r\nexports.stderr = {\r\n rid: 2,\r\n write: chain((p) => {\r\n return new Promise((resolve) => {\r\n const result = process.stderr.write(p);\r\n if (!result) {\r\n process.stderr.once(\"drain\", () => resolve(p.length));\r\n }\r\n else {\r\n resolve(p.length);\r\n }\r\n });\r\n }),\r\n get writable() {\r\n throw new Error(\"Not implemented.\");\r\n },\r\n writeSync() {\r\n // Node.js doesn't support writeSync for stderr\r\n throw new Error(\"Not implemented\");\r\n },\r\n close() {\r\n process.stderr.destroy();\r\n },\r\n};\r\n","\"use strict\";\r\n///\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.version = void 0;\r\nconst version_js_1 = require(\"../../internal/version.js\");\r\nexports.version = {\r\n deno: version_js_1.deno,\r\n typescript: version_js_1.typescript,\r\n v8: process.versions.v8,\r\n};\r\n","\"use strict\";\r\n///\r\nvar __importDefault = (this && this.__importDefault) || function (mod) {\r\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\r\n};\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.sleepSync = exports.utimeSync = exports.utime = exports.futimeSync = exports.futime = void 0;\r\nconst fs_1 = __importDefault(require(\"fs\"));\r\nconst errorMap_js_1 = __importDefault(require(\"../internal/errorMap.js\"));\r\nconst variables_js_1 = require(\"../stable/variables.js\");\r\nconst futime = async function (rid, atime, mtime) {\r\n try {\r\n await new Promise((resolve, reject) => {\r\n // doesn't exist in fs.promises\r\n fs_1.default.futimes(rid, atime, mtime, (err) => {\r\n if (err) {\r\n reject(err);\r\n }\r\n else {\r\n resolve();\r\n }\r\n });\r\n });\r\n }\r\n catch (error) {\r\n throw (0, errorMap_js_1.default)(error);\r\n }\r\n};\r\nexports.futime = futime;\r\nconst futimeSync = function (rid, atime, mtime) {\r\n try {\r\n fs_1.default.futimesSync(rid, atime, mtime);\r\n }\r\n catch (error) {\r\n throw (0, errorMap_js_1.default)(error);\r\n }\r\n};\r\nexports.futimeSync = futimeSync;\r\nconst utime = async function (path, atime, mtime) {\r\n try {\r\n await fs_1.default.promises.utimes(path, atime, mtime);\r\n }\r\n catch (error) {\r\n if ((error === null || error === void 0 ? void 0 : error.code) === \"ENOENT\") {\r\n throw new variables_js_1.errors.NotFound(`No such file or directory (os error 2), utime '${path}'`);\r\n }\r\n throw (0, errorMap_js_1.default)(error);\r\n }\r\n};\r\nexports.utime = utime;\r\nconst utimeSync = function (path, atime, mtime) {\r\n try {\r\n fs_1.default.utimesSync(path, atime, mtime);\r\n }\r\n catch (error) {\r\n if ((error === null || error === void 0 ? void 0 : error.code) === \"ENOENT\") {\r\n throw new variables_js_1.errors.NotFound(`No such file or directory (os error 2), utime '${path}'`);\r\n }\r\n throw (0, errorMap_js_1.default)(error);\r\n }\r\n};\r\nexports.utimeSync = utimeSync;\r\nconst sleepSync = function (milliseconds) {\r\n // https://github.com/sindresorhus/sleep-synchronously/blob/main/index.js\r\n Atomics.wait(new Int32Array(new SharedArrayBuffer(4)), 0, 0, milliseconds);\r\n};\r\nexports.sleepSync = sleepSync;\r\n","\"use strict\";\r\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n var desc = Object.getOwnPropertyDescriptor(m, k);\r\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\r\n desc = { enumerable: true, get: function() { return m[k]; } };\r\n }\r\n Object.defineProperty(o, k2, desc);\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n}));\r\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n});\r\nvar __importStar = (this && this.__importStar) || function (mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n};\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.Deno = void 0;\r\nexports.Deno = __importStar(require(\"./deno.js\"));\r\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst tslib_1 = require(\"tslib\");\ntslib_1.__exportStar(require(\"./gen/api\"), exports);\n//# sourceMappingURL=api.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Attach = void 0;\nconst querystring = require(\"querystring\");\nconst terminal_size_queue_1 = require(\"./terminal-size-queue\");\nconst web_socket_handler_1 = require(\"./web-socket-handler\");\nclass Attach {\n constructor(config, websocketInterface) {\n this.handler = websocketInterface || new web_socket_handler_1.WebSocketHandler(config);\n }\n async attach(namespace, podName, containerName, stdout, stderr, stdin, tty) {\n const query = {\n container: containerName,\n stderr: stderr != null,\n stdin: stdin != null,\n stdout: stdout != null,\n tty,\n };\n const queryStr = querystring.stringify(query);\n const path = `/api/v1/namespaces/${namespace}/pods/${podName}/attach?${queryStr}`;\n const conn = await this.handler.connect(path, null, (streamNum, buff) => {\n web_socket_handler_1.WebSocketHandler.handleStandardStreams(streamNum, buff, stdout, stderr);\n return true;\n });\n if (stdin != null) {\n web_socket_handler_1.WebSocketHandler.handleStandardInput(conn, stdin, web_socket_handler_1.WebSocketHandler.StdinStream);\n }\n if (terminal_size_queue_1.isResizable(stdout)) {\n this.terminalSizeQueue = new terminal_size_queue_1.TerminalSizeQueue();\n web_socket_handler_1.WebSocketHandler.handleStandardInput(conn, this.terminalSizeQueue, web_socket_handler_1.WebSocketHandler.ResizeStream);\n this.terminalSizeQueue.handleResizes(stdout);\n }\n return conn;\n }\n}\nexports.Attach = Attach;\n//# sourceMappingURL=attach.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.AzureAuth = void 0;\nconst tslib_1 = require(\"tslib\");\nconst proc = tslib_1.__importStar(require(\"child_process\"));\nconst jsonpath = tslib_1.__importStar(require(\"jsonpath-plus\"));\nclass AzureAuth {\n isAuthProvider(user) {\n if (!user || !user.authProvider) {\n return false;\n }\n return user.authProvider.name === 'azure';\n }\n async applyAuthentication(user, opts) {\n const token = this.getToken(user);\n if (token) {\n opts.headers.Authorization = `Bearer ${token}`;\n }\n }\n getToken(user) {\n const config = user.authProvider.config;\n if (this.isExpired(config)) {\n this.updateAccessToken(config);\n }\n return config['access-token'];\n }\n isExpired(config) {\n const token = config['access-token'];\n const expiry = config.expiry;\n const expiresOn = config['expires-on'];\n if (!token) {\n return true;\n }\n if (!expiry && !expiresOn) {\n return false;\n }\n const expiresOnDate = expiresOn ? new Date(parseInt(expiresOn, 10) * 1000) : undefined;\n const expiration = expiry ? Date.parse(expiry) : expiresOnDate;\n if (expiration < Date.now()) {\n return true;\n }\n return false;\n }\n updateAccessToken(config) {\n let cmd = config['cmd-path'];\n if (!cmd) {\n throw new Error('Token is expired!');\n }\n // Wrap cmd in quotes to make it cope with spaces in path\n cmd = `\"${cmd}\"`;\n const args = config['cmd-args'];\n if (args) {\n cmd = cmd + ' ' + args;\n }\n // TODO: Cache to file?\n // TODO: do this asynchronously\n let output;\n try {\n output = proc.execSync(cmd);\n }\n catch (err) {\n throw new Error('Failed to refresh token: ' + err.message);\n }\n const resultObj = JSON.parse(output);\n const tokenPathKeyInConfig = config['token-key'];\n const expiryPathKeyInConfig = config['expiry-key'];\n // Format in file is {}, so slice it out and add '$'\n const tokenPathKey = '$' + tokenPathKeyInConfig.slice(1, -1);\n const expiryPathKey = '$' + expiryPathKeyInConfig.slice(1, -1);\n config['access-token'] = jsonpath.JSONPath(tokenPathKey, resultObj);\n config.expiry = jsonpath.JSONPath(expiryPathKey, resultObj);\n }\n}\nexports.AzureAuth = AzureAuth;\n//# sourceMappingURL=azure_auth.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.deleteObject = exports.addOrUpdateObject = exports.deleteItems = exports.ListWatch = void 0;\nconst api_1 = require(\"./api\");\nconst informer_1 = require(\"./informer\");\nclass ListWatch {\n constructor(path, watch, listFn, autoStart = true, labelSelector) {\n this.path = path;\n this.watch = watch;\n this.listFn = listFn;\n this.labelSelector = labelSelector;\n this.objects = [];\n this.indexCache = {};\n this.callbackCache = {};\n this.stopped = false;\n this.callbackCache[informer_1.ADD] = [];\n this.callbackCache[informer_1.UPDATE] = [];\n this.callbackCache[informer_1.DELETE] = [];\n this.callbackCache[informer_1.ERROR] = [];\n this.callbackCache[informer_1.CONNECT] = [];\n this.resourceVersion = '';\n if (autoStart) {\n this.doneHandler(null);\n }\n }\n async start() {\n this.stopped = false;\n await this.doneHandler(null);\n }\n async stop() {\n this.stopped = true;\n this._stop();\n }\n on(verb, cb) {\n if (verb === informer_1.CHANGE) {\n this.on('add', cb);\n this.on('update', cb);\n this.on('delete', cb);\n return;\n }\n if (this.callbackCache[verb] === undefined) {\n throw new Error(`Unknown verb: ${verb}`);\n }\n this.callbackCache[verb].push(cb);\n }\n off(verb, cb) {\n if (verb === informer_1.CHANGE) {\n this.off('add', cb);\n this.off('update', cb);\n this.off('delete', cb);\n return;\n }\n if (this.callbackCache[verb] === undefined) {\n throw new Error(`Unknown verb: ${verb}`);\n }\n const indexToRemove = this.callbackCache[verb].findIndex((cachedCb) => cachedCb === cb);\n if (indexToRemove === -1) {\n return;\n }\n this.callbackCache[verb].splice(indexToRemove, 1);\n }\n get(name, namespace) {\n return this.objects.find((obj) => {\n return obj.metadata.name === name && (!namespace || obj.metadata.namespace === namespace);\n });\n }\n list(namespace) {\n if (!namespace) {\n return this.objects;\n }\n return this.indexCache[namespace];\n }\n latestResourceVersion() {\n return this.resourceVersion;\n }\n _stop() {\n if (this.request) {\n this.request.abort();\n this.request = undefined;\n }\n }\n async doneHandler(err) {\n this._stop();\n if (err && err.statusCode === 410) {\n this.resourceVersion = '';\n }\n else if (err) {\n this.callbackCache[informer_1.ERROR].forEach((elt) => elt(err));\n return;\n }\n if (this.stopped) {\n // do not auto-restart\n return;\n }\n this.callbackCache[informer_1.CONNECT].forEach((elt) => elt(undefined));\n if (!this.resourceVersion) {\n const promise = this.listFn();\n const result = await promise;\n const list = result.body;\n this.objects = deleteItems(this.objects, list.items, this.callbackCache[informer_1.DELETE].slice());\n Object.keys(this.indexCache).forEach((key) => {\n const updateObjects = deleteItems(this.indexCache[key], list.items);\n if (updateObjects.length !== 0) {\n this.indexCache[key] = updateObjects;\n }\n else {\n delete this.indexCache[key];\n }\n });\n this.addOrUpdateItems(list.items);\n this.resourceVersion = list.metadata.resourceVersion;\n }\n const queryParams = {\n resourceVersion: this.resourceVersion,\n };\n if (this.labelSelector !== undefined) {\n queryParams.labelSelector = api_1.ObjectSerializer.serialize(this.labelSelector, 'string');\n }\n this.request = await this.watch.watch(this.path, queryParams, this.watchHandler.bind(this), this.doneHandler.bind(this));\n }\n addOrUpdateItems(items) {\n items.forEach((obj) => {\n addOrUpdateObject(this.objects, obj, this.callbackCache[informer_1.ADD].slice(), this.callbackCache[informer_1.UPDATE].slice());\n if (obj.metadata.namespace) {\n this.indexObj(obj);\n }\n });\n }\n indexObj(obj) {\n let namespaceList = this.indexCache[obj.metadata.namespace];\n if (!namespaceList) {\n namespaceList = [];\n this.indexCache[obj.metadata.namespace] = namespaceList;\n }\n addOrUpdateObject(namespaceList, obj);\n }\n watchHandler(phase, obj, watchObj) {\n switch (phase) {\n case 'ADDED':\n case 'MODIFIED':\n addOrUpdateObject(this.objects, obj, this.callbackCache[informer_1.ADD].slice(), this.callbackCache[informer_1.UPDATE].slice());\n if (obj.metadata.namespace) {\n this.indexObj(obj);\n }\n break;\n case 'DELETED':\n deleteObject(this.objects, obj, this.callbackCache[informer_1.DELETE].slice());\n if (obj.metadata.namespace) {\n const namespaceList = this.indexCache[obj.metadata.namespace];\n if (namespaceList) {\n deleteObject(namespaceList, obj);\n }\n }\n break;\n case 'BOOKMARK':\n // nothing to do, here for documentation, mostly.\n break;\n }\n if (watchObj && watchObj.metadata) {\n this.resourceVersion = watchObj.metadata.resourceVersion;\n }\n }\n}\nexports.ListWatch = ListWatch;\n// external for testing\nfunction deleteItems(oldObjects, newObjects, deleteCallback) {\n return oldObjects.filter((obj) => {\n if (findKubernetesObject(newObjects, obj) === -1) {\n if (deleteCallback) {\n deleteCallback.forEach((fn) => fn(obj));\n }\n return false;\n }\n return true;\n });\n}\nexports.deleteItems = deleteItems;\n// Only public for testing.\nfunction addOrUpdateObject(objects, obj, addCallback, updateCallback) {\n const ix = findKubernetesObject(objects, obj);\n if (ix === -1) {\n objects.push(obj);\n if (addCallback) {\n addCallback.forEach((elt) => elt(obj));\n }\n }\n else {\n if (!isSameVersion(objects[ix], obj)) {\n objects[ix] = obj;\n if (updateCallback) {\n updateCallback.forEach((elt) => elt(obj));\n }\n }\n }\n}\nexports.addOrUpdateObject = addOrUpdateObject;\nfunction isSameObject(o1, o2) {\n return o1.metadata.name === o2.metadata.name && o1.metadata.namespace === o2.metadata.namespace;\n}\nfunction isSameVersion(o1, o2) {\n return (o1.metadata.resourceVersion !== undefined &&\n o1.metadata.resourceVersion !== null &&\n o1.metadata.resourceVersion === o2.metadata.resourceVersion);\n}\nfunction findKubernetesObject(objects, obj) {\n return objects.findIndex((elt) => {\n return isSameObject(elt, obj);\n });\n}\n// Public for testing.\nfunction deleteObject(objects, obj, deleteCallback) {\n const ix = findKubernetesObject(objects, obj);\n if (ix !== -1) {\n objects.splice(ix, 1);\n if (deleteCallback) {\n deleteCallback.forEach((elt) => elt(obj));\n }\n }\n}\nexports.deleteObject = deleteObject;\n//# sourceMappingURL=cache.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.findObject = exports.findHomeDir = exports.bufferFromFileOrString = exports.makeAbsolutePath = exports.Config = exports.KubeConfig = void 0;\nconst tslib_1 = require(\"tslib\");\nconst execa = require(\"execa\");\nconst fs = require(\"fs\");\nconst yaml = require(\"js-yaml\");\nconst net = require(\"net\");\nconst path = require(\"path\");\nconst shelljs = require(\"shelljs\");\nconst api = tslib_1.__importStar(require(\"./api\"));\nconst azure_auth_1 = require(\"./azure_auth\");\nconst config_types_1 = require(\"./config_types\");\nconst exec_auth_1 = require(\"./exec_auth\");\nconst file_auth_1 = require(\"./file_auth\");\nconst gcp_auth_1 = require(\"./gcp_auth\");\nconst oidc_auth_1 = require(\"./oidc_auth\");\n// fs.existsSync was removed in node 10\nfunction fileExists(filepath) {\n try {\n fs.accessSync(filepath);\n return true;\n }\n catch (ignore) {\n return false;\n }\n}\nclass KubeConfig {\n constructor() {\n this.contexts = [];\n this.clusters = [];\n this.users = [];\n }\n getContexts() {\n return this.contexts;\n }\n getClusters() {\n return this.clusters;\n }\n getUsers() {\n return this.users;\n }\n getCurrentContext() {\n return this.currentContext;\n }\n setCurrentContext(context) {\n this.currentContext = context;\n }\n getContextObject(name) {\n if (!this.contexts) {\n return null;\n }\n return findObject(this.contexts, name, 'context');\n }\n getCurrentCluster() {\n const context = this.getCurrentContextObject();\n if (!context) {\n return null;\n }\n return this.getCluster(context.cluster);\n }\n getCluster(name) {\n return findObject(this.clusters, name, 'cluster');\n }\n getCurrentUser() {\n const ctx = this.getCurrentContextObject();\n if (!ctx) {\n return null;\n }\n return this.getUser(ctx.user);\n }\n getUser(name) {\n return findObject(this.users, name, 'user');\n }\n loadFromFile(file, opts) {\n const rootDirectory = path.dirname(file);\n this.loadFromString(fs.readFileSync(file, 'utf8'), opts);\n this.makePathsAbsolute(rootDirectory);\n }\n async applytoHTTPSOptions(opts) {\n const user = this.getCurrentUser();\n await this.applyOptions(opts);\n if (user && user.username) {\n opts.auth = `${user.username}:${user.password}`;\n }\n }\n async applyToRequest(opts) {\n const cluster = this.getCurrentCluster();\n const user = this.getCurrentUser();\n await this.applyOptions(opts);\n if (cluster && cluster.skipTLSVerify) {\n opts.strictSSL = false;\n }\n if (user && user.username) {\n opts.auth = {\n password: user.password,\n username: user.username,\n };\n }\n }\n loadFromString(config, opts) {\n const obj = yaml.load(config);\n this.clusters = config_types_1.newClusters(obj.clusters, opts);\n this.contexts = config_types_1.newContexts(obj.contexts, opts);\n this.users = config_types_1.newUsers(obj.users, opts);\n this.currentContext = obj['current-context'];\n }\n loadFromOptions(options) {\n this.clusters = options.clusters;\n this.contexts = options.contexts;\n this.users = options.users;\n this.currentContext = options.currentContext;\n }\n loadFromClusterAndUser(cluster, user) {\n this.clusters = [cluster];\n this.users = [user];\n this.currentContext = 'loaded-context';\n this.contexts = [\n {\n cluster: cluster.name,\n user: user.name,\n name: this.currentContext,\n },\n ];\n }\n loadFromCluster(pathPrefix = '') {\n const host = process.env.KUBERNETES_SERVICE_HOST;\n const port = process.env.KUBERNETES_SERVICE_PORT;\n const clusterName = 'inCluster';\n const userName = 'inClusterUser';\n const contextName = 'inClusterContext';\n let scheme = 'https';\n if (port === '80' || port === '8080' || port === '8001') {\n scheme = 'http';\n }\n // Wrap raw IPv6 addresses in brackets.\n let serverHost = host;\n if (host && net.isIPv6(host)) {\n serverHost = `[${host}]`;\n }\n this.clusters = [\n {\n name: clusterName,\n caFile: `${pathPrefix}${Config.SERVICEACCOUNT_CA_PATH}`,\n server: `${scheme}://${serverHost}:${port}`,\n skipTLSVerify: false,\n },\n ];\n this.users = [\n {\n name: userName,\n authProvider: {\n name: 'tokenFile',\n config: {\n tokenFile: `${pathPrefix}${Config.SERVICEACCOUNT_TOKEN_PATH}`,\n },\n },\n },\n ];\n const namespaceFile = `${pathPrefix}${Config.SERVICEACCOUNT_NAMESPACE_PATH}`;\n let namespace;\n if (fileExists(namespaceFile)) {\n namespace = fs.readFileSync(namespaceFile, 'utf8');\n }\n this.contexts = [\n {\n cluster: clusterName,\n name: contextName,\n user: userName,\n namespace,\n },\n ];\n this.currentContext = contextName;\n }\n mergeConfig(config, preserveContext = false) {\n if (!preserveContext) {\n this.currentContext = config.currentContext;\n }\n config.clusters.forEach((cluster) => {\n this.addCluster(cluster);\n });\n config.users.forEach((user) => {\n this.addUser(user);\n });\n config.contexts.forEach((ctx) => {\n this.addContext(ctx);\n });\n }\n addCluster(cluster) {\n if (!this.clusters) {\n this.clusters = [];\n }\n this.clusters.forEach((c, ix) => {\n if (c.name === cluster.name) {\n throw new Error(`Duplicate cluster: ${c.name}`);\n }\n });\n this.clusters.push(cluster);\n }\n addUser(user) {\n if (!this.users) {\n this.users = [];\n }\n this.users.forEach((c, ix) => {\n if (c.name === user.name) {\n throw new Error(`Duplicate user: ${c.name}`);\n }\n });\n this.users.push(user);\n }\n addContext(ctx) {\n if (!this.contexts) {\n this.contexts = [];\n }\n this.contexts.forEach((c, ix) => {\n if (c.name === ctx.name) {\n throw new Error(`Duplicate context: ${c.name}`);\n }\n });\n this.contexts.push(ctx);\n }\n loadFromDefault(opts, contextFromStartingConfig = false) {\n if (process.env.KUBECONFIG && process.env.KUBECONFIG.length > 0) {\n const files = process.env.KUBECONFIG.split(path.delimiter).filter((filename) => filename);\n this.loadFromFile(files[0], opts);\n for (let i = 1; i < files.length; i++) {\n const kc = new KubeConfig();\n kc.loadFromFile(files[i], opts);\n this.mergeConfig(kc, contextFromStartingConfig);\n }\n return;\n }\n const home = findHomeDir();\n if (home) {\n const config = path.join(home, '.kube', 'config');\n if (fileExists(config)) {\n this.loadFromFile(config, opts);\n return;\n }\n }\n if (process.platform === 'win32' && shelljs.which('wsl.exe')) {\n try {\n const envKubeconfigPathResult = execa.sync('wsl.exe', ['bash', '-ic', 'printenv KUBECONFIG']);\n if (envKubeconfigPathResult.exitCode === 0 && envKubeconfigPathResult.stdout.length > 0) {\n const result = execa.sync('wsl.exe', ['cat', envKubeconfigPathResult.stdout]);\n if (result.exitCode === 0) {\n this.loadFromString(result.stdout, opts);\n return;\n }\n if (result.exitCode === 0) {\n this.loadFromString(result.stdout, opts);\n return;\n }\n }\n }\n catch (err) {\n // Falling back to default kubeconfig\n }\n try {\n const result = execa.sync('wsl.exe', ['cat', '~/.kube/config']);\n if (result.exitCode === 0) {\n this.loadFromString(result.stdout, opts);\n return;\n }\n }\n catch (err) {\n // Falling back to alternative auth\n }\n }\n if (fileExists(Config.SERVICEACCOUNT_TOKEN_PATH)) {\n this.loadFromCluster();\n return;\n }\n this.loadFromClusterAndUser({ name: 'cluster', server: 'http://localhost:8080' }, { name: 'user' });\n }\n makeApiClient(apiClientType) {\n const cluster = this.getCurrentCluster();\n if (!cluster) {\n throw new Error('No active cluster!');\n }\n const apiClient = new apiClientType(cluster.server);\n apiClient.setDefaultAuthentication(this);\n return apiClient;\n }\n makePathsAbsolute(rootDirectory) {\n this.clusters.forEach((cluster) => {\n if (cluster.caFile) {\n cluster.caFile = makeAbsolutePath(rootDirectory, cluster.caFile);\n }\n });\n this.users.forEach((user) => {\n if (user.certFile) {\n user.certFile = makeAbsolutePath(rootDirectory, user.certFile);\n }\n if (user.keyFile) {\n user.keyFile = makeAbsolutePath(rootDirectory, user.keyFile);\n }\n });\n }\n exportConfig() {\n const configObj = {\n apiVersion: 'v1',\n kind: 'Config',\n clusters: this.clusters.map(config_types_1.exportCluster),\n users: this.users.map(config_types_1.exportUser),\n contexts: this.contexts.map(config_types_1.exportContext),\n preferences: {},\n 'current-context': this.getCurrentContext(),\n };\n return JSON.stringify(configObj);\n }\n getCurrentContextObject() {\n return this.getContextObject(this.currentContext);\n }\n applyHTTPSOptions(opts) {\n const cluster = this.getCurrentCluster();\n const user = this.getCurrentUser();\n if (!user) {\n return;\n }\n if (cluster != null && cluster.skipTLSVerify) {\n opts.rejectUnauthorized = false;\n }\n const ca = cluster != null ? bufferFromFileOrString(cluster.caFile, cluster.caData) : null;\n if (ca) {\n opts.ca = ca;\n }\n const cert = bufferFromFileOrString(user.certFile, user.certData);\n if (cert) {\n opts.cert = cert;\n }\n const key = bufferFromFileOrString(user.keyFile, user.keyData);\n if (key) {\n opts.key = key;\n }\n }\n async applyAuthorizationHeader(opts) {\n const user = this.getCurrentUser();\n if (!user) {\n return;\n }\n const authenticator = KubeConfig.authenticators.find((elt) => {\n return elt.isAuthProvider(user);\n });\n if (!opts.headers) {\n opts.headers = {};\n }\n if (authenticator) {\n await authenticator.applyAuthentication(user, opts);\n }\n if (user.token) {\n opts.headers.Authorization = `Bearer ${user.token}`;\n }\n }\n async applyOptions(opts) {\n this.applyHTTPSOptions(opts);\n await this.applyAuthorizationHeader(opts);\n }\n}\nexports.KubeConfig = KubeConfig;\nKubeConfig.authenticators = [\n new azure_auth_1.AzureAuth(),\n new gcp_auth_1.GoogleCloudPlatformAuth(),\n new exec_auth_1.ExecAuth(),\n new file_auth_1.FileAuth(),\n new oidc_auth_1.OpenIDConnectAuth(),\n];\n// This class is deprecated and will eventually be removed.\nclass Config {\n static fromFile(filename) {\n return Config.apiFromFile(filename, api.CoreV1Api);\n }\n static fromCluster() {\n return Config.apiFromCluster(api.CoreV1Api);\n }\n static defaultClient() {\n return Config.apiFromDefaultClient(api.CoreV1Api);\n }\n static apiFromFile(filename, apiClientType) {\n const kc = new KubeConfig();\n kc.loadFromFile(filename);\n return kc.makeApiClient(apiClientType);\n }\n static apiFromCluster(apiClientType) {\n const kc = new KubeConfig();\n kc.loadFromCluster();\n const cluster = kc.getCurrentCluster();\n if (!cluster) {\n throw new Error('No active cluster!');\n }\n const k8sApi = new apiClientType(cluster.server);\n k8sApi.setDefaultAuthentication(kc);\n return k8sApi;\n }\n static apiFromDefaultClient(apiClientType) {\n const kc = new KubeConfig();\n kc.loadFromDefault();\n return kc.makeApiClient(apiClientType);\n }\n}\nexports.Config = Config;\nConfig.SERVICEACCOUNT_ROOT = '/var/run/secrets/kubernetes.io/serviceaccount';\nConfig.SERVICEACCOUNT_CA_PATH = Config.SERVICEACCOUNT_ROOT + '/ca.crt';\nConfig.SERVICEACCOUNT_TOKEN_PATH = Config.SERVICEACCOUNT_ROOT + '/token';\nConfig.SERVICEACCOUNT_NAMESPACE_PATH = Config.SERVICEACCOUNT_ROOT + '/namespace';\nfunction makeAbsolutePath(root, file) {\n if (!root || path.isAbsolute(file)) {\n return file;\n }\n return path.join(root, file);\n}\nexports.makeAbsolutePath = makeAbsolutePath;\n// This is public really only for testing.\nfunction bufferFromFileOrString(file, data) {\n if (file) {\n return fs.readFileSync(file);\n }\n if (data) {\n return Buffer.from(data, 'base64');\n }\n return null;\n}\nexports.bufferFromFileOrString = bufferFromFileOrString;\nfunction dropDuplicatesAndNils(a) {\n return a.reduce((acceptedValues, currentValue) => {\n // Good-enough algorithm for reducing a small (3 items at this point) array into an ordered list\n // of unique non-empty strings.\n if (currentValue && !acceptedValues.includes(currentValue)) {\n return acceptedValues.concat(currentValue);\n }\n else {\n return acceptedValues;\n }\n }, []);\n}\n// Only public for testing.\nfunction findHomeDir() {\n if (process.platform !== 'win32') {\n if (process.env.HOME) {\n try {\n fs.accessSync(process.env.HOME);\n return process.env.HOME;\n // tslint:disable-next-line:no-empty\n }\n catch (ignore) { }\n }\n return null;\n }\n // $HOME is always favoured, but the k8s go-client prefers the other two env vars\n // differently depending on whether .kube/config exists or not.\n const homeDrivePath = process.env.HOMEDRIVE && process.env.HOMEPATH\n ? path.join(process.env.HOMEDRIVE, process.env.HOMEPATH)\n : '';\n const homePath = process.env.HOME || '';\n const userProfile = process.env.USERPROFILE || '';\n const favourHomeDrivePathList = dropDuplicatesAndNils([homePath, homeDrivePath, userProfile]);\n const favourUserProfileList = dropDuplicatesAndNils([homePath, userProfile, homeDrivePath]);\n // 1. the first of %HOME%, %HOMEDRIVE%%HOMEPATH%, %USERPROFILE% containing a `.kube\\config` file is returned.\n for (const dir of favourHomeDrivePathList) {\n try {\n fs.accessSync(path.join(dir, '.kube', 'config'));\n return dir;\n // tslint:disable-next-line:no-empty\n }\n catch (ignore) { }\n }\n // 2. ...the first of %HOME%, %USERPROFILE%, %HOMEDRIVE%%HOMEPATH% that exists and is writeable is returned\n for (const dir of favourUserProfileList) {\n try {\n fs.accessSync(dir, fs.constants.W_OK);\n return dir;\n // tslint:disable-next-line:no-empty\n }\n catch (ignore) { }\n }\n // 3. ...the first of %HOME%, %USERPROFILE%, %HOMEDRIVE%%HOMEPATH% that exists is returned.\n for (const dir of favourUserProfileList) {\n try {\n fs.accessSync(dir);\n return dir;\n // tslint:disable-next-line:no-empty\n }\n catch (ignore) { }\n }\n // 4. if none of those locations exists, the first of\n // %HOME%, %USERPROFILE%, %HOMEDRIVE%%HOMEPATH% that is set is returned.\n return favourUserProfileList[0] || null;\n}\nexports.findHomeDir = findHomeDir;\n// Only really public for testing...\nfunction findObject(list, name, key) {\n if (!list) {\n return null;\n }\n for (const obj of list) {\n if (obj.name === name) {\n if (obj[key]) {\n obj[key].name = name;\n return obj[key];\n }\n return obj;\n }\n }\n return null;\n}\nexports.findObject = findObject;\n//# sourceMappingURL=config.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.exportContext = exports.newContexts = exports.exportUser = exports.newUsers = exports.exportCluster = exports.newClusters = exports.ActionOnInvalid = void 0;\nconst tslib_1 = require(\"tslib\");\nconst fs = tslib_1.__importStar(require(\"fs\"));\nconst _ = tslib_1.__importStar(require(\"underscore\"));\nvar ActionOnInvalid;\n(function (ActionOnInvalid) {\n ActionOnInvalid[\"THROW\"] = \"throw\";\n ActionOnInvalid[\"FILTER\"] = \"filter\";\n})(ActionOnInvalid = exports.ActionOnInvalid || (exports.ActionOnInvalid = {}));\nfunction defaultNewConfigOptions() {\n return {\n onInvalidEntry: ActionOnInvalid.THROW,\n };\n}\nfunction newClusters(a, opts) {\n const options = Object.assign(defaultNewConfigOptions(), opts || {});\n return _.compact(_.map(a, clusterIterator(options.onInvalidEntry)));\n}\nexports.newClusters = newClusters;\nfunction exportCluster(cluster) {\n return {\n name: cluster.name,\n cluster: {\n server: cluster.server,\n 'certificate-authority-data': cluster.caData,\n 'certificate-authority': cluster.caFile,\n 'insecure-skip-tls-verify': cluster.skipTLSVerify,\n },\n };\n}\nexports.exportCluster = exportCluster;\nfunction clusterIterator(onInvalidEntry) {\n return (elt, i, list) => {\n try {\n if (!elt.name) {\n throw new Error(`clusters[${i}].name is missing`);\n }\n if (!elt.cluster) {\n throw new Error(`clusters[${i}].cluster is missing`);\n }\n if (!elt.cluster.server) {\n throw new Error(`clusters[${i}].cluster.server is missing`);\n }\n return {\n caData: elt.cluster['certificate-authority-data'],\n caFile: elt.cluster['certificate-authority'],\n name: elt.name,\n server: elt.cluster.server.replace(/\\/$/, ''),\n skipTLSVerify: elt.cluster['insecure-skip-tls-verify'] === true,\n };\n }\n catch (err) {\n switch (onInvalidEntry) {\n case ActionOnInvalid.FILTER:\n return null;\n default:\n case ActionOnInvalid.THROW:\n throw err;\n }\n }\n };\n}\nfunction newUsers(a, opts) {\n const options = Object.assign(defaultNewConfigOptions(), opts || {});\n return _.compact(_.map(a, userIterator(options.onInvalidEntry)));\n}\nexports.newUsers = newUsers;\nfunction exportUser(user) {\n return {\n name: user.name,\n user: {\n 'auth-provider': user.authProvider,\n 'client-certificate-data': user.certData,\n 'client-certificate': user.certFile,\n exec: user.exec,\n 'client-key-data': user.keyData,\n 'client-key': user.keyFile,\n token: user.token,\n password: user.password,\n username: user.username,\n },\n };\n}\nexports.exportUser = exportUser;\nfunction userIterator(onInvalidEntry) {\n return (elt, i, list) => {\n try {\n if (!elt.name) {\n throw new Error(`users[${i}].name is missing`);\n }\n return {\n authProvider: elt.user ? elt.user['auth-provider'] : null,\n certData: elt.user ? elt.user['client-certificate-data'] : null,\n certFile: elt.user ? elt.user['client-certificate'] : null,\n exec: elt.user ? elt.user.exec : null,\n keyData: elt.user ? elt.user['client-key-data'] : null,\n keyFile: elt.user ? elt.user['client-key'] : null,\n name: elt.name,\n token: findToken(elt.user),\n password: elt.user ? elt.user.password : null,\n username: elt.user ? elt.user.username : null,\n };\n }\n catch (err) {\n switch (onInvalidEntry) {\n case ActionOnInvalid.FILTER:\n return null;\n default:\n case ActionOnInvalid.THROW:\n throw err;\n }\n }\n };\n}\nfunction findToken(user) {\n if (user) {\n if (user.token) {\n return user.token;\n }\n if (user['token-file']) {\n return fs.readFileSync(user['token-file']).toString();\n }\n }\n}\nfunction newContexts(a, opts) {\n const options = Object.assign(defaultNewConfigOptions(), opts || {});\n return _.compact(_.map(a, contextIterator(options.onInvalidEntry)));\n}\nexports.newContexts = newContexts;\nfunction exportContext(ctx) {\n return {\n name: ctx.name,\n context: ctx,\n };\n}\nexports.exportContext = exportContext;\nfunction contextIterator(onInvalidEntry) {\n return (elt, i, list) => {\n try {\n if (!elt.name) {\n throw new Error(`contexts[${i}].name is missing`);\n }\n if (!elt.context) {\n throw new Error(`contexts[${i}].context is missing`);\n }\n if (!elt.context.cluster) {\n throw new Error(`contexts[${i}].context.cluster is missing`);\n }\n return {\n cluster: elt.context.cluster,\n name: elt.name,\n user: elt.context.user || undefined,\n namespace: elt.context.namespace || undefined,\n };\n }\n catch (err) {\n switch (onInvalidEntry) {\n case ActionOnInvalid.FILTER:\n return null;\n default:\n case ActionOnInvalid.THROW:\n throw err;\n }\n }\n };\n}\n//# sourceMappingURL=config_types.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Cp = void 0;\nconst tslib_1 = require(\"tslib\");\nconst fs = tslib_1.__importStar(require(\"fs\"));\nconst stream_buffers_1 = require(\"stream-buffers\");\nconst tar = tslib_1.__importStar(require(\"tar\"));\nconst tmp = tslib_1.__importStar(require(\"tmp-promise\"));\nconst exec_1 = require(\"./exec\");\nclass Cp {\n constructor(config, execInstance) {\n this.execInstance = execInstance || new exec_1.Exec(config);\n }\n /**\n * @param {string} namespace - The namespace of the pod to exec the command inside.\n * @param {string} podName - The name of the pod to exec the command inside.\n * @param {string} containerName - The name of the container in the pod to exec the command inside.\n * @param {string} srcPath - The source path in the pod\n * @param {string} tgtPath - The target path in local\n */\n async cpFromPod(namespace, podName, containerName, srcPath, tgtPath) {\n const tmpFile = tmp.fileSync();\n const tmpFileName = tmpFile.name;\n const command = ['tar', 'zcf', '-', srcPath];\n const writerStream = fs.createWriteStream(tmpFileName);\n const errStream = new stream_buffers_1.WritableStreamBuffer();\n this.execInstance.exec(namespace, podName, containerName, command, writerStream, errStream, null, false, async () => {\n if (errStream.size()) {\n throw new Error(`Error from cpFromPod - details: \\n ${errStream.getContentsAsString()}`);\n }\n await tar.x({\n file: tmpFileName,\n cwd: tgtPath,\n });\n });\n }\n /**\n * @param {string} namespace - The namespace of the pod to exec the command inside.\n * @param {string} podName - The name of the pod to exec the command inside.\n * @param {string} containerName - The name of the container in the pod to exec the command inside.\n * @param {string} srcPath - The source path in local\n * @param {string} tgtPath - The target path in the pod\n */\n async cpToPod(namespace, podName, containerName, srcPath, tgtPath) {\n const tmpFile = tmp.fileSync();\n const tmpFileName = tmpFile.name;\n const command = ['tar', 'xf', '-', '-C', tgtPath];\n await tar.c({\n file: tmpFile.name,\n }, [srcPath]);\n const readStream = fs.createReadStream(tmpFileName);\n const errStream = new stream_buffers_1.WritableStreamBuffer();\n this.execInstance.exec(namespace, podName, containerName, command, null, errStream, readStream, false, async () => {\n if (errStream.size()) {\n throw new Error(`Error from cpToPod - details: \\n ${errStream.getContentsAsString()}`);\n }\n });\n }\n}\nexports.Cp = Cp;\n//# sourceMappingURL=cp.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Exec = void 0;\nconst querystring = require(\"querystring\");\nconst terminal_size_queue_1 = require(\"./terminal-size-queue\");\nconst web_socket_handler_1 = require(\"./web-socket-handler\");\nclass Exec {\n constructor(config, wsInterface) {\n this.handler = wsInterface || new web_socket_handler_1.WebSocketHandler(config);\n }\n /**\n * @param {string} namespace - The namespace of the pod to exec the command inside.\n * @param {string} podName - The name of the pod to exec the command inside.\n * @param {string} containerName - The name of the container in the pod to exec the command inside.\n * @param {(string|string[])} command - The command or command and arguments to execute.\n * @param {stream.Writable} stdout - The stream to write stdout data from the command.\n * @param {stream.Writable} stderr - The stream to write stderr data from the command.\n * @param {stream.Readable} stdin - The stream to write stdin data into the command.\n * @param {boolean} tty - Should the command execute in a TTY enabled session.\n * @param {(V1Status) => void} statusCallback -\n * A callback to received the status (e.g. exit code) from the command, optional.\n * @return {string} This is the result\n */\n async exec(namespace, podName, containerName, command, stdout, stderr, stdin, tty, statusCallback) {\n const query = {\n stdout: stdout != null,\n stderr: stderr != null,\n stdin: stdin != null,\n tty,\n command,\n container: containerName,\n };\n const queryStr = querystring.stringify(query);\n const path = `/api/v1/namespaces/${namespace}/pods/${podName}/exec?${queryStr}`;\n const conn = await this.handler.connect(path, null, (streamNum, buff) => {\n const status = web_socket_handler_1.WebSocketHandler.handleStandardStreams(streamNum, buff, stdout, stderr);\n if (status != null) {\n if (statusCallback) {\n statusCallback(status);\n }\n return false;\n }\n return true;\n });\n if (stdin != null) {\n web_socket_handler_1.WebSocketHandler.handleStandardInput(conn, stdin, web_socket_handler_1.WebSocketHandler.StdinStream);\n }\n if (terminal_size_queue_1.isResizable(stdout)) {\n this.terminalSizeQueue = new terminal_size_queue_1.TerminalSizeQueue();\n web_socket_handler_1.WebSocketHandler.handleStandardInput(conn, this.terminalSizeQueue, web_socket_handler_1.WebSocketHandler.ResizeStream);\n this.terminalSizeQueue.handleResizes(stdout);\n }\n return conn;\n }\n}\nexports.Exec = Exec;\n//# sourceMappingURL=exec.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ExecAuth = void 0;\nconst execa = require(\"execa\");\nclass ExecAuth {\n constructor() {\n this.tokenCache = {};\n this.execFn = execa.sync;\n }\n isAuthProvider(user) {\n if (!user) {\n return false;\n }\n if (user.exec) {\n return true;\n }\n if (!user.authProvider) {\n return false;\n }\n return (user.authProvider.name === 'exec' || !!(user.authProvider.config && user.authProvider.config.exec));\n }\n async applyAuthentication(user, opts) {\n const credential = this.getCredential(user);\n if (!credential) {\n return;\n }\n if (credential.status.clientCertificateData) {\n opts.cert = credential.status.clientCertificateData;\n }\n if (credential.status.clientKeyData) {\n opts.key = credential.status.clientKeyData;\n }\n const token = this.getToken(credential);\n if (token) {\n if (!opts.headers) {\n opts.headers = [];\n }\n opts.headers.Authorization = `Bearer ${token}`;\n }\n }\n getToken(credential) {\n if (!credential) {\n return null;\n }\n if (credential.status.token) {\n return credential.status.token;\n }\n return null;\n }\n getCredential(user) {\n // TODO: Add a unit test for token caching.\n const cachedToken = this.tokenCache[user.name];\n if (cachedToken) {\n const date = Date.parse(cachedToken.status.expirationTimestamp);\n if (date > Date.now()) {\n return cachedToken;\n }\n this.tokenCache[user.name] = null;\n }\n let exec = null;\n if (user.authProvider && user.authProvider.config) {\n exec = user.authProvider.config.exec;\n }\n if (user.exec) {\n exec = user.exec;\n }\n if (!exec) {\n return null;\n }\n if (!exec.command) {\n throw new Error('No command was specified for exec authProvider!');\n }\n let opts = {};\n if (exec.env) {\n const env = process.env;\n exec.env.forEach((elt) => (env[elt.name] = elt.value));\n opts = { ...opts, env };\n }\n const result = this.execFn(exec.command, exec.args, opts);\n if (result.exitCode === 0) {\n const obj = JSON.parse(result.stdout);\n this.tokenCache[user.name] = obj;\n return obj;\n }\n throw new Error(result.stderr);\n }\n}\nexports.ExecAuth = ExecAuth;\n//# sourceMappingURL=exec_auth.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.FileAuth = void 0;\nconst fs = require(\"fs\");\nclass FileAuth {\n constructor() {\n this.token = null;\n this.lastRead = null;\n }\n isAuthProvider(user) {\n return user.authProvider && user.authProvider.config && user.authProvider.config.tokenFile;\n }\n async applyAuthentication(user, opts) {\n if (this.token == null) {\n this.refreshToken(user.authProvider.config.tokenFile);\n }\n if (this.isTokenExpired()) {\n this.refreshToken(user.authProvider.config.tokenFile);\n }\n if (this.token) {\n opts.headers.Authorization = `Bearer ${this.token}`;\n }\n }\n refreshToken(filePath) {\n // TODO make this async?\n this.token = fs.readFileSync(filePath).toString('UTF-8');\n this.lastRead = new Date();\n }\n isTokenExpired() {\n if (this.lastRead === null) {\n return true;\n }\n const now = new Date();\n const delta = (now.getTime() - this.lastRead.getTime()) / 1000;\n // For now just refresh every 60 seconds. This is imperfect since the token\n // could be out of date for this time, but it is unlikely and it's also what\n // the client-go library does.\n // TODO: Use file notifications instead?\n return delta > 60;\n }\n}\nexports.FileAuth = FileAuth;\n//# sourceMappingURL=file_auth.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.GoogleCloudPlatformAuth = void 0;\nconst tslib_1 = require(\"tslib\");\nconst proc = tslib_1.__importStar(require(\"child_process\"));\nconst jsonpath = tslib_1.__importStar(require(\"jsonpath-plus\"));\nclass GoogleCloudPlatformAuth {\n isAuthProvider(user) {\n if (!user || !user.authProvider) {\n return false;\n }\n return user.authProvider.name === 'gcp';\n }\n async applyAuthentication(user, opts) {\n const token = this.getToken(user);\n if (token) {\n opts.headers.Authorization = `Bearer ${token}`;\n }\n }\n getToken(user) {\n const config = user.authProvider.config;\n if (this.isExpired(config)) {\n this.updateAccessToken(config);\n }\n return config['access-token'];\n }\n isExpired(config) {\n const token = config['access-token'];\n const expiry = config.expiry;\n if (!token) {\n return true;\n }\n if (!expiry) {\n return false;\n }\n const expiration = Date.parse(expiry);\n if (expiration < Date.now()) {\n return true;\n }\n return false;\n }\n updateAccessToken(config) {\n let cmd = config['cmd-path'];\n if (!cmd) {\n throw new Error('Token is expired!');\n }\n // Wrap cmd in quotes to make it cope with spaces in path\n cmd = `\"${cmd}\"`;\n const args = config['cmd-args'];\n if (args) {\n cmd = cmd + ' ' + args;\n }\n // TODO: Cache to file?\n // TODO: do this asynchronously\n let output;\n try {\n output = proc.execSync(cmd);\n }\n catch (err) {\n throw new Error('Failed to refresh token: ' + err.message);\n }\n const resultObj = JSON.parse(output);\n const tokenPathKeyInConfig = config['token-key'];\n const expiryPathKeyInConfig = config['expiry-key'];\n // Format in file is {}, so slice it out and add '$'\n const tokenPathKey = '$' + tokenPathKeyInConfig.slice(1, -1);\n const expiryPathKey = '$' + expiryPathKeyInConfig.slice(1, -1);\n config['access-token'] = jsonpath.JSONPath(tokenPathKey, resultObj);\n config.expiry = jsonpath.JSONPath(expiryPathKey, resultObj);\n }\n}\nexports.GoogleCloudPlatformAuth = GoogleCloudPlatformAuth;\n//# sourceMappingURL=gcp_auth.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst tslib_1 = require(\"tslib\");\n// This is the entrypoint for the package\ntslib_1.__exportStar(require(\"./api/apis\"), exports);\ntslib_1.__exportStar(require(\"./model/models\"), exports);\n//# sourceMappingURL=api.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.AdmissionregistrationApi = exports.AdmissionregistrationApiApiKeys = void 0;\nconst tslib_1 = require(\"tslib\");\nconst request_1 = tslib_1.__importDefault(require(\"request\"));\nconst models_1 = require(\"../model/models\");\nconst models_2 = require(\"../model/models\");\nconst apis_1 = require(\"./apis\");\nlet defaultBasePath = 'http://localhost';\n// ===============================================\n// This file is autogenerated - Please do not edit\n// ===============================================\nvar AdmissionregistrationApiApiKeys;\n(function (AdmissionregistrationApiApiKeys) {\n AdmissionregistrationApiApiKeys[AdmissionregistrationApiApiKeys[\"BearerToken\"] = 0] = \"BearerToken\";\n})(AdmissionregistrationApiApiKeys = exports.AdmissionregistrationApiApiKeys || (exports.AdmissionregistrationApiApiKeys = {}));\nclass AdmissionregistrationApi {\n constructor(basePathOrUsername, password, basePath) {\n this._basePath = defaultBasePath;\n this._defaultHeaders = {};\n this._useQuerystring = false;\n this.authentications = {\n 'default': new models_1.VoidAuth(),\n 'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'),\n };\n this.interceptors = [];\n if (password) {\n if (basePath) {\n this.basePath = basePath;\n }\n }\n else {\n if (basePathOrUsername) {\n this.basePath = basePathOrUsername;\n }\n }\n }\n set useQuerystring(value) {\n this._useQuerystring = value;\n }\n set basePath(basePath) {\n this._basePath = basePath;\n }\n set defaultHeaders(defaultHeaders) {\n this._defaultHeaders = defaultHeaders;\n }\n get defaultHeaders() {\n return this._defaultHeaders;\n }\n get basePath() {\n return this._basePath;\n }\n setDefaultAuthentication(auth) {\n this.authentications.default = auth;\n }\n setApiKey(key, value) {\n this.authentications[AdmissionregistrationApiApiKeys[key]].apiKey = value;\n }\n addInterceptor(interceptor) {\n this.interceptors.push(interceptor);\n }\n /**\n * get information of a group\n */\n async getAPIGroup(options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/admissionregistration.k8s.io/';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1APIGroup\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n}\nexports.AdmissionregistrationApi = AdmissionregistrationApi;\n//# sourceMappingURL=admissionregistrationApi.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.AdmissionregistrationV1Api = exports.AdmissionregistrationV1ApiApiKeys = void 0;\nconst tslib_1 = require(\"tslib\");\nconst request_1 = tslib_1.__importDefault(require(\"request\"));\nconst models_1 = require(\"../model/models\");\nconst models_2 = require(\"../model/models\");\nconst apis_1 = require(\"./apis\");\nlet defaultBasePath = 'http://localhost';\n// ===============================================\n// This file is autogenerated - Please do not edit\n// ===============================================\nvar AdmissionregistrationV1ApiApiKeys;\n(function (AdmissionregistrationV1ApiApiKeys) {\n AdmissionregistrationV1ApiApiKeys[AdmissionregistrationV1ApiApiKeys[\"BearerToken\"] = 0] = \"BearerToken\";\n})(AdmissionregistrationV1ApiApiKeys = exports.AdmissionregistrationV1ApiApiKeys || (exports.AdmissionregistrationV1ApiApiKeys = {}));\nclass AdmissionregistrationV1Api {\n constructor(basePathOrUsername, password, basePath) {\n this._basePath = defaultBasePath;\n this._defaultHeaders = {};\n this._useQuerystring = false;\n this.authentications = {\n 'default': new models_1.VoidAuth(),\n 'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'),\n };\n this.interceptors = [];\n if (password) {\n if (basePath) {\n this.basePath = basePath;\n }\n }\n else {\n if (basePathOrUsername) {\n this.basePath = basePathOrUsername;\n }\n }\n }\n set useQuerystring(value) {\n this._useQuerystring = value;\n }\n set basePath(basePath) {\n this._basePath = basePath;\n }\n set defaultHeaders(defaultHeaders) {\n this._defaultHeaders = defaultHeaders;\n }\n get defaultHeaders() {\n return this._defaultHeaders;\n }\n get basePath() {\n return this._basePath;\n }\n setDefaultAuthentication(auth) {\n this.authentications.default = auth;\n }\n setApiKey(key, value) {\n this.authentications[AdmissionregistrationV1ApiApiKeys[key]].apiKey = value;\n }\n addInterceptor(interceptor) {\n this.interceptors.push(interceptor);\n }\n /**\n * create a MutatingWebhookConfiguration\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n */\n async createMutatingWebhookConfiguration(body, pretty, dryRun, fieldManager, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/admissionregistration.k8s.io/v1/mutatingwebhookconfigurations';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling createMutatingWebhookConfiguration.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'POST',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1MutatingWebhookConfiguration\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1MutatingWebhookConfiguration\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * create a ValidatingWebhookConfiguration\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n */\n async createValidatingWebhookConfiguration(body, pretty, dryRun, fieldManager, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/admissionregistration.k8s.io/v1/validatingwebhookconfigurations';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling createValidatingWebhookConfiguration.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'POST',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1ValidatingWebhookConfiguration\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1ValidatingWebhookConfiguration\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * delete collection of MutatingWebhookConfiguration\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @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.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @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.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @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.\n * @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.\n * @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.\n * @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\n * @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\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param body\n */\n async deleteCollectionMutatingWebhookConfiguration(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/admissionregistration.k8s.io/v1/mutatingwebhookconfigurations';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (gracePeriodSeconds !== undefined) {\n localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, \"number\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, \"number\");\n }\n if (orphanDependents !== undefined) {\n localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, \"boolean\");\n }\n if (propagationPolicy !== undefined) {\n localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, \"string\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (resourceVersionMatch !== undefined) {\n localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1DeleteOptions\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1Status\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * delete collection of ValidatingWebhookConfiguration\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @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.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @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.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @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.\n * @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.\n * @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.\n * @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\n * @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\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param body\n */\n async deleteCollectionValidatingWebhookConfiguration(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/admissionregistration.k8s.io/v1/validatingwebhookconfigurations';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (gracePeriodSeconds !== undefined) {\n localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, \"number\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, \"number\");\n }\n if (orphanDependents !== undefined) {\n localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, \"boolean\");\n }\n if (propagationPolicy !== undefined) {\n localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, \"string\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (resourceVersionMatch !== undefined) {\n localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1DeleteOptions\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1Status\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * delete a MutatingWebhookConfiguration\n * @param name name of the MutatingWebhookConfiguration\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @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.\n * @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.\n * @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.\n * @param body\n */\n async deleteMutatingWebhookConfiguration(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/admissionregistration.k8s.io/v1/mutatingwebhookconfigurations/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling deleteMutatingWebhookConfiguration.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (gracePeriodSeconds !== undefined) {\n localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, \"number\");\n }\n if (orphanDependents !== undefined) {\n localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, \"boolean\");\n }\n if (propagationPolicy !== undefined) {\n localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1DeleteOptions\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1Status\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * delete a ValidatingWebhookConfiguration\n * @param name name of the ValidatingWebhookConfiguration\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @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.\n * @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.\n * @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.\n * @param body\n */\n async deleteValidatingWebhookConfiguration(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/admissionregistration.k8s.io/v1/validatingwebhookconfigurations/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling deleteValidatingWebhookConfiguration.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (gracePeriodSeconds !== undefined) {\n localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, \"number\");\n }\n if (orphanDependents !== undefined) {\n localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, \"boolean\");\n }\n if (propagationPolicy !== undefined) {\n localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1DeleteOptions\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1Status\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * get available resources\n */\n async getAPIResources(options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/admissionregistration.k8s.io/v1/';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1APIResourceList\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * list or watch objects of kind MutatingWebhookConfiguration\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @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.\n * @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.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @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.\n * @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\n * @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\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n */\n async listMutatingWebhookConfiguration(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/admissionregistration.k8s.io/v1/mutatingwebhookconfigurations';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (allowWatchBookmarks !== undefined) {\n localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, \"boolean\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, \"number\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (resourceVersionMatch !== undefined) {\n localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1MutatingWebhookConfigurationList\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * list or watch objects of kind ValidatingWebhookConfiguration\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @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.\n * @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.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @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.\n * @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\n * @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\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n */\n async listValidatingWebhookConfiguration(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/admissionregistration.k8s.io/v1/validatingwebhookconfigurations';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (allowWatchBookmarks !== undefined) {\n localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, \"boolean\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, \"number\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (resourceVersionMatch !== undefined) {\n localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1ValidatingWebhookConfigurationList\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * partially update the specified MutatingWebhookConfiguration\n * @param name name of the MutatingWebhookConfiguration\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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).\n * @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.\n */\n async patchMutatingWebhookConfiguration(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/admissionregistration.k8s.io/v1/mutatingwebhookconfigurations/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling patchMutatingWebhookConfiguration.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling patchMutatingWebhookConfiguration.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n if (force !== undefined) {\n localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"object\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1MutatingWebhookConfiguration\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * partially update the specified ValidatingWebhookConfiguration\n * @param name name of the ValidatingWebhookConfiguration\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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).\n * @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.\n */\n async patchValidatingWebhookConfiguration(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/admissionregistration.k8s.io/v1/validatingwebhookconfigurations/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling patchValidatingWebhookConfiguration.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling patchValidatingWebhookConfiguration.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n if (force !== undefined) {\n localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"object\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1ValidatingWebhookConfiguration\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * read the specified MutatingWebhookConfiguration\n * @param name name of the MutatingWebhookConfiguration\n * @param pretty If \\'true\\', then the output is pretty printed.\n */\n async readMutatingWebhookConfiguration(name, pretty, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/admissionregistration.k8s.io/v1/mutatingwebhookconfigurations/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling readMutatingWebhookConfiguration.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1MutatingWebhookConfiguration\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * read the specified ValidatingWebhookConfiguration\n * @param name name of the ValidatingWebhookConfiguration\n * @param pretty If \\'true\\', then the output is pretty printed.\n */\n async readValidatingWebhookConfiguration(name, pretty, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/admissionregistration.k8s.io/v1/validatingwebhookconfigurations/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling readValidatingWebhookConfiguration.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1ValidatingWebhookConfiguration\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * replace the specified MutatingWebhookConfiguration\n * @param name name of the MutatingWebhookConfiguration\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n */\n async replaceMutatingWebhookConfiguration(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/admissionregistration.k8s.io/v1/mutatingwebhookconfigurations/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling replaceMutatingWebhookConfiguration.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling replaceMutatingWebhookConfiguration.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1MutatingWebhookConfiguration\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1MutatingWebhookConfiguration\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * replace the specified ValidatingWebhookConfiguration\n * @param name name of the ValidatingWebhookConfiguration\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n */\n async replaceValidatingWebhookConfiguration(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/admissionregistration.k8s.io/v1/validatingwebhookconfigurations/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling replaceValidatingWebhookConfiguration.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling replaceValidatingWebhookConfiguration.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1ValidatingWebhookConfiguration\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1ValidatingWebhookConfiguration\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n}\nexports.AdmissionregistrationV1Api = AdmissionregistrationV1Api;\n//# sourceMappingURL=admissionregistrationV1Api.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ApiextensionsApi = exports.ApiextensionsApiApiKeys = void 0;\nconst tslib_1 = require(\"tslib\");\nconst request_1 = tslib_1.__importDefault(require(\"request\"));\nconst models_1 = require(\"../model/models\");\nconst models_2 = require(\"../model/models\");\nconst apis_1 = require(\"./apis\");\nlet defaultBasePath = 'http://localhost';\n// ===============================================\n// This file is autogenerated - Please do not edit\n// ===============================================\nvar ApiextensionsApiApiKeys;\n(function (ApiextensionsApiApiKeys) {\n ApiextensionsApiApiKeys[ApiextensionsApiApiKeys[\"BearerToken\"] = 0] = \"BearerToken\";\n})(ApiextensionsApiApiKeys = exports.ApiextensionsApiApiKeys || (exports.ApiextensionsApiApiKeys = {}));\nclass ApiextensionsApi {\n constructor(basePathOrUsername, password, basePath) {\n this._basePath = defaultBasePath;\n this._defaultHeaders = {};\n this._useQuerystring = false;\n this.authentications = {\n 'default': new models_1.VoidAuth(),\n 'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'),\n };\n this.interceptors = [];\n if (password) {\n if (basePath) {\n this.basePath = basePath;\n }\n }\n else {\n if (basePathOrUsername) {\n this.basePath = basePathOrUsername;\n }\n }\n }\n set useQuerystring(value) {\n this._useQuerystring = value;\n }\n set basePath(basePath) {\n this._basePath = basePath;\n }\n set defaultHeaders(defaultHeaders) {\n this._defaultHeaders = defaultHeaders;\n }\n get defaultHeaders() {\n return this._defaultHeaders;\n }\n get basePath() {\n return this._basePath;\n }\n setDefaultAuthentication(auth) {\n this.authentications.default = auth;\n }\n setApiKey(key, value) {\n this.authentications[ApiextensionsApiApiKeys[key]].apiKey = value;\n }\n addInterceptor(interceptor) {\n this.interceptors.push(interceptor);\n }\n /**\n * get information of a group\n */\n async getAPIGroup(options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/apiextensions.k8s.io/';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1APIGroup\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n}\nexports.ApiextensionsApi = ApiextensionsApi;\n//# sourceMappingURL=apiextensionsApi.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ApiextensionsV1Api = exports.ApiextensionsV1ApiApiKeys = void 0;\nconst tslib_1 = require(\"tslib\");\nconst request_1 = tslib_1.__importDefault(require(\"request\"));\nconst models_1 = require(\"../model/models\");\nconst models_2 = require(\"../model/models\");\nconst apis_1 = require(\"./apis\");\nlet defaultBasePath = 'http://localhost';\n// ===============================================\n// This file is autogenerated - Please do not edit\n// ===============================================\nvar ApiextensionsV1ApiApiKeys;\n(function (ApiextensionsV1ApiApiKeys) {\n ApiextensionsV1ApiApiKeys[ApiextensionsV1ApiApiKeys[\"BearerToken\"] = 0] = \"BearerToken\";\n})(ApiextensionsV1ApiApiKeys = exports.ApiextensionsV1ApiApiKeys || (exports.ApiextensionsV1ApiApiKeys = {}));\nclass ApiextensionsV1Api {\n constructor(basePathOrUsername, password, basePath) {\n this._basePath = defaultBasePath;\n this._defaultHeaders = {};\n this._useQuerystring = false;\n this.authentications = {\n 'default': new models_1.VoidAuth(),\n 'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'),\n };\n this.interceptors = [];\n if (password) {\n if (basePath) {\n this.basePath = basePath;\n }\n }\n else {\n if (basePathOrUsername) {\n this.basePath = basePathOrUsername;\n }\n }\n }\n set useQuerystring(value) {\n this._useQuerystring = value;\n }\n set basePath(basePath) {\n this._basePath = basePath;\n }\n set defaultHeaders(defaultHeaders) {\n this._defaultHeaders = defaultHeaders;\n }\n get defaultHeaders() {\n return this._defaultHeaders;\n }\n get basePath() {\n return this._basePath;\n }\n setDefaultAuthentication(auth) {\n this.authentications.default = auth;\n }\n setApiKey(key, value) {\n this.authentications[ApiextensionsV1ApiApiKeys[key]].apiKey = value;\n }\n addInterceptor(interceptor) {\n this.interceptors.push(interceptor);\n }\n /**\n * create a CustomResourceDefinition\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n */\n async createCustomResourceDefinition(body, pretty, dryRun, fieldManager, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/apiextensions.k8s.io/v1/customresourcedefinitions';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling createCustomResourceDefinition.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'POST',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1CustomResourceDefinition\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1CustomResourceDefinition\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * delete collection of CustomResourceDefinition\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @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.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @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.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @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.\n * @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.\n * @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.\n * @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\n * @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\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param body\n */\n async deleteCollectionCustomResourceDefinition(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/apiextensions.k8s.io/v1/customresourcedefinitions';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (gracePeriodSeconds !== undefined) {\n localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, \"number\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, \"number\");\n }\n if (orphanDependents !== undefined) {\n localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, \"boolean\");\n }\n if (propagationPolicy !== undefined) {\n localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, \"string\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (resourceVersionMatch !== undefined) {\n localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1DeleteOptions\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1Status\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * delete a CustomResourceDefinition\n * @param name name of the CustomResourceDefinition\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @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.\n * @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.\n * @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.\n * @param body\n */\n async deleteCustomResourceDefinition(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/apiextensions.k8s.io/v1/customresourcedefinitions/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling deleteCustomResourceDefinition.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (gracePeriodSeconds !== undefined) {\n localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, \"number\");\n }\n if (orphanDependents !== undefined) {\n localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, \"boolean\");\n }\n if (propagationPolicy !== undefined) {\n localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1DeleteOptions\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1Status\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * get available resources\n */\n async getAPIResources(options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/apiextensions.k8s.io/v1/';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1APIResourceList\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * list or watch objects of kind CustomResourceDefinition\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @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.\n * @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.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @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.\n * @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\n * @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\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n */\n async listCustomResourceDefinition(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/apiextensions.k8s.io/v1/customresourcedefinitions';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (allowWatchBookmarks !== undefined) {\n localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, \"boolean\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, \"number\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (resourceVersionMatch !== undefined) {\n localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1CustomResourceDefinitionList\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * partially update the specified CustomResourceDefinition\n * @param name name of the CustomResourceDefinition\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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).\n * @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.\n */\n async patchCustomResourceDefinition(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/apiextensions.k8s.io/v1/customresourcedefinitions/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling patchCustomResourceDefinition.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling patchCustomResourceDefinition.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n if (force !== undefined) {\n localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"object\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1CustomResourceDefinition\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * partially update status of the specified CustomResourceDefinition\n * @param name name of the CustomResourceDefinition\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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).\n * @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.\n */\n async patchCustomResourceDefinitionStatus(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/apiextensions.k8s.io/v1/customresourcedefinitions/{name}/status'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling patchCustomResourceDefinitionStatus.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling patchCustomResourceDefinitionStatus.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n if (force !== undefined) {\n localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"object\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1CustomResourceDefinition\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * read the specified CustomResourceDefinition\n * @param name name of the CustomResourceDefinition\n * @param pretty If \\'true\\', then the output is pretty printed.\n */\n async readCustomResourceDefinition(name, pretty, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/apiextensions.k8s.io/v1/customresourcedefinitions/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling readCustomResourceDefinition.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1CustomResourceDefinition\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * read status of the specified CustomResourceDefinition\n * @param name name of the CustomResourceDefinition\n * @param pretty If \\'true\\', then the output is pretty printed.\n */\n async readCustomResourceDefinitionStatus(name, pretty, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/apiextensions.k8s.io/v1/customresourcedefinitions/{name}/status'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling readCustomResourceDefinitionStatus.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1CustomResourceDefinition\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * replace the specified CustomResourceDefinition\n * @param name name of the CustomResourceDefinition\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n */\n async replaceCustomResourceDefinition(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/apiextensions.k8s.io/v1/customresourcedefinitions/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling replaceCustomResourceDefinition.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling replaceCustomResourceDefinition.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1CustomResourceDefinition\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1CustomResourceDefinition\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * replace status of the specified CustomResourceDefinition\n * @param name name of the CustomResourceDefinition\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n */\n async replaceCustomResourceDefinitionStatus(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/apiextensions.k8s.io/v1/customresourcedefinitions/{name}/status'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling replaceCustomResourceDefinitionStatus.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling replaceCustomResourceDefinitionStatus.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1CustomResourceDefinition\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1CustomResourceDefinition\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n}\nexports.ApiextensionsV1Api = ApiextensionsV1Api;\n//# sourceMappingURL=apiextensionsV1Api.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ApiregistrationApi = exports.ApiregistrationApiApiKeys = void 0;\nconst tslib_1 = require(\"tslib\");\nconst request_1 = tslib_1.__importDefault(require(\"request\"));\nconst models_1 = require(\"../model/models\");\nconst models_2 = require(\"../model/models\");\nconst apis_1 = require(\"./apis\");\nlet defaultBasePath = 'http://localhost';\n// ===============================================\n// This file is autogenerated - Please do not edit\n// ===============================================\nvar ApiregistrationApiApiKeys;\n(function (ApiregistrationApiApiKeys) {\n ApiregistrationApiApiKeys[ApiregistrationApiApiKeys[\"BearerToken\"] = 0] = \"BearerToken\";\n})(ApiregistrationApiApiKeys = exports.ApiregistrationApiApiKeys || (exports.ApiregistrationApiApiKeys = {}));\nclass ApiregistrationApi {\n constructor(basePathOrUsername, password, basePath) {\n this._basePath = defaultBasePath;\n this._defaultHeaders = {};\n this._useQuerystring = false;\n this.authentications = {\n 'default': new models_1.VoidAuth(),\n 'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'),\n };\n this.interceptors = [];\n if (password) {\n if (basePath) {\n this.basePath = basePath;\n }\n }\n else {\n if (basePathOrUsername) {\n this.basePath = basePathOrUsername;\n }\n }\n }\n set useQuerystring(value) {\n this._useQuerystring = value;\n }\n set basePath(basePath) {\n this._basePath = basePath;\n }\n set defaultHeaders(defaultHeaders) {\n this._defaultHeaders = defaultHeaders;\n }\n get defaultHeaders() {\n return this._defaultHeaders;\n }\n get basePath() {\n return this._basePath;\n }\n setDefaultAuthentication(auth) {\n this.authentications.default = auth;\n }\n setApiKey(key, value) {\n this.authentications[ApiregistrationApiApiKeys[key]].apiKey = value;\n }\n addInterceptor(interceptor) {\n this.interceptors.push(interceptor);\n }\n /**\n * get information of a group\n */\n async getAPIGroup(options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/apiregistration.k8s.io/';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1APIGroup\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n}\nexports.ApiregistrationApi = ApiregistrationApi;\n//# sourceMappingURL=apiregistrationApi.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ApiregistrationV1Api = exports.ApiregistrationV1ApiApiKeys = void 0;\nconst tslib_1 = require(\"tslib\");\nconst request_1 = tslib_1.__importDefault(require(\"request\"));\nconst models_1 = require(\"../model/models\");\nconst models_2 = require(\"../model/models\");\nconst apis_1 = require(\"./apis\");\nlet defaultBasePath = 'http://localhost';\n// ===============================================\n// This file is autogenerated - Please do not edit\n// ===============================================\nvar ApiregistrationV1ApiApiKeys;\n(function (ApiregistrationV1ApiApiKeys) {\n ApiregistrationV1ApiApiKeys[ApiregistrationV1ApiApiKeys[\"BearerToken\"] = 0] = \"BearerToken\";\n})(ApiregistrationV1ApiApiKeys = exports.ApiregistrationV1ApiApiKeys || (exports.ApiregistrationV1ApiApiKeys = {}));\nclass ApiregistrationV1Api {\n constructor(basePathOrUsername, password, basePath) {\n this._basePath = defaultBasePath;\n this._defaultHeaders = {};\n this._useQuerystring = false;\n this.authentications = {\n 'default': new models_1.VoidAuth(),\n 'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'),\n };\n this.interceptors = [];\n if (password) {\n if (basePath) {\n this.basePath = basePath;\n }\n }\n else {\n if (basePathOrUsername) {\n this.basePath = basePathOrUsername;\n }\n }\n }\n set useQuerystring(value) {\n this._useQuerystring = value;\n }\n set basePath(basePath) {\n this._basePath = basePath;\n }\n set defaultHeaders(defaultHeaders) {\n this._defaultHeaders = defaultHeaders;\n }\n get defaultHeaders() {\n return this._defaultHeaders;\n }\n get basePath() {\n return this._basePath;\n }\n setDefaultAuthentication(auth) {\n this.authentications.default = auth;\n }\n setApiKey(key, value) {\n this.authentications[ApiregistrationV1ApiApiKeys[key]].apiKey = value;\n }\n addInterceptor(interceptor) {\n this.interceptors.push(interceptor);\n }\n /**\n * create an APIService\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n */\n async createAPIService(body, pretty, dryRun, fieldManager, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/apiregistration.k8s.io/v1/apiservices';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling createAPIService.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'POST',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1APIService\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1APIService\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * delete an APIService\n * @param name name of the APIService\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @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.\n * @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.\n * @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.\n * @param body\n */\n async deleteAPIService(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/apiregistration.k8s.io/v1/apiservices/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling deleteAPIService.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (gracePeriodSeconds !== undefined) {\n localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, \"number\");\n }\n if (orphanDependents !== undefined) {\n localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, \"boolean\");\n }\n if (propagationPolicy !== undefined) {\n localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1DeleteOptions\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1Status\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * delete collection of APIService\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @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.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @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.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @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.\n * @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.\n * @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.\n * @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\n * @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\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param body\n */\n async deleteCollectionAPIService(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/apiregistration.k8s.io/v1/apiservices';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (gracePeriodSeconds !== undefined) {\n localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, \"number\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, \"number\");\n }\n if (orphanDependents !== undefined) {\n localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, \"boolean\");\n }\n if (propagationPolicy !== undefined) {\n localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, \"string\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (resourceVersionMatch !== undefined) {\n localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1DeleteOptions\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1Status\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * get available resources\n */\n async getAPIResources(options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/apiregistration.k8s.io/v1/';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1APIResourceList\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * list or watch objects of kind APIService\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @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.\n * @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.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @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.\n * @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\n * @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\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n */\n async listAPIService(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/apiregistration.k8s.io/v1/apiservices';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (allowWatchBookmarks !== undefined) {\n localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, \"boolean\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, \"number\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (resourceVersionMatch !== undefined) {\n localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1APIServiceList\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * partially update the specified APIService\n * @param name name of the APIService\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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).\n * @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.\n */\n async patchAPIService(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/apiregistration.k8s.io/v1/apiservices/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling patchAPIService.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling patchAPIService.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n if (force !== undefined) {\n localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"object\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1APIService\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * partially update status of the specified APIService\n * @param name name of the APIService\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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).\n * @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.\n */\n async patchAPIServiceStatus(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/apiregistration.k8s.io/v1/apiservices/{name}/status'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling patchAPIServiceStatus.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling patchAPIServiceStatus.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n if (force !== undefined) {\n localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"object\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1APIService\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * read the specified APIService\n * @param name name of the APIService\n * @param pretty If \\'true\\', then the output is pretty printed.\n */\n async readAPIService(name, pretty, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/apiregistration.k8s.io/v1/apiservices/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling readAPIService.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1APIService\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * read status of the specified APIService\n * @param name name of the APIService\n * @param pretty If \\'true\\', then the output is pretty printed.\n */\n async readAPIServiceStatus(name, pretty, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/apiregistration.k8s.io/v1/apiservices/{name}/status'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling readAPIServiceStatus.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1APIService\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * replace the specified APIService\n * @param name name of the APIService\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n */\n async replaceAPIService(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/apiregistration.k8s.io/v1/apiservices/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling replaceAPIService.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling replaceAPIService.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1APIService\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1APIService\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * replace status of the specified APIService\n * @param name name of the APIService\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n */\n async replaceAPIServiceStatus(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/apiregistration.k8s.io/v1/apiservices/{name}/status'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling replaceAPIServiceStatus.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling replaceAPIServiceStatus.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1APIService\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1APIService\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n}\nexports.ApiregistrationV1Api = ApiregistrationV1Api;\n//# sourceMappingURL=apiregistrationV1Api.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.APIS = exports.HttpError = void 0;\nconst tslib_1 = require(\"tslib\");\ntslib_1.__exportStar(require(\"./admissionregistrationApi\"), exports);\nconst admissionregistrationApi_1 = require(\"./admissionregistrationApi\");\ntslib_1.__exportStar(require(\"./admissionregistrationV1Api\"), exports);\nconst admissionregistrationV1Api_1 = require(\"./admissionregistrationV1Api\");\ntslib_1.__exportStar(require(\"./apiextensionsApi\"), exports);\nconst apiextensionsApi_1 = require(\"./apiextensionsApi\");\ntslib_1.__exportStar(require(\"./apiextensionsV1Api\"), exports);\nconst apiextensionsV1Api_1 = require(\"./apiextensionsV1Api\");\ntslib_1.__exportStar(require(\"./apiregistrationApi\"), exports);\nconst apiregistrationApi_1 = require(\"./apiregistrationApi\");\ntslib_1.__exportStar(require(\"./apiregistrationV1Api\"), exports);\nconst apiregistrationV1Api_1 = require(\"./apiregistrationV1Api\");\ntslib_1.__exportStar(require(\"./apisApi\"), exports);\nconst apisApi_1 = require(\"./apisApi\");\ntslib_1.__exportStar(require(\"./appsApi\"), exports);\nconst appsApi_1 = require(\"./appsApi\");\ntslib_1.__exportStar(require(\"./appsV1Api\"), exports);\nconst appsV1Api_1 = require(\"./appsV1Api\");\ntslib_1.__exportStar(require(\"./authenticationApi\"), exports);\nconst authenticationApi_1 = require(\"./authenticationApi\");\ntslib_1.__exportStar(require(\"./authenticationV1Api\"), exports);\nconst authenticationV1Api_1 = require(\"./authenticationV1Api\");\ntslib_1.__exportStar(require(\"./authorizationApi\"), exports);\nconst authorizationApi_1 = require(\"./authorizationApi\");\ntslib_1.__exportStar(require(\"./authorizationV1Api\"), exports);\nconst authorizationV1Api_1 = require(\"./authorizationV1Api\");\ntslib_1.__exportStar(require(\"./autoscalingApi\"), exports);\nconst autoscalingApi_1 = require(\"./autoscalingApi\");\ntslib_1.__exportStar(require(\"./autoscalingV1Api\"), exports);\nconst autoscalingV1Api_1 = require(\"./autoscalingV1Api\");\ntslib_1.__exportStar(require(\"./autoscalingV2beta1Api\"), exports);\nconst autoscalingV2beta1Api_1 = require(\"./autoscalingV2beta1Api\");\ntslib_1.__exportStar(require(\"./autoscalingV2beta2Api\"), exports);\nconst autoscalingV2beta2Api_1 = require(\"./autoscalingV2beta2Api\");\ntslib_1.__exportStar(require(\"./batchApi\"), exports);\nconst batchApi_1 = require(\"./batchApi\");\ntslib_1.__exportStar(require(\"./batchV1Api\"), exports);\nconst batchV1Api_1 = require(\"./batchV1Api\");\ntslib_1.__exportStar(require(\"./batchV1beta1Api\"), exports);\nconst batchV1beta1Api_1 = require(\"./batchV1beta1Api\");\ntslib_1.__exportStar(require(\"./certificatesApi\"), exports);\nconst certificatesApi_1 = require(\"./certificatesApi\");\ntslib_1.__exportStar(require(\"./certificatesV1Api\"), exports);\nconst certificatesV1Api_1 = require(\"./certificatesV1Api\");\ntslib_1.__exportStar(require(\"./coordinationApi\"), exports);\nconst coordinationApi_1 = require(\"./coordinationApi\");\ntslib_1.__exportStar(require(\"./coordinationV1Api\"), exports);\nconst coordinationV1Api_1 = require(\"./coordinationV1Api\");\ntslib_1.__exportStar(require(\"./coreApi\"), exports);\nconst coreApi_1 = require(\"./coreApi\");\ntslib_1.__exportStar(require(\"./coreV1Api\"), exports);\nconst coreV1Api_1 = require(\"./coreV1Api\");\ntslib_1.__exportStar(require(\"./customObjectsApi\"), exports);\nconst customObjectsApi_1 = require(\"./customObjectsApi\");\ntslib_1.__exportStar(require(\"./discoveryApi\"), exports);\nconst discoveryApi_1 = require(\"./discoveryApi\");\ntslib_1.__exportStar(require(\"./discoveryV1Api\"), exports);\nconst discoveryV1Api_1 = require(\"./discoveryV1Api\");\ntslib_1.__exportStar(require(\"./discoveryV1beta1Api\"), exports);\nconst discoveryV1beta1Api_1 = require(\"./discoveryV1beta1Api\");\ntslib_1.__exportStar(require(\"./eventsApi\"), exports);\nconst eventsApi_1 = require(\"./eventsApi\");\ntslib_1.__exportStar(require(\"./eventsV1Api\"), exports);\nconst eventsV1Api_1 = require(\"./eventsV1Api\");\ntslib_1.__exportStar(require(\"./eventsV1beta1Api\"), exports);\nconst eventsV1beta1Api_1 = require(\"./eventsV1beta1Api\");\ntslib_1.__exportStar(require(\"./flowcontrolApiserverApi\"), exports);\nconst flowcontrolApiserverApi_1 = require(\"./flowcontrolApiserverApi\");\ntslib_1.__exportStar(require(\"./flowcontrolApiserverV1beta1Api\"), exports);\nconst flowcontrolApiserverV1beta1Api_1 = require(\"./flowcontrolApiserverV1beta1Api\");\ntslib_1.__exportStar(require(\"./internalApiserverApi\"), exports);\nconst internalApiserverApi_1 = require(\"./internalApiserverApi\");\ntslib_1.__exportStar(require(\"./internalApiserverV1alpha1Api\"), exports);\nconst internalApiserverV1alpha1Api_1 = require(\"./internalApiserverV1alpha1Api\");\ntslib_1.__exportStar(require(\"./logsApi\"), exports);\nconst logsApi_1 = require(\"./logsApi\");\ntslib_1.__exportStar(require(\"./networkingApi\"), exports);\nconst networkingApi_1 = require(\"./networkingApi\");\ntslib_1.__exportStar(require(\"./networkingV1Api\"), exports);\nconst networkingV1Api_1 = require(\"./networkingV1Api\");\ntslib_1.__exportStar(require(\"./nodeApi\"), exports);\nconst nodeApi_1 = require(\"./nodeApi\");\ntslib_1.__exportStar(require(\"./nodeV1Api\"), exports);\nconst nodeV1Api_1 = require(\"./nodeV1Api\");\ntslib_1.__exportStar(require(\"./nodeV1alpha1Api\"), exports);\nconst nodeV1alpha1Api_1 = require(\"./nodeV1alpha1Api\");\ntslib_1.__exportStar(require(\"./nodeV1beta1Api\"), exports);\nconst nodeV1beta1Api_1 = require(\"./nodeV1beta1Api\");\ntslib_1.__exportStar(require(\"./openidApi\"), exports);\nconst openidApi_1 = require(\"./openidApi\");\ntslib_1.__exportStar(require(\"./policyApi\"), exports);\nconst policyApi_1 = require(\"./policyApi\");\ntslib_1.__exportStar(require(\"./policyV1Api\"), exports);\nconst policyV1Api_1 = require(\"./policyV1Api\");\ntslib_1.__exportStar(require(\"./policyV1beta1Api\"), exports);\nconst policyV1beta1Api_1 = require(\"./policyV1beta1Api\");\ntslib_1.__exportStar(require(\"./rbacAuthorizationApi\"), exports);\nconst rbacAuthorizationApi_1 = require(\"./rbacAuthorizationApi\");\ntslib_1.__exportStar(require(\"./rbacAuthorizationV1Api\"), exports);\nconst rbacAuthorizationV1Api_1 = require(\"./rbacAuthorizationV1Api\");\ntslib_1.__exportStar(require(\"./rbacAuthorizationV1alpha1Api\"), exports);\nconst rbacAuthorizationV1alpha1Api_1 = require(\"./rbacAuthorizationV1alpha1Api\");\ntslib_1.__exportStar(require(\"./schedulingApi\"), exports);\nconst schedulingApi_1 = require(\"./schedulingApi\");\ntslib_1.__exportStar(require(\"./schedulingV1Api\"), exports);\nconst schedulingV1Api_1 = require(\"./schedulingV1Api\");\ntslib_1.__exportStar(require(\"./schedulingV1alpha1Api\"), exports);\nconst schedulingV1alpha1Api_1 = require(\"./schedulingV1alpha1Api\");\ntslib_1.__exportStar(require(\"./storageApi\"), exports);\nconst storageApi_1 = require(\"./storageApi\");\ntslib_1.__exportStar(require(\"./storageV1Api\"), exports);\nconst storageV1Api_1 = require(\"./storageV1Api\");\ntslib_1.__exportStar(require(\"./storageV1alpha1Api\"), exports);\nconst storageV1alpha1Api_1 = require(\"./storageV1alpha1Api\");\ntslib_1.__exportStar(require(\"./storageV1beta1Api\"), exports);\nconst storageV1beta1Api_1 = require(\"./storageV1beta1Api\");\ntslib_1.__exportStar(require(\"./versionApi\"), exports);\nconst versionApi_1 = require(\"./versionApi\");\ntslib_1.__exportStar(require(\"./wellKnownApi\"), exports);\nconst wellKnownApi_1 = require(\"./wellKnownApi\");\nclass HttpError extends Error {\n constructor(response, body, statusCode) {\n super('HTTP request failed');\n this.response = response;\n this.body = body;\n this.statusCode = statusCode;\n this.name = 'HttpError';\n }\n}\nexports.HttpError = HttpError;\nexports.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];\n//# sourceMappingURL=apis.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ApisApi = exports.ApisApiApiKeys = void 0;\nconst tslib_1 = require(\"tslib\");\nconst request_1 = tslib_1.__importDefault(require(\"request\"));\nconst models_1 = require(\"../model/models\");\nconst models_2 = require(\"../model/models\");\nconst apis_1 = require(\"./apis\");\nlet defaultBasePath = 'http://localhost';\n// ===============================================\n// This file is autogenerated - Please do not edit\n// ===============================================\nvar ApisApiApiKeys;\n(function (ApisApiApiKeys) {\n ApisApiApiKeys[ApisApiApiKeys[\"BearerToken\"] = 0] = \"BearerToken\";\n})(ApisApiApiKeys = exports.ApisApiApiKeys || (exports.ApisApiApiKeys = {}));\nclass ApisApi {\n constructor(basePathOrUsername, password, basePath) {\n this._basePath = defaultBasePath;\n this._defaultHeaders = {};\n this._useQuerystring = false;\n this.authentications = {\n 'default': new models_1.VoidAuth(),\n 'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'),\n };\n this.interceptors = [];\n if (password) {\n if (basePath) {\n this.basePath = basePath;\n }\n }\n else {\n if (basePathOrUsername) {\n this.basePath = basePathOrUsername;\n }\n }\n }\n set useQuerystring(value) {\n this._useQuerystring = value;\n }\n set basePath(basePath) {\n this._basePath = basePath;\n }\n set defaultHeaders(defaultHeaders) {\n this._defaultHeaders = defaultHeaders;\n }\n get defaultHeaders() {\n return this._defaultHeaders;\n }\n get basePath() {\n return this._basePath;\n }\n setDefaultAuthentication(auth) {\n this.authentications.default = auth;\n }\n setApiKey(key, value) {\n this.authentications[ApisApiApiKeys[key]].apiKey = value;\n }\n addInterceptor(interceptor) {\n this.interceptors.push(interceptor);\n }\n /**\n * get available API versions\n */\n async getAPIVersions(options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1APIGroupList\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n}\nexports.ApisApi = ApisApi;\n//# sourceMappingURL=apisApi.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.AppsApi = exports.AppsApiApiKeys = void 0;\nconst tslib_1 = require(\"tslib\");\nconst request_1 = tslib_1.__importDefault(require(\"request\"));\nconst models_1 = require(\"../model/models\");\nconst models_2 = require(\"../model/models\");\nconst apis_1 = require(\"./apis\");\nlet defaultBasePath = 'http://localhost';\n// ===============================================\n// This file is autogenerated - Please do not edit\n// ===============================================\nvar AppsApiApiKeys;\n(function (AppsApiApiKeys) {\n AppsApiApiKeys[AppsApiApiKeys[\"BearerToken\"] = 0] = \"BearerToken\";\n})(AppsApiApiKeys = exports.AppsApiApiKeys || (exports.AppsApiApiKeys = {}));\nclass AppsApi {\n constructor(basePathOrUsername, password, basePath) {\n this._basePath = defaultBasePath;\n this._defaultHeaders = {};\n this._useQuerystring = false;\n this.authentications = {\n 'default': new models_1.VoidAuth(),\n 'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'),\n };\n this.interceptors = [];\n if (password) {\n if (basePath) {\n this.basePath = basePath;\n }\n }\n else {\n if (basePathOrUsername) {\n this.basePath = basePathOrUsername;\n }\n }\n }\n set useQuerystring(value) {\n this._useQuerystring = value;\n }\n set basePath(basePath) {\n this._basePath = basePath;\n }\n set defaultHeaders(defaultHeaders) {\n this._defaultHeaders = defaultHeaders;\n }\n get defaultHeaders() {\n return this._defaultHeaders;\n }\n get basePath() {\n return this._basePath;\n }\n setDefaultAuthentication(auth) {\n this.authentications.default = auth;\n }\n setApiKey(key, value) {\n this.authentications[AppsApiApiKeys[key]].apiKey = value;\n }\n addInterceptor(interceptor) {\n this.interceptors.push(interceptor);\n }\n /**\n * get information of a group\n */\n async getAPIGroup(options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/apps/';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1APIGroup\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n}\nexports.AppsApi = AppsApi;\n//# sourceMappingURL=appsApi.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.AppsV1Api = exports.AppsV1ApiApiKeys = void 0;\nconst tslib_1 = require(\"tslib\");\nconst request_1 = tslib_1.__importDefault(require(\"request\"));\nconst models_1 = require(\"../model/models\");\nconst models_2 = require(\"../model/models\");\nconst apis_1 = require(\"./apis\");\nlet defaultBasePath = 'http://localhost';\n// ===============================================\n// This file is autogenerated - Please do not edit\n// ===============================================\nvar AppsV1ApiApiKeys;\n(function (AppsV1ApiApiKeys) {\n AppsV1ApiApiKeys[AppsV1ApiApiKeys[\"BearerToken\"] = 0] = \"BearerToken\";\n})(AppsV1ApiApiKeys = exports.AppsV1ApiApiKeys || (exports.AppsV1ApiApiKeys = {}));\nclass AppsV1Api {\n constructor(basePathOrUsername, password, basePath) {\n this._basePath = defaultBasePath;\n this._defaultHeaders = {};\n this._useQuerystring = false;\n this.authentications = {\n 'default': new models_1.VoidAuth(),\n 'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'),\n };\n this.interceptors = [];\n if (password) {\n if (basePath) {\n this.basePath = basePath;\n }\n }\n else {\n if (basePathOrUsername) {\n this.basePath = basePathOrUsername;\n }\n }\n }\n set useQuerystring(value) {\n this._useQuerystring = value;\n }\n set basePath(basePath) {\n this._basePath = basePath;\n }\n set defaultHeaders(defaultHeaders) {\n this._defaultHeaders = defaultHeaders;\n }\n get defaultHeaders() {\n return this._defaultHeaders;\n }\n get basePath() {\n return this._basePath;\n }\n setDefaultAuthentication(auth) {\n this.authentications.default = auth;\n }\n setApiKey(key, value) {\n this.authentications[AppsV1ApiApiKeys[key]].apiKey = value;\n }\n addInterceptor(interceptor) {\n this.interceptors.push(interceptor);\n }\n /**\n * create a ControllerRevision\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n */\n async createNamespacedControllerRevision(namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/controllerrevisions'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling createNamespacedControllerRevision.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling createNamespacedControllerRevision.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'POST',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1ControllerRevision\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1ControllerRevision\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * create a DaemonSet\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n */\n async createNamespacedDaemonSet(namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/daemonsets'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling createNamespacedDaemonSet.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling createNamespacedDaemonSet.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'POST',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1DaemonSet\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1DaemonSet\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * create a Deployment\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n */\n async createNamespacedDeployment(namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/deployments'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling createNamespacedDeployment.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling createNamespacedDeployment.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'POST',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1Deployment\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1Deployment\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * create a ReplicaSet\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n */\n async createNamespacedReplicaSet(namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/replicasets'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling createNamespacedReplicaSet.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling createNamespacedReplicaSet.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'POST',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1ReplicaSet\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1ReplicaSet\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * create a StatefulSet\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n */\n async createNamespacedStatefulSet(namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/statefulsets'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling createNamespacedStatefulSet.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling createNamespacedStatefulSet.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'POST',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1StatefulSet\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1StatefulSet\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * delete collection of ControllerRevision\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @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.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @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.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @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.\n * @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.\n * @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.\n * @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\n * @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\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param body\n */\n async deleteCollectionNamespacedControllerRevision(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/controllerrevisions'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedControllerRevision.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (gracePeriodSeconds !== undefined) {\n localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, \"number\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, \"number\");\n }\n if (orphanDependents !== undefined) {\n localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, \"boolean\");\n }\n if (propagationPolicy !== undefined) {\n localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, \"string\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (resourceVersionMatch !== undefined) {\n localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1DeleteOptions\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1Status\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * delete collection of DaemonSet\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @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.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @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.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @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.\n * @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.\n * @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.\n * @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\n * @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\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param body\n */\n async deleteCollectionNamespacedDaemonSet(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/daemonsets'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedDaemonSet.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (gracePeriodSeconds !== undefined) {\n localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, \"number\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, \"number\");\n }\n if (orphanDependents !== undefined) {\n localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, \"boolean\");\n }\n if (propagationPolicy !== undefined) {\n localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, \"string\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (resourceVersionMatch !== undefined) {\n localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1DeleteOptions\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1Status\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * delete collection of Deployment\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @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.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @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.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @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.\n * @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.\n * @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.\n * @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\n * @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\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param body\n */\n async deleteCollectionNamespacedDeployment(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/deployments'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedDeployment.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (gracePeriodSeconds !== undefined) {\n localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, \"number\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, \"number\");\n }\n if (orphanDependents !== undefined) {\n localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, \"boolean\");\n }\n if (propagationPolicy !== undefined) {\n localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, \"string\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (resourceVersionMatch !== undefined) {\n localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1DeleteOptions\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1Status\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * delete collection of ReplicaSet\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @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.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @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.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @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.\n * @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.\n * @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.\n * @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\n * @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\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param body\n */\n async deleteCollectionNamespacedReplicaSet(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/replicasets'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedReplicaSet.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (gracePeriodSeconds !== undefined) {\n localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, \"number\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, \"number\");\n }\n if (orphanDependents !== undefined) {\n localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, \"boolean\");\n }\n if (propagationPolicy !== undefined) {\n localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, \"string\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (resourceVersionMatch !== undefined) {\n localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1DeleteOptions\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1Status\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * delete collection of StatefulSet\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @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.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @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.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @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.\n * @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.\n * @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.\n * @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\n * @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\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param body\n */\n async deleteCollectionNamespacedStatefulSet(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/statefulsets'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedStatefulSet.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (gracePeriodSeconds !== undefined) {\n localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, \"number\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, \"number\");\n }\n if (orphanDependents !== undefined) {\n localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, \"boolean\");\n }\n if (propagationPolicy !== undefined) {\n localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, \"string\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (resourceVersionMatch !== undefined) {\n localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1DeleteOptions\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1Status\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * delete a ControllerRevision\n * @param name name of the ControllerRevision\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @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.\n * @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.\n * @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.\n * @param body\n */\n async deleteNamespacedControllerRevision(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/controllerrevisions/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling deleteNamespacedControllerRevision.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedControllerRevision.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (gracePeriodSeconds !== undefined) {\n localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, \"number\");\n }\n if (orphanDependents !== undefined) {\n localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, \"boolean\");\n }\n if (propagationPolicy !== undefined) {\n localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1DeleteOptions\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1Status\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * delete a DaemonSet\n * @param name name of the DaemonSet\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @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.\n * @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.\n * @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.\n * @param body\n */\n async deleteNamespacedDaemonSet(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/daemonsets/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling deleteNamespacedDaemonSet.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedDaemonSet.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (gracePeriodSeconds !== undefined) {\n localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, \"number\");\n }\n if (orphanDependents !== undefined) {\n localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, \"boolean\");\n }\n if (propagationPolicy !== undefined) {\n localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1DeleteOptions\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1Status\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * delete a Deployment\n * @param name name of the Deployment\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @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.\n * @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.\n * @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.\n * @param body\n */\n async deleteNamespacedDeployment(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/deployments/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling deleteNamespacedDeployment.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedDeployment.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (gracePeriodSeconds !== undefined) {\n localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, \"number\");\n }\n if (orphanDependents !== undefined) {\n localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, \"boolean\");\n }\n if (propagationPolicy !== undefined) {\n localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1DeleteOptions\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1Status\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * delete a ReplicaSet\n * @param name name of the ReplicaSet\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @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.\n * @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.\n * @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.\n * @param body\n */\n async deleteNamespacedReplicaSet(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/replicasets/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling deleteNamespacedReplicaSet.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedReplicaSet.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (gracePeriodSeconds !== undefined) {\n localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, \"number\");\n }\n if (orphanDependents !== undefined) {\n localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, \"boolean\");\n }\n if (propagationPolicy !== undefined) {\n localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1DeleteOptions\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1Status\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * delete a StatefulSet\n * @param name name of the StatefulSet\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @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.\n * @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.\n * @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.\n * @param body\n */\n async deleteNamespacedStatefulSet(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/statefulsets/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling deleteNamespacedStatefulSet.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedStatefulSet.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (gracePeriodSeconds !== undefined) {\n localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, \"number\");\n }\n if (orphanDependents !== undefined) {\n localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, \"boolean\");\n }\n if (propagationPolicy !== undefined) {\n localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1DeleteOptions\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1Status\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * get available resources\n */\n async getAPIResources(options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/apps/v1/';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1APIResourceList\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * list or watch objects of kind ControllerRevision\n * @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.\n * @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.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @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.\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @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\n * @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\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n */\n async listControllerRevisionForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/apps/v1/controllerrevisions';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n if (allowWatchBookmarks !== undefined) {\n localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, \"boolean\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, \"number\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (resourceVersionMatch !== undefined) {\n localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1ControllerRevisionList\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * list or watch objects of kind DaemonSet\n * @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.\n * @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.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @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.\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @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\n * @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\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n */\n async listDaemonSetForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/apps/v1/daemonsets';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n if (allowWatchBookmarks !== undefined) {\n localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, \"boolean\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, \"number\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (resourceVersionMatch !== undefined) {\n localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1DaemonSetList\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * list or watch objects of kind Deployment\n * @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.\n * @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.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @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.\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @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\n * @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\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n */\n async listDeploymentForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/apps/v1/deployments';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n if (allowWatchBookmarks !== undefined) {\n localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, \"boolean\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, \"number\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (resourceVersionMatch !== undefined) {\n localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1DeploymentList\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * list or watch objects of kind ControllerRevision\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @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.\n * @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.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @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.\n * @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\n * @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\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n */\n async listNamespacedControllerRevision(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/controllerrevisions'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling listNamespacedControllerRevision.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (allowWatchBookmarks !== undefined) {\n localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, \"boolean\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, \"number\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (resourceVersionMatch !== undefined) {\n localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1ControllerRevisionList\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * list or watch objects of kind DaemonSet\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @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.\n * @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.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @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.\n * @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\n * @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\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n */\n async listNamespacedDaemonSet(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/daemonsets'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling listNamespacedDaemonSet.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (allowWatchBookmarks !== undefined) {\n localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, \"boolean\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, \"number\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (resourceVersionMatch !== undefined) {\n localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1DaemonSetList\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * list or watch objects of kind Deployment\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @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.\n * @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.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @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.\n * @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\n * @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\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n */\n async listNamespacedDeployment(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/deployments'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling listNamespacedDeployment.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (allowWatchBookmarks !== undefined) {\n localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, \"boolean\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, \"number\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (resourceVersionMatch !== undefined) {\n localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1DeploymentList\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * list or watch objects of kind ReplicaSet\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @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.\n * @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.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @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.\n * @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\n * @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\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n */\n async listNamespacedReplicaSet(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/replicasets'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling listNamespacedReplicaSet.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (allowWatchBookmarks !== undefined) {\n localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, \"boolean\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, \"number\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (resourceVersionMatch !== undefined) {\n localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1ReplicaSetList\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * list or watch objects of kind StatefulSet\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @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.\n * @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.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @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.\n * @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\n * @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\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n */\n async listNamespacedStatefulSet(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/statefulsets'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling listNamespacedStatefulSet.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (allowWatchBookmarks !== undefined) {\n localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, \"boolean\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, \"number\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (resourceVersionMatch !== undefined) {\n localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1StatefulSetList\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * list or watch objects of kind ReplicaSet\n * @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.\n * @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.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @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.\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @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\n * @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\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n */\n async listReplicaSetForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/apps/v1/replicasets';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n if (allowWatchBookmarks !== undefined) {\n localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, \"boolean\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, \"number\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (resourceVersionMatch !== undefined) {\n localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1ReplicaSetList\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * list or watch objects of kind StatefulSet\n * @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.\n * @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.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @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.\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @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\n * @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\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n */\n async listStatefulSetForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/apps/v1/statefulsets';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n if (allowWatchBookmarks !== undefined) {\n localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, \"boolean\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, \"number\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (resourceVersionMatch !== undefined) {\n localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1StatefulSetList\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * partially update the specified ControllerRevision\n * @param name name of the ControllerRevision\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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).\n * @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.\n */\n async patchNamespacedControllerRevision(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/controllerrevisions/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling patchNamespacedControllerRevision.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedControllerRevision.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling patchNamespacedControllerRevision.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n if (force !== undefined) {\n localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"object\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1ControllerRevision\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * partially update the specified DaemonSet\n * @param name name of the DaemonSet\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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).\n * @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.\n */\n async patchNamespacedDaemonSet(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/daemonsets/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling patchNamespacedDaemonSet.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedDaemonSet.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling patchNamespacedDaemonSet.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n if (force !== undefined) {\n localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"object\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1DaemonSet\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * partially update status of the specified DaemonSet\n * @param name name of the DaemonSet\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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).\n * @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.\n */\n async patchNamespacedDaemonSetStatus(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/daemonsets/{name}/status'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling patchNamespacedDaemonSetStatus.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedDaemonSetStatus.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling patchNamespacedDaemonSetStatus.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n if (force !== undefined) {\n localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"object\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1DaemonSet\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * partially update the specified Deployment\n * @param name name of the Deployment\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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).\n * @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.\n */\n async patchNamespacedDeployment(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/deployments/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling patchNamespacedDeployment.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedDeployment.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling patchNamespacedDeployment.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n if (force !== undefined) {\n localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"object\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1Deployment\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * partially update scale of the specified Deployment\n * @param name name of the Scale\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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).\n * @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.\n */\n async patchNamespacedDeploymentScale(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/deployments/{name}/scale'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling patchNamespacedDeploymentScale.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedDeploymentScale.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling patchNamespacedDeploymentScale.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n if (force !== undefined) {\n localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"object\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1Scale\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * partially update status of the specified Deployment\n * @param name name of the Deployment\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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).\n * @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.\n */\n async patchNamespacedDeploymentStatus(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/deployments/{name}/status'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling patchNamespacedDeploymentStatus.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedDeploymentStatus.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling patchNamespacedDeploymentStatus.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n if (force !== undefined) {\n localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"object\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1Deployment\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * partially update the specified ReplicaSet\n * @param name name of the ReplicaSet\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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).\n * @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.\n */\n async patchNamespacedReplicaSet(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/replicasets/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling patchNamespacedReplicaSet.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedReplicaSet.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling patchNamespacedReplicaSet.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n if (force !== undefined) {\n localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"object\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1ReplicaSet\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * partially update scale of the specified ReplicaSet\n * @param name name of the Scale\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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).\n * @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.\n */\n async patchNamespacedReplicaSetScale(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/replicasets/{name}/scale'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling patchNamespacedReplicaSetScale.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedReplicaSetScale.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling patchNamespacedReplicaSetScale.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n if (force !== undefined) {\n localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"object\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1Scale\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * partially update status of the specified ReplicaSet\n * @param name name of the ReplicaSet\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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).\n * @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.\n */\n async patchNamespacedReplicaSetStatus(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/replicasets/{name}/status'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling patchNamespacedReplicaSetStatus.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedReplicaSetStatus.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling patchNamespacedReplicaSetStatus.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n if (force !== undefined) {\n localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"object\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1ReplicaSet\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * partially update the specified StatefulSet\n * @param name name of the StatefulSet\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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).\n * @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.\n */\n async patchNamespacedStatefulSet(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/statefulsets/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling patchNamespacedStatefulSet.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedStatefulSet.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling patchNamespacedStatefulSet.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n if (force !== undefined) {\n localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"object\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1StatefulSet\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * partially update scale of the specified StatefulSet\n * @param name name of the Scale\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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).\n * @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.\n */\n async patchNamespacedStatefulSetScale(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/statefulsets/{name}/scale'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling patchNamespacedStatefulSetScale.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedStatefulSetScale.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling patchNamespacedStatefulSetScale.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n if (force !== undefined) {\n localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"object\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1Scale\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * partially update status of the specified StatefulSet\n * @param name name of the StatefulSet\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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).\n * @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.\n */\n async patchNamespacedStatefulSetStatus(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/statefulsets/{name}/status'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling patchNamespacedStatefulSetStatus.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedStatefulSetStatus.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling patchNamespacedStatefulSetStatus.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n if (force !== undefined) {\n localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"object\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1StatefulSet\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * read the specified ControllerRevision\n * @param name name of the ControllerRevision\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If \\'true\\', then the output is pretty printed.\n */\n async readNamespacedControllerRevision(name, namespace, pretty, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/controllerrevisions/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling readNamespacedControllerRevision.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling readNamespacedControllerRevision.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1ControllerRevision\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * read the specified DaemonSet\n * @param name name of the DaemonSet\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If \\'true\\', then the output is pretty printed.\n */\n async readNamespacedDaemonSet(name, namespace, pretty, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/daemonsets/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling readNamespacedDaemonSet.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling readNamespacedDaemonSet.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1DaemonSet\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * read status of the specified DaemonSet\n * @param name name of the DaemonSet\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If \\'true\\', then the output is pretty printed.\n */\n async readNamespacedDaemonSetStatus(name, namespace, pretty, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/daemonsets/{name}/status'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling readNamespacedDaemonSetStatus.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling readNamespacedDaemonSetStatus.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1DaemonSet\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * read the specified Deployment\n * @param name name of the Deployment\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If \\'true\\', then the output is pretty printed.\n */\n async readNamespacedDeployment(name, namespace, pretty, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/deployments/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling readNamespacedDeployment.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling readNamespacedDeployment.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1Deployment\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * read scale of the specified Deployment\n * @param name name of the Scale\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If \\'true\\', then the output is pretty printed.\n */\n async readNamespacedDeploymentScale(name, namespace, pretty, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/deployments/{name}/scale'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling readNamespacedDeploymentScale.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling readNamespacedDeploymentScale.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1Scale\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * read status of the specified Deployment\n * @param name name of the Deployment\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If \\'true\\', then the output is pretty printed.\n */\n async readNamespacedDeploymentStatus(name, namespace, pretty, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/deployments/{name}/status'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling readNamespacedDeploymentStatus.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling readNamespacedDeploymentStatus.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1Deployment\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * read the specified ReplicaSet\n * @param name name of the ReplicaSet\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If \\'true\\', then the output is pretty printed.\n */\n async readNamespacedReplicaSet(name, namespace, pretty, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/replicasets/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling readNamespacedReplicaSet.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling readNamespacedReplicaSet.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1ReplicaSet\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * read scale of the specified ReplicaSet\n * @param name name of the Scale\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If \\'true\\', then the output is pretty printed.\n */\n async readNamespacedReplicaSetScale(name, namespace, pretty, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/replicasets/{name}/scale'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling readNamespacedReplicaSetScale.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling readNamespacedReplicaSetScale.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1Scale\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * read status of the specified ReplicaSet\n * @param name name of the ReplicaSet\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If \\'true\\', then the output is pretty printed.\n */\n async readNamespacedReplicaSetStatus(name, namespace, pretty, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/replicasets/{name}/status'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling readNamespacedReplicaSetStatus.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling readNamespacedReplicaSetStatus.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1ReplicaSet\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * read the specified StatefulSet\n * @param name name of the StatefulSet\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If \\'true\\', then the output is pretty printed.\n */\n async readNamespacedStatefulSet(name, namespace, pretty, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/statefulsets/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling readNamespacedStatefulSet.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling readNamespacedStatefulSet.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1StatefulSet\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * read scale of the specified StatefulSet\n * @param name name of the Scale\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If \\'true\\', then the output is pretty printed.\n */\n async readNamespacedStatefulSetScale(name, namespace, pretty, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/statefulsets/{name}/scale'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling readNamespacedStatefulSetScale.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling readNamespacedStatefulSetScale.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1Scale\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * read status of the specified StatefulSet\n * @param name name of the StatefulSet\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If \\'true\\', then the output is pretty printed.\n */\n async readNamespacedStatefulSetStatus(name, namespace, pretty, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/statefulsets/{name}/status'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling readNamespacedStatefulSetStatus.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling readNamespacedStatefulSetStatus.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1StatefulSet\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * replace the specified ControllerRevision\n * @param name name of the ControllerRevision\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n */\n async replaceNamespacedControllerRevision(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/controllerrevisions/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling replaceNamespacedControllerRevision.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedControllerRevision.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling replaceNamespacedControllerRevision.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1ControllerRevision\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1ControllerRevision\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * replace the specified DaemonSet\n * @param name name of the DaemonSet\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n */\n async replaceNamespacedDaemonSet(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/daemonsets/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling replaceNamespacedDaemonSet.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedDaemonSet.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling replaceNamespacedDaemonSet.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1DaemonSet\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1DaemonSet\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * replace status of the specified DaemonSet\n * @param name name of the DaemonSet\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n */\n async replaceNamespacedDaemonSetStatus(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/daemonsets/{name}/status'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling replaceNamespacedDaemonSetStatus.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedDaemonSetStatus.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling replaceNamespacedDaemonSetStatus.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1DaemonSet\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1DaemonSet\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * replace the specified Deployment\n * @param name name of the Deployment\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n */\n async replaceNamespacedDeployment(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/deployments/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling replaceNamespacedDeployment.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedDeployment.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling replaceNamespacedDeployment.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1Deployment\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1Deployment\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * replace scale of the specified Deployment\n * @param name name of the Scale\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n */\n async replaceNamespacedDeploymentScale(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/deployments/{name}/scale'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling replaceNamespacedDeploymentScale.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedDeploymentScale.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling replaceNamespacedDeploymentScale.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1Scale\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1Scale\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * replace status of the specified Deployment\n * @param name name of the Deployment\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n */\n async replaceNamespacedDeploymentStatus(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/deployments/{name}/status'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling replaceNamespacedDeploymentStatus.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedDeploymentStatus.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling replaceNamespacedDeploymentStatus.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1Deployment\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1Deployment\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * replace the specified ReplicaSet\n * @param name name of the ReplicaSet\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n */\n async replaceNamespacedReplicaSet(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/replicasets/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling replaceNamespacedReplicaSet.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedReplicaSet.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling replaceNamespacedReplicaSet.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1ReplicaSet\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1ReplicaSet\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * replace scale of the specified ReplicaSet\n * @param name name of the Scale\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n */\n async replaceNamespacedReplicaSetScale(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/replicasets/{name}/scale'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling replaceNamespacedReplicaSetScale.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedReplicaSetScale.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling replaceNamespacedReplicaSetScale.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1Scale\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1Scale\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * replace status of the specified ReplicaSet\n * @param name name of the ReplicaSet\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n */\n async replaceNamespacedReplicaSetStatus(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/replicasets/{name}/status'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling replaceNamespacedReplicaSetStatus.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedReplicaSetStatus.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling replaceNamespacedReplicaSetStatus.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1ReplicaSet\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1ReplicaSet\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * replace the specified StatefulSet\n * @param name name of the StatefulSet\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n */\n async replaceNamespacedStatefulSet(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/statefulsets/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling replaceNamespacedStatefulSet.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedStatefulSet.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling replaceNamespacedStatefulSet.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1StatefulSet\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1StatefulSet\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * replace scale of the specified StatefulSet\n * @param name name of the Scale\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n */\n async replaceNamespacedStatefulSetScale(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/statefulsets/{name}/scale'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling replaceNamespacedStatefulSetScale.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedStatefulSetScale.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling replaceNamespacedStatefulSetScale.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1Scale\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1Scale\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * replace status of the specified StatefulSet\n * @param name name of the StatefulSet\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n */\n async replaceNamespacedStatefulSetStatus(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/apps/v1/namespaces/{namespace}/statefulsets/{name}/status'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling replaceNamespacedStatefulSetStatus.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedStatefulSetStatus.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling replaceNamespacedStatefulSetStatus.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1StatefulSet\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1StatefulSet\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n}\nexports.AppsV1Api = AppsV1Api;\n//# sourceMappingURL=appsV1Api.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.AuthenticationApi = exports.AuthenticationApiApiKeys = void 0;\nconst tslib_1 = require(\"tslib\");\nconst request_1 = tslib_1.__importDefault(require(\"request\"));\nconst models_1 = require(\"../model/models\");\nconst models_2 = require(\"../model/models\");\nconst apis_1 = require(\"./apis\");\nlet defaultBasePath = 'http://localhost';\n// ===============================================\n// This file is autogenerated - Please do not edit\n// ===============================================\nvar AuthenticationApiApiKeys;\n(function (AuthenticationApiApiKeys) {\n AuthenticationApiApiKeys[AuthenticationApiApiKeys[\"BearerToken\"] = 0] = \"BearerToken\";\n})(AuthenticationApiApiKeys = exports.AuthenticationApiApiKeys || (exports.AuthenticationApiApiKeys = {}));\nclass AuthenticationApi {\n constructor(basePathOrUsername, password, basePath) {\n this._basePath = defaultBasePath;\n this._defaultHeaders = {};\n this._useQuerystring = false;\n this.authentications = {\n 'default': new models_1.VoidAuth(),\n 'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'),\n };\n this.interceptors = [];\n if (password) {\n if (basePath) {\n this.basePath = basePath;\n }\n }\n else {\n if (basePathOrUsername) {\n this.basePath = basePathOrUsername;\n }\n }\n }\n set useQuerystring(value) {\n this._useQuerystring = value;\n }\n set basePath(basePath) {\n this._basePath = basePath;\n }\n set defaultHeaders(defaultHeaders) {\n this._defaultHeaders = defaultHeaders;\n }\n get defaultHeaders() {\n return this._defaultHeaders;\n }\n get basePath() {\n return this._basePath;\n }\n setDefaultAuthentication(auth) {\n this.authentications.default = auth;\n }\n setApiKey(key, value) {\n this.authentications[AuthenticationApiApiKeys[key]].apiKey = value;\n }\n addInterceptor(interceptor) {\n this.interceptors.push(interceptor);\n }\n /**\n * get information of a group\n */\n async getAPIGroup(options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/authentication.k8s.io/';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1APIGroup\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n}\nexports.AuthenticationApi = AuthenticationApi;\n//# sourceMappingURL=authenticationApi.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.AuthenticationV1Api = exports.AuthenticationV1ApiApiKeys = void 0;\nconst tslib_1 = require(\"tslib\");\nconst request_1 = tslib_1.__importDefault(require(\"request\"));\nconst models_1 = require(\"../model/models\");\nconst models_2 = require(\"../model/models\");\nconst apis_1 = require(\"./apis\");\nlet defaultBasePath = 'http://localhost';\n// ===============================================\n// This file is autogenerated - Please do not edit\n// ===============================================\nvar AuthenticationV1ApiApiKeys;\n(function (AuthenticationV1ApiApiKeys) {\n AuthenticationV1ApiApiKeys[AuthenticationV1ApiApiKeys[\"BearerToken\"] = 0] = \"BearerToken\";\n})(AuthenticationV1ApiApiKeys = exports.AuthenticationV1ApiApiKeys || (exports.AuthenticationV1ApiApiKeys = {}));\nclass AuthenticationV1Api {\n constructor(basePathOrUsername, password, basePath) {\n this._basePath = defaultBasePath;\n this._defaultHeaders = {};\n this._useQuerystring = false;\n this.authentications = {\n 'default': new models_1.VoidAuth(),\n 'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'),\n };\n this.interceptors = [];\n if (password) {\n if (basePath) {\n this.basePath = basePath;\n }\n }\n else {\n if (basePathOrUsername) {\n this.basePath = basePathOrUsername;\n }\n }\n }\n set useQuerystring(value) {\n this._useQuerystring = value;\n }\n set basePath(basePath) {\n this._basePath = basePath;\n }\n set defaultHeaders(defaultHeaders) {\n this._defaultHeaders = defaultHeaders;\n }\n get defaultHeaders() {\n return this._defaultHeaders;\n }\n get basePath() {\n return this._basePath;\n }\n setDefaultAuthentication(auth) {\n this.authentications.default = auth;\n }\n setApiKey(key, value) {\n this.authentications[AuthenticationV1ApiApiKeys[key]].apiKey = value;\n }\n addInterceptor(interceptor) {\n this.interceptors.push(interceptor);\n }\n /**\n * create a TokenReview\n * @param body\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n * @param pretty If \\'true\\', then the output is pretty printed.\n */\n async createTokenReview(body, dryRun, fieldManager, pretty, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/authentication.k8s.io/v1/tokenreviews';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling createTokenReview.');\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'POST',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1TokenReview\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1TokenReview\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * get available resources\n */\n async getAPIResources(options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/authentication.k8s.io/v1/';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1APIResourceList\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n}\nexports.AuthenticationV1Api = AuthenticationV1Api;\n//# sourceMappingURL=authenticationV1Api.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.AuthorizationApi = exports.AuthorizationApiApiKeys = void 0;\nconst tslib_1 = require(\"tslib\");\nconst request_1 = tslib_1.__importDefault(require(\"request\"));\nconst models_1 = require(\"../model/models\");\nconst models_2 = require(\"../model/models\");\nconst apis_1 = require(\"./apis\");\nlet defaultBasePath = 'http://localhost';\n// ===============================================\n// This file is autogenerated - Please do not edit\n// ===============================================\nvar AuthorizationApiApiKeys;\n(function (AuthorizationApiApiKeys) {\n AuthorizationApiApiKeys[AuthorizationApiApiKeys[\"BearerToken\"] = 0] = \"BearerToken\";\n})(AuthorizationApiApiKeys = exports.AuthorizationApiApiKeys || (exports.AuthorizationApiApiKeys = {}));\nclass AuthorizationApi {\n constructor(basePathOrUsername, password, basePath) {\n this._basePath = defaultBasePath;\n this._defaultHeaders = {};\n this._useQuerystring = false;\n this.authentications = {\n 'default': new models_1.VoidAuth(),\n 'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'),\n };\n this.interceptors = [];\n if (password) {\n if (basePath) {\n this.basePath = basePath;\n }\n }\n else {\n if (basePathOrUsername) {\n this.basePath = basePathOrUsername;\n }\n }\n }\n set useQuerystring(value) {\n this._useQuerystring = value;\n }\n set basePath(basePath) {\n this._basePath = basePath;\n }\n set defaultHeaders(defaultHeaders) {\n this._defaultHeaders = defaultHeaders;\n }\n get defaultHeaders() {\n return this._defaultHeaders;\n }\n get basePath() {\n return this._basePath;\n }\n setDefaultAuthentication(auth) {\n this.authentications.default = auth;\n }\n setApiKey(key, value) {\n this.authentications[AuthorizationApiApiKeys[key]].apiKey = value;\n }\n addInterceptor(interceptor) {\n this.interceptors.push(interceptor);\n }\n /**\n * get information of a group\n */\n async getAPIGroup(options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/authorization.k8s.io/';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1APIGroup\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n}\nexports.AuthorizationApi = AuthorizationApi;\n//# sourceMappingURL=authorizationApi.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.AuthorizationV1Api = exports.AuthorizationV1ApiApiKeys = void 0;\nconst tslib_1 = require(\"tslib\");\nconst request_1 = tslib_1.__importDefault(require(\"request\"));\nconst models_1 = require(\"../model/models\");\nconst models_2 = require(\"../model/models\");\nconst apis_1 = require(\"./apis\");\nlet defaultBasePath = 'http://localhost';\n// ===============================================\n// This file is autogenerated - Please do not edit\n// ===============================================\nvar AuthorizationV1ApiApiKeys;\n(function (AuthorizationV1ApiApiKeys) {\n AuthorizationV1ApiApiKeys[AuthorizationV1ApiApiKeys[\"BearerToken\"] = 0] = \"BearerToken\";\n})(AuthorizationV1ApiApiKeys = exports.AuthorizationV1ApiApiKeys || (exports.AuthorizationV1ApiApiKeys = {}));\nclass AuthorizationV1Api {\n constructor(basePathOrUsername, password, basePath) {\n this._basePath = defaultBasePath;\n this._defaultHeaders = {};\n this._useQuerystring = false;\n this.authentications = {\n 'default': new models_1.VoidAuth(),\n 'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'),\n };\n this.interceptors = [];\n if (password) {\n if (basePath) {\n this.basePath = basePath;\n }\n }\n else {\n if (basePathOrUsername) {\n this.basePath = basePathOrUsername;\n }\n }\n }\n set useQuerystring(value) {\n this._useQuerystring = value;\n }\n set basePath(basePath) {\n this._basePath = basePath;\n }\n set defaultHeaders(defaultHeaders) {\n this._defaultHeaders = defaultHeaders;\n }\n get defaultHeaders() {\n return this._defaultHeaders;\n }\n get basePath() {\n return this._basePath;\n }\n setDefaultAuthentication(auth) {\n this.authentications.default = auth;\n }\n setApiKey(key, value) {\n this.authentications[AuthorizationV1ApiApiKeys[key]].apiKey = value;\n }\n addInterceptor(interceptor) {\n this.interceptors.push(interceptor);\n }\n /**\n * create a LocalSubjectAccessReview\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n * @param pretty If \\'true\\', then the output is pretty printed.\n */\n async createNamespacedLocalSubjectAccessReview(namespace, body, dryRun, fieldManager, pretty, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/authorization.k8s.io/v1/namespaces/{namespace}/localsubjectaccessreviews'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling createNamespacedLocalSubjectAccessReview.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling createNamespacedLocalSubjectAccessReview.');\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'POST',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1LocalSubjectAccessReview\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1LocalSubjectAccessReview\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * create a SelfSubjectAccessReview\n * @param body\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n * @param pretty If \\'true\\', then the output is pretty printed.\n */\n async createSelfSubjectAccessReview(body, dryRun, fieldManager, pretty, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/authorization.k8s.io/v1/selfsubjectaccessreviews';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling createSelfSubjectAccessReview.');\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'POST',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1SelfSubjectAccessReview\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1SelfSubjectAccessReview\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * create a SelfSubjectRulesReview\n * @param body\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n * @param pretty If \\'true\\', then the output is pretty printed.\n */\n async createSelfSubjectRulesReview(body, dryRun, fieldManager, pretty, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/authorization.k8s.io/v1/selfsubjectrulesreviews';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling createSelfSubjectRulesReview.');\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'POST',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1SelfSubjectRulesReview\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1SelfSubjectRulesReview\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * create a SubjectAccessReview\n * @param body\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n * @param pretty If \\'true\\', then the output is pretty printed.\n */\n async createSubjectAccessReview(body, dryRun, fieldManager, pretty, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/authorization.k8s.io/v1/subjectaccessreviews';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling createSubjectAccessReview.');\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'POST',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1SubjectAccessReview\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1SubjectAccessReview\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * get available resources\n */\n async getAPIResources(options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/authorization.k8s.io/v1/';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1APIResourceList\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n}\nexports.AuthorizationV1Api = AuthorizationV1Api;\n//# sourceMappingURL=authorizationV1Api.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.AutoscalingApi = exports.AutoscalingApiApiKeys = void 0;\nconst tslib_1 = require(\"tslib\");\nconst request_1 = tslib_1.__importDefault(require(\"request\"));\nconst models_1 = require(\"../model/models\");\nconst models_2 = require(\"../model/models\");\nconst apis_1 = require(\"./apis\");\nlet defaultBasePath = 'http://localhost';\n// ===============================================\n// This file is autogenerated - Please do not edit\n// ===============================================\nvar AutoscalingApiApiKeys;\n(function (AutoscalingApiApiKeys) {\n AutoscalingApiApiKeys[AutoscalingApiApiKeys[\"BearerToken\"] = 0] = \"BearerToken\";\n})(AutoscalingApiApiKeys = exports.AutoscalingApiApiKeys || (exports.AutoscalingApiApiKeys = {}));\nclass AutoscalingApi {\n constructor(basePathOrUsername, password, basePath) {\n this._basePath = defaultBasePath;\n this._defaultHeaders = {};\n this._useQuerystring = false;\n this.authentications = {\n 'default': new models_1.VoidAuth(),\n 'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'),\n };\n this.interceptors = [];\n if (password) {\n if (basePath) {\n this.basePath = basePath;\n }\n }\n else {\n if (basePathOrUsername) {\n this.basePath = basePathOrUsername;\n }\n }\n }\n set useQuerystring(value) {\n this._useQuerystring = value;\n }\n set basePath(basePath) {\n this._basePath = basePath;\n }\n set defaultHeaders(defaultHeaders) {\n this._defaultHeaders = defaultHeaders;\n }\n get defaultHeaders() {\n return this._defaultHeaders;\n }\n get basePath() {\n return this._basePath;\n }\n setDefaultAuthentication(auth) {\n this.authentications.default = auth;\n }\n setApiKey(key, value) {\n this.authentications[AutoscalingApiApiKeys[key]].apiKey = value;\n }\n addInterceptor(interceptor) {\n this.interceptors.push(interceptor);\n }\n /**\n * get information of a group\n */\n async getAPIGroup(options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/autoscaling/';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1APIGroup\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n}\nexports.AutoscalingApi = AutoscalingApi;\n//# sourceMappingURL=autoscalingApi.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.AutoscalingV1Api = exports.AutoscalingV1ApiApiKeys = void 0;\nconst tslib_1 = require(\"tslib\");\nconst request_1 = tslib_1.__importDefault(require(\"request\"));\nconst models_1 = require(\"../model/models\");\nconst models_2 = require(\"../model/models\");\nconst apis_1 = require(\"./apis\");\nlet defaultBasePath = 'http://localhost';\n// ===============================================\n// This file is autogenerated - Please do not edit\n// ===============================================\nvar AutoscalingV1ApiApiKeys;\n(function (AutoscalingV1ApiApiKeys) {\n AutoscalingV1ApiApiKeys[AutoscalingV1ApiApiKeys[\"BearerToken\"] = 0] = \"BearerToken\";\n})(AutoscalingV1ApiApiKeys = exports.AutoscalingV1ApiApiKeys || (exports.AutoscalingV1ApiApiKeys = {}));\nclass AutoscalingV1Api {\n constructor(basePathOrUsername, password, basePath) {\n this._basePath = defaultBasePath;\n this._defaultHeaders = {};\n this._useQuerystring = false;\n this.authentications = {\n 'default': new models_1.VoidAuth(),\n 'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'),\n };\n this.interceptors = [];\n if (password) {\n if (basePath) {\n this.basePath = basePath;\n }\n }\n else {\n if (basePathOrUsername) {\n this.basePath = basePathOrUsername;\n }\n }\n }\n set useQuerystring(value) {\n this._useQuerystring = value;\n }\n set basePath(basePath) {\n this._basePath = basePath;\n }\n set defaultHeaders(defaultHeaders) {\n this._defaultHeaders = defaultHeaders;\n }\n get defaultHeaders() {\n return this._defaultHeaders;\n }\n get basePath() {\n return this._basePath;\n }\n setDefaultAuthentication(auth) {\n this.authentications.default = auth;\n }\n setApiKey(key, value) {\n this.authentications[AutoscalingV1ApiApiKeys[key]].apiKey = value;\n }\n addInterceptor(interceptor) {\n this.interceptors.push(interceptor);\n }\n /**\n * create a HorizontalPodAutoscaler\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n */\n async createNamespacedHorizontalPodAutoscaler(namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling createNamespacedHorizontalPodAutoscaler.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling createNamespacedHorizontalPodAutoscaler.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'POST',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1HorizontalPodAutoscaler\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1HorizontalPodAutoscaler\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * delete collection of HorizontalPodAutoscaler\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @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.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @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.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @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.\n * @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.\n * @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.\n * @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\n * @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\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param body\n */\n async deleteCollectionNamespacedHorizontalPodAutoscaler(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedHorizontalPodAutoscaler.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (gracePeriodSeconds !== undefined) {\n localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, \"number\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, \"number\");\n }\n if (orphanDependents !== undefined) {\n localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, \"boolean\");\n }\n if (propagationPolicy !== undefined) {\n localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, \"string\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (resourceVersionMatch !== undefined) {\n localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1DeleteOptions\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1Status\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * delete a HorizontalPodAutoscaler\n * @param name name of the HorizontalPodAutoscaler\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @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.\n * @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.\n * @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.\n * @param body\n */\n async deleteNamespacedHorizontalPodAutoscaler(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling deleteNamespacedHorizontalPodAutoscaler.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedHorizontalPodAutoscaler.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (gracePeriodSeconds !== undefined) {\n localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, \"number\");\n }\n if (orphanDependents !== undefined) {\n localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, \"boolean\");\n }\n if (propagationPolicy !== undefined) {\n localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1DeleteOptions\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1Status\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * get available resources\n */\n async getAPIResources(options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/autoscaling/v1/';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1APIResourceList\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * list or watch objects of kind HorizontalPodAutoscaler\n * @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.\n * @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.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @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.\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @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\n * @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\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n */\n async listHorizontalPodAutoscalerForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/autoscaling/v1/horizontalpodautoscalers';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n if (allowWatchBookmarks !== undefined) {\n localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, \"boolean\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, \"number\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (resourceVersionMatch !== undefined) {\n localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1HorizontalPodAutoscalerList\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * list or watch objects of kind HorizontalPodAutoscaler\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @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.\n * @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.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @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.\n * @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\n * @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\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n */\n async listNamespacedHorizontalPodAutoscaler(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling listNamespacedHorizontalPodAutoscaler.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (allowWatchBookmarks !== undefined) {\n localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, \"boolean\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, \"number\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (resourceVersionMatch !== undefined) {\n localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1HorizontalPodAutoscalerList\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * partially update the specified HorizontalPodAutoscaler\n * @param name name of the HorizontalPodAutoscaler\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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).\n * @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.\n */\n async patchNamespacedHorizontalPodAutoscaler(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling patchNamespacedHorizontalPodAutoscaler.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedHorizontalPodAutoscaler.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling patchNamespacedHorizontalPodAutoscaler.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n if (force !== undefined) {\n localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"object\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1HorizontalPodAutoscaler\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * partially update status of the specified HorizontalPodAutoscaler\n * @param name name of the HorizontalPodAutoscaler\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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).\n * @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.\n */\n async patchNamespacedHorizontalPodAutoscalerStatus(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers/{name}/status'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling patchNamespacedHorizontalPodAutoscalerStatus.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedHorizontalPodAutoscalerStatus.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling patchNamespacedHorizontalPodAutoscalerStatus.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n if (force !== undefined) {\n localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"object\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1HorizontalPodAutoscaler\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * read the specified HorizontalPodAutoscaler\n * @param name name of the HorizontalPodAutoscaler\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If \\'true\\', then the output is pretty printed.\n */\n async readNamespacedHorizontalPodAutoscaler(name, namespace, pretty, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling readNamespacedHorizontalPodAutoscaler.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling readNamespacedHorizontalPodAutoscaler.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1HorizontalPodAutoscaler\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * read status of the specified HorizontalPodAutoscaler\n * @param name name of the HorizontalPodAutoscaler\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If \\'true\\', then the output is pretty printed.\n */\n async readNamespacedHorizontalPodAutoscalerStatus(name, namespace, pretty, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers/{name}/status'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling readNamespacedHorizontalPodAutoscalerStatus.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling readNamespacedHorizontalPodAutoscalerStatus.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1HorizontalPodAutoscaler\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * replace the specified HorizontalPodAutoscaler\n * @param name name of the HorizontalPodAutoscaler\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n */\n async replaceNamespacedHorizontalPodAutoscaler(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling replaceNamespacedHorizontalPodAutoscaler.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedHorizontalPodAutoscaler.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling replaceNamespacedHorizontalPodAutoscaler.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1HorizontalPodAutoscaler\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1HorizontalPodAutoscaler\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * replace status of the specified HorizontalPodAutoscaler\n * @param name name of the HorizontalPodAutoscaler\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n */\n async replaceNamespacedHorizontalPodAutoscalerStatus(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers/{name}/status'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling replaceNamespacedHorizontalPodAutoscalerStatus.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedHorizontalPodAutoscalerStatus.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling replaceNamespacedHorizontalPodAutoscalerStatus.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1HorizontalPodAutoscaler\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1HorizontalPodAutoscaler\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n}\nexports.AutoscalingV1Api = AutoscalingV1Api;\n//# sourceMappingURL=autoscalingV1Api.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.AutoscalingV2beta1Api = exports.AutoscalingV2beta1ApiApiKeys = void 0;\nconst tslib_1 = require(\"tslib\");\nconst request_1 = tslib_1.__importDefault(require(\"request\"));\nconst models_1 = require(\"../model/models\");\nconst models_2 = require(\"../model/models\");\nconst apis_1 = require(\"./apis\");\nlet defaultBasePath = 'http://localhost';\n// ===============================================\n// This file is autogenerated - Please do not edit\n// ===============================================\nvar AutoscalingV2beta1ApiApiKeys;\n(function (AutoscalingV2beta1ApiApiKeys) {\n AutoscalingV2beta1ApiApiKeys[AutoscalingV2beta1ApiApiKeys[\"BearerToken\"] = 0] = \"BearerToken\";\n})(AutoscalingV2beta1ApiApiKeys = exports.AutoscalingV2beta1ApiApiKeys || (exports.AutoscalingV2beta1ApiApiKeys = {}));\nclass AutoscalingV2beta1Api {\n constructor(basePathOrUsername, password, basePath) {\n this._basePath = defaultBasePath;\n this._defaultHeaders = {};\n this._useQuerystring = false;\n this.authentications = {\n 'default': new models_1.VoidAuth(),\n 'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'),\n };\n this.interceptors = [];\n if (password) {\n if (basePath) {\n this.basePath = basePath;\n }\n }\n else {\n if (basePathOrUsername) {\n this.basePath = basePathOrUsername;\n }\n }\n }\n set useQuerystring(value) {\n this._useQuerystring = value;\n }\n set basePath(basePath) {\n this._basePath = basePath;\n }\n set defaultHeaders(defaultHeaders) {\n this._defaultHeaders = defaultHeaders;\n }\n get defaultHeaders() {\n return this._defaultHeaders;\n }\n get basePath() {\n return this._basePath;\n }\n setDefaultAuthentication(auth) {\n this.authentications.default = auth;\n }\n setApiKey(key, value) {\n this.authentications[AutoscalingV2beta1ApiApiKeys[key]].apiKey = value;\n }\n addInterceptor(interceptor) {\n this.interceptors.push(interceptor);\n }\n /**\n * create a HorizontalPodAutoscaler\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n */\n async createNamespacedHorizontalPodAutoscaler(namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/autoscaling/v2beta1/namespaces/{namespace}/horizontalpodautoscalers'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling createNamespacedHorizontalPodAutoscaler.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling createNamespacedHorizontalPodAutoscaler.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'POST',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V2beta1HorizontalPodAutoscaler\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V2beta1HorizontalPodAutoscaler\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * delete collection of HorizontalPodAutoscaler\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @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.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @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.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @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.\n * @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.\n * @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.\n * @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\n * @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\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param body\n */\n async deleteCollectionNamespacedHorizontalPodAutoscaler(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/autoscaling/v2beta1/namespaces/{namespace}/horizontalpodautoscalers'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedHorizontalPodAutoscaler.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (gracePeriodSeconds !== undefined) {\n localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, \"number\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, \"number\");\n }\n if (orphanDependents !== undefined) {\n localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, \"boolean\");\n }\n if (propagationPolicy !== undefined) {\n localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, \"string\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (resourceVersionMatch !== undefined) {\n localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1DeleteOptions\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1Status\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * delete a HorizontalPodAutoscaler\n * @param name name of the HorizontalPodAutoscaler\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @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.\n * @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.\n * @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.\n * @param body\n */\n async deleteNamespacedHorizontalPodAutoscaler(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/autoscaling/v2beta1/namespaces/{namespace}/horizontalpodautoscalers/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling deleteNamespacedHorizontalPodAutoscaler.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedHorizontalPodAutoscaler.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (gracePeriodSeconds !== undefined) {\n localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, \"number\");\n }\n if (orphanDependents !== undefined) {\n localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, \"boolean\");\n }\n if (propagationPolicy !== undefined) {\n localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1DeleteOptions\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1Status\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * get available resources\n */\n async getAPIResources(options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/autoscaling/v2beta1/';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1APIResourceList\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * list or watch objects of kind HorizontalPodAutoscaler\n * @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.\n * @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.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @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.\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @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\n * @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\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n */\n async listHorizontalPodAutoscalerForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/autoscaling/v2beta1/horizontalpodautoscalers';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n if (allowWatchBookmarks !== undefined) {\n localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, \"boolean\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, \"number\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (resourceVersionMatch !== undefined) {\n localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V2beta1HorizontalPodAutoscalerList\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * list or watch objects of kind HorizontalPodAutoscaler\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @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.\n * @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.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @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.\n * @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\n * @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\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n */\n async listNamespacedHorizontalPodAutoscaler(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/autoscaling/v2beta1/namespaces/{namespace}/horizontalpodautoscalers'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling listNamespacedHorizontalPodAutoscaler.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (allowWatchBookmarks !== undefined) {\n localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, \"boolean\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, \"number\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (resourceVersionMatch !== undefined) {\n localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V2beta1HorizontalPodAutoscalerList\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * partially update the specified HorizontalPodAutoscaler\n * @param name name of the HorizontalPodAutoscaler\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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).\n * @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.\n */\n async patchNamespacedHorizontalPodAutoscaler(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/autoscaling/v2beta1/namespaces/{namespace}/horizontalpodautoscalers/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling patchNamespacedHorizontalPodAutoscaler.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedHorizontalPodAutoscaler.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling patchNamespacedHorizontalPodAutoscaler.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n if (force !== undefined) {\n localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"object\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V2beta1HorizontalPodAutoscaler\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * partially update status of the specified HorizontalPodAutoscaler\n * @param name name of the HorizontalPodAutoscaler\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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).\n * @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.\n */\n async patchNamespacedHorizontalPodAutoscalerStatus(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/autoscaling/v2beta1/namespaces/{namespace}/horizontalpodautoscalers/{name}/status'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling patchNamespacedHorizontalPodAutoscalerStatus.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedHorizontalPodAutoscalerStatus.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling patchNamespacedHorizontalPodAutoscalerStatus.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n if (force !== undefined) {\n localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"object\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V2beta1HorizontalPodAutoscaler\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * read the specified HorizontalPodAutoscaler\n * @param name name of the HorizontalPodAutoscaler\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If \\'true\\', then the output is pretty printed.\n */\n async readNamespacedHorizontalPodAutoscaler(name, namespace, pretty, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/autoscaling/v2beta1/namespaces/{namespace}/horizontalpodautoscalers/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling readNamespacedHorizontalPodAutoscaler.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling readNamespacedHorizontalPodAutoscaler.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V2beta1HorizontalPodAutoscaler\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * read status of the specified HorizontalPodAutoscaler\n * @param name name of the HorizontalPodAutoscaler\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If \\'true\\', then the output is pretty printed.\n */\n async readNamespacedHorizontalPodAutoscalerStatus(name, namespace, pretty, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/autoscaling/v2beta1/namespaces/{namespace}/horizontalpodautoscalers/{name}/status'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling readNamespacedHorizontalPodAutoscalerStatus.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling readNamespacedHorizontalPodAutoscalerStatus.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V2beta1HorizontalPodAutoscaler\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * replace the specified HorizontalPodAutoscaler\n * @param name name of the HorizontalPodAutoscaler\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n */\n async replaceNamespacedHorizontalPodAutoscaler(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/autoscaling/v2beta1/namespaces/{namespace}/horizontalpodautoscalers/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling replaceNamespacedHorizontalPodAutoscaler.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedHorizontalPodAutoscaler.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling replaceNamespacedHorizontalPodAutoscaler.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V2beta1HorizontalPodAutoscaler\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V2beta1HorizontalPodAutoscaler\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * replace status of the specified HorizontalPodAutoscaler\n * @param name name of the HorizontalPodAutoscaler\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n */\n async replaceNamespacedHorizontalPodAutoscalerStatus(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/autoscaling/v2beta1/namespaces/{namespace}/horizontalpodautoscalers/{name}/status'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling replaceNamespacedHorizontalPodAutoscalerStatus.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedHorizontalPodAutoscalerStatus.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling replaceNamespacedHorizontalPodAutoscalerStatus.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V2beta1HorizontalPodAutoscaler\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V2beta1HorizontalPodAutoscaler\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n}\nexports.AutoscalingV2beta1Api = AutoscalingV2beta1Api;\n//# sourceMappingURL=autoscalingV2beta1Api.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.AutoscalingV2beta2Api = exports.AutoscalingV2beta2ApiApiKeys = void 0;\nconst tslib_1 = require(\"tslib\");\nconst request_1 = tslib_1.__importDefault(require(\"request\"));\nconst models_1 = require(\"../model/models\");\nconst models_2 = require(\"../model/models\");\nconst apis_1 = require(\"./apis\");\nlet defaultBasePath = 'http://localhost';\n// ===============================================\n// This file is autogenerated - Please do not edit\n// ===============================================\nvar AutoscalingV2beta2ApiApiKeys;\n(function (AutoscalingV2beta2ApiApiKeys) {\n AutoscalingV2beta2ApiApiKeys[AutoscalingV2beta2ApiApiKeys[\"BearerToken\"] = 0] = \"BearerToken\";\n})(AutoscalingV2beta2ApiApiKeys = exports.AutoscalingV2beta2ApiApiKeys || (exports.AutoscalingV2beta2ApiApiKeys = {}));\nclass AutoscalingV2beta2Api {\n constructor(basePathOrUsername, password, basePath) {\n this._basePath = defaultBasePath;\n this._defaultHeaders = {};\n this._useQuerystring = false;\n this.authentications = {\n 'default': new models_1.VoidAuth(),\n 'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'),\n };\n this.interceptors = [];\n if (password) {\n if (basePath) {\n this.basePath = basePath;\n }\n }\n else {\n if (basePathOrUsername) {\n this.basePath = basePathOrUsername;\n }\n }\n }\n set useQuerystring(value) {\n this._useQuerystring = value;\n }\n set basePath(basePath) {\n this._basePath = basePath;\n }\n set defaultHeaders(defaultHeaders) {\n this._defaultHeaders = defaultHeaders;\n }\n get defaultHeaders() {\n return this._defaultHeaders;\n }\n get basePath() {\n return this._basePath;\n }\n setDefaultAuthentication(auth) {\n this.authentications.default = auth;\n }\n setApiKey(key, value) {\n this.authentications[AutoscalingV2beta2ApiApiKeys[key]].apiKey = value;\n }\n addInterceptor(interceptor) {\n this.interceptors.push(interceptor);\n }\n /**\n * create a HorizontalPodAutoscaler\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n */\n async createNamespacedHorizontalPodAutoscaler(namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/autoscaling/v2beta2/namespaces/{namespace}/horizontalpodautoscalers'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling createNamespacedHorizontalPodAutoscaler.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling createNamespacedHorizontalPodAutoscaler.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'POST',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V2beta2HorizontalPodAutoscaler\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V2beta2HorizontalPodAutoscaler\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * delete collection of HorizontalPodAutoscaler\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @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.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @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.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @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.\n * @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.\n * @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.\n * @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\n * @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\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param body\n */\n async deleteCollectionNamespacedHorizontalPodAutoscaler(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/autoscaling/v2beta2/namespaces/{namespace}/horizontalpodautoscalers'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedHorizontalPodAutoscaler.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (gracePeriodSeconds !== undefined) {\n localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, \"number\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, \"number\");\n }\n if (orphanDependents !== undefined) {\n localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, \"boolean\");\n }\n if (propagationPolicy !== undefined) {\n localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, \"string\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (resourceVersionMatch !== undefined) {\n localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1DeleteOptions\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1Status\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * delete a HorizontalPodAutoscaler\n * @param name name of the HorizontalPodAutoscaler\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @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.\n * @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.\n * @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.\n * @param body\n */\n async deleteNamespacedHorizontalPodAutoscaler(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/autoscaling/v2beta2/namespaces/{namespace}/horizontalpodautoscalers/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling deleteNamespacedHorizontalPodAutoscaler.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedHorizontalPodAutoscaler.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (gracePeriodSeconds !== undefined) {\n localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, \"number\");\n }\n if (orphanDependents !== undefined) {\n localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, \"boolean\");\n }\n if (propagationPolicy !== undefined) {\n localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1DeleteOptions\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1Status\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * get available resources\n */\n async getAPIResources(options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/autoscaling/v2beta2/';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1APIResourceList\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * list or watch objects of kind HorizontalPodAutoscaler\n * @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.\n * @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.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @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.\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @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\n * @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\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n */\n async listHorizontalPodAutoscalerForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/autoscaling/v2beta2/horizontalpodautoscalers';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n if (allowWatchBookmarks !== undefined) {\n localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, \"boolean\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, \"number\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (resourceVersionMatch !== undefined) {\n localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V2beta2HorizontalPodAutoscalerList\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * list or watch objects of kind HorizontalPodAutoscaler\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @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.\n * @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.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @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.\n * @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\n * @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\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n */\n async listNamespacedHorizontalPodAutoscaler(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/autoscaling/v2beta2/namespaces/{namespace}/horizontalpodautoscalers'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling listNamespacedHorizontalPodAutoscaler.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (allowWatchBookmarks !== undefined) {\n localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, \"boolean\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, \"number\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (resourceVersionMatch !== undefined) {\n localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V2beta2HorizontalPodAutoscalerList\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * partially update the specified HorizontalPodAutoscaler\n * @param name name of the HorizontalPodAutoscaler\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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).\n * @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.\n */\n async patchNamespacedHorizontalPodAutoscaler(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/autoscaling/v2beta2/namespaces/{namespace}/horizontalpodautoscalers/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling patchNamespacedHorizontalPodAutoscaler.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedHorizontalPodAutoscaler.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling patchNamespacedHorizontalPodAutoscaler.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n if (force !== undefined) {\n localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"object\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V2beta2HorizontalPodAutoscaler\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * partially update status of the specified HorizontalPodAutoscaler\n * @param name name of the HorizontalPodAutoscaler\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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).\n * @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.\n */\n async patchNamespacedHorizontalPodAutoscalerStatus(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/autoscaling/v2beta2/namespaces/{namespace}/horizontalpodautoscalers/{name}/status'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling patchNamespacedHorizontalPodAutoscalerStatus.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedHorizontalPodAutoscalerStatus.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling patchNamespacedHorizontalPodAutoscalerStatus.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n if (force !== undefined) {\n localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"object\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V2beta2HorizontalPodAutoscaler\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * read the specified HorizontalPodAutoscaler\n * @param name name of the HorizontalPodAutoscaler\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If \\'true\\', then the output is pretty printed.\n */\n async readNamespacedHorizontalPodAutoscaler(name, namespace, pretty, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/autoscaling/v2beta2/namespaces/{namespace}/horizontalpodautoscalers/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling readNamespacedHorizontalPodAutoscaler.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling readNamespacedHorizontalPodAutoscaler.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V2beta2HorizontalPodAutoscaler\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * read status of the specified HorizontalPodAutoscaler\n * @param name name of the HorizontalPodAutoscaler\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If \\'true\\', then the output is pretty printed.\n */\n async readNamespacedHorizontalPodAutoscalerStatus(name, namespace, pretty, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/autoscaling/v2beta2/namespaces/{namespace}/horizontalpodautoscalers/{name}/status'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling readNamespacedHorizontalPodAutoscalerStatus.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling readNamespacedHorizontalPodAutoscalerStatus.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V2beta2HorizontalPodAutoscaler\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * replace the specified HorizontalPodAutoscaler\n * @param name name of the HorizontalPodAutoscaler\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n */\n async replaceNamespacedHorizontalPodAutoscaler(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/autoscaling/v2beta2/namespaces/{namespace}/horizontalpodautoscalers/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling replaceNamespacedHorizontalPodAutoscaler.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedHorizontalPodAutoscaler.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling replaceNamespacedHorizontalPodAutoscaler.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V2beta2HorizontalPodAutoscaler\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V2beta2HorizontalPodAutoscaler\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * replace status of the specified HorizontalPodAutoscaler\n * @param name name of the HorizontalPodAutoscaler\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n */\n async replaceNamespacedHorizontalPodAutoscalerStatus(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/autoscaling/v2beta2/namespaces/{namespace}/horizontalpodautoscalers/{name}/status'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling replaceNamespacedHorizontalPodAutoscalerStatus.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedHorizontalPodAutoscalerStatus.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling replaceNamespacedHorizontalPodAutoscalerStatus.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V2beta2HorizontalPodAutoscaler\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V2beta2HorizontalPodAutoscaler\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n}\nexports.AutoscalingV2beta2Api = AutoscalingV2beta2Api;\n//# sourceMappingURL=autoscalingV2beta2Api.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.BatchApi = exports.BatchApiApiKeys = void 0;\nconst tslib_1 = require(\"tslib\");\nconst request_1 = tslib_1.__importDefault(require(\"request\"));\nconst models_1 = require(\"../model/models\");\nconst models_2 = require(\"../model/models\");\nconst apis_1 = require(\"./apis\");\nlet defaultBasePath = 'http://localhost';\n// ===============================================\n// This file is autogenerated - Please do not edit\n// ===============================================\nvar BatchApiApiKeys;\n(function (BatchApiApiKeys) {\n BatchApiApiKeys[BatchApiApiKeys[\"BearerToken\"] = 0] = \"BearerToken\";\n})(BatchApiApiKeys = exports.BatchApiApiKeys || (exports.BatchApiApiKeys = {}));\nclass BatchApi {\n constructor(basePathOrUsername, password, basePath) {\n this._basePath = defaultBasePath;\n this._defaultHeaders = {};\n this._useQuerystring = false;\n this.authentications = {\n 'default': new models_1.VoidAuth(),\n 'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'),\n };\n this.interceptors = [];\n if (password) {\n if (basePath) {\n this.basePath = basePath;\n }\n }\n else {\n if (basePathOrUsername) {\n this.basePath = basePathOrUsername;\n }\n }\n }\n set useQuerystring(value) {\n this._useQuerystring = value;\n }\n set basePath(basePath) {\n this._basePath = basePath;\n }\n set defaultHeaders(defaultHeaders) {\n this._defaultHeaders = defaultHeaders;\n }\n get defaultHeaders() {\n return this._defaultHeaders;\n }\n get basePath() {\n return this._basePath;\n }\n setDefaultAuthentication(auth) {\n this.authentications.default = auth;\n }\n setApiKey(key, value) {\n this.authentications[BatchApiApiKeys[key]].apiKey = value;\n }\n addInterceptor(interceptor) {\n this.interceptors.push(interceptor);\n }\n /**\n * get information of a group\n */\n async getAPIGroup(options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/batch/';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1APIGroup\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n}\nexports.BatchApi = BatchApi;\n//# sourceMappingURL=batchApi.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.BatchV1Api = exports.BatchV1ApiApiKeys = void 0;\nconst tslib_1 = require(\"tslib\");\nconst request_1 = tslib_1.__importDefault(require(\"request\"));\nconst models_1 = require(\"../model/models\");\nconst models_2 = require(\"../model/models\");\nconst apis_1 = require(\"./apis\");\nlet defaultBasePath = 'http://localhost';\n// ===============================================\n// This file is autogenerated - Please do not edit\n// ===============================================\nvar BatchV1ApiApiKeys;\n(function (BatchV1ApiApiKeys) {\n BatchV1ApiApiKeys[BatchV1ApiApiKeys[\"BearerToken\"] = 0] = \"BearerToken\";\n})(BatchV1ApiApiKeys = exports.BatchV1ApiApiKeys || (exports.BatchV1ApiApiKeys = {}));\nclass BatchV1Api {\n constructor(basePathOrUsername, password, basePath) {\n this._basePath = defaultBasePath;\n this._defaultHeaders = {};\n this._useQuerystring = false;\n this.authentications = {\n 'default': new models_1.VoidAuth(),\n 'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'),\n };\n this.interceptors = [];\n if (password) {\n if (basePath) {\n this.basePath = basePath;\n }\n }\n else {\n if (basePathOrUsername) {\n this.basePath = basePathOrUsername;\n }\n }\n }\n set useQuerystring(value) {\n this._useQuerystring = value;\n }\n set basePath(basePath) {\n this._basePath = basePath;\n }\n set defaultHeaders(defaultHeaders) {\n this._defaultHeaders = defaultHeaders;\n }\n get defaultHeaders() {\n return this._defaultHeaders;\n }\n get basePath() {\n return this._basePath;\n }\n setDefaultAuthentication(auth) {\n this.authentications.default = auth;\n }\n setApiKey(key, value) {\n this.authentications[BatchV1ApiApiKeys[key]].apiKey = value;\n }\n addInterceptor(interceptor) {\n this.interceptors.push(interceptor);\n }\n /**\n * create a CronJob\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n */\n async createNamespacedCronJob(namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/batch/v1/namespaces/{namespace}/cronjobs'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling createNamespacedCronJob.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling createNamespacedCronJob.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'POST',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1CronJob\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1CronJob\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * create a Job\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n */\n async createNamespacedJob(namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/batch/v1/namespaces/{namespace}/jobs'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling createNamespacedJob.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling createNamespacedJob.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'POST',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1Job\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1Job\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * delete collection of CronJob\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @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.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @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.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @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.\n * @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.\n * @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.\n * @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\n * @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\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param body\n */\n async deleteCollectionNamespacedCronJob(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/batch/v1/namespaces/{namespace}/cronjobs'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedCronJob.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (gracePeriodSeconds !== undefined) {\n localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, \"number\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, \"number\");\n }\n if (orphanDependents !== undefined) {\n localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, \"boolean\");\n }\n if (propagationPolicy !== undefined) {\n localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, \"string\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (resourceVersionMatch !== undefined) {\n localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1DeleteOptions\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1Status\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * delete collection of Job\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @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.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @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.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @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.\n * @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.\n * @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.\n * @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\n * @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\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param body\n */\n async deleteCollectionNamespacedJob(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/batch/v1/namespaces/{namespace}/jobs'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedJob.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (gracePeriodSeconds !== undefined) {\n localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, \"number\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, \"number\");\n }\n if (orphanDependents !== undefined) {\n localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, \"boolean\");\n }\n if (propagationPolicy !== undefined) {\n localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, \"string\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (resourceVersionMatch !== undefined) {\n localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1DeleteOptions\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1Status\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * delete a CronJob\n * @param name name of the CronJob\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @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.\n * @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.\n * @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.\n * @param body\n */\n async deleteNamespacedCronJob(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/batch/v1/namespaces/{namespace}/cronjobs/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling deleteNamespacedCronJob.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedCronJob.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (gracePeriodSeconds !== undefined) {\n localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, \"number\");\n }\n if (orphanDependents !== undefined) {\n localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, \"boolean\");\n }\n if (propagationPolicy !== undefined) {\n localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1DeleteOptions\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1Status\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * delete a Job\n * @param name name of the Job\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @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.\n * @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.\n * @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.\n * @param body\n */\n async deleteNamespacedJob(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/batch/v1/namespaces/{namespace}/jobs/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling deleteNamespacedJob.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedJob.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (gracePeriodSeconds !== undefined) {\n localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, \"number\");\n }\n if (orphanDependents !== undefined) {\n localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, \"boolean\");\n }\n if (propagationPolicy !== undefined) {\n localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1DeleteOptions\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1Status\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * get available resources\n */\n async getAPIResources(options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/batch/v1/';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1APIResourceList\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * list or watch objects of kind CronJob\n * @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.\n * @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.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @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.\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @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\n * @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\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n */\n async listCronJobForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/batch/v1/cronjobs';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n if (allowWatchBookmarks !== undefined) {\n localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, \"boolean\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, \"number\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (resourceVersionMatch !== undefined) {\n localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1CronJobList\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * list or watch objects of kind Job\n * @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.\n * @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.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @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.\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @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\n * @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\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n */\n async listJobForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/batch/v1/jobs';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n if (allowWatchBookmarks !== undefined) {\n localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, \"boolean\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, \"number\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (resourceVersionMatch !== undefined) {\n localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1JobList\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * list or watch objects of kind CronJob\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @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.\n * @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.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @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.\n * @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\n * @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\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n */\n async listNamespacedCronJob(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/batch/v1/namespaces/{namespace}/cronjobs'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling listNamespacedCronJob.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (allowWatchBookmarks !== undefined) {\n localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, \"boolean\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, \"number\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (resourceVersionMatch !== undefined) {\n localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1CronJobList\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * list or watch objects of kind Job\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @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.\n * @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.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @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.\n * @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\n * @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\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n */\n async listNamespacedJob(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/batch/v1/namespaces/{namespace}/jobs'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling listNamespacedJob.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (allowWatchBookmarks !== undefined) {\n localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, \"boolean\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, \"number\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (resourceVersionMatch !== undefined) {\n localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1JobList\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * partially update the specified CronJob\n * @param name name of the CronJob\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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).\n * @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.\n */\n async patchNamespacedCronJob(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/batch/v1/namespaces/{namespace}/cronjobs/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling patchNamespacedCronJob.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedCronJob.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling patchNamespacedCronJob.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n if (force !== undefined) {\n localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"object\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1CronJob\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * partially update status of the specified CronJob\n * @param name name of the CronJob\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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).\n * @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.\n */\n async patchNamespacedCronJobStatus(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/batch/v1/namespaces/{namespace}/cronjobs/{name}/status'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling patchNamespacedCronJobStatus.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedCronJobStatus.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling patchNamespacedCronJobStatus.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n if (force !== undefined) {\n localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"object\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1CronJob\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * partially update the specified Job\n * @param name name of the Job\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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).\n * @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.\n */\n async patchNamespacedJob(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/batch/v1/namespaces/{namespace}/jobs/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling patchNamespacedJob.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedJob.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling patchNamespacedJob.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n if (force !== undefined) {\n localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"object\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1Job\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * partially update status of the specified Job\n * @param name name of the Job\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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).\n * @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.\n */\n async patchNamespacedJobStatus(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/batch/v1/namespaces/{namespace}/jobs/{name}/status'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling patchNamespacedJobStatus.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedJobStatus.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling patchNamespacedJobStatus.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n if (force !== undefined) {\n localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"object\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1Job\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * read the specified CronJob\n * @param name name of the CronJob\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If \\'true\\', then the output is pretty printed.\n */\n async readNamespacedCronJob(name, namespace, pretty, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/batch/v1/namespaces/{namespace}/cronjobs/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling readNamespacedCronJob.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling readNamespacedCronJob.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1CronJob\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * read status of the specified CronJob\n * @param name name of the CronJob\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If \\'true\\', then the output is pretty printed.\n */\n async readNamespacedCronJobStatus(name, namespace, pretty, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/batch/v1/namespaces/{namespace}/cronjobs/{name}/status'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling readNamespacedCronJobStatus.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling readNamespacedCronJobStatus.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1CronJob\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * read the specified Job\n * @param name name of the Job\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If \\'true\\', then the output is pretty printed.\n */\n async readNamespacedJob(name, namespace, pretty, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/batch/v1/namespaces/{namespace}/jobs/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling readNamespacedJob.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling readNamespacedJob.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1Job\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * read status of the specified Job\n * @param name name of the Job\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If \\'true\\', then the output is pretty printed.\n */\n async readNamespacedJobStatus(name, namespace, pretty, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/batch/v1/namespaces/{namespace}/jobs/{name}/status'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling readNamespacedJobStatus.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling readNamespacedJobStatus.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1Job\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * replace the specified CronJob\n * @param name name of the CronJob\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n */\n async replaceNamespacedCronJob(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/batch/v1/namespaces/{namespace}/cronjobs/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling replaceNamespacedCronJob.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedCronJob.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling replaceNamespacedCronJob.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1CronJob\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1CronJob\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * replace status of the specified CronJob\n * @param name name of the CronJob\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n */\n async replaceNamespacedCronJobStatus(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/batch/v1/namespaces/{namespace}/cronjobs/{name}/status'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling replaceNamespacedCronJobStatus.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedCronJobStatus.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling replaceNamespacedCronJobStatus.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1CronJob\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1CronJob\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * replace the specified Job\n * @param name name of the Job\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n */\n async replaceNamespacedJob(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/batch/v1/namespaces/{namespace}/jobs/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling replaceNamespacedJob.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedJob.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling replaceNamespacedJob.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1Job\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1Job\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * replace status of the specified Job\n * @param name name of the Job\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n */\n async replaceNamespacedJobStatus(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/batch/v1/namespaces/{namespace}/jobs/{name}/status'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling replaceNamespacedJobStatus.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedJobStatus.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling replaceNamespacedJobStatus.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1Job\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1Job\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n}\nexports.BatchV1Api = BatchV1Api;\n//# sourceMappingURL=batchV1Api.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.BatchV1beta1Api = exports.BatchV1beta1ApiApiKeys = void 0;\nconst tslib_1 = require(\"tslib\");\nconst request_1 = tslib_1.__importDefault(require(\"request\"));\nconst models_1 = require(\"../model/models\");\nconst models_2 = require(\"../model/models\");\nconst apis_1 = require(\"./apis\");\nlet defaultBasePath = 'http://localhost';\n// ===============================================\n// This file is autogenerated - Please do not edit\n// ===============================================\nvar BatchV1beta1ApiApiKeys;\n(function (BatchV1beta1ApiApiKeys) {\n BatchV1beta1ApiApiKeys[BatchV1beta1ApiApiKeys[\"BearerToken\"] = 0] = \"BearerToken\";\n})(BatchV1beta1ApiApiKeys = exports.BatchV1beta1ApiApiKeys || (exports.BatchV1beta1ApiApiKeys = {}));\nclass BatchV1beta1Api {\n constructor(basePathOrUsername, password, basePath) {\n this._basePath = defaultBasePath;\n this._defaultHeaders = {};\n this._useQuerystring = false;\n this.authentications = {\n 'default': new models_1.VoidAuth(),\n 'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'),\n };\n this.interceptors = [];\n if (password) {\n if (basePath) {\n this.basePath = basePath;\n }\n }\n else {\n if (basePathOrUsername) {\n this.basePath = basePathOrUsername;\n }\n }\n }\n set useQuerystring(value) {\n this._useQuerystring = value;\n }\n set basePath(basePath) {\n this._basePath = basePath;\n }\n set defaultHeaders(defaultHeaders) {\n this._defaultHeaders = defaultHeaders;\n }\n get defaultHeaders() {\n return this._defaultHeaders;\n }\n get basePath() {\n return this._basePath;\n }\n setDefaultAuthentication(auth) {\n this.authentications.default = auth;\n }\n setApiKey(key, value) {\n this.authentications[BatchV1beta1ApiApiKeys[key]].apiKey = value;\n }\n addInterceptor(interceptor) {\n this.interceptors.push(interceptor);\n }\n /**\n * create a CronJob\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n */\n async createNamespacedCronJob(namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/batch/v1beta1/namespaces/{namespace}/cronjobs'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling createNamespacedCronJob.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling createNamespacedCronJob.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'POST',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1beta1CronJob\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1beta1CronJob\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * delete collection of CronJob\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @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.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @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.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @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.\n * @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.\n * @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.\n * @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\n * @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\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param body\n */\n async deleteCollectionNamespacedCronJob(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/batch/v1beta1/namespaces/{namespace}/cronjobs'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedCronJob.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (gracePeriodSeconds !== undefined) {\n localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, \"number\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, \"number\");\n }\n if (orphanDependents !== undefined) {\n localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, \"boolean\");\n }\n if (propagationPolicy !== undefined) {\n localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, \"string\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (resourceVersionMatch !== undefined) {\n localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1DeleteOptions\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1Status\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * delete a CronJob\n * @param name name of the CronJob\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @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.\n * @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.\n * @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.\n * @param body\n */\n async deleteNamespacedCronJob(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/batch/v1beta1/namespaces/{namespace}/cronjobs/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling deleteNamespacedCronJob.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedCronJob.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (gracePeriodSeconds !== undefined) {\n localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, \"number\");\n }\n if (orphanDependents !== undefined) {\n localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, \"boolean\");\n }\n if (propagationPolicy !== undefined) {\n localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1DeleteOptions\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1Status\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * get available resources\n */\n async getAPIResources(options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/batch/v1beta1/';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1APIResourceList\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * list or watch objects of kind CronJob\n * @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.\n * @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.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @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.\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @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\n * @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\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n */\n async listCronJobForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/batch/v1beta1/cronjobs';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n if (allowWatchBookmarks !== undefined) {\n localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, \"boolean\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, \"number\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (resourceVersionMatch !== undefined) {\n localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1beta1CronJobList\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * list or watch objects of kind CronJob\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @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.\n * @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.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @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.\n * @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\n * @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\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n */\n async listNamespacedCronJob(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/batch/v1beta1/namespaces/{namespace}/cronjobs'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling listNamespacedCronJob.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (allowWatchBookmarks !== undefined) {\n localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, \"boolean\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, \"number\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (resourceVersionMatch !== undefined) {\n localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1beta1CronJobList\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * partially update the specified CronJob\n * @param name name of the CronJob\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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).\n * @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.\n */\n async patchNamespacedCronJob(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/batch/v1beta1/namespaces/{namespace}/cronjobs/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling patchNamespacedCronJob.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedCronJob.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling patchNamespacedCronJob.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n if (force !== undefined) {\n localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"object\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1beta1CronJob\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * partially update status of the specified CronJob\n * @param name name of the CronJob\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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).\n * @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.\n */\n async patchNamespacedCronJobStatus(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/batch/v1beta1/namespaces/{namespace}/cronjobs/{name}/status'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling patchNamespacedCronJobStatus.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedCronJobStatus.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling patchNamespacedCronJobStatus.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n if (force !== undefined) {\n localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"object\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1beta1CronJob\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * read the specified CronJob\n * @param name name of the CronJob\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If \\'true\\', then the output is pretty printed.\n */\n async readNamespacedCronJob(name, namespace, pretty, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/batch/v1beta1/namespaces/{namespace}/cronjobs/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling readNamespacedCronJob.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling readNamespacedCronJob.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1beta1CronJob\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * read status of the specified CronJob\n * @param name name of the CronJob\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If \\'true\\', then the output is pretty printed.\n */\n async readNamespacedCronJobStatus(name, namespace, pretty, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/batch/v1beta1/namespaces/{namespace}/cronjobs/{name}/status'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling readNamespacedCronJobStatus.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling readNamespacedCronJobStatus.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1beta1CronJob\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * replace the specified CronJob\n * @param name name of the CronJob\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n */\n async replaceNamespacedCronJob(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/batch/v1beta1/namespaces/{namespace}/cronjobs/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling replaceNamespacedCronJob.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedCronJob.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling replaceNamespacedCronJob.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1beta1CronJob\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1beta1CronJob\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * replace status of the specified CronJob\n * @param name name of the CronJob\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n */\n async replaceNamespacedCronJobStatus(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/batch/v1beta1/namespaces/{namespace}/cronjobs/{name}/status'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling replaceNamespacedCronJobStatus.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedCronJobStatus.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling replaceNamespacedCronJobStatus.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1beta1CronJob\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1beta1CronJob\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n}\nexports.BatchV1beta1Api = BatchV1beta1Api;\n//# sourceMappingURL=batchV1beta1Api.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.CertificatesApi = exports.CertificatesApiApiKeys = void 0;\nconst tslib_1 = require(\"tslib\");\nconst request_1 = tslib_1.__importDefault(require(\"request\"));\nconst models_1 = require(\"../model/models\");\nconst models_2 = require(\"../model/models\");\nconst apis_1 = require(\"./apis\");\nlet defaultBasePath = 'http://localhost';\n// ===============================================\n// This file is autogenerated - Please do not edit\n// ===============================================\nvar CertificatesApiApiKeys;\n(function (CertificatesApiApiKeys) {\n CertificatesApiApiKeys[CertificatesApiApiKeys[\"BearerToken\"] = 0] = \"BearerToken\";\n})(CertificatesApiApiKeys = exports.CertificatesApiApiKeys || (exports.CertificatesApiApiKeys = {}));\nclass CertificatesApi {\n constructor(basePathOrUsername, password, basePath) {\n this._basePath = defaultBasePath;\n this._defaultHeaders = {};\n this._useQuerystring = false;\n this.authentications = {\n 'default': new models_1.VoidAuth(),\n 'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'),\n };\n this.interceptors = [];\n if (password) {\n if (basePath) {\n this.basePath = basePath;\n }\n }\n else {\n if (basePathOrUsername) {\n this.basePath = basePathOrUsername;\n }\n }\n }\n set useQuerystring(value) {\n this._useQuerystring = value;\n }\n set basePath(basePath) {\n this._basePath = basePath;\n }\n set defaultHeaders(defaultHeaders) {\n this._defaultHeaders = defaultHeaders;\n }\n get defaultHeaders() {\n return this._defaultHeaders;\n }\n get basePath() {\n return this._basePath;\n }\n setDefaultAuthentication(auth) {\n this.authentications.default = auth;\n }\n setApiKey(key, value) {\n this.authentications[CertificatesApiApiKeys[key]].apiKey = value;\n }\n addInterceptor(interceptor) {\n this.interceptors.push(interceptor);\n }\n /**\n * get information of a group\n */\n async getAPIGroup(options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/certificates.k8s.io/';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1APIGroup\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n}\nexports.CertificatesApi = CertificatesApi;\n//# sourceMappingURL=certificatesApi.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.CertificatesV1Api = exports.CertificatesV1ApiApiKeys = void 0;\nconst tslib_1 = require(\"tslib\");\nconst request_1 = tslib_1.__importDefault(require(\"request\"));\nconst models_1 = require(\"../model/models\");\nconst models_2 = require(\"../model/models\");\nconst apis_1 = require(\"./apis\");\nlet defaultBasePath = 'http://localhost';\n// ===============================================\n// This file is autogenerated - Please do not edit\n// ===============================================\nvar CertificatesV1ApiApiKeys;\n(function (CertificatesV1ApiApiKeys) {\n CertificatesV1ApiApiKeys[CertificatesV1ApiApiKeys[\"BearerToken\"] = 0] = \"BearerToken\";\n})(CertificatesV1ApiApiKeys = exports.CertificatesV1ApiApiKeys || (exports.CertificatesV1ApiApiKeys = {}));\nclass CertificatesV1Api {\n constructor(basePathOrUsername, password, basePath) {\n this._basePath = defaultBasePath;\n this._defaultHeaders = {};\n this._useQuerystring = false;\n this.authentications = {\n 'default': new models_1.VoidAuth(),\n 'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'),\n };\n this.interceptors = [];\n if (password) {\n if (basePath) {\n this.basePath = basePath;\n }\n }\n else {\n if (basePathOrUsername) {\n this.basePath = basePathOrUsername;\n }\n }\n }\n set useQuerystring(value) {\n this._useQuerystring = value;\n }\n set basePath(basePath) {\n this._basePath = basePath;\n }\n set defaultHeaders(defaultHeaders) {\n this._defaultHeaders = defaultHeaders;\n }\n get defaultHeaders() {\n return this._defaultHeaders;\n }\n get basePath() {\n return this._basePath;\n }\n setDefaultAuthentication(auth) {\n this.authentications.default = auth;\n }\n setApiKey(key, value) {\n this.authentications[CertificatesV1ApiApiKeys[key]].apiKey = value;\n }\n addInterceptor(interceptor) {\n this.interceptors.push(interceptor);\n }\n /**\n * create a CertificateSigningRequest\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n */\n async createCertificateSigningRequest(body, pretty, dryRun, fieldManager, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/certificates.k8s.io/v1/certificatesigningrequests';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling createCertificateSigningRequest.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'POST',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1CertificateSigningRequest\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1CertificateSigningRequest\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * delete a CertificateSigningRequest\n * @param name name of the CertificateSigningRequest\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @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.\n * @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.\n * @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.\n * @param body\n */\n async deleteCertificateSigningRequest(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/certificates.k8s.io/v1/certificatesigningrequests/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling deleteCertificateSigningRequest.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (gracePeriodSeconds !== undefined) {\n localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, \"number\");\n }\n if (orphanDependents !== undefined) {\n localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, \"boolean\");\n }\n if (propagationPolicy !== undefined) {\n localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1DeleteOptions\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1Status\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * delete collection of CertificateSigningRequest\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @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.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @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.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @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.\n * @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.\n * @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.\n * @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\n * @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\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param body\n */\n async deleteCollectionCertificateSigningRequest(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/certificates.k8s.io/v1/certificatesigningrequests';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (gracePeriodSeconds !== undefined) {\n localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, \"number\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, \"number\");\n }\n if (orphanDependents !== undefined) {\n localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, \"boolean\");\n }\n if (propagationPolicy !== undefined) {\n localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, \"string\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (resourceVersionMatch !== undefined) {\n localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1DeleteOptions\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1Status\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * get available resources\n */\n async getAPIResources(options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/certificates.k8s.io/v1/';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1APIResourceList\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * list or watch objects of kind CertificateSigningRequest\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @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.\n * @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.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @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.\n * @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\n * @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\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n */\n async listCertificateSigningRequest(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/certificates.k8s.io/v1/certificatesigningrequests';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (allowWatchBookmarks !== undefined) {\n localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, \"boolean\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, \"number\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (resourceVersionMatch !== undefined) {\n localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1CertificateSigningRequestList\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * partially update the specified CertificateSigningRequest\n * @param name name of the CertificateSigningRequest\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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).\n * @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.\n */\n async patchCertificateSigningRequest(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/certificates.k8s.io/v1/certificatesigningrequests/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling patchCertificateSigningRequest.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling patchCertificateSigningRequest.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n if (force !== undefined) {\n localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"object\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1CertificateSigningRequest\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * partially update approval of the specified CertificateSigningRequest\n * @param name name of the CertificateSigningRequest\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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).\n * @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.\n */\n async patchCertificateSigningRequestApproval(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/certificates.k8s.io/v1/certificatesigningrequests/{name}/approval'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling patchCertificateSigningRequestApproval.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling patchCertificateSigningRequestApproval.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n if (force !== undefined) {\n localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"object\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1CertificateSigningRequest\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * partially update status of the specified CertificateSigningRequest\n * @param name name of the CertificateSigningRequest\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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).\n * @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.\n */\n async patchCertificateSigningRequestStatus(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/certificates.k8s.io/v1/certificatesigningrequests/{name}/status'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling patchCertificateSigningRequestStatus.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling patchCertificateSigningRequestStatus.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n if (force !== undefined) {\n localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"object\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1CertificateSigningRequest\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * read the specified CertificateSigningRequest\n * @param name name of the CertificateSigningRequest\n * @param pretty If \\'true\\', then the output is pretty printed.\n */\n async readCertificateSigningRequest(name, pretty, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/certificates.k8s.io/v1/certificatesigningrequests/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling readCertificateSigningRequest.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1CertificateSigningRequest\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * read approval of the specified CertificateSigningRequest\n * @param name name of the CertificateSigningRequest\n * @param pretty If \\'true\\', then the output is pretty printed.\n */\n async readCertificateSigningRequestApproval(name, pretty, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/certificates.k8s.io/v1/certificatesigningrequests/{name}/approval'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling readCertificateSigningRequestApproval.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1CertificateSigningRequest\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * read status of the specified CertificateSigningRequest\n * @param name name of the CertificateSigningRequest\n * @param pretty If \\'true\\', then the output is pretty printed.\n */\n async readCertificateSigningRequestStatus(name, pretty, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/certificates.k8s.io/v1/certificatesigningrequests/{name}/status'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling readCertificateSigningRequestStatus.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1CertificateSigningRequest\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * replace the specified CertificateSigningRequest\n * @param name name of the CertificateSigningRequest\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n */\n async replaceCertificateSigningRequest(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/certificates.k8s.io/v1/certificatesigningrequests/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling replaceCertificateSigningRequest.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling replaceCertificateSigningRequest.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1CertificateSigningRequest\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1CertificateSigningRequest\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * replace approval of the specified CertificateSigningRequest\n * @param name name of the CertificateSigningRequest\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n */\n async replaceCertificateSigningRequestApproval(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/certificates.k8s.io/v1/certificatesigningrequests/{name}/approval'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling replaceCertificateSigningRequestApproval.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling replaceCertificateSigningRequestApproval.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1CertificateSigningRequest\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1CertificateSigningRequest\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * replace status of the specified CertificateSigningRequest\n * @param name name of the CertificateSigningRequest\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n */\n async replaceCertificateSigningRequestStatus(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/certificates.k8s.io/v1/certificatesigningrequests/{name}/status'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling replaceCertificateSigningRequestStatus.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling replaceCertificateSigningRequestStatus.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1CertificateSigningRequest\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1CertificateSigningRequest\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n}\nexports.CertificatesV1Api = CertificatesV1Api;\n//# sourceMappingURL=certificatesV1Api.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.CoordinationApi = exports.CoordinationApiApiKeys = void 0;\nconst tslib_1 = require(\"tslib\");\nconst request_1 = tslib_1.__importDefault(require(\"request\"));\nconst models_1 = require(\"../model/models\");\nconst models_2 = require(\"../model/models\");\nconst apis_1 = require(\"./apis\");\nlet defaultBasePath = 'http://localhost';\n// ===============================================\n// This file is autogenerated - Please do not edit\n// ===============================================\nvar CoordinationApiApiKeys;\n(function (CoordinationApiApiKeys) {\n CoordinationApiApiKeys[CoordinationApiApiKeys[\"BearerToken\"] = 0] = \"BearerToken\";\n})(CoordinationApiApiKeys = exports.CoordinationApiApiKeys || (exports.CoordinationApiApiKeys = {}));\nclass CoordinationApi {\n constructor(basePathOrUsername, password, basePath) {\n this._basePath = defaultBasePath;\n this._defaultHeaders = {};\n this._useQuerystring = false;\n this.authentications = {\n 'default': new models_1.VoidAuth(),\n 'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'),\n };\n this.interceptors = [];\n if (password) {\n if (basePath) {\n this.basePath = basePath;\n }\n }\n else {\n if (basePathOrUsername) {\n this.basePath = basePathOrUsername;\n }\n }\n }\n set useQuerystring(value) {\n this._useQuerystring = value;\n }\n set basePath(basePath) {\n this._basePath = basePath;\n }\n set defaultHeaders(defaultHeaders) {\n this._defaultHeaders = defaultHeaders;\n }\n get defaultHeaders() {\n return this._defaultHeaders;\n }\n get basePath() {\n return this._basePath;\n }\n setDefaultAuthentication(auth) {\n this.authentications.default = auth;\n }\n setApiKey(key, value) {\n this.authentications[CoordinationApiApiKeys[key]].apiKey = value;\n }\n addInterceptor(interceptor) {\n this.interceptors.push(interceptor);\n }\n /**\n * get information of a group\n */\n async getAPIGroup(options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/coordination.k8s.io/';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1APIGroup\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n}\nexports.CoordinationApi = CoordinationApi;\n//# sourceMappingURL=coordinationApi.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.CoordinationV1Api = exports.CoordinationV1ApiApiKeys = void 0;\nconst tslib_1 = require(\"tslib\");\nconst request_1 = tslib_1.__importDefault(require(\"request\"));\nconst models_1 = require(\"../model/models\");\nconst models_2 = require(\"../model/models\");\nconst apis_1 = require(\"./apis\");\nlet defaultBasePath = 'http://localhost';\n// ===============================================\n// This file is autogenerated - Please do not edit\n// ===============================================\nvar CoordinationV1ApiApiKeys;\n(function (CoordinationV1ApiApiKeys) {\n CoordinationV1ApiApiKeys[CoordinationV1ApiApiKeys[\"BearerToken\"] = 0] = \"BearerToken\";\n})(CoordinationV1ApiApiKeys = exports.CoordinationV1ApiApiKeys || (exports.CoordinationV1ApiApiKeys = {}));\nclass CoordinationV1Api {\n constructor(basePathOrUsername, password, basePath) {\n this._basePath = defaultBasePath;\n this._defaultHeaders = {};\n this._useQuerystring = false;\n this.authentications = {\n 'default': new models_1.VoidAuth(),\n 'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'),\n };\n this.interceptors = [];\n if (password) {\n if (basePath) {\n this.basePath = basePath;\n }\n }\n else {\n if (basePathOrUsername) {\n this.basePath = basePathOrUsername;\n }\n }\n }\n set useQuerystring(value) {\n this._useQuerystring = value;\n }\n set basePath(basePath) {\n this._basePath = basePath;\n }\n set defaultHeaders(defaultHeaders) {\n this._defaultHeaders = defaultHeaders;\n }\n get defaultHeaders() {\n return this._defaultHeaders;\n }\n get basePath() {\n return this._basePath;\n }\n setDefaultAuthentication(auth) {\n this.authentications.default = auth;\n }\n setApiKey(key, value) {\n this.authentications[CoordinationV1ApiApiKeys[key]].apiKey = value;\n }\n addInterceptor(interceptor) {\n this.interceptors.push(interceptor);\n }\n /**\n * create a Lease\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n */\n async createNamespacedLease(namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/coordination.k8s.io/v1/namespaces/{namespace}/leases'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling createNamespacedLease.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling createNamespacedLease.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'POST',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1Lease\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1Lease\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * delete collection of Lease\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @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.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @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.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @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.\n * @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.\n * @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.\n * @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\n * @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\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param body\n */\n async deleteCollectionNamespacedLease(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/coordination.k8s.io/v1/namespaces/{namespace}/leases'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedLease.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (gracePeriodSeconds !== undefined) {\n localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, \"number\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, \"number\");\n }\n if (orphanDependents !== undefined) {\n localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, \"boolean\");\n }\n if (propagationPolicy !== undefined) {\n localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, \"string\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (resourceVersionMatch !== undefined) {\n localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1DeleteOptions\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1Status\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * delete a Lease\n * @param name name of the Lease\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @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.\n * @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.\n * @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.\n * @param body\n */\n async deleteNamespacedLease(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/coordination.k8s.io/v1/namespaces/{namespace}/leases/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling deleteNamespacedLease.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedLease.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (gracePeriodSeconds !== undefined) {\n localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, \"number\");\n }\n if (orphanDependents !== undefined) {\n localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, \"boolean\");\n }\n if (propagationPolicy !== undefined) {\n localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1DeleteOptions\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1Status\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * get available resources\n */\n async getAPIResources(options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/coordination.k8s.io/v1/';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1APIResourceList\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * list or watch objects of kind Lease\n * @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.\n * @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.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @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.\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @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\n * @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\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n */\n async listLeaseForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/coordination.k8s.io/v1/leases';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n if (allowWatchBookmarks !== undefined) {\n localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, \"boolean\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, \"number\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (resourceVersionMatch !== undefined) {\n localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1LeaseList\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * list or watch objects of kind Lease\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @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.\n * @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.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @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.\n * @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\n * @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\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n */\n async listNamespacedLease(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/coordination.k8s.io/v1/namespaces/{namespace}/leases'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling listNamespacedLease.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (allowWatchBookmarks !== undefined) {\n localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, \"boolean\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, \"number\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (resourceVersionMatch !== undefined) {\n localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1LeaseList\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * partially update the specified Lease\n * @param name name of the Lease\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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).\n * @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.\n */\n async patchNamespacedLease(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/coordination.k8s.io/v1/namespaces/{namespace}/leases/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling patchNamespacedLease.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedLease.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling patchNamespacedLease.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n if (force !== undefined) {\n localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"object\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1Lease\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * read the specified Lease\n * @param name name of the Lease\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If \\'true\\', then the output is pretty printed.\n */\n async readNamespacedLease(name, namespace, pretty, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/coordination.k8s.io/v1/namespaces/{namespace}/leases/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling readNamespacedLease.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling readNamespacedLease.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1Lease\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * replace the specified Lease\n * @param name name of the Lease\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n */\n async replaceNamespacedLease(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/coordination.k8s.io/v1/namespaces/{namespace}/leases/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling replaceNamespacedLease.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedLease.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling replaceNamespacedLease.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1Lease\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1Lease\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n}\nexports.CoordinationV1Api = CoordinationV1Api;\n//# sourceMappingURL=coordinationV1Api.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.CoreApi = exports.CoreApiApiKeys = void 0;\nconst tslib_1 = require(\"tslib\");\nconst request_1 = tslib_1.__importDefault(require(\"request\"));\nconst models_1 = require(\"../model/models\");\nconst models_2 = require(\"../model/models\");\nconst apis_1 = require(\"./apis\");\nlet defaultBasePath = 'http://localhost';\n// ===============================================\n// This file is autogenerated - Please do not edit\n// ===============================================\nvar CoreApiApiKeys;\n(function (CoreApiApiKeys) {\n CoreApiApiKeys[CoreApiApiKeys[\"BearerToken\"] = 0] = \"BearerToken\";\n})(CoreApiApiKeys = exports.CoreApiApiKeys || (exports.CoreApiApiKeys = {}));\nclass CoreApi {\n constructor(basePathOrUsername, password, basePath) {\n this._basePath = defaultBasePath;\n this._defaultHeaders = {};\n this._useQuerystring = false;\n this.authentications = {\n 'default': new models_1.VoidAuth(),\n 'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'),\n };\n this.interceptors = [];\n if (password) {\n if (basePath) {\n this.basePath = basePath;\n }\n }\n else {\n if (basePathOrUsername) {\n this.basePath = basePathOrUsername;\n }\n }\n }\n set useQuerystring(value) {\n this._useQuerystring = value;\n }\n set basePath(basePath) {\n this._basePath = basePath;\n }\n set defaultHeaders(defaultHeaders) {\n this._defaultHeaders = defaultHeaders;\n }\n get defaultHeaders() {\n return this._defaultHeaders;\n }\n get basePath() {\n return this._basePath;\n }\n setDefaultAuthentication(auth) {\n this.authentications.default = auth;\n }\n setApiKey(key, value) {\n this.authentications[CoreApiApiKeys[key]].apiKey = value;\n }\n addInterceptor(interceptor) {\n this.interceptors.push(interceptor);\n }\n /**\n * get available API versions\n */\n async getAPIVersions(options = { headers: {} }) {\n const localVarPath = this.basePath + '/api/';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1APIVersions\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n}\nexports.CoreApi = CoreApi;\n//# sourceMappingURL=coreApi.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.CoreV1Api = exports.CoreV1ApiApiKeys = void 0;\nconst tslib_1 = require(\"tslib\");\nconst request_1 = tslib_1.__importDefault(require(\"request\"));\nconst models_1 = require(\"../model/models\");\nconst models_2 = require(\"../model/models\");\nconst apis_1 = require(\"./apis\");\nlet defaultBasePath = 'http://localhost';\n// ===============================================\n// This file is autogenerated - Please do not edit\n// ===============================================\nvar CoreV1ApiApiKeys;\n(function (CoreV1ApiApiKeys) {\n CoreV1ApiApiKeys[CoreV1ApiApiKeys[\"BearerToken\"] = 0] = \"BearerToken\";\n})(CoreV1ApiApiKeys = exports.CoreV1ApiApiKeys || (exports.CoreV1ApiApiKeys = {}));\nclass CoreV1Api {\n constructor(basePathOrUsername, password, basePath) {\n this._basePath = defaultBasePath;\n this._defaultHeaders = {};\n this._useQuerystring = false;\n this.authentications = {\n 'default': new models_1.VoidAuth(),\n 'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'),\n };\n this.interceptors = [];\n if (password) {\n if (basePath) {\n this.basePath = basePath;\n }\n }\n else {\n if (basePathOrUsername) {\n this.basePath = basePathOrUsername;\n }\n }\n }\n set useQuerystring(value) {\n this._useQuerystring = value;\n }\n set basePath(basePath) {\n this._basePath = basePath;\n }\n set defaultHeaders(defaultHeaders) {\n this._defaultHeaders = defaultHeaders;\n }\n get defaultHeaders() {\n return this._defaultHeaders;\n }\n get basePath() {\n return this._basePath;\n }\n setDefaultAuthentication(auth) {\n this.authentications.default = auth;\n }\n setApiKey(key, value) {\n this.authentications[CoreV1ApiApiKeys[key]].apiKey = value;\n }\n addInterceptor(interceptor) {\n this.interceptors.push(interceptor);\n }\n /**\n * connect DELETE requests to proxy of Pod\n * @param name name of the PodProxyOptions\n * @param namespace object name and auth scope, such as for teams and projects\n * @param path Path is the URL path to use for the current proxy request to pod.\n */\n async connectDeleteNamespacedPodProxy(name, namespace, path, options = { headers: {} }) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/pods/{name}/proxy'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['*/*'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling connectDeleteNamespacedPodProxy.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling connectDeleteNamespacedPodProxy.');\n }\n if (path !== undefined) {\n localVarQueryParameters['path'] = models_1.ObjectSerializer.serialize(path, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"string\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * connect DELETE requests to proxy of Pod\n * @param name name of the PodProxyOptions\n * @param namespace object name and auth scope, such as for teams and projects\n * @param path path to the resource\n * @param path2 Path is the URL path to use for the current proxy request to pod.\n */\n async connectDeleteNamespacedPodProxyWithPath(name, namespace, path, path2, options = { headers: {} }) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/pods/{name}/proxy/{path}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)))\n .replace('{' + 'path' + '}', encodeURIComponent(String(path)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['*/*'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling connectDeleteNamespacedPodProxyWithPath.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling connectDeleteNamespacedPodProxyWithPath.');\n }\n // verify required parameter 'path' is not null or undefined\n if (path === null || path === undefined) {\n throw new Error('Required parameter path was null or undefined when calling connectDeleteNamespacedPodProxyWithPath.');\n }\n if (path2 !== undefined) {\n localVarQueryParameters['path'] = models_1.ObjectSerializer.serialize(path2, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"string\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * connect DELETE requests to proxy of Service\n * @param name name of the ServiceProxyOptions\n * @param namespace object name and auth scope, such as for teams and projects\n * @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.\n */\n async connectDeleteNamespacedServiceProxy(name, namespace, path, options = { headers: {} }) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/services/{name}/proxy'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['*/*'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling connectDeleteNamespacedServiceProxy.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling connectDeleteNamespacedServiceProxy.');\n }\n if (path !== undefined) {\n localVarQueryParameters['path'] = models_1.ObjectSerializer.serialize(path, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"string\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * connect DELETE requests to proxy of Service\n * @param name name of the ServiceProxyOptions\n * @param namespace object name and auth scope, such as for teams and projects\n * @param path path to the resource\n * @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.\n */\n async connectDeleteNamespacedServiceProxyWithPath(name, namespace, path, path2, options = { headers: {} }) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/services/{name}/proxy/{path}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)))\n .replace('{' + 'path' + '}', encodeURIComponent(String(path)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['*/*'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling connectDeleteNamespacedServiceProxyWithPath.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling connectDeleteNamespacedServiceProxyWithPath.');\n }\n // verify required parameter 'path' is not null or undefined\n if (path === null || path === undefined) {\n throw new Error('Required parameter path was null or undefined when calling connectDeleteNamespacedServiceProxyWithPath.');\n }\n if (path2 !== undefined) {\n localVarQueryParameters['path'] = models_1.ObjectSerializer.serialize(path2, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"string\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * connect DELETE requests to proxy of Node\n * @param name name of the NodeProxyOptions\n * @param path Path is the URL path to use for the current proxy request to node.\n */\n async connectDeleteNodeProxy(name, path, options = { headers: {} }) {\n const localVarPath = this.basePath + '/api/v1/nodes/{name}/proxy'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['*/*'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling connectDeleteNodeProxy.');\n }\n if (path !== undefined) {\n localVarQueryParameters['path'] = models_1.ObjectSerializer.serialize(path, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"string\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * connect DELETE requests to proxy of Node\n * @param name name of the NodeProxyOptions\n * @param path path to the resource\n * @param path2 Path is the URL path to use for the current proxy request to node.\n */\n async connectDeleteNodeProxyWithPath(name, path, path2, options = { headers: {} }) {\n const localVarPath = this.basePath + '/api/v1/nodes/{name}/proxy/{path}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'path' + '}', encodeURIComponent(String(path)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['*/*'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling connectDeleteNodeProxyWithPath.');\n }\n // verify required parameter 'path' is not null or undefined\n if (path === null || path === undefined) {\n throw new Error('Required parameter path was null or undefined when calling connectDeleteNodeProxyWithPath.');\n }\n if (path2 !== undefined) {\n localVarQueryParameters['path'] = models_1.ObjectSerializer.serialize(path2, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"string\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * connect GET requests to attach of Pod\n * @param name name of the PodAttachOptions\n * @param namespace object name and auth scope, such as for teams and projects\n * @param container The container in which to execute the command. Defaults to only container if there is only one container in the pod.\n * @param stderr Stderr if true indicates that stderr is to be redirected for the attach call. Defaults to true.\n * @param stdin Stdin if true, redirects the standard input stream of the pod for this call. Defaults to false.\n * @param stdout Stdout if true indicates that stdout is to be redirected for the attach call. Defaults to true.\n * @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.\n */\n async connectGetNamespacedPodAttach(name, namespace, container, stderr, stdin, stdout, tty, options = { headers: {} }) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/pods/{name}/attach'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['*/*'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling connectGetNamespacedPodAttach.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling connectGetNamespacedPodAttach.');\n }\n if (container !== undefined) {\n localVarQueryParameters['container'] = models_1.ObjectSerializer.serialize(container, \"string\");\n }\n if (stderr !== undefined) {\n localVarQueryParameters['stderr'] = models_1.ObjectSerializer.serialize(stderr, \"boolean\");\n }\n if (stdin !== undefined) {\n localVarQueryParameters['stdin'] = models_1.ObjectSerializer.serialize(stdin, \"boolean\");\n }\n if (stdout !== undefined) {\n localVarQueryParameters['stdout'] = models_1.ObjectSerializer.serialize(stdout, \"boolean\");\n }\n if (tty !== undefined) {\n localVarQueryParameters['tty'] = models_1.ObjectSerializer.serialize(tty, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"string\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * connect GET requests to exec of Pod\n * @param name name of the PodExecOptions\n * @param namespace object name and auth scope, such as for teams and projects\n * @param command Command is the remote command to execute. argv array. Not executed within a shell.\n * @param container Container in which to execute the command. Defaults to only container if there is only one container in the pod.\n * @param stderr Redirect the standard error stream of the pod for this call. Defaults to true.\n * @param stdin Redirect the standard input stream of the pod for this call. Defaults to false.\n * @param stdout Redirect the standard output stream of the pod for this call. Defaults to true.\n * @param tty TTY if true indicates that a tty will be allocated for the exec call. Defaults to false.\n */\n async connectGetNamespacedPodExec(name, namespace, command, container, stderr, stdin, stdout, tty, options = { headers: {} }) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/pods/{name}/exec'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['*/*'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling connectGetNamespacedPodExec.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling connectGetNamespacedPodExec.');\n }\n if (command !== undefined) {\n localVarQueryParameters['command'] = models_1.ObjectSerializer.serialize(command, \"string\");\n }\n if (container !== undefined) {\n localVarQueryParameters['container'] = models_1.ObjectSerializer.serialize(container, \"string\");\n }\n if (stderr !== undefined) {\n localVarQueryParameters['stderr'] = models_1.ObjectSerializer.serialize(stderr, \"boolean\");\n }\n if (stdin !== undefined) {\n localVarQueryParameters['stdin'] = models_1.ObjectSerializer.serialize(stdin, \"boolean\");\n }\n if (stdout !== undefined) {\n localVarQueryParameters['stdout'] = models_1.ObjectSerializer.serialize(stdout, \"boolean\");\n }\n if (tty !== undefined) {\n localVarQueryParameters['tty'] = models_1.ObjectSerializer.serialize(tty, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"string\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * connect GET requests to portforward of Pod\n * @param name name of the PodPortForwardOptions\n * @param namespace object name and auth scope, such as for teams and projects\n * @param ports List of ports to forward Required when using WebSockets\n */\n async connectGetNamespacedPodPortforward(name, namespace, ports, options = { headers: {} }) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/pods/{name}/portforward'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['*/*'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling connectGetNamespacedPodPortforward.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling connectGetNamespacedPodPortforward.');\n }\n if (ports !== undefined) {\n localVarQueryParameters['ports'] = models_1.ObjectSerializer.serialize(ports, \"number\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"string\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * connect GET requests to proxy of Pod\n * @param name name of the PodProxyOptions\n * @param namespace object name and auth scope, such as for teams and projects\n * @param path Path is the URL path to use for the current proxy request to pod.\n */\n async connectGetNamespacedPodProxy(name, namespace, path, options = { headers: {} }) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/pods/{name}/proxy'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['*/*'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling connectGetNamespacedPodProxy.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling connectGetNamespacedPodProxy.');\n }\n if (path !== undefined) {\n localVarQueryParameters['path'] = models_1.ObjectSerializer.serialize(path, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"string\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * connect GET requests to proxy of Pod\n * @param name name of the PodProxyOptions\n * @param namespace object name and auth scope, such as for teams and projects\n * @param path path to the resource\n * @param path2 Path is the URL path to use for the current proxy request to pod.\n */\n async connectGetNamespacedPodProxyWithPath(name, namespace, path, path2, options = { headers: {} }) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/pods/{name}/proxy/{path}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)))\n .replace('{' + 'path' + '}', encodeURIComponent(String(path)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['*/*'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling connectGetNamespacedPodProxyWithPath.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling connectGetNamespacedPodProxyWithPath.');\n }\n // verify required parameter 'path' is not null or undefined\n if (path === null || path === undefined) {\n throw new Error('Required parameter path was null or undefined when calling connectGetNamespacedPodProxyWithPath.');\n }\n if (path2 !== undefined) {\n localVarQueryParameters['path'] = models_1.ObjectSerializer.serialize(path2, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"string\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * connect GET requests to proxy of Service\n * @param name name of the ServiceProxyOptions\n * @param namespace object name and auth scope, such as for teams and projects\n * @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.\n */\n async connectGetNamespacedServiceProxy(name, namespace, path, options = { headers: {} }) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/services/{name}/proxy'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['*/*'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling connectGetNamespacedServiceProxy.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling connectGetNamespacedServiceProxy.');\n }\n if (path !== undefined) {\n localVarQueryParameters['path'] = models_1.ObjectSerializer.serialize(path, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"string\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * connect GET requests to proxy of Service\n * @param name name of the ServiceProxyOptions\n * @param namespace object name and auth scope, such as for teams and projects\n * @param path path to the resource\n * @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.\n */\n async connectGetNamespacedServiceProxyWithPath(name, namespace, path, path2, options = { headers: {} }) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/services/{name}/proxy/{path}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)))\n .replace('{' + 'path' + '}', encodeURIComponent(String(path)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['*/*'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling connectGetNamespacedServiceProxyWithPath.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling connectGetNamespacedServiceProxyWithPath.');\n }\n // verify required parameter 'path' is not null or undefined\n if (path === null || path === undefined) {\n throw new Error('Required parameter path was null or undefined when calling connectGetNamespacedServiceProxyWithPath.');\n }\n if (path2 !== undefined) {\n localVarQueryParameters['path'] = models_1.ObjectSerializer.serialize(path2, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"string\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * connect GET requests to proxy of Node\n * @param name name of the NodeProxyOptions\n * @param path Path is the URL path to use for the current proxy request to node.\n */\n async connectGetNodeProxy(name, path, options = { headers: {} }) {\n const localVarPath = this.basePath + '/api/v1/nodes/{name}/proxy'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['*/*'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling connectGetNodeProxy.');\n }\n if (path !== undefined) {\n localVarQueryParameters['path'] = models_1.ObjectSerializer.serialize(path, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"string\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * connect GET requests to proxy of Node\n * @param name name of the NodeProxyOptions\n * @param path path to the resource\n * @param path2 Path is the URL path to use for the current proxy request to node.\n */\n async connectGetNodeProxyWithPath(name, path, path2, options = { headers: {} }) {\n const localVarPath = this.basePath + '/api/v1/nodes/{name}/proxy/{path}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'path' + '}', encodeURIComponent(String(path)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['*/*'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling connectGetNodeProxyWithPath.');\n }\n // verify required parameter 'path' is not null or undefined\n if (path === null || path === undefined) {\n throw new Error('Required parameter path was null or undefined when calling connectGetNodeProxyWithPath.');\n }\n if (path2 !== undefined) {\n localVarQueryParameters['path'] = models_1.ObjectSerializer.serialize(path2, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"string\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * connect HEAD requests to proxy of Pod\n * @param name name of the PodProxyOptions\n * @param namespace object name and auth scope, such as for teams and projects\n * @param path Path is the URL path to use for the current proxy request to pod.\n */\n async connectHeadNamespacedPodProxy(name, namespace, path, options = { headers: {} }) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/pods/{name}/proxy'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['*/*'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling connectHeadNamespacedPodProxy.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling connectHeadNamespacedPodProxy.');\n }\n if (path !== undefined) {\n localVarQueryParameters['path'] = models_1.ObjectSerializer.serialize(path, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'HEAD',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"string\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * connect HEAD requests to proxy of Pod\n * @param name name of the PodProxyOptions\n * @param namespace object name and auth scope, such as for teams and projects\n * @param path path to the resource\n * @param path2 Path is the URL path to use for the current proxy request to pod.\n */\n async connectHeadNamespacedPodProxyWithPath(name, namespace, path, path2, options = { headers: {} }) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/pods/{name}/proxy/{path}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)))\n .replace('{' + 'path' + '}', encodeURIComponent(String(path)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['*/*'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling connectHeadNamespacedPodProxyWithPath.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling connectHeadNamespacedPodProxyWithPath.');\n }\n // verify required parameter 'path' is not null or undefined\n if (path === null || path === undefined) {\n throw new Error('Required parameter path was null or undefined when calling connectHeadNamespacedPodProxyWithPath.');\n }\n if (path2 !== undefined) {\n localVarQueryParameters['path'] = models_1.ObjectSerializer.serialize(path2, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'HEAD',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"string\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * connect HEAD requests to proxy of Service\n * @param name name of the ServiceProxyOptions\n * @param namespace object name and auth scope, such as for teams and projects\n * @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.\n */\n async connectHeadNamespacedServiceProxy(name, namespace, path, options = { headers: {} }) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/services/{name}/proxy'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['*/*'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling connectHeadNamespacedServiceProxy.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling connectHeadNamespacedServiceProxy.');\n }\n if (path !== undefined) {\n localVarQueryParameters['path'] = models_1.ObjectSerializer.serialize(path, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'HEAD',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"string\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * connect HEAD requests to proxy of Service\n * @param name name of the ServiceProxyOptions\n * @param namespace object name and auth scope, such as for teams and projects\n * @param path path to the resource\n * @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.\n */\n async connectHeadNamespacedServiceProxyWithPath(name, namespace, path, path2, options = { headers: {} }) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/services/{name}/proxy/{path}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)))\n .replace('{' + 'path' + '}', encodeURIComponent(String(path)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['*/*'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling connectHeadNamespacedServiceProxyWithPath.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling connectHeadNamespacedServiceProxyWithPath.');\n }\n // verify required parameter 'path' is not null or undefined\n if (path === null || path === undefined) {\n throw new Error('Required parameter path was null or undefined when calling connectHeadNamespacedServiceProxyWithPath.');\n }\n if (path2 !== undefined) {\n localVarQueryParameters['path'] = models_1.ObjectSerializer.serialize(path2, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'HEAD',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"string\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * connect HEAD requests to proxy of Node\n * @param name name of the NodeProxyOptions\n * @param path Path is the URL path to use for the current proxy request to node.\n */\n async connectHeadNodeProxy(name, path, options = { headers: {} }) {\n const localVarPath = this.basePath + '/api/v1/nodes/{name}/proxy'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['*/*'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling connectHeadNodeProxy.');\n }\n if (path !== undefined) {\n localVarQueryParameters['path'] = models_1.ObjectSerializer.serialize(path, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'HEAD',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"string\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * connect HEAD requests to proxy of Node\n * @param name name of the NodeProxyOptions\n * @param path path to the resource\n * @param path2 Path is the URL path to use for the current proxy request to node.\n */\n async connectHeadNodeProxyWithPath(name, path, path2, options = { headers: {} }) {\n const localVarPath = this.basePath + '/api/v1/nodes/{name}/proxy/{path}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'path' + '}', encodeURIComponent(String(path)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['*/*'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling connectHeadNodeProxyWithPath.');\n }\n // verify required parameter 'path' is not null or undefined\n if (path === null || path === undefined) {\n throw new Error('Required parameter path was null or undefined when calling connectHeadNodeProxyWithPath.');\n }\n if (path2 !== undefined) {\n localVarQueryParameters['path'] = models_1.ObjectSerializer.serialize(path2, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'HEAD',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"string\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * connect OPTIONS requests to proxy of Pod\n * @param name name of the PodProxyOptions\n * @param namespace object name and auth scope, such as for teams and projects\n * @param path Path is the URL path to use for the current proxy request to pod.\n */\n async connectOptionsNamespacedPodProxy(name, namespace, path, options = { headers: {} }) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/pods/{name}/proxy'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['*/*'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling connectOptionsNamespacedPodProxy.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling connectOptionsNamespacedPodProxy.');\n }\n if (path !== undefined) {\n localVarQueryParameters['path'] = models_1.ObjectSerializer.serialize(path, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'OPTIONS',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"string\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * connect OPTIONS requests to proxy of Pod\n * @param name name of the PodProxyOptions\n * @param namespace object name and auth scope, such as for teams and projects\n * @param path path to the resource\n * @param path2 Path is the URL path to use for the current proxy request to pod.\n */\n async connectOptionsNamespacedPodProxyWithPath(name, namespace, path, path2, options = { headers: {} }) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/pods/{name}/proxy/{path}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)))\n .replace('{' + 'path' + '}', encodeURIComponent(String(path)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['*/*'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling connectOptionsNamespacedPodProxyWithPath.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling connectOptionsNamespacedPodProxyWithPath.');\n }\n // verify required parameter 'path' is not null or undefined\n if (path === null || path === undefined) {\n throw new Error('Required parameter path was null or undefined when calling connectOptionsNamespacedPodProxyWithPath.');\n }\n if (path2 !== undefined) {\n localVarQueryParameters['path'] = models_1.ObjectSerializer.serialize(path2, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'OPTIONS',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"string\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * connect OPTIONS requests to proxy of Service\n * @param name name of the ServiceProxyOptions\n * @param namespace object name and auth scope, such as for teams and projects\n * @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.\n */\n async connectOptionsNamespacedServiceProxy(name, namespace, path, options = { headers: {} }) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/services/{name}/proxy'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['*/*'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling connectOptionsNamespacedServiceProxy.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling connectOptionsNamespacedServiceProxy.');\n }\n if (path !== undefined) {\n localVarQueryParameters['path'] = models_1.ObjectSerializer.serialize(path, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'OPTIONS',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"string\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * connect OPTIONS requests to proxy of Service\n * @param name name of the ServiceProxyOptions\n * @param namespace object name and auth scope, such as for teams and projects\n * @param path path to the resource\n * @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.\n */\n async connectOptionsNamespacedServiceProxyWithPath(name, namespace, path, path2, options = { headers: {} }) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/services/{name}/proxy/{path}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)))\n .replace('{' + 'path' + '}', encodeURIComponent(String(path)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['*/*'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling connectOptionsNamespacedServiceProxyWithPath.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling connectOptionsNamespacedServiceProxyWithPath.');\n }\n // verify required parameter 'path' is not null or undefined\n if (path === null || path === undefined) {\n throw new Error('Required parameter path was null or undefined when calling connectOptionsNamespacedServiceProxyWithPath.');\n }\n if (path2 !== undefined) {\n localVarQueryParameters['path'] = models_1.ObjectSerializer.serialize(path2, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'OPTIONS',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"string\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * connect OPTIONS requests to proxy of Node\n * @param name name of the NodeProxyOptions\n * @param path Path is the URL path to use for the current proxy request to node.\n */\n async connectOptionsNodeProxy(name, path, options = { headers: {} }) {\n const localVarPath = this.basePath + '/api/v1/nodes/{name}/proxy'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['*/*'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling connectOptionsNodeProxy.');\n }\n if (path !== undefined) {\n localVarQueryParameters['path'] = models_1.ObjectSerializer.serialize(path, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'OPTIONS',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"string\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * connect OPTIONS requests to proxy of Node\n * @param name name of the NodeProxyOptions\n * @param path path to the resource\n * @param path2 Path is the URL path to use for the current proxy request to node.\n */\n async connectOptionsNodeProxyWithPath(name, path, path2, options = { headers: {} }) {\n const localVarPath = this.basePath + '/api/v1/nodes/{name}/proxy/{path}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'path' + '}', encodeURIComponent(String(path)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['*/*'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling connectOptionsNodeProxyWithPath.');\n }\n // verify required parameter 'path' is not null or undefined\n if (path === null || path === undefined) {\n throw new Error('Required parameter path was null or undefined when calling connectOptionsNodeProxyWithPath.');\n }\n if (path2 !== undefined) {\n localVarQueryParameters['path'] = models_1.ObjectSerializer.serialize(path2, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'OPTIONS',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"string\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * connect PATCH requests to proxy of Pod\n * @param name name of the PodProxyOptions\n * @param namespace object name and auth scope, such as for teams and projects\n * @param path Path is the URL path to use for the current proxy request to pod.\n */\n async connectPatchNamespacedPodProxy(name, namespace, path, options = { headers: {} }) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/pods/{name}/proxy'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['*/*'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling connectPatchNamespacedPodProxy.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling connectPatchNamespacedPodProxy.');\n }\n if (path !== undefined) {\n localVarQueryParameters['path'] = models_1.ObjectSerializer.serialize(path, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"string\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * connect PATCH requests to proxy of Pod\n * @param name name of the PodProxyOptions\n * @param namespace object name and auth scope, such as for teams and projects\n * @param path path to the resource\n * @param path2 Path is the URL path to use for the current proxy request to pod.\n */\n async connectPatchNamespacedPodProxyWithPath(name, namespace, path, path2, options = { headers: {} }) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/pods/{name}/proxy/{path}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)))\n .replace('{' + 'path' + '}', encodeURIComponent(String(path)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['*/*'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling connectPatchNamespacedPodProxyWithPath.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling connectPatchNamespacedPodProxyWithPath.');\n }\n // verify required parameter 'path' is not null or undefined\n if (path === null || path === undefined) {\n throw new Error('Required parameter path was null or undefined when calling connectPatchNamespacedPodProxyWithPath.');\n }\n if (path2 !== undefined) {\n localVarQueryParameters['path'] = models_1.ObjectSerializer.serialize(path2, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"string\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * connect PATCH requests to proxy of Service\n * @param name name of the ServiceProxyOptions\n * @param namespace object name and auth scope, such as for teams and projects\n * @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.\n */\n async connectPatchNamespacedServiceProxy(name, namespace, path, options = { headers: {} }) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/services/{name}/proxy'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['*/*'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling connectPatchNamespacedServiceProxy.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling connectPatchNamespacedServiceProxy.');\n }\n if (path !== undefined) {\n localVarQueryParameters['path'] = models_1.ObjectSerializer.serialize(path, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"string\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * connect PATCH requests to proxy of Service\n * @param name name of the ServiceProxyOptions\n * @param namespace object name and auth scope, such as for teams and projects\n * @param path path to the resource\n * @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.\n */\n async connectPatchNamespacedServiceProxyWithPath(name, namespace, path, path2, options = { headers: {} }) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/services/{name}/proxy/{path}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)))\n .replace('{' + 'path' + '}', encodeURIComponent(String(path)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['*/*'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling connectPatchNamespacedServiceProxyWithPath.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling connectPatchNamespacedServiceProxyWithPath.');\n }\n // verify required parameter 'path' is not null or undefined\n if (path === null || path === undefined) {\n throw new Error('Required parameter path was null or undefined when calling connectPatchNamespacedServiceProxyWithPath.');\n }\n if (path2 !== undefined) {\n localVarQueryParameters['path'] = models_1.ObjectSerializer.serialize(path2, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"string\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * connect PATCH requests to proxy of Node\n * @param name name of the NodeProxyOptions\n * @param path Path is the URL path to use for the current proxy request to node.\n */\n async connectPatchNodeProxy(name, path, options = { headers: {} }) {\n const localVarPath = this.basePath + '/api/v1/nodes/{name}/proxy'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['*/*'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling connectPatchNodeProxy.');\n }\n if (path !== undefined) {\n localVarQueryParameters['path'] = models_1.ObjectSerializer.serialize(path, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"string\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * connect PATCH requests to proxy of Node\n * @param name name of the NodeProxyOptions\n * @param path path to the resource\n * @param path2 Path is the URL path to use for the current proxy request to node.\n */\n async connectPatchNodeProxyWithPath(name, path, path2, options = { headers: {} }) {\n const localVarPath = this.basePath + '/api/v1/nodes/{name}/proxy/{path}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'path' + '}', encodeURIComponent(String(path)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['*/*'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling connectPatchNodeProxyWithPath.');\n }\n // verify required parameter 'path' is not null or undefined\n if (path === null || path === undefined) {\n throw new Error('Required parameter path was null or undefined when calling connectPatchNodeProxyWithPath.');\n }\n if (path2 !== undefined) {\n localVarQueryParameters['path'] = models_1.ObjectSerializer.serialize(path2, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"string\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * connect POST requests to attach of Pod\n * @param name name of the PodAttachOptions\n * @param namespace object name and auth scope, such as for teams and projects\n * @param container The container in which to execute the command. Defaults to only container if there is only one container in the pod.\n * @param stderr Stderr if true indicates that stderr is to be redirected for the attach call. Defaults to true.\n * @param stdin Stdin if true, redirects the standard input stream of the pod for this call. Defaults to false.\n * @param stdout Stdout if true indicates that stdout is to be redirected for the attach call. Defaults to true.\n * @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.\n */\n async connectPostNamespacedPodAttach(name, namespace, container, stderr, stdin, stdout, tty, options = { headers: {} }) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/pods/{name}/attach'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['*/*'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling connectPostNamespacedPodAttach.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling connectPostNamespacedPodAttach.');\n }\n if (container !== undefined) {\n localVarQueryParameters['container'] = models_1.ObjectSerializer.serialize(container, \"string\");\n }\n if (stderr !== undefined) {\n localVarQueryParameters['stderr'] = models_1.ObjectSerializer.serialize(stderr, \"boolean\");\n }\n if (stdin !== undefined) {\n localVarQueryParameters['stdin'] = models_1.ObjectSerializer.serialize(stdin, \"boolean\");\n }\n if (stdout !== undefined) {\n localVarQueryParameters['stdout'] = models_1.ObjectSerializer.serialize(stdout, \"boolean\");\n }\n if (tty !== undefined) {\n localVarQueryParameters['tty'] = models_1.ObjectSerializer.serialize(tty, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'POST',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"string\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * connect POST requests to exec of Pod\n * @param name name of the PodExecOptions\n * @param namespace object name and auth scope, such as for teams and projects\n * @param command Command is the remote command to execute. argv array. Not executed within a shell.\n * @param container Container in which to execute the command. Defaults to only container if there is only one container in the pod.\n * @param stderr Redirect the standard error stream of the pod for this call. Defaults to true.\n * @param stdin Redirect the standard input stream of the pod for this call. Defaults to false.\n * @param stdout Redirect the standard output stream of the pod for this call. Defaults to true.\n * @param tty TTY if true indicates that a tty will be allocated for the exec call. Defaults to false.\n */\n async connectPostNamespacedPodExec(name, namespace, command, container, stderr, stdin, stdout, tty, options = { headers: {} }) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/pods/{name}/exec'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['*/*'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling connectPostNamespacedPodExec.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling connectPostNamespacedPodExec.');\n }\n if (command !== undefined) {\n localVarQueryParameters['command'] = models_1.ObjectSerializer.serialize(command, \"string\");\n }\n if (container !== undefined) {\n localVarQueryParameters['container'] = models_1.ObjectSerializer.serialize(container, \"string\");\n }\n if (stderr !== undefined) {\n localVarQueryParameters['stderr'] = models_1.ObjectSerializer.serialize(stderr, \"boolean\");\n }\n if (stdin !== undefined) {\n localVarQueryParameters['stdin'] = models_1.ObjectSerializer.serialize(stdin, \"boolean\");\n }\n if (stdout !== undefined) {\n localVarQueryParameters['stdout'] = models_1.ObjectSerializer.serialize(stdout, \"boolean\");\n }\n if (tty !== undefined) {\n localVarQueryParameters['tty'] = models_1.ObjectSerializer.serialize(tty, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'POST',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"string\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * connect POST requests to portforward of Pod\n * @param name name of the PodPortForwardOptions\n * @param namespace object name and auth scope, such as for teams and projects\n * @param ports List of ports to forward Required when using WebSockets\n */\n async connectPostNamespacedPodPortforward(name, namespace, ports, options = { headers: {} }) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/pods/{name}/portforward'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['*/*'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling connectPostNamespacedPodPortforward.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling connectPostNamespacedPodPortforward.');\n }\n if (ports !== undefined) {\n localVarQueryParameters['ports'] = models_1.ObjectSerializer.serialize(ports, \"number\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'POST',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"string\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * connect POST requests to proxy of Pod\n * @param name name of the PodProxyOptions\n * @param namespace object name and auth scope, such as for teams and projects\n * @param path Path is the URL path to use for the current proxy request to pod.\n */\n async connectPostNamespacedPodProxy(name, namespace, path, options = { headers: {} }) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/pods/{name}/proxy'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['*/*'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling connectPostNamespacedPodProxy.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling connectPostNamespacedPodProxy.');\n }\n if (path !== undefined) {\n localVarQueryParameters['path'] = models_1.ObjectSerializer.serialize(path, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'POST',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"string\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * connect POST requests to proxy of Pod\n * @param name name of the PodProxyOptions\n * @param namespace object name and auth scope, such as for teams and projects\n * @param path path to the resource\n * @param path2 Path is the URL path to use for the current proxy request to pod.\n */\n async connectPostNamespacedPodProxyWithPath(name, namespace, path, path2, options = { headers: {} }) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/pods/{name}/proxy/{path}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)))\n .replace('{' + 'path' + '}', encodeURIComponent(String(path)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['*/*'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling connectPostNamespacedPodProxyWithPath.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling connectPostNamespacedPodProxyWithPath.');\n }\n // verify required parameter 'path' is not null or undefined\n if (path === null || path === undefined) {\n throw new Error('Required parameter path was null or undefined when calling connectPostNamespacedPodProxyWithPath.');\n }\n if (path2 !== undefined) {\n localVarQueryParameters['path'] = models_1.ObjectSerializer.serialize(path2, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'POST',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"string\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * connect POST requests to proxy of Service\n * @param name name of the ServiceProxyOptions\n * @param namespace object name and auth scope, such as for teams and projects\n * @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.\n */\n async connectPostNamespacedServiceProxy(name, namespace, path, options = { headers: {} }) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/services/{name}/proxy'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['*/*'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling connectPostNamespacedServiceProxy.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling connectPostNamespacedServiceProxy.');\n }\n if (path !== undefined) {\n localVarQueryParameters['path'] = models_1.ObjectSerializer.serialize(path, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'POST',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"string\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * connect POST requests to proxy of Service\n * @param name name of the ServiceProxyOptions\n * @param namespace object name and auth scope, such as for teams and projects\n * @param path path to the resource\n * @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.\n */\n async connectPostNamespacedServiceProxyWithPath(name, namespace, path, path2, options = { headers: {} }) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/services/{name}/proxy/{path}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)))\n .replace('{' + 'path' + '}', encodeURIComponent(String(path)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['*/*'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling connectPostNamespacedServiceProxyWithPath.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling connectPostNamespacedServiceProxyWithPath.');\n }\n // verify required parameter 'path' is not null or undefined\n if (path === null || path === undefined) {\n throw new Error('Required parameter path was null or undefined when calling connectPostNamespacedServiceProxyWithPath.');\n }\n if (path2 !== undefined) {\n localVarQueryParameters['path'] = models_1.ObjectSerializer.serialize(path2, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'POST',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"string\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * connect POST requests to proxy of Node\n * @param name name of the NodeProxyOptions\n * @param path Path is the URL path to use for the current proxy request to node.\n */\n async connectPostNodeProxy(name, path, options = { headers: {} }) {\n const localVarPath = this.basePath + '/api/v1/nodes/{name}/proxy'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['*/*'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling connectPostNodeProxy.');\n }\n if (path !== undefined) {\n localVarQueryParameters['path'] = models_1.ObjectSerializer.serialize(path, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'POST',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"string\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * connect POST requests to proxy of Node\n * @param name name of the NodeProxyOptions\n * @param path path to the resource\n * @param path2 Path is the URL path to use for the current proxy request to node.\n */\n async connectPostNodeProxyWithPath(name, path, path2, options = { headers: {} }) {\n const localVarPath = this.basePath + '/api/v1/nodes/{name}/proxy/{path}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'path' + '}', encodeURIComponent(String(path)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['*/*'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling connectPostNodeProxyWithPath.');\n }\n // verify required parameter 'path' is not null or undefined\n if (path === null || path === undefined) {\n throw new Error('Required parameter path was null or undefined when calling connectPostNodeProxyWithPath.');\n }\n if (path2 !== undefined) {\n localVarQueryParameters['path'] = models_1.ObjectSerializer.serialize(path2, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'POST',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"string\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * connect PUT requests to proxy of Pod\n * @param name name of the PodProxyOptions\n * @param namespace object name and auth scope, such as for teams and projects\n * @param path Path is the URL path to use for the current proxy request to pod.\n */\n async connectPutNamespacedPodProxy(name, namespace, path, options = { headers: {} }) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/pods/{name}/proxy'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['*/*'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling connectPutNamespacedPodProxy.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling connectPutNamespacedPodProxy.');\n }\n if (path !== undefined) {\n localVarQueryParameters['path'] = models_1.ObjectSerializer.serialize(path, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"string\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * connect PUT requests to proxy of Pod\n * @param name name of the PodProxyOptions\n * @param namespace object name and auth scope, such as for teams and projects\n * @param path path to the resource\n * @param path2 Path is the URL path to use for the current proxy request to pod.\n */\n async connectPutNamespacedPodProxyWithPath(name, namespace, path, path2, options = { headers: {} }) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/pods/{name}/proxy/{path}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)))\n .replace('{' + 'path' + '}', encodeURIComponent(String(path)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['*/*'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling connectPutNamespacedPodProxyWithPath.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling connectPutNamespacedPodProxyWithPath.');\n }\n // verify required parameter 'path' is not null or undefined\n if (path === null || path === undefined) {\n throw new Error('Required parameter path was null or undefined when calling connectPutNamespacedPodProxyWithPath.');\n }\n if (path2 !== undefined) {\n localVarQueryParameters['path'] = models_1.ObjectSerializer.serialize(path2, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"string\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * connect PUT requests to proxy of Service\n * @param name name of the ServiceProxyOptions\n * @param namespace object name and auth scope, such as for teams and projects\n * @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.\n */\n async connectPutNamespacedServiceProxy(name, namespace, path, options = { headers: {} }) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/services/{name}/proxy'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['*/*'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling connectPutNamespacedServiceProxy.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling connectPutNamespacedServiceProxy.');\n }\n if (path !== undefined) {\n localVarQueryParameters['path'] = models_1.ObjectSerializer.serialize(path, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"string\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * connect PUT requests to proxy of Service\n * @param name name of the ServiceProxyOptions\n * @param namespace object name and auth scope, such as for teams and projects\n * @param path path to the resource\n * @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.\n */\n async connectPutNamespacedServiceProxyWithPath(name, namespace, path, path2, options = { headers: {} }) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/services/{name}/proxy/{path}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)))\n .replace('{' + 'path' + '}', encodeURIComponent(String(path)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['*/*'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling connectPutNamespacedServiceProxyWithPath.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling connectPutNamespacedServiceProxyWithPath.');\n }\n // verify required parameter 'path' is not null or undefined\n if (path === null || path === undefined) {\n throw new Error('Required parameter path was null or undefined when calling connectPutNamespacedServiceProxyWithPath.');\n }\n if (path2 !== undefined) {\n localVarQueryParameters['path'] = models_1.ObjectSerializer.serialize(path2, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"string\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * connect PUT requests to proxy of Node\n * @param name name of the NodeProxyOptions\n * @param path Path is the URL path to use for the current proxy request to node.\n */\n async connectPutNodeProxy(name, path, options = { headers: {} }) {\n const localVarPath = this.basePath + '/api/v1/nodes/{name}/proxy'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['*/*'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling connectPutNodeProxy.');\n }\n if (path !== undefined) {\n localVarQueryParameters['path'] = models_1.ObjectSerializer.serialize(path, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"string\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * connect PUT requests to proxy of Node\n * @param name name of the NodeProxyOptions\n * @param path path to the resource\n * @param path2 Path is the URL path to use for the current proxy request to node.\n */\n async connectPutNodeProxyWithPath(name, path, path2, options = { headers: {} }) {\n const localVarPath = this.basePath + '/api/v1/nodes/{name}/proxy/{path}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'path' + '}', encodeURIComponent(String(path)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['*/*'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling connectPutNodeProxyWithPath.');\n }\n // verify required parameter 'path' is not null or undefined\n if (path === null || path === undefined) {\n throw new Error('Required parameter path was null or undefined when calling connectPutNodeProxyWithPath.');\n }\n if (path2 !== undefined) {\n localVarQueryParameters['path'] = models_1.ObjectSerializer.serialize(path2, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"string\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * create a Namespace\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n */\n async createNamespace(body, pretty, dryRun, fieldManager, options = { headers: {} }) {\n const localVarPath = this.basePath + '/api/v1/namespaces';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling createNamespace.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'POST',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1Namespace\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1Namespace\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * create a Binding\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n * @param pretty If \\'true\\', then the output is pretty printed.\n */\n async createNamespacedBinding(namespace, body, dryRun, fieldManager, pretty, options = { headers: {} }) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/bindings'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling createNamespacedBinding.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling createNamespacedBinding.');\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'POST',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1Binding\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1Binding\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * create a ConfigMap\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n */\n async createNamespacedConfigMap(namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/configmaps'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling createNamespacedConfigMap.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling createNamespacedConfigMap.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'POST',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1ConfigMap\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1ConfigMap\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * create Endpoints\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n */\n async createNamespacedEndpoints(namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/endpoints'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling createNamespacedEndpoints.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling createNamespacedEndpoints.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'POST',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1Endpoints\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1Endpoints\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * create an Event\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n */\n async createNamespacedEvent(namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/events'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling createNamespacedEvent.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling createNamespacedEvent.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'POST',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"CoreV1Event\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"CoreV1Event\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * create a LimitRange\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n */\n async createNamespacedLimitRange(namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/limitranges'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling createNamespacedLimitRange.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling createNamespacedLimitRange.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'POST',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1LimitRange\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1LimitRange\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * create a PersistentVolumeClaim\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n */\n async createNamespacedPersistentVolumeClaim(namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/persistentvolumeclaims'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling createNamespacedPersistentVolumeClaim.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling createNamespacedPersistentVolumeClaim.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'POST',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1PersistentVolumeClaim\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1PersistentVolumeClaim\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * create a Pod\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n */\n async createNamespacedPod(namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/pods'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling createNamespacedPod.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling createNamespacedPod.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'POST',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1Pod\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1Pod\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * create binding of a Pod\n * @param name name of the Binding\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n * @param pretty If \\'true\\', then the output is pretty printed.\n */\n async createNamespacedPodBinding(name, namespace, body, dryRun, fieldManager, pretty, options = { headers: {} }) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/pods/{name}/binding'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling createNamespacedPodBinding.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling createNamespacedPodBinding.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling createNamespacedPodBinding.');\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'POST',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1Binding\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1Binding\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * create eviction of a Pod\n * @param name name of the Eviction\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n * @param pretty If \\'true\\', then the output is pretty printed.\n */\n async createNamespacedPodEviction(name, namespace, body, dryRun, fieldManager, pretty, options = { headers: {} }) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/pods/{name}/eviction'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling createNamespacedPodEviction.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling createNamespacedPodEviction.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling createNamespacedPodEviction.');\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'POST',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1Eviction\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1Eviction\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * create a PodTemplate\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n */\n async createNamespacedPodTemplate(namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/podtemplates'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling createNamespacedPodTemplate.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling createNamespacedPodTemplate.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'POST',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1PodTemplate\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1PodTemplate\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * create a ReplicationController\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n */\n async createNamespacedReplicationController(namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/replicationcontrollers'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling createNamespacedReplicationController.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling createNamespacedReplicationController.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'POST',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1ReplicationController\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1ReplicationController\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * create a ResourceQuota\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n */\n async createNamespacedResourceQuota(namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/resourcequotas'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling createNamespacedResourceQuota.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling createNamespacedResourceQuota.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'POST',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1ResourceQuota\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1ResourceQuota\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * create a Secret\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n */\n async createNamespacedSecret(namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/secrets'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling createNamespacedSecret.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling createNamespacedSecret.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'POST',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1Secret\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1Secret\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * create a Service\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n */\n async createNamespacedService(namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/services'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling createNamespacedService.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling createNamespacedService.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'POST',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1Service\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1Service\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * create a ServiceAccount\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n */\n async createNamespacedServiceAccount(namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/serviceaccounts'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling createNamespacedServiceAccount.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling createNamespacedServiceAccount.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'POST',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1ServiceAccount\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1ServiceAccount\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * create token of a ServiceAccount\n * @param name name of the TokenRequest\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n * @param pretty If \\'true\\', then the output is pretty printed.\n */\n async createNamespacedServiceAccountToken(name, namespace, body, dryRun, fieldManager, pretty, options = { headers: {} }) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/serviceaccounts/{name}/token'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling createNamespacedServiceAccountToken.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling createNamespacedServiceAccountToken.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling createNamespacedServiceAccountToken.');\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'POST',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"AuthenticationV1TokenRequest\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"AuthenticationV1TokenRequest\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * create a Node\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n */\n async createNode(body, pretty, dryRun, fieldManager, options = { headers: {} }) {\n const localVarPath = this.basePath + '/api/v1/nodes';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling createNode.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'POST',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1Node\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1Node\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * create a PersistentVolume\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n */\n async createPersistentVolume(body, pretty, dryRun, fieldManager, options = { headers: {} }) {\n const localVarPath = this.basePath + '/api/v1/persistentvolumes';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling createPersistentVolume.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'POST',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1PersistentVolume\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1PersistentVolume\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * delete collection of ConfigMap\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @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.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @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.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @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.\n * @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.\n * @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.\n * @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\n * @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\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param body\n */\n async deleteCollectionNamespacedConfigMap(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/configmaps'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedConfigMap.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (gracePeriodSeconds !== undefined) {\n localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, \"number\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, \"number\");\n }\n if (orphanDependents !== undefined) {\n localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, \"boolean\");\n }\n if (propagationPolicy !== undefined) {\n localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, \"string\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (resourceVersionMatch !== undefined) {\n localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1DeleteOptions\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1Status\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * delete collection of Endpoints\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @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.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @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.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @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.\n * @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.\n * @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.\n * @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\n * @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\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param body\n */\n async deleteCollectionNamespacedEndpoints(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/endpoints'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedEndpoints.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (gracePeriodSeconds !== undefined) {\n localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, \"number\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, \"number\");\n }\n if (orphanDependents !== undefined) {\n localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, \"boolean\");\n }\n if (propagationPolicy !== undefined) {\n localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, \"string\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (resourceVersionMatch !== undefined) {\n localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1DeleteOptions\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1Status\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * delete collection of Event\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @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.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @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.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @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.\n * @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.\n * @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.\n * @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\n * @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\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param body\n */\n async deleteCollectionNamespacedEvent(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/events'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedEvent.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (gracePeriodSeconds !== undefined) {\n localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, \"number\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, \"number\");\n }\n if (orphanDependents !== undefined) {\n localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, \"boolean\");\n }\n if (propagationPolicy !== undefined) {\n localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, \"string\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (resourceVersionMatch !== undefined) {\n localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1DeleteOptions\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1Status\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * delete collection of LimitRange\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @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.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @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.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @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.\n * @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.\n * @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.\n * @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\n * @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\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param body\n */\n async deleteCollectionNamespacedLimitRange(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/limitranges'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedLimitRange.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (gracePeriodSeconds !== undefined) {\n localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, \"number\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, \"number\");\n }\n if (orphanDependents !== undefined) {\n localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, \"boolean\");\n }\n if (propagationPolicy !== undefined) {\n localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, \"string\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (resourceVersionMatch !== undefined) {\n localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1DeleteOptions\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1Status\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * delete collection of PersistentVolumeClaim\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @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.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @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.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @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.\n * @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.\n * @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.\n * @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\n * @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\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param body\n */\n async deleteCollectionNamespacedPersistentVolumeClaim(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/persistentvolumeclaims'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedPersistentVolumeClaim.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (gracePeriodSeconds !== undefined) {\n localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, \"number\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, \"number\");\n }\n if (orphanDependents !== undefined) {\n localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, \"boolean\");\n }\n if (propagationPolicy !== undefined) {\n localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, \"string\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (resourceVersionMatch !== undefined) {\n localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1DeleteOptions\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1Status\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * delete collection of Pod\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @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.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @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.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @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.\n * @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.\n * @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.\n * @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\n * @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\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param body\n */\n async deleteCollectionNamespacedPod(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/pods'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedPod.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (gracePeriodSeconds !== undefined) {\n localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, \"number\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, \"number\");\n }\n if (orphanDependents !== undefined) {\n localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, \"boolean\");\n }\n if (propagationPolicy !== undefined) {\n localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, \"string\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (resourceVersionMatch !== undefined) {\n localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1DeleteOptions\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1Status\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * delete collection of PodTemplate\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @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.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @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.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @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.\n * @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.\n * @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.\n * @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\n * @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\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param body\n */\n async deleteCollectionNamespacedPodTemplate(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/podtemplates'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedPodTemplate.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (gracePeriodSeconds !== undefined) {\n localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, \"number\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, \"number\");\n }\n if (orphanDependents !== undefined) {\n localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, \"boolean\");\n }\n if (propagationPolicy !== undefined) {\n localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, \"string\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (resourceVersionMatch !== undefined) {\n localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1DeleteOptions\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1Status\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * delete collection of ReplicationController\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @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.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @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.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @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.\n * @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.\n * @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.\n * @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\n * @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\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param body\n */\n async deleteCollectionNamespacedReplicationController(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/replicationcontrollers'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedReplicationController.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (gracePeriodSeconds !== undefined) {\n localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, \"number\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, \"number\");\n }\n if (orphanDependents !== undefined) {\n localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, \"boolean\");\n }\n if (propagationPolicy !== undefined) {\n localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, \"string\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (resourceVersionMatch !== undefined) {\n localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1DeleteOptions\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1Status\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * delete collection of ResourceQuota\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @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.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @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.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @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.\n * @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.\n * @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.\n * @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\n * @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\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param body\n */\n async deleteCollectionNamespacedResourceQuota(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/resourcequotas'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedResourceQuota.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (gracePeriodSeconds !== undefined) {\n localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, \"number\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, \"number\");\n }\n if (orphanDependents !== undefined) {\n localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, \"boolean\");\n }\n if (propagationPolicy !== undefined) {\n localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, \"string\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (resourceVersionMatch !== undefined) {\n localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1DeleteOptions\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1Status\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * delete collection of Secret\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @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.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @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.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @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.\n * @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.\n * @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.\n * @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\n * @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\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param body\n */\n async deleteCollectionNamespacedSecret(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/secrets'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedSecret.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (gracePeriodSeconds !== undefined) {\n localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, \"number\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, \"number\");\n }\n if (orphanDependents !== undefined) {\n localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, \"boolean\");\n }\n if (propagationPolicy !== undefined) {\n localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, \"string\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (resourceVersionMatch !== undefined) {\n localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1DeleteOptions\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1Status\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * delete collection of ServiceAccount\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @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.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @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.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @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.\n * @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.\n * @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.\n * @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\n * @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\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param body\n */\n async deleteCollectionNamespacedServiceAccount(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/serviceaccounts'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedServiceAccount.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (gracePeriodSeconds !== undefined) {\n localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, \"number\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, \"number\");\n }\n if (orphanDependents !== undefined) {\n localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, \"boolean\");\n }\n if (propagationPolicy !== undefined) {\n localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, \"string\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (resourceVersionMatch !== undefined) {\n localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1DeleteOptions\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1Status\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * delete collection of Node\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @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.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @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.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @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.\n * @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.\n * @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.\n * @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\n * @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\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param body\n */\n async deleteCollectionNode(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) {\n const localVarPath = this.basePath + '/api/v1/nodes';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (gracePeriodSeconds !== undefined) {\n localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, \"number\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, \"number\");\n }\n if (orphanDependents !== undefined) {\n localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, \"boolean\");\n }\n if (propagationPolicy !== undefined) {\n localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, \"string\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (resourceVersionMatch !== undefined) {\n localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1DeleteOptions\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1Status\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * delete collection of PersistentVolume\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @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.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @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.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @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.\n * @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.\n * @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.\n * @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\n * @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\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param body\n */\n async deleteCollectionPersistentVolume(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) {\n const localVarPath = this.basePath + '/api/v1/persistentvolumes';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (gracePeriodSeconds !== undefined) {\n localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, \"number\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, \"number\");\n }\n if (orphanDependents !== undefined) {\n localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, \"boolean\");\n }\n if (propagationPolicy !== undefined) {\n localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, \"string\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (resourceVersionMatch !== undefined) {\n localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1DeleteOptions\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1Status\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * delete a Namespace\n * @param name name of the Namespace\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @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.\n * @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.\n * @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.\n * @param body\n */\n async deleteNamespace(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling deleteNamespace.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (gracePeriodSeconds !== undefined) {\n localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, \"number\");\n }\n if (orphanDependents !== undefined) {\n localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, \"boolean\");\n }\n if (propagationPolicy !== undefined) {\n localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1DeleteOptions\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1Status\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * delete a ConfigMap\n * @param name name of the ConfigMap\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @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.\n * @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.\n * @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.\n * @param body\n */\n async deleteNamespacedConfigMap(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/configmaps/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling deleteNamespacedConfigMap.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedConfigMap.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (gracePeriodSeconds !== undefined) {\n localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, \"number\");\n }\n if (orphanDependents !== undefined) {\n localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, \"boolean\");\n }\n if (propagationPolicy !== undefined) {\n localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1DeleteOptions\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1Status\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * delete Endpoints\n * @param name name of the Endpoints\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @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.\n * @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.\n * @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.\n * @param body\n */\n async deleteNamespacedEndpoints(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/endpoints/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling deleteNamespacedEndpoints.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedEndpoints.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (gracePeriodSeconds !== undefined) {\n localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, \"number\");\n }\n if (orphanDependents !== undefined) {\n localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, \"boolean\");\n }\n if (propagationPolicy !== undefined) {\n localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1DeleteOptions\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1Status\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * delete an Event\n * @param name name of the Event\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @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.\n * @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.\n * @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.\n * @param body\n */\n async deleteNamespacedEvent(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/events/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling deleteNamespacedEvent.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedEvent.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (gracePeriodSeconds !== undefined) {\n localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, \"number\");\n }\n if (orphanDependents !== undefined) {\n localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, \"boolean\");\n }\n if (propagationPolicy !== undefined) {\n localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1DeleteOptions\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1Status\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * delete a LimitRange\n * @param name name of the LimitRange\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @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.\n * @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.\n * @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.\n * @param body\n */\n async deleteNamespacedLimitRange(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/limitranges/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling deleteNamespacedLimitRange.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedLimitRange.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (gracePeriodSeconds !== undefined) {\n localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, \"number\");\n }\n if (orphanDependents !== undefined) {\n localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, \"boolean\");\n }\n if (propagationPolicy !== undefined) {\n localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1DeleteOptions\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1Status\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * delete a PersistentVolumeClaim\n * @param name name of the PersistentVolumeClaim\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @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.\n * @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.\n * @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.\n * @param body\n */\n async deleteNamespacedPersistentVolumeClaim(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/persistentvolumeclaims/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling deleteNamespacedPersistentVolumeClaim.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedPersistentVolumeClaim.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (gracePeriodSeconds !== undefined) {\n localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, \"number\");\n }\n if (orphanDependents !== undefined) {\n localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, \"boolean\");\n }\n if (propagationPolicy !== undefined) {\n localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1DeleteOptions\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1PersistentVolumeClaim\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * delete a Pod\n * @param name name of the Pod\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @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.\n * @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.\n * @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.\n * @param body\n */\n async deleteNamespacedPod(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/pods/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling deleteNamespacedPod.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedPod.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (gracePeriodSeconds !== undefined) {\n localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, \"number\");\n }\n if (orphanDependents !== undefined) {\n localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, \"boolean\");\n }\n if (propagationPolicy !== undefined) {\n localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1DeleteOptions\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1Pod\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * delete a PodTemplate\n * @param name name of the PodTemplate\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @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.\n * @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.\n * @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.\n * @param body\n */\n async deleteNamespacedPodTemplate(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/podtemplates/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling deleteNamespacedPodTemplate.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedPodTemplate.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (gracePeriodSeconds !== undefined) {\n localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, \"number\");\n }\n if (orphanDependents !== undefined) {\n localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, \"boolean\");\n }\n if (propagationPolicy !== undefined) {\n localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1DeleteOptions\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1PodTemplate\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * delete a ReplicationController\n * @param name name of the ReplicationController\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @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.\n * @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.\n * @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.\n * @param body\n */\n async deleteNamespacedReplicationController(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/replicationcontrollers/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling deleteNamespacedReplicationController.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedReplicationController.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (gracePeriodSeconds !== undefined) {\n localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, \"number\");\n }\n if (orphanDependents !== undefined) {\n localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, \"boolean\");\n }\n if (propagationPolicy !== undefined) {\n localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1DeleteOptions\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1Status\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * delete a ResourceQuota\n * @param name name of the ResourceQuota\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @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.\n * @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.\n * @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.\n * @param body\n */\n async deleteNamespacedResourceQuota(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/resourcequotas/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling deleteNamespacedResourceQuota.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedResourceQuota.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (gracePeriodSeconds !== undefined) {\n localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, \"number\");\n }\n if (orphanDependents !== undefined) {\n localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, \"boolean\");\n }\n if (propagationPolicy !== undefined) {\n localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1DeleteOptions\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1ResourceQuota\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * delete a Secret\n * @param name name of the Secret\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @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.\n * @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.\n * @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.\n * @param body\n */\n async deleteNamespacedSecret(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/secrets/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling deleteNamespacedSecret.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedSecret.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (gracePeriodSeconds !== undefined) {\n localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, \"number\");\n }\n if (orphanDependents !== undefined) {\n localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, \"boolean\");\n }\n if (propagationPolicy !== undefined) {\n localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1DeleteOptions\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1Status\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * delete a Service\n * @param name name of the Service\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @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.\n * @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.\n * @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.\n * @param body\n */\n async deleteNamespacedService(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/services/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling deleteNamespacedService.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedService.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (gracePeriodSeconds !== undefined) {\n localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, \"number\");\n }\n if (orphanDependents !== undefined) {\n localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, \"boolean\");\n }\n if (propagationPolicy !== undefined) {\n localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1DeleteOptions\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1Status\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * delete a ServiceAccount\n * @param name name of the ServiceAccount\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @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.\n * @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.\n * @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.\n * @param body\n */\n async deleteNamespacedServiceAccount(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/serviceaccounts/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling deleteNamespacedServiceAccount.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedServiceAccount.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (gracePeriodSeconds !== undefined) {\n localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, \"number\");\n }\n if (orphanDependents !== undefined) {\n localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, \"boolean\");\n }\n if (propagationPolicy !== undefined) {\n localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1DeleteOptions\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1ServiceAccount\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * delete a Node\n * @param name name of the Node\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @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.\n * @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.\n * @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.\n * @param body\n */\n async deleteNode(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) {\n const localVarPath = this.basePath + '/api/v1/nodes/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling deleteNode.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (gracePeriodSeconds !== undefined) {\n localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, \"number\");\n }\n if (orphanDependents !== undefined) {\n localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, \"boolean\");\n }\n if (propagationPolicy !== undefined) {\n localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1DeleteOptions\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1Status\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * delete a PersistentVolume\n * @param name name of the PersistentVolume\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @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.\n * @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.\n * @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.\n * @param body\n */\n async deletePersistentVolume(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) {\n const localVarPath = this.basePath + '/api/v1/persistentvolumes/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling deletePersistentVolume.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (gracePeriodSeconds !== undefined) {\n localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, \"number\");\n }\n if (orphanDependents !== undefined) {\n localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, \"boolean\");\n }\n if (propagationPolicy !== undefined) {\n localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1DeleteOptions\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1PersistentVolume\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * get available resources\n */\n async getAPIResources(options = { headers: {} }) {\n const localVarPath = this.basePath + '/api/v1/';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1APIResourceList\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * list objects of kind ComponentStatus\n * @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.\n * @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.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @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.\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @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\n * @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\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n */\n async listComponentStatus(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {\n const localVarPath = this.basePath + '/api/v1/componentstatuses';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n if (allowWatchBookmarks !== undefined) {\n localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, \"boolean\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, \"number\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (resourceVersionMatch !== undefined) {\n localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1ComponentStatusList\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * list or watch objects of kind ConfigMap\n * @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.\n * @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.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @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.\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @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\n * @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\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n */\n async listConfigMapForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {\n const localVarPath = this.basePath + '/api/v1/configmaps';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n if (allowWatchBookmarks !== undefined) {\n localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, \"boolean\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, \"number\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (resourceVersionMatch !== undefined) {\n localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1ConfigMapList\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * list or watch objects of kind Endpoints\n * @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.\n * @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.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @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.\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @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\n * @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\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n */\n async listEndpointsForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {\n const localVarPath = this.basePath + '/api/v1/endpoints';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n if (allowWatchBookmarks !== undefined) {\n localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, \"boolean\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, \"number\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (resourceVersionMatch !== undefined) {\n localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1EndpointsList\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * list or watch objects of kind Event\n * @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.\n * @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.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @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.\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @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\n * @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\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n */\n async listEventForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {\n const localVarPath = this.basePath + '/api/v1/events';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n if (allowWatchBookmarks !== undefined) {\n localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, \"boolean\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, \"number\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (resourceVersionMatch !== undefined) {\n localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"CoreV1EventList\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * list or watch objects of kind LimitRange\n * @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.\n * @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.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @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.\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @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\n * @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\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n */\n async listLimitRangeForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {\n const localVarPath = this.basePath + '/api/v1/limitranges';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n if (allowWatchBookmarks !== undefined) {\n localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, \"boolean\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, \"number\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (resourceVersionMatch !== undefined) {\n localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1LimitRangeList\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * list or watch objects of kind Namespace\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @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.\n * @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.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @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.\n * @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\n * @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\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n */\n async listNamespace(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {\n const localVarPath = this.basePath + '/api/v1/namespaces';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (allowWatchBookmarks !== undefined) {\n localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, \"boolean\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, \"number\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (resourceVersionMatch !== undefined) {\n localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1NamespaceList\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * list or watch objects of kind ConfigMap\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @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.\n * @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.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @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.\n * @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\n * @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\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n */\n async listNamespacedConfigMap(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/configmaps'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling listNamespacedConfigMap.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (allowWatchBookmarks !== undefined) {\n localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, \"boolean\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, \"number\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (resourceVersionMatch !== undefined) {\n localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1ConfigMapList\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * list or watch objects of kind Endpoints\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @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.\n * @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.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @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.\n * @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\n * @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\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n */\n async listNamespacedEndpoints(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/endpoints'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling listNamespacedEndpoints.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (allowWatchBookmarks !== undefined) {\n localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, \"boolean\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, \"number\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (resourceVersionMatch !== undefined) {\n localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1EndpointsList\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * list or watch objects of kind Event\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @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.\n * @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.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @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.\n * @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\n * @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\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n */\n async listNamespacedEvent(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/events'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling listNamespacedEvent.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (allowWatchBookmarks !== undefined) {\n localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, \"boolean\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, \"number\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (resourceVersionMatch !== undefined) {\n localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"CoreV1EventList\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * list or watch objects of kind LimitRange\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @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.\n * @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.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @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.\n * @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\n * @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\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n */\n async listNamespacedLimitRange(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/limitranges'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling listNamespacedLimitRange.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (allowWatchBookmarks !== undefined) {\n localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, \"boolean\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, \"number\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (resourceVersionMatch !== undefined) {\n localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1LimitRangeList\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * list or watch objects of kind PersistentVolumeClaim\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @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.\n * @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.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @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.\n * @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\n * @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\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n */\n async listNamespacedPersistentVolumeClaim(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/persistentvolumeclaims'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling listNamespacedPersistentVolumeClaim.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (allowWatchBookmarks !== undefined) {\n localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, \"boolean\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, \"number\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (resourceVersionMatch !== undefined) {\n localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1PersistentVolumeClaimList\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * list or watch objects of kind Pod\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @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.\n * @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.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @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.\n * @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\n * @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\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n */\n async listNamespacedPod(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/pods'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling listNamespacedPod.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (allowWatchBookmarks !== undefined) {\n localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, \"boolean\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, \"number\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (resourceVersionMatch !== undefined) {\n localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1PodList\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * list or watch objects of kind PodTemplate\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @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.\n * @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.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @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.\n * @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\n * @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\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n */\n async listNamespacedPodTemplate(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/podtemplates'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling listNamespacedPodTemplate.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (allowWatchBookmarks !== undefined) {\n localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, \"boolean\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, \"number\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (resourceVersionMatch !== undefined) {\n localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1PodTemplateList\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * list or watch objects of kind ReplicationController\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @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.\n * @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.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @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.\n * @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\n * @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\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n */\n async listNamespacedReplicationController(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/replicationcontrollers'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling listNamespacedReplicationController.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (allowWatchBookmarks !== undefined) {\n localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, \"boolean\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, \"number\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (resourceVersionMatch !== undefined) {\n localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1ReplicationControllerList\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * list or watch objects of kind ResourceQuota\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @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.\n * @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.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @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.\n * @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\n * @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\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n */\n async listNamespacedResourceQuota(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/resourcequotas'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling listNamespacedResourceQuota.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (allowWatchBookmarks !== undefined) {\n localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, \"boolean\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, \"number\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (resourceVersionMatch !== undefined) {\n localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1ResourceQuotaList\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * list or watch objects of kind Secret\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @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.\n * @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.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @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.\n * @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\n * @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\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n */\n async listNamespacedSecret(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/secrets'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling listNamespacedSecret.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (allowWatchBookmarks !== undefined) {\n localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, \"boolean\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, \"number\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (resourceVersionMatch !== undefined) {\n localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1SecretList\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * list or watch objects of kind Service\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @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.\n * @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.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @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.\n * @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\n * @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\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n */\n async listNamespacedService(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/services'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling listNamespacedService.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (allowWatchBookmarks !== undefined) {\n localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, \"boolean\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, \"number\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (resourceVersionMatch !== undefined) {\n localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1ServiceList\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * list or watch objects of kind ServiceAccount\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @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.\n * @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.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @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.\n * @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\n * @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\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n */\n async listNamespacedServiceAccount(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/serviceaccounts'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling listNamespacedServiceAccount.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (allowWatchBookmarks !== undefined) {\n localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, \"boolean\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, \"number\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (resourceVersionMatch !== undefined) {\n localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1ServiceAccountList\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * list or watch objects of kind Node\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @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.\n * @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.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @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.\n * @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\n * @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\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n */\n async listNode(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {\n const localVarPath = this.basePath + '/api/v1/nodes';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (allowWatchBookmarks !== undefined) {\n localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, \"boolean\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, \"number\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (resourceVersionMatch !== undefined) {\n localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1NodeList\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * list or watch objects of kind PersistentVolume\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @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.\n * @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.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @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.\n * @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\n * @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\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n */\n async listPersistentVolume(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {\n const localVarPath = this.basePath + '/api/v1/persistentvolumes';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (allowWatchBookmarks !== undefined) {\n localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, \"boolean\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, \"number\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (resourceVersionMatch !== undefined) {\n localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1PersistentVolumeList\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * list or watch objects of kind PersistentVolumeClaim\n * @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.\n * @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.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @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.\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @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\n * @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\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n */\n async listPersistentVolumeClaimForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {\n const localVarPath = this.basePath + '/api/v1/persistentvolumeclaims';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n if (allowWatchBookmarks !== undefined) {\n localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, \"boolean\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, \"number\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (resourceVersionMatch !== undefined) {\n localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1PersistentVolumeClaimList\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * list or watch objects of kind Pod\n * @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.\n * @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.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @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.\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @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\n * @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\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n */\n async listPodForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {\n const localVarPath = this.basePath + '/api/v1/pods';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n if (allowWatchBookmarks !== undefined) {\n localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, \"boolean\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, \"number\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (resourceVersionMatch !== undefined) {\n localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1PodList\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * list or watch objects of kind PodTemplate\n * @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.\n * @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.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @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.\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @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\n * @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\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n */\n async listPodTemplateForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {\n const localVarPath = this.basePath + '/api/v1/podtemplates';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n if (allowWatchBookmarks !== undefined) {\n localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, \"boolean\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, \"number\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (resourceVersionMatch !== undefined) {\n localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1PodTemplateList\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * list or watch objects of kind ReplicationController\n * @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.\n * @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.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @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.\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @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\n * @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\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n */\n async listReplicationControllerForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {\n const localVarPath = this.basePath + '/api/v1/replicationcontrollers';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n if (allowWatchBookmarks !== undefined) {\n localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, \"boolean\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, \"number\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (resourceVersionMatch !== undefined) {\n localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1ReplicationControllerList\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * list or watch objects of kind ResourceQuota\n * @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.\n * @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.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @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.\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @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\n * @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\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n */\n async listResourceQuotaForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {\n const localVarPath = this.basePath + '/api/v1/resourcequotas';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n if (allowWatchBookmarks !== undefined) {\n localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, \"boolean\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, \"number\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (resourceVersionMatch !== undefined) {\n localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1ResourceQuotaList\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * list or watch objects of kind Secret\n * @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.\n * @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.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @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.\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @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\n * @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\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n */\n async listSecretForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {\n const localVarPath = this.basePath + '/api/v1/secrets';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n if (allowWatchBookmarks !== undefined) {\n localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, \"boolean\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, \"number\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (resourceVersionMatch !== undefined) {\n localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1SecretList\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * list or watch objects of kind ServiceAccount\n * @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.\n * @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.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @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.\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @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\n * @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\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n */\n async listServiceAccountForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {\n const localVarPath = this.basePath + '/api/v1/serviceaccounts';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n if (allowWatchBookmarks !== undefined) {\n localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, \"boolean\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, \"number\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (resourceVersionMatch !== undefined) {\n localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1ServiceAccountList\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * list or watch objects of kind Service\n * @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.\n * @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.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @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.\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @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\n * @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\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n */\n async listServiceForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {\n const localVarPath = this.basePath + '/api/v1/services';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n if (allowWatchBookmarks !== undefined) {\n localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, \"boolean\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, \"number\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (resourceVersionMatch !== undefined) {\n localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1ServiceList\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * partially update the specified Namespace\n * @param name name of the Namespace\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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).\n * @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.\n */\n async patchNamespace(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling patchNamespace.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling patchNamespace.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n if (force !== undefined) {\n localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"object\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1Namespace\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * partially update status of the specified Namespace\n * @param name name of the Namespace\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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).\n * @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.\n */\n async patchNamespaceStatus(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{name}/status'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling patchNamespaceStatus.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling patchNamespaceStatus.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n if (force !== undefined) {\n localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"object\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1Namespace\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * partially update the specified ConfigMap\n * @param name name of the ConfigMap\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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).\n * @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.\n */\n async patchNamespacedConfigMap(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/configmaps/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling patchNamespacedConfigMap.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedConfigMap.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling patchNamespacedConfigMap.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n if (force !== undefined) {\n localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"object\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1ConfigMap\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * partially update the specified Endpoints\n * @param name name of the Endpoints\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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).\n * @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.\n */\n async patchNamespacedEndpoints(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/endpoints/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling patchNamespacedEndpoints.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedEndpoints.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling patchNamespacedEndpoints.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n if (force !== undefined) {\n localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"object\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1Endpoints\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * partially update the specified Event\n * @param name name of the Event\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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).\n * @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.\n */\n async patchNamespacedEvent(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/events/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling patchNamespacedEvent.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedEvent.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling patchNamespacedEvent.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n if (force !== undefined) {\n localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"object\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"CoreV1Event\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * partially update the specified LimitRange\n * @param name name of the LimitRange\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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).\n * @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.\n */\n async patchNamespacedLimitRange(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/limitranges/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling patchNamespacedLimitRange.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedLimitRange.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling patchNamespacedLimitRange.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n if (force !== undefined) {\n localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"object\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1LimitRange\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * partially update the specified PersistentVolumeClaim\n * @param name name of the PersistentVolumeClaim\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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).\n * @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.\n */\n async patchNamespacedPersistentVolumeClaim(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/persistentvolumeclaims/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling patchNamespacedPersistentVolumeClaim.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedPersistentVolumeClaim.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling patchNamespacedPersistentVolumeClaim.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n if (force !== undefined) {\n localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"object\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1PersistentVolumeClaim\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * partially update status of the specified PersistentVolumeClaim\n * @param name name of the PersistentVolumeClaim\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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).\n * @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.\n */\n async patchNamespacedPersistentVolumeClaimStatus(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/persistentvolumeclaims/{name}/status'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling patchNamespacedPersistentVolumeClaimStatus.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedPersistentVolumeClaimStatus.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling patchNamespacedPersistentVolumeClaimStatus.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n if (force !== undefined) {\n localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"object\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1PersistentVolumeClaim\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * partially update the specified Pod\n * @param name name of the Pod\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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).\n * @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.\n */\n async patchNamespacedPod(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/pods/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling patchNamespacedPod.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedPod.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling patchNamespacedPod.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n if (force !== undefined) {\n localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"object\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1Pod\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * partially update ephemeralcontainers of the specified Pod\n * @param name name of the Pod\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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).\n * @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.\n */\n async patchNamespacedPodEphemeralcontainers(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/pods/{name}/ephemeralcontainers'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling patchNamespacedPodEphemeralcontainers.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedPodEphemeralcontainers.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling patchNamespacedPodEphemeralcontainers.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n if (force !== undefined) {\n localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"object\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1Pod\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * partially update status of the specified Pod\n * @param name name of the Pod\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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).\n * @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.\n */\n async patchNamespacedPodStatus(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/pods/{name}/status'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling patchNamespacedPodStatus.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedPodStatus.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling patchNamespacedPodStatus.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n if (force !== undefined) {\n localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"object\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1Pod\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * partially update the specified PodTemplate\n * @param name name of the PodTemplate\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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).\n * @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.\n */\n async patchNamespacedPodTemplate(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/podtemplates/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling patchNamespacedPodTemplate.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedPodTemplate.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling patchNamespacedPodTemplate.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n if (force !== undefined) {\n localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"object\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1PodTemplate\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * partially update the specified ReplicationController\n * @param name name of the ReplicationController\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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).\n * @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.\n */\n async patchNamespacedReplicationController(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/replicationcontrollers/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling patchNamespacedReplicationController.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedReplicationController.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling patchNamespacedReplicationController.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n if (force !== undefined) {\n localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"object\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1ReplicationController\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * partially update scale of the specified ReplicationController\n * @param name name of the Scale\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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).\n * @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.\n */\n async patchNamespacedReplicationControllerScale(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/replicationcontrollers/{name}/scale'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling patchNamespacedReplicationControllerScale.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedReplicationControllerScale.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling patchNamespacedReplicationControllerScale.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n if (force !== undefined) {\n localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"object\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1Scale\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * partially update status of the specified ReplicationController\n * @param name name of the ReplicationController\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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).\n * @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.\n */\n async patchNamespacedReplicationControllerStatus(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/replicationcontrollers/{name}/status'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling patchNamespacedReplicationControllerStatus.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedReplicationControllerStatus.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling patchNamespacedReplicationControllerStatus.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n if (force !== undefined) {\n localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"object\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1ReplicationController\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * partially update the specified ResourceQuota\n * @param name name of the ResourceQuota\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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).\n * @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.\n */\n async patchNamespacedResourceQuota(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/resourcequotas/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling patchNamespacedResourceQuota.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedResourceQuota.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling patchNamespacedResourceQuota.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n if (force !== undefined) {\n localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"object\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1ResourceQuota\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * partially update status of the specified ResourceQuota\n * @param name name of the ResourceQuota\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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).\n * @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.\n */\n async patchNamespacedResourceQuotaStatus(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/resourcequotas/{name}/status'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling patchNamespacedResourceQuotaStatus.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedResourceQuotaStatus.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling patchNamespacedResourceQuotaStatus.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n if (force !== undefined) {\n localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"object\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1ResourceQuota\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * partially update the specified Secret\n * @param name name of the Secret\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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).\n * @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.\n */\n async patchNamespacedSecret(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/secrets/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling patchNamespacedSecret.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedSecret.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling patchNamespacedSecret.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n if (force !== undefined) {\n localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"object\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1Secret\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * partially update the specified Service\n * @param name name of the Service\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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).\n * @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.\n */\n async patchNamespacedService(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/services/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling patchNamespacedService.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedService.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling patchNamespacedService.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n if (force !== undefined) {\n localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"object\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1Service\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * partially update the specified ServiceAccount\n * @param name name of the ServiceAccount\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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).\n * @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.\n */\n async patchNamespacedServiceAccount(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/serviceaccounts/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling patchNamespacedServiceAccount.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedServiceAccount.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling patchNamespacedServiceAccount.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n if (force !== undefined) {\n localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"object\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1ServiceAccount\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * partially update status of the specified Service\n * @param name name of the Service\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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).\n * @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.\n */\n async patchNamespacedServiceStatus(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/services/{name}/status'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling patchNamespacedServiceStatus.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedServiceStatus.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling patchNamespacedServiceStatus.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n if (force !== undefined) {\n localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"object\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1Service\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * partially update the specified Node\n * @param name name of the Node\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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).\n * @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.\n */\n async patchNode(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {\n const localVarPath = this.basePath + '/api/v1/nodes/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling patchNode.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling patchNode.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n if (force !== undefined) {\n localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"object\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1Node\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * partially update status of the specified Node\n * @param name name of the Node\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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).\n * @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.\n */\n async patchNodeStatus(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {\n const localVarPath = this.basePath + '/api/v1/nodes/{name}/status'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling patchNodeStatus.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling patchNodeStatus.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n if (force !== undefined) {\n localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"object\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1Node\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * partially update the specified PersistentVolume\n * @param name name of the PersistentVolume\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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).\n * @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.\n */\n async patchPersistentVolume(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {\n const localVarPath = this.basePath + '/api/v1/persistentvolumes/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling patchPersistentVolume.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling patchPersistentVolume.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n if (force !== undefined) {\n localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"object\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1PersistentVolume\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * partially update status of the specified PersistentVolume\n * @param name name of the PersistentVolume\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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).\n * @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.\n */\n async patchPersistentVolumeStatus(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {\n const localVarPath = this.basePath + '/api/v1/persistentvolumes/{name}/status'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling patchPersistentVolumeStatus.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling patchPersistentVolumeStatus.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n if (force !== undefined) {\n localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"object\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1PersistentVolume\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * read the specified ComponentStatus\n * @param name name of the ComponentStatus\n * @param pretty If \\'true\\', then the output is pretty printed.\n */\n async readComponentStatus(name, pretty, options = { headers: {} }) {\n const localVarPath = this.basePath + '/api/v1/componentstatuses/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling readComponentStatus.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1ComponentStatus\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * read the specified Namespace\n * @param name name of the Namespace\n * @param pretty If \\'true\\', then the output is pretty printed.\n */\n async readNamespace(name, pretty, options = { headers: {} }) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling readNamespace.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1Namespace\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * read status of the specified Namespace\n * @param name name of the Namespace\n * @param pretty If \\'true\\', then the output is pretty printed.\n */\n async readNamespaceStatus(name, pretty, options = { headers: {} }) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{name}/status'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling readNamespaceStatus.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1Namespace\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * read the specified ConfigMap\n * @param name name of the ConfigMap\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If \\'true\\', then the output is pretty printed.\n */\n async readNamespacedConfigMap(name, namespace, pretty, options = { headers: {} }) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/configmaps/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling readNamespacedConfigMap.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling readNamespacedConfigMap.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1ConfigMap\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * read the specified Endpoints\n * @param name name of the Endpoints\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If \\'true\\', then the output is pretty printed.\n */\n async readNamespacedEndpoints(name, namespace, pretty, options = { headers: {} }) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/endpoints/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling readNamespacedEndpoints.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling readNamespacedEndpoints.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1Endpoints\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * read the specified Event\n * @param name name of the Event\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If \\'true\\', then the output is pretty printed.\n */\n async readNamespacedEvent(name, namespace, pretty, options = { headers: {} }) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/events/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling readNamespacedEvent.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling readNamespacedEvent.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"CoreV1Event\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * read the specified LimitRange\n * @param name name of the LimitRange\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If \\'true\\', then the output is pretty printed.\n */\n async readNamespacedLimitRange(name, namespace, pretty, options = { headers: {} }) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/limitranges/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling readNamespacedLimitRange.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling readNamespacedLimitRange.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1LimitRange\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * read the specified PersistentVolumeClaim\n * @param name name of the PersistentVolumeClaim\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If \\'true\\', then the output is pretty printed.\n */\n async readNamespacedPersistentVolumeClaim(name, namespace, pretty, options = { headers: {} }) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/persistentvolumeclaims/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling readNamespacedPersistentVolumeClaim.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling readNamespacedPersistentVolumeClaim.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1PersistentVolumeClaim\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * read status of the specified PersistentVolumeClaim\n * @param name name of the PersistentVolumeClaim\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If \\'true\\', then the output is pretty printed.\n */\n async readNamespacedPersistentVolumeClaimStatus(name, namespace, pretty, options = { headers: {} }) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/persistentvolumeclaims/{name}/status'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling readNamespacedPersistentVolumeClaimStatus.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling readNamespacedPersistentVolumeClaimStatus.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1PersistentVolumeClaim\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * read the specified Pod\n * @param name name of the Pod\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If \\'true\\', then the output is pretty printed.\n */\n async readNamespacedPod(name, namespace, pretty, options = { headers: {} }) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/pods/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling readNamespacedPod.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling readNamespacedPod.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1Pod\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * read ephemeralcontainers of the specified Pod\n * @param name name of the Pod\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If \\'true\\', then the output is pretty printed.\n */\n async readNamespacedPodEphemeralcontainers(name, namespace, pretty, options = { headers: {} }) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/pods/{name}/ephemeralcontainers'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling readNamespacedPodEphemeralcontainers.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling readNamespacedPodEphemeralcontainers.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1Pod\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * read log of the specified Pod\n * @param name name of the Pod\n * @param namespace object name and auth scope, such as for teams and projects\n * @param container The container for which to stream logs. Defaults to only container if there is one container in the pod.\n * @param follow Follow the log stream of the pod. Defaults to false.\n * @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).\n * @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.\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param previous Return previous terminated container logs. Defaults to false.\n * @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.\n * @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\n * @param timestamps If true, add an RFC3339 or RFC3339Nano timestamp at the beginning of every line of log output. Defaults to false.\n */\n async readNamespacedPodLog(name, namespace, container, follow, insecureSkipTLSVerifyBackend, limitBytes, pretty, previous, sinceSeconds, tailLines, timestamps, options = { headers: {} }) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/pods/{name}/log'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['text/plain', 'application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling readNamespacedPodLog.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling readNamespacedPodLog.');\n }\n if (container !== undefined) {\n localVarQueryParameters['container'] = models_1.ObjectSerializer.serialize(container, \"string\");\n }\n if (follow !== undefined) {\n localVarQueryParameters['follow'] = models_1.ObjectSerializer.serialize(follow, \"boolean\");\n }\n if (insecureSkipTLSVerifyBackend !== undefined) {\n localVarQueryParameters['insecureSkipTLSVerifyBackend'] = models_1.ObjectSerializer.serialize(insecureSkipTLSVerifyBackend, \"boolean\");\n }\n if (limitBytes !== undefined) {\n localVarQueryParameters['limitBytes'] = models_1.ObjectSerializer.serialize(limitBytes, \"number\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (previous !== undefined) {\n localVarQueryParameters['previous'] = models_1.ObjectSerializer.serialize(previous, \"boolean\");\n }\n if (sinceSeconds !== undefined) {\n localVarQueryParameters['sinceSeconds'] = models_1.ObjectSerializer.serialize(sinceSeconds, \"number\");\n }\n if (tailLines !== undefined) {\n localVarQueryParameters['tailLines'] = models_1.ObjectSerializer.serialize(tailLines, \"number\");\n }\n if (timestamps !== undefined) {\n localVarQueryParameters['timestamps'] = models_1.ObjectSerializer.serialize(timestamps, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"string\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * read status of the specified Pod\n * @param name name of the Pod\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If \\'true\\', then the output is pretty printed.\n */\n async readNamespacedPodStatus(name, namespace, pretty, options = { headers: {} }) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/pods/{name}/status'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling readNamespacedPodStatus.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling readNamespacedPodStatus.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1Pod\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * read the specified PodTemplate\n * @param name name of the PodTemplate\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If \\'true\\', then the output is pretty printed.\n */\n async readNamespacedPodTemplate(name, namespace, pretty, options = { headers: {} }) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/podtemplates/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling readNamespacedPodTemplate.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling readNamespacedPodTemplate.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1PodTemplate\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * read the specified ReplicationController\n * @param name name of the ReplicationController\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If \\'true\\', then the output is pretty printed.\n */\n async readNamespacedReplicationController(name, namespace, pretty, options = { headers: {} }) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/replicationcontrollers/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling readNamespacedReplicationController.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling readNamespacedReplicationController.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1ReplicationController\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * read scale of the specified ReplicationController\n * @param name name of the Scale\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If \\'true\\', then the output is pretty printed.\n */\n async readNamespacedReplicationControllerScale(name, namespace, pretty, options = { headers: {} }) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/replicationcontrollers/{name}/scale'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling readNamespacedReplicationControllerScale.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling readNamespacedReplicationControllerScale.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1Scale\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * read status of the specified ReplicationController\n * @param name name of the ReplicationController\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If \\'true\\', then the output is pretty printed.\n */\n async readNamespacedReplicationControllerStatus(name, namespace, pretty, options = { headers: {} }) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/replicationcontrollers/{name}/status'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling readNamespacedReplicationControllerStatus.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling readNamespacedReplicationControllerStatus.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1ReplicationController\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * read the specified ResourceQuota\n * @param name name of the ResourceQuota\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If \\'true\\', then the output is pretty printed.\n */\n async readNamespacedResourceQuota(name, namespace, pretty, options = { headers: {} }) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/resourcequotas/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling readNamespacedResourceQuota.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling readNamespacedResourceQuota.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1ResourceQuota\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * read status of the specified ResourceQuota\n * @param name name of the ResourceQuota\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If \\'true\\', then the output is pretty printed.\n */\n async readNamespacedResourceQuotaStatus(name, namespace, pretty, options = { headers: {} }) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/resourcequotas/{name}/status'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling readNamespacedResourceQuotaStatus.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling readNamespacedResourceQuotaStatus.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1ResourceQuota\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * read the specified Secret\n * @param name name of the Secret\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If \\'true\\', then the output is pretty printed.\n */\n async readNamespacedSecret(name, namespace, pretty, options = { headers: {} }) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/secrets/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling readNamespacedSecret.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling readNamespacedSecret.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1Secret\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * read the specified Service\n * @param name name of the Service\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If \\'true\\', then the output is pretty printed.\n */\n async readNamespacedService(name, namespace, pretty, options = { headers: {} }) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/services/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling readNamespacedService.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling readNamespacedService.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1Service\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * read the specified ServiceAccount\n * @param name name of the ServiceAccount\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If \\'true\\', then the output is pretty printed.\n */\n async readNamespacedServiceAccount(name, namespace, pretty, options = { headers: {} }) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/serviceaccounts/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling readNamespacedServiceAccount.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling readNamespacedServiceAccount.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1ServiceAccount\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * read status of the specified Service\n * @param name name of the Service\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If \\'true\\', then the output is pretty printed.\n */\n async readNamespacedServiceStatus(name, namespace, pretty, options = { headers: {} }) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/services/{name}/status'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling readNamespacedServiceStatus.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling readNamespacedServiceStatus.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1Service\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * read the specified Node\n * @param name name of the Node\n * @param pretty If \\'true\\', then the output is pretty printed.\n */\n async readNode(name, pretty, options = { headers: {} }) {\n const localVarPath = this.basePath + '/api/v1/nodes/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling readNode.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1Node\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * read status of the specified Node\n * @param name name of the Node\n * @param pretty If \\'true\\', then the output is pretty printed.\n */\n async readNodeStatus(name, pretty, options = { headers: {} }) {\n const localVarPath = this.basePath + '/api/v1/nodes/{name}/status'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling readNodeStatus.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1Node\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * read the specified PersistentVolume\n * @param name name of the PersistentVolume\n * @param pretty If \\'true\\', then the output is pretty printed.\n */\n async readPersistentVolume(name, pretty, options = { headers: {} }) {\n const localVarPath = this.basePath + '/api/v1/persistentvolumes/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling readPersistentVolume.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1PersistentVolume\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * read status of the specified PersistentVolume\n * @param name name of the PersistentVolume\n * @param pretty If \\'true\\', then the output is pretty printed.\n */\n async readPersistentVolumeStatus(name, pretty, options = { headers: {} }) {\n const localVarPath = this.basePath + '/api/v1/persistentvolumes/{name}/status'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling readPersistentVolumeStatus.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1PersistentVolume\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * replace the specified Namespace\n * @param name name of the Namespace\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n */\n async replaceNamespace(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling replaceNamespace.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling replaceNamespace.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1Namespace\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1Namespace\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * replace finalize of the specified Namespace\n * @param name name of the Namespace\n * @param body\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n * @param pretty If \\'true\\', then the output is pretty printed.\n */\n async replaceNamespaceFinalize(name, body, dryRun, fieldManager, pretty, options = { headers: {} }) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{name}/finalize'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling replaceNamespaceFinalize.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling replaceNamespaceFinalize.');\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1Namespace\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1Namespace\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * replace status of the specified Namespace\n * @param name name of the Namespace\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n */\n async replaceNamespaceStatus(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{name}/status'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling replaceNamespaceStatus.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling replaceNamespaceStatus.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1Namespace\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1Namespace\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * replace the specified ConfigMap\n * @param name name of the ConfigMap\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n */\n async replaceNamespacedConfigMap(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/configmaps/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling replaceNamespacedConfigMap.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedConfigMap.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling replaceNamespacedConfigMap.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1ConfigMap\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1ConfigMap\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * replace the specified Endpoints\n * @param name name of the Endpoints\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n */\n async replaceNamespacedEndpoints(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/endpoints/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling replaceNamespacedEndpoints.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedEndpoints.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling replaceNamespacedEndpoints.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1Endpoints\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1Endpoints\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * replace the specified Event\n * @param name name of the Event\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n */\n async replaceNamespacedEvent(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/events/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling replaceNamespacedEvent.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedEvent.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling replaceNamespacedEvent.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"CoreV1Event\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"CoreV1Event\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * replace the specified LimitRange\n * @param name name of the LimitRange\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n */\n async replaceNamespacedLimitRange(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/limitranges/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling replaceNamespacedLimitRange.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedLimitRange.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling replaceNamespacedLimitRange.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1LimitRange\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1LimitRange\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * replace the specified PersistentVolumeClaim\n * @param name name of the PersistentVolumeClaim\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n */\n async replaceNamespacedPersistentVolumeClaim(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/persistentvolumeclaims/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling replaceNamespacedPersistentVolumeClaim.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedPersistentVolumeClaim.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling replaceNamespacedPersistentVolumeClaim.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1PersistentVolumeClaim\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1PersistentVolumeClaim\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * replace status of the specified PersistentVolumeClaim\n * @param name name of the PersistentVolumeClaim\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n */\n async replaceNamespacedPersistentVolumeClaimStatus(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/persistentvolumeclaims/{name}/status'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling replaceNamespacedPersistentVolumeClaimStatus.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedPersistentVolumeClaimStatus.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling replaceNamespacedPersistentVolumeClaimStatus.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1PersistentVolumeClaim\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1PersistentVolumeClaim\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * replace the specified Pod\n * @param name name of the Pod\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n */\n async replaceNamespacedPod(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/pods/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling replaceNamespacedPod.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedPod.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling replaceNamespacedPod.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1Pod\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1Pod\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * replace ephemeralcontainers of the specified Pod\n * @param name name of the Pod\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n */\n async replaceNamespacedPodEphemeralcontainers(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/pods/{name}/ephemeralcontainers'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling replaceNamespacedPodEphemeralcontainers.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedPodEphemeralcontainers.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling replaceNamespacedPodEphemeralcontainers.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1Pod\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1Pod\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * replace status of the specified Pod\n * @param name name of the Pod\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n */\n async replaceNamespacedPodStatus(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/pods/{name}/status'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling replaceNamespacedPodStatus.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedPodStatus.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling replaceNamespacedPodStatus.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1Pod\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1Pod\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * replace the specified PodTemplate\n * @param name name of the PodTemplate\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n */\n async replaceNamespacedPodTemplate(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/podtemplates/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling replaceNamespacedPodTemplate.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedPodTemplate.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling replaceNamespacedPodTemplate.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1PodTemplate\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1PodTemplate\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * replace the specified ReplicationController\n * @param name name of the ReplicationController\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n */\n async replaceNamespacedReplicationController(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/replicationcontrollers/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling replaceNamespacedReplicationController.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedReplicationController.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling replaceNamespacedReplicationController.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1ReplicationController\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1ReplicationController\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * replace scale of the specified ReplicationController\n * @param name name of the Scale\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n */\n async replaceNamespacedReplicationControllerScale(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/replicationcontrollers/{name}/scale'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling replaceNamespacedReplicationControllerScale.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedReplicationControllerScale.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling replaceNamespacedReplicationControllerScale.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1Scale\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1Scale\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * replace status of the specified ReplicationController\n * @param name name of the ReplicationController\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n */\n async replaceNamespacedReplicationControllerStatus(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/replicationcontrollers/{name}/status'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling replaceNamespacedReplicationControllerStatus.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedReplicationControllerStatus.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling replaceNamespacedReplicationControllerStatus.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1ReplicationController\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1ReplicationController\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * replace the specified ResourceQuota\n * @param name name of the ResourceQuota\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n */\n async replaceNamespacedResourceQuota(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/resourcequotas/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling replaceNamespacedResourceQuota.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedResourceQuota.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling replaceNamespacedResourceQuota.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1ResourceQuota\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1ResourceQuota\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * replace status of the specified ResourceQuota\n * @param name name of the ResourceQuota\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n */\n async replaceNamespacedResourceQuotaStatus(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/resourcequotas/{name}/status'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling replaceNamespacedResourceQuotaStatus.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedResourceQuotaStatus.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling replaceNamespacedResourceQuotaStatus.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1ResourceQuota\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1ResourceQuota\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * replace the specified Secret\n * @param name name of the Secret\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n */\n async replaceNamespacedSecret(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/secrets/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling replaceNamespacedSecret.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedSecret.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling replaceNamespacedSecret.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1Secret\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1Secret\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * replace the specified Service\n * @param name name of the Service\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n */\n async replaceNamespacedService(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/services/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling replaceNamespacedService.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedService.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling replaceNamespacedService.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1Service\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1Service\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * replace the specified ServiceAccount\n * @param name name of the ServiceAccount\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n */\n async replaceNamespacedServiceAccount(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/serviceaccounts/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling replaceNamespacedServiceAccount.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedServiceAccount.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling replaceNamespacedServiceAccount.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1ServiceAccount\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1ServiceAccount\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * replace status of the specified Service\n * @param name name of the Service\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n */\n async replaceNamespacedServiceStatus(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {\n const localVarPath = this.basePath + '/api/v1/namespaces/{namespace}/services/{name}/status'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling replaceNamespacedServiceStatus.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedServiceStatus.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling replaceNamespacedServiceStatus.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1Service\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1Service\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * replace the specified Node\n * @param name name of the Node\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n */\n async replaceNode(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) {\n const localVarPath = this.basePath + '/api/v1/nodes/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling replaceNode.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling replaceNode.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1Node\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1Node\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * replace status of the specified Node\n * @param name name of the Node\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n */\n async replaceNodeStatus(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) {\n const localVarPath = this.basePath + '/api/v1/nodes/{name}/status'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling replaceNodeStatus.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling replaceNodeStatus.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1Node\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1Node\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * replace the specified PersistentVolume\n * @param name name of the PersistentVolume\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n */\n async replacePersistentVolume(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) {\n const localVarPath = this.basePath + '/api/v1/persistentvolumes/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling replacePersistentVolume.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling replacePersistentVolume.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1PersistentVolume\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1PersistentVolume\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * replace status of the specified PersistentVolume\n * @param name name of the PersistentVolume\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n */\n async replacePersistentVolumeStatus(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) {\n const localVarPath = this.basePath + '/api/v1/persistentvolumes/{name}/status'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling replacePersistentVolumeStatus.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling replacePersistentVolumeStatus.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1PersistentVolume\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1PersistentVolume\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n}\nexports.CoreV1Api = CoreV1Api;\n//# sourceMappingURL=coreV1Api.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.CustomObjectsApi = exports.CustomObjectsApiApiKeys = void 0;\nconst tslib_1 = require(\"tslib\");\nconst request_1 = tslib_1.__importDefault(require(\"request\"));\nconst models_1 = require(\"../model/models\");\nconst models_2 = require(\"../model/models\");\nconst apis_1 = require(\"./apis\");\nlet defaultBasePath = 'http://localhost';\n// ===============================================\n// This file is autogenerated - Please do not edit\n// ===============================================\nvar CustomObjectsApiApiKeys;\n(function (CustomObjectsApiApiKeys) {\n CustomObjectsApiApiKeys[CustomObjectsApiApiKeys[\"BearerToken\"] = 0] = \"BearerToken\";\n})(CustomObjectsApiApiKeys = exports.CustomObjectsApiApiKeys || (exports.CustomObjectsApiApiKeys = {}));\nclass CustomObjectsApi {\n constructor(basePathOrUsername, password, basePath) {\n this._basePath = defaultBasePath;\n this._defaultHeaders = {};\n this._useQuerystring = false;\n this.authentications = {\n 'default': new models_1.VoidAuth(),\n 'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'),\n };\n this.interceptors = [];\n if (password) {\n if (basePath) {\n this.basePath = basePath;\n }\n }\n else {\n if (basePathOrUsername) {\n this.basePath = basePathOrUsername;\n }\n }\n }\n set useQuerystring(value) {\n this._useQuerystring = value;\n }\n set basePath(basePath) {\n this._basePath = basePath;\n }\n set defaultHeaders(defaultHeaders) {\n this._defaultHeaders = defaultHeaders;\n }\n get defaultHeaders() {\n return this._defaultHeaders;\n }\n get basePath() {\n return this._basePath;\n }\n setDefaultAuthentication(auth) {\n this.authentications.default = auth;\n }\n setApiKey(key, value) {\n this.authentications[CustomObjectsApiApiKeys[key]].apiKey = value;\n }\n addInterceptor(interceptor) {\n this.interceptors.push(interceptor);\n }\n /**\n * Creates a cluster scoped Custom object\n * @param group The custom resource\\'s group name\n * @param version The custom resource\\'s version\n * @param plural The custom resource\\'s plural name. For TPRs this would be lowercase plural kind.\n * @param body The JSON schema of the Resource to create.\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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).\n */\n async createClusterCustomObject(group, version, plural, body, pretty, dryRun, fieldManager, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/{group}/{version}/{plural}'\n .replace('{' + 'group' + '}', encodeURIComponent(String(group)))\n .replace('{' + 'version' + '}', encodeURIComponent(String(version)))\n .replace('{' + 'plural' + '}', encodeURIComponent(String(plural)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'group' is not null or undefined\n if (group === null || group === undefined) {\n throw new Error('Required parameter group was null or undefined when calling createClusterCustomObject.');\n }\n // verify required parameter 'version' is not null or undefined\n if (version === null || version === undefined) {\n throw new Error('Required parameter version was null or undefined when calling createClusterCustomObject.');\n }\n // verify required parameter 'plural' is not null or undefined\n if (plural === null || plural === undefined) {\n throw new Error('Required parameter plural was null or undefined when calling createClusterCustomObject.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling createClusterCustomObject.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'POST',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"object\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"object\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * Creates a namespace scoped Custom object\n * @param group The custom resource\\'s group name\n * @param version The custom resource\\'s version\n * @param namespace The custom resource\\'s namespace\n * @param plural The custom resource\\'s plural name. For TPRs this would be lowercase plural kind.\n * @param body The JSON schema of the Resource to create.\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n */\n async createNamespacedCustomObject(group, version, namespace, plural, body, pretty, dryRun, fieldManager, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/{group}/{version}/namespaces/{namespace}/{plural}'\n .replace('{' + 'group' + '}', encodeURIComponent(String(group)))\n .replace('{' + 'version' + '}', encodeURIComponent(String(version)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)))\n .replace('{' + 'plural' + '}', encodeURIComponent(String(plural)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'group' is not null or undefined\n if (group === null || group === undefined) {\n throw new Error('Required parameter group was null or undefined when calling createNamespacedCustomObject.');\n }\n // verify required parameter 'version' is not null or undefined\n if (version === null || version === undefined) {\n throw new Error('Required parameter version was null or undefined when calling createNamespacedCustomObject.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling createNamespacedCustomObject.');\n }\n // verify required parameter 'plural' is not null or undefined\n if (plural === null || plural === undefined) {\n throw new Error('Required parameter plural was null or undefined when calling createNamespacedCustomObject.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling createNamespacedCustomObject.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'POST',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"object\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"object\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * Deletes the specified cluster scoped custom object\n * @param group the custom resource\\'s group\n * @param version the custom resource\\'s version\n * @param plural the custom object\\'s plural name. For TPRs this would be lowercase plural kind.\n * @param name the custom object\\'s name\n * @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.\n * @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.\n * @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.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param body\n */\n async deleteClusterCustomObject(group, version, plural, name, gracePeriodSeconds, orphanDependents, propagationPolicy, dryRun, body, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/{group}/{version}/{plural}/{name}'\n .replace('{' + 'group' + '}', encodeURIComponent(String(group)))\n .replace('{' + 'version' + '}', encodeURIComponent(String(version)))\n .replace('{' + 'plural' + '}', encodeURIComponent(String(plural)))\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'group' is not null or undefined\n if (group === null || group === undefined) {\n throw new Error('Required parameter group was null or undefined when calling deleteClusterCustomObject.');\n }\n // verify required parameter 'version' is not null or undefined\n if (version === null || version === undefined) {\n throw new Error('Required parameter version was null or undefined when calling deleteClusterCustomObject.');\n }\n // verify required parameter 'plural' is not null or undefined\n if (plural === null || plural === undefined) {\n throw new Error('Required parameter plural was null or undefined when calling deleteClusterCustomObject.');\n }\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling deleteClusterCustomObject.');\n }\n if (gracePeriodSeconds !== undefined) {\n localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, \"number\");\n }\n if (orphanDependents !== undefined) {\n localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, \"boolean\");\n }\n if (propagationPolicy !== undefined) {\n localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1DeleteOptions\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"object\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * Delete collection of cluster scoped custom objects\n * @param group The custom resource\\'s group name\n * @param version The custom resource\\'s version\n * @param plural The custom resource\\'s plural name. For TPRs this would be lowercase plural kind.\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @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.\n * @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.\n * @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.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param body\n */\n async deleteCollectionClusterCustomObject(group, version, plural, pretty, gracePeriodSeconds, orphanDependents, propagationPolicy, dryRun, body, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/{group}/{version}/{plural}'\n .replace('{' + 'group' + '}', encodeURIComponent(String(group)))\n .replace('{' + 'version' + '}', encodeURIComponent(String(version)))\n .replace('{' + 'plural' + '}', encodeURIComponent(String(plural)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'group' is not null or undefined\n if (group === null || group === undefined) {\n throw new Error('Required parameter group was null or undefined when calling deleteCollectionClusterCustomObject.');\n }\n // verify required parameter 'version' is not null or undefined\n if (version === null || version === undefined) {\n throw new Error('Required parameter version was null or undefined when calling deleteCollectionClusterCustomObject.');\n }\n // verify required parameter 'plural' is not null or undefined\n if (plural === null || plural === undefined) {\n throw new Error('Required parameter plural was null or undefined when calling deleteCollectionClusterCustomObject.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (gracePeriodSeconds !== undefined) {\n localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, \"number\");\n }\n if (orphanDependents !== undefined) {\n localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, \"boolean\");\n }\n if (propagationPolicy !== undefined) {\n localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1DeleteOptions\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"object\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * Delete collection of namespace scoped custom objects\n * @param group The custom resource\\'s group name\n * @param version The custom resource\\'s version\n * @param namespace The custom resource\\'s namespace\n * @param plural The custom resource\\'s plural name. For TPRs this would be lowercase plural kind.\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @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.\n * @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.\n * @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.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param body\n */\n async deleteCollectionNamespacedCustomObject(group, version, namespace, plural, pretty, gracePeriodSeconds, orphanDependents, propagationPolicy, dryRun, body, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/{group}/{version}/namespaces/{namespace}/{plural}'\n .replace('{' + 'group' + '}', encodeURIComponent(String(group)))\n .replace('{' + 'version' + '}', encodeURIComponent(String(version)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)))\n .replace('{' + 'plural' + '}', encodeURIComponent(String(plural)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'group' is not null or undefined\n if (group === null || group === undefined) {\n throw new Error('Required parameter group was null or undefined when calling deleteCollectionNamespacedCustomObject.');\n }\n // verify required parameter 'version' is not null or undefined\n if (version === null || version === undefined) {\n throw new Error('Required parameter version was null or undefined when calling deleteCollectionNamespacedCustomObject.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedCustomObject.');\n }\n // verify required parameter 'plural' is not null or undefined\n if (plural === null || plural === undefined) {\n throw new Error('Required parameter plural was null or undefined when calling deleteCollectionNamespacedCustomObject.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (gracePeriodSeconds !== undefined) {\n localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, \"number\");\n }\n if (orphanDependents !== undefined) {\n localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, \"boolean\");\n }\n if (propagationPolicy !== undefined) {\n localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1DeleteOptions\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"object\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * Deletes the specified namespace scoped custom object\n * @param group the custom resource\\'s group\n * @param version the custom resource\\'s version\n * @param namespace The custom resource\\'s namespace\n * @param plural the custom resource\\'s plural name. For TPRs this would be lowercase plural kind.\n * @param name the custom object\\'s name\n * @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.\n * @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.\n * @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.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param body\n */\n async deleteNamespacedCustomObject(group, version, namespace, plural, name, gracePeriodSeconds, orphanDependents, propagationPolicy, dryRun, body, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/{group}/{version}/namespaces/{namespace}/{plural}/{name}'\n .replace('{' + 'group' + '}', encodeURIComponent(String(group)))\n .replace('{' + 'version' + '}', encodeURIComponent(String(version)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)))\n .replace('{' + 'plural' + '}', encodeURIComponent(String(plural)))\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'group' is not null or undefined\n if (group === null || group === undefined) {\n throw new Error('Required parameter group was null or undefined when calling deleteNamespacedCustomObject.');\n }\n // verify required parameter 'version' is not null or undefined\n if (version === null || version === undefined) {\n throw new Error('Required parameter version was null or undefined when calling deleteNamespacedCustomObject.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedCustomObject.');\n }\n // verify required parameter 'plural' is not null or undefined\n if (plural === null || plural === undefined) {\n throw new Error('Required parameter plural was null or undefined when calling deleteNamespacedCustomObject.');\n }\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling deleteNamespacedCustomObject.');\n }\n if (gracePeriodSeconds !== undefined) {\n localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, \"number\");\n }\n if (orphanDependents !== undefined) {\n localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, \"boolean\");\n }\n if (propagationPolicy !== undefined) {\n localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1DeleteOptions\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"object\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * Returns a cluster scoped custom object\n * @param group the custom resource\\'s group\n * @param version the custom resource\\'s version\n * @param plural the custom object\\'s plural name. For TPRs this would be lowercase plural kind.\n * @param name the custom object\\'s name\n */\n async getClusterCustomObject(group, version, plural, name, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/{group}/{version}/{plural}/{name}'\n .replace('{' + 'group' + '}', encodeURIComponent(String(group)))\n .replace('{' + 'version' + '}', encodeURIComponent(String(version)))\n .replace('{' + 'plural' + '}', encodeURIComponent(String(plural)))\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'group' is not null or undefined\n if (group === null || group === undefined) {\n throw new Error('Required parameter group was null or undefined when calling getClusterCustomObject.');\n }\n // verify required parameter 'version' is not null or undefined\n if (version === null || version === undefined) {\n throw new Error('Required parameter version was null or undefined when calling getClusterCustomObject.');\n }\n // verify required parameter 'plural' is not null or undefined\n if (plural === null || plural === undefined) {\n throw new Error('Required parameter plural was null or undefined when calling getClusterCustomObject.');\n }\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling getClusterCustomObject.');\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"object\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * read scale of the specified custom object\n * @param group the custom resource\\'s group\n * @param version the custom resource\\'s version\n * @param plural the custom resource\\'s plural name. For TPRs this would be lowercase plural kind.\n * @param name the custom object\\'s name\n */\n async getClusterCustomObjectScale(group, version, plural, name, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/{group}/{version}/{plural}/{name}/scale'\n .replace('{' + 'group' + '}', encodeURIComponent(String(group)))\n .replace('{' + 'version' + '}', encodeURIComponent(String(version)))\n .replace('{' + 'plural' + '}', encodeURIComponent(String(plural)))\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'group' is not null or undefined\n if (group === null || group === undefined) {\n throw new Error('Required parameter group was null or undefined when calling getClusterCustomObjectScale.');\n }\n // verify required parameter 'version' is not null or undefined\n if (version === null || version === undefined) {\n throw new Error('Required parameter version was null or undefined when calling getClusterCustomObjectScale.');\n }\n // verify required parameter 'plural' is not null or undefined\n if (plural === null || plural === undefined) {\n throw new Error('Required parameter plural was null or undefined when calling getClusterCustomObjectScale.');\n }\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling getClusterCustomObjectScale.');\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"object\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * read status of the specified cluster scoped custom object\n * @param group the custom resource\\'s group\n * @param version the custom resource\\'s version\n * @param plural the custom resource\\'s plural name. For TPRs this would be lowercase plural kind.\n * @param name the custom object\\'s name\n */\n async getClusterCustomObjectStatus(group, version, plural, name, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/{group}/{version}/{plural}/{name}/status'\n .replace('{' + 'group' + '}', encodeURIComponent(String(group)))\n .replace('{' + 'version' + '}', encodeURIComponent(String(version)))\n .replace('{' + 'plural' + '}', encodeURIComponent(String(plural)))\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'group' is not null or undefined\n if (group === null || group === undefined) {\n throw new Error('Required parameter group was null or undefined when calling getClusterCustomObjectStatus.');\n }\n // verify required parameter 'version' is not null or undefined\n if (version === null || version === undefined) {\n throw new Error('Required parameter version was null or undefined when calling getClusterCustomObjectStatus.');\n }\n // verify required parameter 'plural' is not null or undefined\n if (plural === null || plural === undefined) {\n throw new Error('Required parameter plural was null or undefined when calling getClusterCustomObjectStatus.');\n }\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling getClusterCustomObjectStatus.');\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"object\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * Returns a namespace scoped custom object\n * @param group the custom resource\\'s group\n * @param version the custom resource\\'s version\n * @param namespace The custom resource\\'s namespace\n * @param plural the custom resource\\'s plural name. For TPRs this would be lowercase plural kind.\n * @param name the custom object\\'s name\n */\n async getNamespacedCustomObject(group, version, namespace, plural, name, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/{group}/{version}/namespaces/{namespace}/{plural}/{name}'\n .replace('{' + 'group' + '}', encodeURIComponent(String(group)))\n .replace('{' + 'version' + '}', encodeURIComponent(String(version)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)))\n .replace('{' + 'plural' + '}', encodeURIComponent(String(plural)))\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'group' is not null or undefined\n if (group === null || group === undefined) {\n throw new Error('Required parameter group was null or undefined when calling getNamespacedCustomObject.');\n }\n // verify required parameter 'version' is not null or undefined\n if (version === null || version === undefined) {\n throw new Error('Required parameter version was null or undefined when calling getNamespacedCustomObject.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling getNamespacedCustomObject.');\n }\n // verify required parameter 'plural' is not null or undefined\n if (plural === null || plural === undefined) {\n throw new Error('Required parameter plural was null or undefined when calling getNamespacedCustomObject.');\n }\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling getNamespacedCustomObject.');\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"object\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * read scale of the specified namespace scoped custom object\n * @param group the custom resource\\'s group\n * @param version the custom resource\\'s version\n * @param namespace The custom resource\\'s namespace\n * @param plural the custom resource\\'s plural name. For TPRs this would be lowercase plural kind.\n * @param name the custom object\\'s name\n */\n async getNamespacedCustomObjectScale(group, version, namespace, plural, name, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/{group}/{version}/namespaces/{namespace}/{plural}/{name}/scale'\n .replace('{' + 'group' + '}', encodeURIComponent(String(group)))\n .replace('{' + 'version' + '}', encodeURIComponent(String(version)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)))\n .replace('{' + 'plural' + '}', encodeURIComponent(String(plural)))\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'group' is not null or undefined\n if (group === null || group === undefined) {\n throw new Error('Required parameter group was null or undefined when calling getNamespacedCustomObjectScale.');\n }\n // verify required parameter 'version' is not null or undefined\n if (version === null || version === undefined) {\n throw new Error('Required parameter version was null or undefined when calling getNamespacedCustomObjectScale.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling getNamespacedCustomObjectScale.');\n }\n // verify required parameter 'plural' is not null or undefined\n if (plural === null || plural === undefined) {\n throw new Error('Required parameter plural was null or undefined when calling getNamespacedCustomObjectScale.');\n }\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling getNamespacedCustomObjectScale.');\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"object\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * read status of the specified namespace scoped custom object\n * @param group the custom resource\\'s group\n * @param version the custom resource\\'s version\n * @param namespace The custom resource\\'s namespace\n * @param plural the custom resource\\'s plural name. For TPRs this would be lowercase plural kind.\n * @param name the custom object\\'s name\n */\n async getNamespacedCustomObjectStatus(group, version, namespace, plural, name, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/{group}/{version}/namespaces/{namespace}/{plural}/{name}/status'\n .replace('{' + 'group' + '}', encodeURIComponent(String(group)))\n .replace('{' + 'version' + '}', encodeURIComponent(String(version)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)))\n .replace('{' + 'plural' + '}', encodeURIComponent(String(plural)))\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'group' is not null or undefined\n if (group === null || group === undefined) {\n throw new Error('Required parameter group was null or undefined when calling getNamespacedCustomObjectStatus.');\n }\n // verify required parameter 'version' is not null or undefined\n if (version === null || version === undefined) {\n throw new Error('Required parameter version was null or undefined when calling getNamespacedCustomObjectStatus.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling getNamespacedCustomObjectStatus.');\n }\n // verify required parameter 'plural' is not null or undefined\n if (plural === null || plural === undefined) {\n throw new Error('Required parameter plural was null or undefined when calling getNamespacedCustomObjectStatus.');\n }\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling getNamespacedCustomObjectStatus.');\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"object\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * list or watch cluster scoped custom objects\n * @param group The custom resource\\'s group name\n * @param version The custom resource\\'s version\n * @param plural The custom resource\\'s plural name. For TPRs this would be lowercase plural kind.\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @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.\n * @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.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @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.\n * @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.\n * @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\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications.\n */\n async listClusterCustomObject(group, version, plural, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/{group}/{version}/{plural}'\n .replace('{' + 'group' + '}', encodeURIComponent(String(group)))\n .replace('{' + 'version' + '}', encodeURIComponent(String(version)))\n .replace('{' + 'plural' + '}', encodeURIComponent(String(plural)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/json;stream=watch'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'group' is not null or undefined\n if (group === null || group === undefined) {\n throw new Error('Required parameter group was null or undefined when calling listClusterCustomObject.');\n }\n // verify required parameter 'version' is not null or undefined\n if (version === null || version === undefined) {\n throw new Error('Required parameter version was null or undefined when calling listClusterCustomObject.');\n }\n // verify required parameter 'plural' is not null or undefined\n if (plural === null || plural === undefined) {\n throw new Error('Required parameter plural was null or undefined when calling listClusterCustomObject.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (allowWatchBookmarks !== undefined) {\n localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, \"boolean\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, \"number\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (resourceVersionMatch !== undefined) {\n localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"object\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * list or watch namespace scoped custom objects\n * @param group The custom resource\\'s group name\n * @param version The custom resource\\'s version\n * @param namespace The custom resource\\'s namespace\n * @param plural The custom resource\\'s plural name. For TPRs this would be lowercase plural kind.\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @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.\n * @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.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @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.\n * @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.\n * @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\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications.\n */\n async listNamespacedCustomObject(group, version, namespace, plural, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/{group}/{version}/namespaces/{namespace}/{plural}'\n .replace('{' + 'group' + '}', encodeURIComponent(String(group)))\n .replace('{' + 'version' + '}', encodeURIComponent(String(version)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)))\n .replace('{' + 'plural' + '}', encodeURIComponent(String(plural)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/json;stream=watch'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'group' is not null or undefined\n if (group === null || group === undefined) {\n throw new Error('Required parameter group was null or undefined when calling listNamespacedCustomObject.');\n }\n // verify required parameter 'version' is not null or undefined\n if (version === null || version === undefined) {\n throw new Error('Required parameter version was null or undefined when calling listNamespacedCustomObject.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling listNamespacedCustomObject.');\n }\n // verify required parameter 'plural' is not null or undefined\n if (plural === null || plural === undefined) {\n throw new Error('Required parameter plural was null or undefined when calling listNamespacedCustomObject.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (allowWatchBookmarks !== undefined) {\n localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, \"boolean\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, \"number\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (resourceVersionMatch !== undefined) {\n localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"object\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * patch the specified cluster scoped custom object\n * @param group the custom resource\\'s group\n * @param version the custom resource\\'s version\n * @param plural the custom object\\'s plural name. For TPRs this would be lowercase plural kind.\n * @param name the custom object\\'s name\n * @param body The JSON schema of the Resource to patch.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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).\n * @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.\n */\n async patchClusterCustomObject(group, version, plural, name, body, dryRun, fieldManager, force, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/{group}/{version}/{plural}/{name}'\n .replace('{' + 'group' + '}', encodeURIComponent(String(group)))\n .replace('{' + 'version' + '}', encodeURIComponent(String(version)))\n .replace('{' + 'plural' + '}', encodeURIComponent(String(plural)))\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'group' is not null or undefined\n if (group === null || group === undefined) {\n throw new Error('Required parameter group was null or undefined when calling patchClusterCustomObject.');\n }\n // verify required parameter 'version' is not null or undefined\n if (version === null || version === undefined) {\n throw new Error('Required parameter version was null or undefined when calling patchClusterCustomObject.');\n }\n // verify required parameter 'plural' is not null or undefined\n if (plural === null || plural === undefined) {\n throw new Error('Required parameter plural was null or undefined when calling patchClusterCustomObject.');\n }\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling patchClusterCustomObject.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling patchClusterCustomObject.');\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n if (force !== undefined) {\n localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"object\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"object\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * partially update scale of the specified cluster scoped custom object\n * @param group the custom resource\\'s group\n * @param version the custom resource\\'s version\n * @param plural the custom resource\\'s plural name. For TPRs this would be lowercase plural kind.\n * @param name the custom object\\'s name\n * @param body\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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).\n * @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.\n */\n async patchClusterCustomObjectScale(group, version, plural, name, body, dryRun, fieldManager, force, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/{group}/{version}/{plural}/{name}/scale'\n .replace('{' + 'group' + '}', encodeURIComponent(String(group)))\n .replace('{' + 'version' + '}', encodeURIComponent(String(version)))\n .replace('{' + 'plural' + '}', encodeURIComponent(String(plural)))\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'group' is not null or undefined\n if (group === null || group === undefined) {\n throw new Error('Required parameter group was null or undefined when calling patchClusterCustomObjectScale.');\n }\n // verify required parameter 'version' is not null or undefined\n if (version === null || version === undefined) {\n throw new Error('Required parameter version was null or undefined when calling patchClusterCustomObjectScale.');\n }\n // verify required parameter 'plural' is not null or undefined\n if (plural === null || plural === undefined) {\n throw new Error('Required parameter plural was null or undefined when calling patchClusterCustomObjectScale.');\n }\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling patchClusterCustomObjectScale.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling patchClusterCustomObjectScale.');\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n if (force !== undefined) {\n localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"object\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"object\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * partially update status of the specified cluster scoped custom object\n * @param group the custom resource\\'s group\n * @param version the custom resource\\'s version\n * @param plural the custom resource\\'s plural name. For TPRs this would be lowercase plural kind.\n * @param name the custom object\\'s name\n * @param body\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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).\n * @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.\n */\n async patchClusterCustomObjectStatus(group, version, plural, name, body, dryRun, fieldManager, force, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/{group}/{version}/{plural}/{name}/status'\n .replace('{' + 'group' + '}', encodeURIComponent(String(group)))\n .replace('{' + 'version' + '}', encodeURIComponent(String(version)))\n .replace('{' + 'plural' + '}', encodeURIComponent(String(plural)))\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'group' is not null or undefined\n if (group === null || group === undefined) {\n throw new Error('Required parameter group was null or undefined when calling patchClusterCustomObjectStatus.');\n }\n // verify required parameter 'version' is not null or undefined\n if (version === null || version === undefined) {\n throw new Error('Required parameter version was null or undefined when calling patchClusterCustomObjectStatus.');\n }\n // verify required parameter 'plural' is not null or undefined\n if (plural === null || plural === undefined) {\n throw new Error('Required parameter plural was null or undefined when calling patchClusterCustomObjectStatus.');\n }\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling patchClusterCustomObjectStatus.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling patchClusterCustomObjectStatus.');\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n if (force !== undefined) {\n localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"object\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"object\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * patch the specified namespace scoped custom object\n * @param group the custom resource\\'s group\n * @param version the custom resource\\'s version\n * @param namespace The custom resource\\'s namespace\n * @param plural the custom resource\\'s plural name. For TPRs this would be lowercase plural kind.\n * @param name the custom object\\'s name\n * @param body The JSON schema of the Resource to patch.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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).\n * @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.\n */\n async patchNamespacedCustomObject(group, version, namespace, plural, name, body, dryRun, fieldManager, force, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/{group}/{version}/namespaces/{namespace}/{plural}/{name}'\n .replace('{' + 'group' + '}', encodeURIComponent(String(group)))\n .replace('{' + 'version' + '}', encodeURIComponent(String(version)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)))\n .replace('{' + 'plural' + '}', encodeURIComponent(String(plural)))\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'group' is not null or undefined\n if (group === null || group === undefined) {\n throw new Error('Required parameter group was null or undefined when calling patchNamespacedCustomObject.');\n }\n // verify required parameter 'version' is not null or undefined\n if (version === null || version === undefined) {\n throw new Error('Required parameter version was null or undefined when calling patchNamespacedCustomObject.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedCustomObject.');\n }\n // verify required parameter 'plural' is not null or undefined\n if (plural === null || plural === undefined) {\n throw new Error('Required parameter plural was null or undefined when calling patchNamespacedCustomObject.');\n }\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling patchNamespacedCustomObject.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling patchNamespacedCustomObject.');\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n if (force !== undefined) {\n localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"object\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"object\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * partially update scale of the specified namespace scoped custom object\n * @param group the custom resource\\'s group\n * @param version the custom resource\\'s version\n * @param namespace The custom resource\\'s namespace\n * @param plural the custom resource\\'s plural name. For TPRs this would be lowercase plural kind.\n * @param name the custom object\\'s name\n * @param body\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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).\n * @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.\n */\n async patchNamespacedCustomObjectScale(group, version, namespace, plural, name, body, dryRun, fieldManager, force, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/{group}/{version}/namespaces/{namespace}/{plural}/{name}/scale'\n .replace('{' + 'group' + '}', encodeURIComponent(String(group)))\n .replace('{' + 'version' + '}', encodeURIComponent(String(version)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)))\n .replace('{' + 'plural' + '}', encodeURIComponent(String(plural)))\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'group' is not null or undefined\n if (group === null || group === undefined) {\n throw new Error('Required parameter group was null or undefined when calling patchNamespacedCustomObjectScale.');\n }\n // verify required parameter 'version' is not null or undefined\n if (version === null || version === undefined) {\n throw new Error('Required parameter version was null or undefined when calling patchNamespacedCustomObjectScale.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedCustomObjectScale.');\n }\n // verify required parameter 'plural' is not null or undefined\n if (plural === null || plural === undefined) {\n throw new Error('Required parameter plural was null or undefined when calling patchNamespacedCustomObjectScale.');\n }\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling patchNamespacedCustomObjectScale.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling patchNamespacedCustomObjectScale.');\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n if (force !== undefined) {\n localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"object\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"object\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * partially update status of the specified namespace scoped custom object\n * @param group the custom resource\\'s group\n * @param version the custom resource\\'s version\n * @param namespace The custom resource\\'s namespace\n * @param plural the custom resource\\'s plural name. For TPRs this would be lowercase plural kind.\n * @param name the custom object\\'s name\n * @param body\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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).\n * @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.\n */\n async patchNamespacedCustomObjectStatus(group, version, namespace, plural, name, body, dryRun, fieldManager, force, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/{group}/{version}/namespaces/{namespace}/{plural}/{name}/status'\n .replace('{' + 'group' + '}', encodeURIComponent(String(group)))\n .replace('{' + 'version' + '}', encodeURIComponent(String(version)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)))\n .replace('{' + 'plural' + '}', encodeURIComponent(String(plural)))\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'group' is not null or undefined\n if (group === null || group === undefined) {\n throw new Error('Required parameter group was null or undefined when calling patchNamespacedCustomObjectStatus.');\n }\n // verify required parameter 'version' is not null or undefined\n if (version === null || version === undefined) {\n throw new Error('Required parameter version was null or undefined when calling patchNamespacedCustomObjectStatus.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedCustomObjectStatus.');\n }\n // verify required parameter 'plural' is not null or undefined\n if (plural === null || plural === undefined) {\n throw new Error('Required parameter plural was null or undefined when calling patchNamespacedCustomObjectStatus.');\n }\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling patchNamespacedCustomObjectStatus.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling patchNamespacedCustomObjectStatus.');\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n if (force !== undefined) {\n localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"object\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"object\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * replace the specified cluster scoped custom object\n * @param group the custom resource\\'s group\n * @param version the custom resource\\'s version\n * @param plural the custom object\\'s plural name. For TPRs this would be lowercase plural kind.\n * @param name the custom object\\'s name\n * @param body The JSON schema of the Resource to replace.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n */\n async replaceClusterCustomObject(group, version, plural, name, body, dryRun, fieldManager, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/{group}/{version}/{plural}/{name}'\n .replace('{' + 'group' + '}', encodeURIComponent(String(group)))\n .replace('{' + 'version' + '}', encodeURIComponent(String(version)))\n .replace('{' + 'plural' + '}', encodeURIComponent(String(plural)))\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'group' is not null or undefined\n if (group === null || group === undefined) {\n throw new Error('Required parameter group was null or undefined when calling replaceClusterCustomObject.');\n }\n // verify required parameter 'version' is not null or undefined\n if (version === null || version === undefined) {\n throw new Error('Required parameter version was null or undefined when calling replaceClusterCustomObject.');\n }\n // verify required parameter 'plural' is not null or undefined\n if (plural === null || plural === undefined) {\n throw new Error('Required parameter plural was null or undefined when calling replaceClusterCustomObject.');\n }\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling replaceClusterCustomObject.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling replaceClusterCustomObject.');\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"object\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"object\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * replace scale of the specified cluster scoped custom object\n * @param group the custom resource\\'s group\n * @param version the custom resource\\'s version\n * @param plural the custom resource\\'s plural name. For TPRs this would be lowercase plural kind.\n * @param name the custom object\\'s name\n * @param body\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n */\n async replaceClusterCustomObjectScale(group, version, plural, name, body, dryRun, fieldManager, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/{group}/{version}/{plural}/{name}/scale'\n .replace('{' + 'group' + '}', encodeURIComponent(String(group)))\n .replace('{' + 'version' + '}', encodeURIComponent(String(version)))\n .replace('{' + 'plural' + '}', encodeURIComponent(String(plural)))\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'group' is not null or undefined\n if (group === null || group === undefined) {\n throw new Error('Required parameter group was null or undefined when calling replaceClusterCustomObjectScale.');\n }\n // verify required parameter 'version' is not null or undefined\n if (version === null || version === undefined) {\n throw new Error('Required parameter version was null or undefined when calling replaceClusterCustomObjectScale.');\n }\n // verify required parameter 'plural' is not null or undefined\n if (plural === null || plural === undefined) {\n throw new Error('Required parameter plural was null or undefined when calling replaceClusterCustomObjectScale.');\n }\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling replaceClusterCustomObjectScale.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling replaceClusterCustomObjectScale.');\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"object\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"object\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * replace status of the cluster scoped specified custom object\n * @param group the custom resource\\'s group\n * @param version the custom resource\\'s version\n * @param plural the custom resource\\'s plural name. For TPRs this would be lowercase plural kind.\n * @param name the custom object\\'s name\n * @param body\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n */\n async replaceClusterCustomObjectStatus(group, version, plural, name, body, dryRun, fieldManager, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/{group}/{version}/{plural}/{name}/status'\n .replace('{' + 'group' + '}', encodeURIComponent(String(group)))\n .replace('{' + 'version' + '}', encodeURIComponent(String(version)))\n .replace('{' + 'plural' + '}', encodeURIComponent(String(plural)))\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'group' is not null or undefined\n if (group === null || group === undefined) {\n throw new Error('Required parameter group was null or undefined when calling replaceClusterCustomObjectStatus.');\n }\n // verify required parameter 'version' is not null or undefined\n if (version === null || version === undefined) {\n throw new Error('Required parameter version was null or undefined when calling replaceClusterCustomObjectStatus.');\n }\n // verify required parameter 'plural' is not null or undefined\n if (plural === null || plural === undefined) {\n throw new Error('Required parameter plural was null or undefined when calling replaceClusterCustomObjectStatus.');\n }\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling replaceClusterCustomObjectStatus.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling replaceClusterCustomObjectStatus.');\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"object\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"object\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * replace the specified namespace scoped custom object\n * @param group the custom resource\\'s group\n * @param version the custom resource\\'s version\n * @param namespace The custom resource\\'s namespace\n * @param plural the custom resource\\'s plural name. For TPRs this would be lowercase plural kind.\n * @param name the custom object\\'s name\n * @param body The JSON schema of the Resource to replace.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n */\n async replaceNamespacedCustomObject(group, version, namespace, plural, name, body, dryRun, fieldManager, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/{group}/{version}/namespaces/{namespace}/{plural}/{name}'\n .replace('{' + 'group' + '}', encodeURIComponent(String(group)))\n .replace('{' + 'version' + '}', encodeURIComponent(String(version)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)))\n .replace('{' + 'plural' + '}', encodeURIComponent(String(plural)))\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'group' is not null or undefined\n if (group === null || group === undefined) {\n throw new Error('Required parameter group was null or undefined when calling replaceNamespacedCustomObject.');\n }\n // verify required parameter 'version' is not null or undefined\n if (version === null || version === undefined) {\n throw new Error('Required parameter version was null or undefined when calling replaceNamespacedCustomObject.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedCustomObject.');\n }\n // verify required parameter 'plural' is not null or undefined\n if (plural === null || plural === undefined) {\n throw new Error('Required parameter plural was null or undefined when calling replaceNamespacedCustomObject.');\n }\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling replaceNamespacedCustomObject.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling replaceNamespacedCustomObject.');\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"object\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"object\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * replace scale of the specified namespace scoped custom object\n * @param group the custom resource\\'s group\n * @param version the custom resource\\'s version\n * @param namespace The custom resource\\'s namespace\n * @param plural the custom resource\\'s plural name. For TPRs this would be lowercase plural kind.\n * @param name the custom object\\'s name\n * @param body\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n */\n async replaceNamespacedCustomObjectScale(group, version, namespace, plural, name, body, dryRun, fieldManager, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/{group}/{version}/namespaces/{namespace}/{plural}/{name}/scale'\n .replace('{' + 'group' + '}', encodeURIComponent(String(group)))\n .replace('{' + 'version' + '}', encodeURIComponent(String(version)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)))\n .replace('{' + 'plural' + '}', encodeURIComponent(String(plural)))\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'group' is not null or undefined\n if (group === null || group === undefined) {\n throw new Error('Required parameter group was null or undefined when calling replaceNamespacedCustomObjectScale.');\n }\n // verify required parameter 'version' is not null or undefined\n if (version === null || version === undefined) {\n throw new Error('Required parameter version was null or undefined when calling replaceNamespacedCustomObjectScale.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedCustomObjectScale.');\n }\n // verify required parameter 'plural' is not null or undefined\n if (plural === null || plural === undefined) {\n throw new Error('Required parameter plural was null or undefined when calling replaceNamespacedCustomObjectScale.');\n }\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling replaceNamespacedCustomObjectScale.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling replaceNamespacedCustomObjectScale.');\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"object\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"object\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * replace status of the specified namespace scoped custom object\n * @param group the custom resource\\'s group\n * @param version the custom resource\\'s version\n * @param namespace The custom resource\\'s namespace\n * @param plural the custom resource\\'s plural name. For TPRs this would be lowercase plural kind.\n * @param name the custom object\\'s name\n * @param body\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n */\n async replaceNamespacedCustomObjectStatus(group, version, namespace, plural, name, body, dryRun, fieldManager, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/{group}/{version}/namespaces/{namespace}/{plural}/{name}/status'\n .replace('{' + 'group' + '}', encodeURIComponent(String(group)))\n .replace('{' + 'version' + '}', encodeURIComponent(String(version)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)))\n .replace('{' + 'plural' + '}', encodeURIComponent(String(plural)))\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'group' is not null or undefined\n if (group === null || group === undefined) {\n throw new Error('Required parameter group was null or undefined when calling replaceNamespacedCustomObjectStatus.');\n }\n // verify required parameter 'version' is not null or undefined\n if (version === null || version === undefined) {\n throw new Error('Required parameter version was null or undefined when calling replaceNamespacedCustomObjectStatus.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedCustomObjectStatus.');\n }\n // verify required parameter 'plural' is not null or undefined\n if (plural === null || plural === undefined) {\n throw new Error('Required parameter plural was null or undefined when calling replaceNamespacedCustomObjectStatus.');\n }\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling replaceNamespacedCustomObjectStatus.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling replaceNamespacedCustomObjectStatus.');\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"object\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"object\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n}\nexports.CustomObjectsApi = CustomObjectsApi;\n//# sourceMappingURL=customObjectsApi.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.DiscoveryApi = exports.DiscoveryApiApiKeys = void 0;\nconst tslib_1 = require(\"tslib\");\nconst request_1 = tslib_1.__importDefault(require(\"request\"));\nconst models_1 = require(\"../model/models\");\nconst models_2 = require(\"../model/models\");\nconst apis_1 = require(\"./apis\");\nlet defaultBasePath = 'http://localhost';\n// ===============================================\n// This file is autogenerated - Please do not edit\n// ===============================================\nvar DiscoveryApiApiKeys;\n(function (DiscoveryApiApiKeys) {\n DiscoveryApiApiKeys[DiscoveryApiApiKeys[\"BearerToken\"] = 0] = \"BearerToken\";\n})(DiscoveryApiApiKeys = exports.DiscoveryApiApiKeys || (exports.DiscoveryApiApiKeys = {}));\nclass DiscoveryApi {\n constructor(basePathOrUsername, password, basePath) {\n this._basePath = defaultBasePath;\n this._defaultHeaders = {};\n this._useQuerystring = false;\n this.authentications = {\n 'default': new models_1.VoidAuth(),\n 'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'),\n };\n this.interceptors = [];\n if (password) {\n if (basePath) {\n this.basePath = basePath;\n }\n }\n else {\n if (basePathOrUsername) {\n this.basePath = basePathOrUsername;\n }\n }\n }\n set useQuerystring(value) {\n this._useQuerystring = value;\n }\n set basePath(basePath) {\n this._basePath = basePath;\n }\n set defaultHeaders(defaultHeaders) {\n this._defaultHeaders = defaultHeaders;\n }\n get defaultHeaders() {\n return this._defaultHeaders;\n }\n get basePath() {\n return this._basePath;\n }\n setDefaultAuthentication(auth) {\n this.authentications.default = auth;\n }\n setApiKey(key, value) {\n this.authentications[DiscoveryApiApiKeys[key]].apiKey = value;\n }\n addInterceptor(interceptor) {\n this.interceptors.push(interceptor);\n }\n /**\n * get information of a group\n */\n async getAPIGroup(options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/discovery.k8s.io/';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1APIGroup\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n}\nexports.DiscoveryApi = DiscoveryApi;\n//# sourceMappingURL=discoveryApi.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.DiscoveryV1Api = exports.DiscoveryV1ApiApiKeys = void 0;\nconst tslib_1 = require(\"tslib\");\nconst request_1 = tslib_1.__importDefault(require(\"request\"));\nconst models_1 = require(\"../model/models\");\nconst models_2 = require(\"../model/models\");\nconst apis_1 = require(\"./apis\");\nlet defaultBasePath = 'http://localhost';\n// ===============================================\n// This file is autogenerated - Please do not edit\n// ===============================================\nvar DiscoveryV1ApiApiKeys;\n(function (DiscoveryV1ApiApiKeys) {\n DiscoveryV1ApiApiKeys[DiscoveryV1ApiApiKeys[\"BearerToken\"] = 0] = \"BearerToken\";\n})(DiscoveryV1ApiApiKeys = exports.DiscoveryV1ApiApiKeys || (exports.DiscoveryV1ApiApiKeys = {}));\nclass DiscoveryV1Api {\n constructor(basePathOrUsername, password, basePath) {\n this._basePath = defaultBasePath;\n this._defaultHeaders = {};\n this._useQuerystring = false;\n this.authentications = {\n 'default': new models_1.VoidAuth(),\n 'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'),\n };\n this.interceptors = [];\n if (password) {\n if (basePath) {\n this.basePath = basePath;\n }\n }\n else {\n if (basePathOrUsername) {\n this.basePath = basePathOrUsername;\n }\n }\n }\n set useQuerystring(value) {\n this._useQuerystring = value;\n }\n set basePath(basePath) {\n this._basePath = basePath;\n }\n set defaultHeaders(defaultHeaders) {\n this._defaultHeaders = defaultHeaders;\n }\n get defaultHeaders() {\n return this._defaultHeaders;\n }\n get basePath() {\n return this._basePath;\n }\n setDefaultAuthentication(auth) {\n this.authentications.default = auth;\n }\n setApiKey(key, value) {\n this.authentications[DiscoveryV1ApiApiKeys[key]].apiKey = value;\n }\n addInterceptor(interceptor) {\n this.interceptors.push(interceptor);\n }\n /**\n * create an EndpointSlice\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n */\n async createNamespacedEndpointSlice(namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/discovery.k8s.io/v1/namespaces/{namespace}/endpointslices'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling createNamespacedEndpointSlice.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling createNamespacedEndpointSlice.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'POST',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1EndpointSlice\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1EndpointSlice\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * delete collection of EndpointSlice\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @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.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @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.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @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.\n * @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.\n * @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.\n * @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\n * @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\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param body\n */\n async deleteCollectionNamespacedEndpointSlice(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/discovery.k8s.io/v1/namespaces/{namespace}/endpointslices'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedEndpointSlice.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (gracePeriodSeconds !== undefined) {\n localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, \"number\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, \"number\");\n }\n if (orphanDependents !== undefined) {\n localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, \"boolean\");\n }\n if (propagationPolicy !== undefined) {\n localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, \"string\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (resourceVersionMatch !== undefined) {\n localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1DeleteOptions\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1Status\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * delete an EndpointSlice\n * @param name name of the EndpointSlice\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @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.\n * @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.\n * @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.\n * @param body\n */\n async deleteNamespacedEndpointSlice(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/discovery.k8s.io/v1/namespaces/{namespace}/endpointslices/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling deleteNamespacedEndpointSlice.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedEndpointSlice.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (gracePeriodSeconds !== undefined) {\n localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, \"number\");\n }\n if (orphanDependents !== undefined) {\n localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, \"boolean\");\n }\n if (propagationPolicy !== undefined) {\n localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1DeleteOptions\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1Status\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * get available resources\n */\n async getAPIResources(options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/discovery.k8s.io/v1/';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1APIResourceList\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * list or watch objects of kind EndpointSlice\n * @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.\n * @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.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @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.\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @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\n * @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\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n */\n async listEndpointSliceForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/discovery.k8s.io/v1/endpointslices';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n if (allowWatchBookmarks !== undefined) {\n localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, \"boolean\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, \"number\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (resourceVersionMatch !== undefined) {\n localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1EndpointSliceList\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * list or watch objects of kind EndpointSlice\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @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.\n * @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.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @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.\n * @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\n * @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\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n */\n async listNamespacedEndpointSlice(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/discovery.k8s.io/v1/namespaces/{namespace}/endpointslices'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling listNamespacedEndpointSlice.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (allowWatchBookmarks !== undefined) {\n localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, \"boolean\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, \"number\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (resourceVersionMatch !== undefined) {\n localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1EndpointSliceList\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * partially update the specified EndpointSlice\n * @param name name of the EndpointSlice\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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).\n * @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.\n */\n async patchNamespacedEndpointSlice(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/discovery.k8s.io/v1/namespaces/{namespace}/endpointslices/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling patchNamespacedEndpointSlice.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedEndpointSlice.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling patchNamespacedEndpointSlice.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n if (force !== undefined) {\n localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"object\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1EndpointSlice\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * read the specified EndpointSlice\n * @param name name of the EndpointSlice\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If \\'true\\', then the output is pretty printed.\n */\n async readNamespacedEndpointSlice(name, namespace, pretty, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/discovery.k8s.io/v1/namespaces/{namespace}/endpointslices/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling readNamespacedEndpointSlice.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling readNamespacedEndpointSlice.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1EndpointSlice\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * replace the specified EndpointSlice\n * @param name name of the EndpointSlice\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n */\n async replaceNamespacedEndpointSlice(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/discovery.k8s.io/v1/namespaces/{namespace}/endpointslices/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling replaceNamespacedEndpointSlice.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedEndpointSlice.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling replaceNamespacedEndpointSlice.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1EndpointSlice\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1EndpointSlice\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n}\nexports.DiscoveryV1Api = DiscoveryV1Api;\n//# sourceMappingURL=discoveryV1Api.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.DiscoveryV1beta1Api = exports.DiscoveryV1beta1ApiApiKeys = void 0;\nconst tslib_1 = require(\"tslib\");\nconst request_1 = tslib_1.__importDefault(require(\"request\"));\nconst models_1 = require(\"../model/models\");\nconst models_2 = require(\"../model/models\");\nconst apis_1 = require(\"./apis\");\nlet defaultBasePath = 'http://localhost';\n// ===============================================\n// This file is autogenerated - Please do not edit\n// ===============================================\nvar DiscoveryV1beta1ApiApiKeys;\n(function (DiscoveryV1beta1ApiApiKeys) {\n DiscoveryV1beta1ApiApiKeys[DiscoveryV1beta1ApiApiKeys[\"BearerToken\"] = 0] = \"BearerToken\";\n})(DiscoveryV1beta1ApiApiKeys = exports.DiscoveryV1beta1ApiApiKeys || (exports.DiscoveryV1beta1ApiApiKeys = {}));\nclass DiscoveryV1beta1Api {\n constructor(basePathOrUsername, password, basePath) {\n this._basePath = defaultBasePath;\n this._defaultHeaders = {};\n this._useQuerystring = false;\n this.authentications = {\n 'default': new models_1.VoidAuth(),\n 'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'),\n };\n this.interceptors = [];\n if (password) {\n if (basePath) {\n this.basePath = basePath;\n }\n }\n else {\n if (basePathOrUsername) {\n this.basePath = basePathOrUsername;\n }\n }\n }\n set useQuerystring(value) {\n this._useQuerystring = value;\n }\n set basePath(basePath) {\n this._basePath = basePath;\n }\n set defaultHeaders(defaultHeaders) {\n this._defaultHeaders = defaultHeaders;\n }\n get defaultHeaders() {\n return this._defaultHeaders;\n }\n get basePath() {\n return this._basePath;\n }\n setDefaultAuthentication(auth) {\n this.authentications.default = auth;\n }\n setApiKey(key, value) {\n this.authentications[DiscoveryV1beta1ApiApiKeys[key]].apiKey = value;\n }\n addInterceptor(interceptor) {\n this.interceptors.push(interceptor);\n }\n /**\n * create an EndpointSlice\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n */\n async createNamespacedEndpointSlice(namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/discovery.k8s.io/v1beta1/namespaces/{namespace}/endpointslices'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling createNamespacedEndpointSlice.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling createNamespacedEndpointSlice.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'POST',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1beta1EndpointSlice\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1beta1EndpointSlice\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * delete collection of EndpointSlice\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @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.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @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.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @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.\n * @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.\n * @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.\n * @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\n * @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\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param body\n */\n async deleteCollectionNamespacedEndpointSlice(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/discovery.k8s.io/v1beta1/namespaces/{namespace}/endpointslices'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedEndpointSlice.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (gracePeriodSeconds !== undefined) {\n localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, \"number\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, \"number\");\n }\n if (orphanDependents !== undefined) {\n localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, \"boolean\");\n }\n if (propagationPolicy !== undefined) {\n localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, \"string\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (resourceVersionMatch !== undefined) {\n localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1DeleteOptions\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1Status\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * delete an EndpointSlice\n * @param name name of the EndpointSlice\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @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.\n * @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.\n * @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.\n * @param body\n */\n async deleteNamespacedEndpointSlice(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/discovery.k8s.io/v1beta1/namespaces/{namespace}/endpointslices/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling deleteNamespacedEndpointSlice.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedEndpointSlice.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (gracePeriodSeconds !== undefined) {\n localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, \"number\");\n }\n if (orphanDependents !== undefined) {\n localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, \"boolean\");\n }\n if (propagationPolicy !== undefined) {\n localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1DeleteOptions\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1Status\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * get available resources\n */\n async getAPIResources(options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/discovery.k8s.io/v1beta1/';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1APIResourceList\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * list or watch objects of kind EndpointSlice\n * @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.\n * @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.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @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.\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @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\n * @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\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n */\n async listEndpointSliceForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/discovery.k8s.io/v1beta1/endpointslices';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n if (allowWatchBookmarks !== undefined) {\n localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, \"boolean\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, \"number\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (resourceVersionMatch !== undefined) {\n localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1beta1EndpointSliceList\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * list or watch objects of kind EndpointSlice\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @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.\n * @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.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @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.\n * @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\n * @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\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n */\n async listNamespacedEndpointSlice(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/discovery.k8s.io/v1beta1/namespaces/{namespace}/endpointslices'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling listNamespacedEndpointSlice.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (allowWatchBookmarks !== undefined) {\n localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, \"boolean\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, \"number\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (resourceVersionMatch !== undefined) {\n localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1beta1EndpointSliceList\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * partially update the specified EndpointSlice\n * @param name name of the EndpointSlice\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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).\n * @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.\n */\n async patchNamespacedEndpointSlice(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/discovery.k8s.io/v1beta1/namespaces/{namespace}/endpointslices/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling patchNamespacedEndpointSlice.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedEndpointSlice.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling patchNamespacedEndpointSlice.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n if (force !== undefined) {\n localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"object\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1beta1EndpointSlice\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * read the specified EndpointSlice\n * @param name name of the EndpointSlice\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If \\'true\\', then the output is pretty printed.\n */\n async readNamespacedEndpointSlice(name, namespace, pretty, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/discovery.k8s.io/v1beta1/namespaces/{namespace}/endpointslices/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling readNamespacedEndpointSlice.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling readNamespacedEndpointSlice.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1beta1EndpointSlice\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * replace the specified EndpointSlice\n * @param name name of the EndpointSlice\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n */\n async replaceNamespacedEndpointSlice(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/discovery.k8s.io/v1beta1/namespaces/{namespace}/endpointslices/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling replaceNamespacedEndpointSlice.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedEndpointSlice.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling replaceNamespacedEndpointSlice.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1beta1EndpointSlice\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1beta1EndpointSlice\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n}\nexports.DiscoveryV1beta1Api = DiscoveryV1beta1Api;\n//# sourceMappingURL=discoveryV1beta1Api.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.EventsApi = exports.EventsApiApiKeys = void 0;\nconst tslib_1 = require(\"tslib\");\nconst request_1 = tslib_1.__importDefault(require(\"request\"));\nconst models_1 = require(\"../model/models\");\nconst models_2 = require(\"../model/models\");\nconst apis_1 = require(\"./apis\");\nlet defaultBasePath = 'http://localhost';\n// ===============================================\n// This file is autogenerated - Please do not edit\n// ===============================================\nvar EventsApiApiKeys;\n(function (EventsApiApiKeys) {\n EventsApiApiKeys[EventsApiApiKeys[\"BearerToken\"] = 0] = \"BearerToken\";\n})(EventsApiApiKeys = exports.EventsApiApiKeys || (exports.EventsApiApiKeys = {}));\nclass EventsApi {\n constructor(basePathOrUsername, password, basePath) {\n this._basePath = defaultBasePath;\n this._defaultHeaders = {};\n this._useQuerystring = false;\n this.authentications = {\n 'default': new models_1.VoidAuth(),\n 'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'),\n };\n this.interceptors = [];\n if (password) {\n if (basePath) {\n this.basePath = basePath;\n }\n }\n else {\n if (basePathOrUsername) {\n this.basePath = basePathOrUsername;\n }\n }\n }\n set useQuerystring(value) {\n this._useQuerystring = value;\n }\n set basePath(basePath) {\n this._basePath = basePath;\n }\n set defaultHeaders(defaultHeaders) {\n this._defaultHeaders = defaultHeaders;\n }\n get defaultHeaders() {\n return this._defaultHeaders;\n }\n get basePath() {\n return this._basePath;\n }\n setDefaultAuthentication(auth) {\n this.authentications.default = auth;\n }\n setApiKey(key, value) {\n this.authentications[EventsApiApiKeys[key]].apiKey = value;\n }\n addInterceptor(interceptor) {\n this.interceptors.push(interceptor);\n }\n /**\n * get information of a group\n */\n async getAPIGroup(options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/events.k8s.io/';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1APIGroup\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n}\nexports.EventsApi = EventsApi;\n//# sourceMappingURL=eventsApi.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.EventsV1Api = exports.EventsV1ApiApiKeys = void 0;\nconst tslib_1 = require(\"tslib\");\nconst request_1 = tslib_1.__importDefault(require(\"request\"));\nconst models_1 = require(\"../model/models\");\nconst models_2 = require(\"../model/models\");\nconst apis_1 = require(\"./apis\");\nlet defaultBasePath = 'http://localhost';\n// ===============================================\n// This file is autogenerated - Please do not edit\n// ===============================================\nvar EventsV1ApiApiKeys;\n(function (EventsV1ApiApiKeys) {\n EventsV1ApiApiKeys[EventsV1ApiApiKeys[\"BearerToken\"] = 0] = \"BearerToken\";\n})(EventsV1ApiApiKeys = exports.EventsV1ApiApiKeys || (exports.EventsV1ApiApiKeys = {}));\nclass EventsV1Api {\n constructor(basePathOrUsername, password, basePath) {\n this._basePath = defaultBasePath;\n this._defaultHeaders = {};\n this._useQuerystring = false;\n this.authentications = {\n 'default': new models_1.VoidAuth(),\n 'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'),\n };\n this.interceptors = [];\n if (password) {\n if (basePath) {\n this.basePath = basePath;\n }\n }\n else {\n if (basePathOrUsername) {\n this.basePath = basePathOrUsername;\n }\n }\n }\n set useQuerystring(value) {\n this._useQuerystring = value;\n }\n set basePath(basePath) {\n this._basePath = basePath;\n }\n set defaultHeaders(defaultHeaders) {\n this._defaultHeaders = defaultHeaders;\n }\n get defaultHeaders() {\n return this._defaultHeaders;\n }\n get basePath() {\n return this._basePath;\n }\n setDefaultAuthentication(auth) {\n this.authentications.default = auth;\n }\n setApiKey(key, value) {\n this.authentications[EventsV1ApiApiKeys[key]].apiKey = value;\n }\n addInterceptor(interceptor) {\n this.interceptors.push(interceptor);\n }\n /**\n * create an Event\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n */\n async createNamespacedEvent(namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/events.k8s.io/v1/namespaces/{namespace}/events'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling createNamespacedEvent.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling createNamespacedEvent.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'POST',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"EventsV1Event\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"EventsV1Event\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * delete collection of Event\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @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.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @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.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @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.\n * @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.\n * @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.\n * @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\n * @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\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param body\n */\n async deleteCollectionNamespacedEvent(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/events.k8s.io/v1/namespaces/{namespace}/events'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedEvent.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (gracePeriodSeconds !== undefined) {\n localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, \"number\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, \"number\");\n }\n if (orphanDependents !== undefined) {\n localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, \"boolean\");\n }\n if (propagationPolicy !== undefined) {\n localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, \"string\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (resourceVersionMatch !== undefined) {\n localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1DeleteOptions\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1Status\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * delete an Event\n * @param name name of the Event\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @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.\n * @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.\n * @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.\n * @param body\n */\n async deleteNamespacedEvent(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/events.k8s.io/v1/namespaces/{namespace}/events/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling deleteNamespacedEvent.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedEvent.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (gracePeriodSeconds !== undefined) {\n localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, \"number\");\n }\n if (orphanDependents !== undefined) {\n localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, \"boolean\");\n }\n if (propagationPolicy !== undefined) {\n localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1DeleteOptions\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1Status\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * get available resources\n */\n async getAPIResources(options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/events.k8s.io/v1/';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1APIResourceList\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * list or watch objects of kind Event\n * @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.\n * @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.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @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.\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @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\n * @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\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n */\n async listEventForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/events.k8s.io/v1/events';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n if (allowWatchBookmarks !== undefined) {\n localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, \"boolean\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, \"number\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (resourceVersionMatch !== undefined) {\n localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"EventsV1EventList\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * list or watch objects of kind Event\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @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.\n * @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.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @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.\n * @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\n * @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\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n */\n async listNamespacedEvent(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/events.k8s.io/v1/namespaces/{namespace}/events'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling listNamespacedEvent.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (allowWatchBookmarks !== undefined) {\n localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, \"boolean\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, \"number\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (resourceVersionMatch !== undefined) {\n localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"EventsV1EventList\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * partially update the specified Event\n * @param name name of the Event\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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).\n * @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.\n */\n async patchNamespacedEvent(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/events.k8s.io/v1/namespaces/{namespace}/events/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling patchNamespacedEvent.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedEvent.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling patchNamespacedEvent.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n if (force !== undefined) {\n localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"object\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"EventsV1Event\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * read the specified Event\n * @param name name of the Event\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If \\'true\\', then the output is pretty printed.\n */\n async readNamespacedEvent(name, namespace, pretty, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/events.k8s.io/v1/namespaces/{namespace}/events/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling readNamespacedEvent.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling readNamespacedEvent.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"EventsV1Event\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * replace the specified Event\n * @param name name of the Event\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n */\n async replaceNamespacedEvent(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/events.k8s.io/v1/namespaces/{namespace}/events/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling replaceNamespacedEvent.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedEvent.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling replaceNamespacedEvent.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"EventsV1Event\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"EventsV1Event\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n}\nexports.EventsV1Api = EventsV1Api;\n//# sourceMappingURL=eventsV1Api.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.EventsV1beta1Api = exports.EventsV1beta1ApiApiKeys = void 0;\nconst tslib_1 = require(\"tslib\");\nconst request_1 = tslib_1.__importDefault(require(\"request\"));\nconst models_1 = require(\"../model/models\");\nconst models_2 = require(\"../model/models\");\nconst apis_1 = require(\"./apis\");\nlet defaultBasePath = 'http://localhost';\n// ===============================================\n// This file is autogenerated - Please do not edit\n// ===============================================\nvar EventsV1beta1ApiApiKeys;\n(function (EventsV1beta1ApiApiKeys) {\n EventsV1beta1ApiApiKeys[EventsV1beta1ApiApiKeys[\"BearerToken\"] = 0] = \"BearerToken\";\n})(EventsV1beta1ApiApiKeys = exports.EventsV1beta1ApiApiKeys || (exports.EventsV1beta1ApiApiKeys = {}));\nclass EventsV1beta1Api {\n constructor(basePathOrUsername, password, basePath) {\n this._basePath = defaultBasePath;\n this._defaultHeaders = {};\n this._useQuerystring = false;\n this.authentications = {\n 'default': new models_1.VoidAuth(),\n 'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'),\n };\n this.interceptors = [];\n if (password) {\n if (basePath) {\n this.basePath = basePath;\n }\n }\n else {\n if (basePathOrUsername) {\n this.basePath = basePathOrUsername;\n }\n }\n }\n set useQuerystring(value) {\n this._useQuerystring = value;\n }\n set basePath(basePath) {\n this._basePath = basePath;\n }\n set defaultHeaders(defaultHeaders) {\n this._defaultHeaders = defaultHeaders;\n }\n get defaultHeaders() {\n return this._defaultHeaders;\n }\n get basePath() {\n return this._basePath;\n }\n setDefaultAuthentication(auth) {\n this.authentications.default = auth;\n }\n setApiKey(key, value) {\n this.authentications[EventsV1beta1ApiApiKeys[key]].apiKey = value;\n }\n addInterceptor(interceptor) {\n this.interceptors.push(interceptor);\n }\n /**\n * create an Event\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n */\n async createNamespacedEvent(namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/events.k8s.io/v1beta1/namespaces/{namespace}/events'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling createNamespacedEvent.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling createNamespacedEvent.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'POST',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1beta1Event\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1beta1Event\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * delete collection of Event\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @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.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @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.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @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.\n * @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.\n * @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.\n * @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\n * @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\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param body\n */\n async deleteCollectionNamespacedEvent(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/events.k8s.io/v1beta1/namespaces/{namespace}/events'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedEvent.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (gracePeriodSeconds !== undefined) {\n localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, \"number\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, \"number\");\n }\n if (orphanDependents !== undefined) {\n localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, \"boolean\");\n }\n if (propagationPolicy !== undefined) {\n localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, \"string\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (resourceVersionMatch !== undefined) {\n localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1DeleteOptions\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1Status\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * delete an Event\n * @param name name of the Event\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @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.\n * @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.\n * @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.\n * @param body\n */\n async deleteNamespacedEvent(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/events.k8s.io/v1beta1/namespaces/{namespace}/events/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling deleteNamespacedEvent.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedEvent.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (gracePeriodSeconds !== undefined) {\n localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, \"number\");\n }\n if (orphanDependents !== undefined) {\n localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, \"boolean\");\n }\n if (propagationPolicy !== undefined) {\n localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1DeleteOptions\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1Status\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * get available resources\n */\n async getAPIResources(options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/events.k8s.io/v1beta1/';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1APIResourceList\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * list or watch objects of kind Event\n * @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.\n * @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.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @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.\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @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\n * @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\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n */\n async listEventForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/events.k8s.io/v1beta1/events';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n if (allowWatchBookmarks !== undefined) {\n localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, \"boolean\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, \"number\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (resourceVersionMatch !== undefined) {\n localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1beta1EventList\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * list or watch objects of kind Event\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @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.\n * @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.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @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.\n * @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\n * @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\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n */\n async listNamespacedEvent(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/events.k8s.io/v1beta1/namespaces/{namespace}/events'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling listNamespacedEvent.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (allowWatchBookmarks !== undefined) {\n localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, \"boolean\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, \"number\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (resourceVersionMatch !== undefined) {\n localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1beta1EventList\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * partially update the specified Event\n * @param name name of the Event\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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).\n * @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.\n */\n async patchNamespacedEvent(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/events.k8s.io/v1beta1/namespaces/{namespace}/events/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling patchNamespacedEvent.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedEvent.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling patchNamespacedEvent.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n if (force !== undefined) {\n localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"object\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1beta1Event\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * read the specified Event\n * @param name name of the Event\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If \\'true\\', then the output is pretty printed.\n */\n async readNamespacedEvent(name, namespace, pretty, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/events.k8s.io/v1beta1/namespaces/{namespace}/events/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling readNamespacedEvent.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling readNamespacedEvent.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1beta1Event\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * replace the specified Event\n * @param name name of the Event\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n */\n async replaceNamespacedEvent(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/events.k8s.io/v1beta1/namespaces/{namespace}/events/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling replaceNamespacedEvent.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedEvent.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling replaceNamespacedEvent.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1beta1Event\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1beta1Event\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n}\nexports.EventsV1beta1Api = EventsV1beta1Api;\n//# sourceMappingURL=eventsV1beta1Api.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.FlowcontrolApiserverApi = exports.FlowcontrolApiserverApiApiKeys = void 0;\nconst tslib_1 = require(\"tslib\");\nconst request_1 = tslib_1.__importDefault(require(\"request\"));\nconst models_1 = require(\"../model/models\");\nconst models_2 = require(\"../model/models\");\nconst apis_1 = require(\"./apis\");\nlet defaultBasePath = 'http://localhost';\n// ===============================================\n// This file is autogenerated - Please do not edit\n// ===============================================\nvar FlowcontrolApiserverApiApiKeys;\n(function (FlowcontrolApiserverApiApiKeys) {\n FlowcontrolApiserverApiApiKeys[FlowcontrolApiserverApiApiKeys[\"BearerToken\"] = 0] = \"BearerToken\";\n})(FlowcontrolApiserverApiApiKeys = exports.FlowcontrolApiserverApiApiKeys || (exports.FlowcontrolApiserverApiApiKeys = {}));\nclass FlowcontrolApiserverApi {\n constructor(basePathOrUsername, password, basePath) {\n this._basePath = defaultBasePath;\n this._defaultHeaders = {};\n this._useQuerystring = false;\n this.authentications = {\n 'default': new models_1.VoidAuth(),\n 'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'),\n };\n this.interceptors = [];\n if (password) {\n if (basePath) {\n this.basePath = basePath;\n }\n }\n else {\n if (basePathOrUsername) {\n this.basePath = basePathOrUsername;\n }\n }\n }\n set useQuerystring(value) {\n this._useQuerystring = value;\n }\n set basePath(basePath) {\n this._basePath = basePath;\n }\n set defaultHeaders(defaultHeaders) {\n this._defaultHeaders = defaultHeaders;\n }\n get defaultHeaders() {\n return this._defaultHeaders;\n }\n get basePath() {\n return this._basePath;\n }\n setDefaultAuthentication(auth) {\n this.authentications.default = auth;\n }\n setApiKey(key, value) {\n this.authentications[FlowcontrolApiserverApiApiKeys[key]].apiKey = value;\n }\n addInterceptor(interceptor) {\n this.interceptors.push(interceptor);\n }\n /**\n * get information of a group\n */\n async getAPIGroup(options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/flowcontrol.apiserver.k8s.io/';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1APIGroup\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n}\nexports.FlowcontrolApiserverApi = FlowcontrolApiserverApi;\n//# sourceMappingURL=flowcontrolApiserverApi.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.FlowcontrolApiserverV1beta1Api = exports.FlowcontrolApiserverV1beta1ApiApiKeys = void 0;\nconst tslib_1 = require(\"tslib\");\nconst request_1 = tslib_1.__importDefault(require(\"request\"));\nconst models_1 = require(\"../model/models\");\nconst models_2 = require(\"../model/models\");\nconst apis_1 = require(\"./apis\");\nlet defaultBasePath = 'http://localhost';\n// ===============================================\n// This file is autogenerated - Please do not edit\n// ===============================================\nvar FlowcontrolApiserverV1beta1ApiApiKeys;\n(function (FlowcontrolApiserverV1beta1ApiApiKeys) {\n FlowcontrolApiserverV1beta1ApiApiKeys[FlowcontrolApiserverV1beta1ApiApiKeys[\"BearerToken\"] = 0] = \"BearerToken\";\n})(FlowcontrolApiserverV1beta1ApiApiKeys = exports.FlowcontrolApiserverV1beta1ApiApiKeys || (exports.FlowcontrolApiserverV1beta1ApiApiKeys = {}));\nclass FlowcontrolApiserverV1beta1Api {\n constructor(basePathOrUsername, password, basePath) {\n this._basePath = defaultBasePath;\n this._defaultHeaders = {};\n this._useQuerystring = false;\n this.authentications = {\n 'default': new models_1.VoidAuth(),\n 'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'),\n };\n this.interceptors = [];\n if (password) {\n if (basePath) {\n this.basePath = basePath;\n }\n }\n else {\n if (basePathOrUsername) {\n this.basePath = basePathOrUsername;\n }\n }\n }\n set useQuerystring(value) {\n this._useQuerystring = value;\n }\n set basePath(basePath) {\n this._basePath = basePath;\n }\n set defaultHeaders(defaultHeaders) {\n this._defaultHeaders = defaultHeaders;\n }\n get defaultHeaders() {\n return this._defaultHeaders;\n }\n get basePath() {\n return this._basePath;\n }\n setDefaultAuthentication(auth) {\n this.authentications.default = auth;\n }\n setApiKey(key, value) {\n this.authentications[FlowcontrolApiserverV1beta1ApiApiKeys[key]].apiKey = value;\n }\n addInterceptor(interceptor) {\n this.interceptors.push(interceptor);\n }\n /**\n * create a FlowSchema\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n */\n async createFlowSchema(body, pretty, dryRun, fieldManager, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/flowcontrol.apiserver.k8s.io/v1beta1/flowschemas';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling createFlowSchema.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'POST',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1beta1FlowSchema\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1beta1FlowSchema\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * create a PriorityLevelConfiguration\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n */\n async createPriorityLevelConfiguration(body, pretty, dryRun, fieldManager, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/flowcontrol.apiserver.k8s.io/v1beta1/prioritylevelconfigurations';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling createPriorityLevelConfiguration.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'POST',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1beta1PriorityLevelConfiguration\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1beta1PriorityLevelConfiguration\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * delete collection of FlowSchema\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @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.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @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.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @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.\n * @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.\n * @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.\n * @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\n * @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\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param body\n */\n async deleteCollectionFlowSchema(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/flowcontrol.apiserver.k8s.io/v1beta1/flowschemas';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (gracePeriodSeconds !== undefined) {\n localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, \"number\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, \"number\");\n }\n if (orphanDependents !== undefined) {\n localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, \"boolean\");\n }\n if (propagationPolicy !== undefined) {\n localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, \"string\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (resourceVersionMatch !== undefined) {\n localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1DeleteOptions\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1Status\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * delete collection of PriorityLevelConfiguration\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @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.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @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.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @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.\n * @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.\n * @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.\n * @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\n * @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\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param body\n */\n async deleteCollectionPriorityLevelConfiguration(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/flowcontrol.apiserver.k8s.io/v1beta1/prioritylevelconfigurations';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (gracePeriodSeconds !== undefined) {\n localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, \"number\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, \"number\");\n }\n if (orphanDependents !== undefined) {\n localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, \"boolean\");\n }\n if (propagationPolicy !== undefined) {\n localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, \"string\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (resourceVersionMatch !== undefined) {\n localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1DeleteOptions\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1Status\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * delete a FlowSchema\n * @param name name of the FlowSchema\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @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.\n * @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.\n * @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.\n * @param body\n */\n async deleteFlowSchema(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/flowcontrol.apiserver.k8s.io/v1beta1/flowschemas/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling deleteFlowSchema.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (gracePeriodSeconds !== undefined) {\n localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, \"number\");\n }\n if (orphanDependents !== undefined) {\n localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, \"boolean\");\n }\n if (propagationPolicy !== undefined) {\n localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1DeleteOptions\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1Status\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * delete a PriorityLevelConfiguration\n * @param name name of the PriorityLevelConfiguration\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @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.\n * @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.\n * @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.\n * @param body\n */\n async deletePriorityLevelConfiguration(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/flowcontrol.apiserver.k8s.io/v1beta1/prioritylevelconfigurations/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling deletePriorityLevelConfiguration.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (gracePeriodSeconds !== undefined) {\n localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, \"number\");\n }\n if (orphanDependents !== undefined) {\n localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, \"boolean\");\n }\n if (propagationPolicy !== undefined) {\n localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1DeleteOptions\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1Status\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * get available resources\n */\n async getAPIResources(options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/flowcontrol.apiserver.k8s.io/v1beta1/';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1APIResourceList\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * list or watch objects of kind FlowSchema\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @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.\n * @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.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @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.\n * @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\n * @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\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n */\n async listFlowSchema(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/flowcontrol.apiserver.k8s.io/v1beta1/flowschemas';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (allowWatchBookmarks !== undefined) {\n localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, \"boolean\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, \"number\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (resourceVersionMatch !== undefined) {\n localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1beta1FlowSchemaList\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * list or watch objects of kind PriorityLevelConfiguration\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @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.\n * @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.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @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.\n * @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\n * @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\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n */\n async listPriorityLevelConfiguration(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/flowcontrol.apiserver.k8s.io/v1beta1/prioritylevelconfigurations';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (allowWatchBookmarks !== undefined) {\n localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, \"boolean\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, \"number\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (resourceVersionMatch !== undefined) {\n localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1beta1PriorityLevelConfigurationList\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * partially update the specified FlowSchema\n * @param name name of the FlowSchema\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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).\n * @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.\n */\n async patchFlowSchema(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/flowcontrol.apiserver.k8s.io/v1beta1/flowschemas/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling patchFlowSchema.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling patchFlowSchema.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n if (force !== undefined) {\n localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"object\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1beta1FlowSchema\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * partially update status of the specified FlowSchema\n * @param name name of the FlowSchema\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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).\n * @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.\n */\n async patchFlowSchemaStatus(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/flowcontrol.apiserver.k8s.io/v1beta1/flowschemas/{name}/status'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling patchFlowSchemaStatus.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling patchFlowSchemaStatus.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n if (force !== undefined) {\n localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"object\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1beta1FlowSchema\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * partially update the specified PriorityLevelConfiguration\n * @param name name of the PriorityLevelConfiguration\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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).\n * @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.\n */\n async patchPriorityLevelConfiguration(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/flowcontrol.apiserver.k8s.io/v1beta1/prioritylevelconfigurations/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling patchPriorityLevelConfiguration.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling patchPriorityLevelConfiguration.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n if (force !== undefined) {\n localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"object\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1beta1PriorityLevelConfiguration\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * partially update status of the specified PriorityLevelConfiguration\n * @param name name of the PriorityLevelConfiguration\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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).\n * @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.\n */\n async patchPriorityLevelConfigurationStatus(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/flowcontrol.apiserver.k8s.io/v1beta1/prioritylevelconfigurations/{name}/status'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling patchPriorityLevelConfigurationStatus.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling patchPriorityLevelConfigurationStatus.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n if (force !== undefined) {\n localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"object\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1beta1PriorityLevelConfiguration\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * read the specified FlowSchema\n * @param name name of the FlowSchema\n * @param pretty If \\'true\\', then the output is pretty printed.\n */\n async readFlowSchema(name, pretty, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/flowcontrol.apiserver.k8s.io/v1beta1/flowschemas/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling readFlowSchema.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1beta1FlowSchema\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * read status of the specified FlowSchema\n * @param name name of the FlowSchema\n * @param pretty If \\'true\\', then the output is pretty printed.\n */\n async readFlowSchemaStatus(name, pretty, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/flowcontrol.apiserver.k8s.io/v1beta1/flowschemas/{name}/status'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling readFlowSchemaStatus.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1beta1FlowSchema\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * read the specified PriorityLevelConfiguration\n * @param name name of the PriorityLevelConfiguration\n * @param pretty If \\'true\\', then the output is pretty printed.\n */\n async readPriorityLevelConfiguration(name, pretty, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/flowcontrol.apiserver.k8s.io/v1beta1/prioritylevelconfigurations/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling readPriorityLevelConfiguration.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1beta1PriorityLevelConfiguration\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * read status of the specified PriorityLevelConfiguration\n * @param name name of the PriorityLevelConfiguration\n * @param pretty If \\'true\\', then the output is pretty printed.\n */\n async readPriorityLevelConfigurationStatus(name, pretty, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/flowcontrol.apiserver.k8s.io/v1beta1/prioritylevelconfigurations/{name}/status'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling readPriorityLevelConfigurationStatus.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1beta1PriorityLevelConfiguration\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * replace the specified FlowSchema\n * @param name name of the FlowSchema\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n */\n async replaceFlowSchema(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/flowcontrol.apiserver.k8s.io/v1beta1/flowschemas/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling replaceFlowSchema.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling replaceFlowSchema.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1beta1FlowSchema\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1beta1FlowSchema\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * replace status of the specified FlowSchema\n * @param name name of the FlowSchema\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n */\n async replaceFlowSchemaStatus(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/flowcontrol.apiserver.k8s.io/v1beta1/flowschemas/{name}/status'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling replaceFlowSchemaStatus.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling replaceFlowSchemaStatus.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1beta1FlowSchema\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1beta1FlowSchema\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * replace the specified PriorityLevelConfiguration\n * @param name name of the PriorityLevelConfiguration\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n */\n async replacePriorityLevelConfiguration(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/flowcontrol.apiserver.k8s.io/v1beta1/prioritylevelconfigurations/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling replacePriorityLevelConfiguration.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling replacePriorityLevelConfiguration.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1beta1PriorityLevelConfiguration\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1beta1PriorityLevelConfiguration\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * replace status of the specified PriorityLevelConfiguration\n * @param name name of the PriorityLevelConfiguration\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n */\n async replacePriorityLevelConfigurationStatus(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/flowcontrol.apiserver.k8s.io/v1beta1/prioritylevelconfigurations/{name}/status'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling replacePriorityLevelConfigurationStatus.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling replacePriorityLevelConfigurationStatus.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1beta1PriorityLevelConfiguration\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1beta1PriorityLevelConfiguration\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n}\nexports.FlowcontrolApiserverV1beta1Api = FlowcontrolApiserverV1beta1Api;\n//# sourceMappingURL=flowcontrolApiserverV1beta1Api.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.InternalApiserverApi = exports.InternalApiserverApiApiKeys = void 0;\nconst tslib_1 = require(\"tslib\");\nconst request_1 = tslib_1.__importDefault(require(\"request\"));\nconst models_1 = require(\"../model/models\");\nconst models_2 = require(\"../model/models\");\nconst apis_1 = require(\"./apis\");\nlet defaultBasePath = 'http://localhost';\n// ===============================================\n// This file is autogenerated - Please do not edit\n// ===============================================\nvar InternalApiserverApiApiKeys;\n(function (InternalApiserverApiApiKeys) {\n InternalApiserverApiApiKeys[InternalApiserverApiApiKeys[\"BearerToken\"] = 0] = \"BearerToken\";\n})(InternalApiserverApiApiKeys = exports.InternalApiserverApiApiKeys || (exports.InternalApiserverApiApiKeys = {}));\nclass InternalApiserverApi {\n constructor(basePathOrUsername, password, basePath) {\n this._basePath = defaultBasePath;\n this._defaultHeaders = {};\n this._useQuerystring = false;\n this.authentications = {\n 'default': new models_1.VoidAuth(),\n 'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'),\n };\n this.interceptors = [];\n if (password) {\n if (basePath) {\n this.basePath = basePath;\n }\n }\n else {\n if (basePathOrUsername) {\n this.basePath = basePathOrUsername;\n }\n }\n }\n set useQuerystring(value) {\n this._useQuerystring = value;\n }\n set basePath(basePath) {\n this._basePath = basePath;\n }\n set defaultHeaders(defaultHeaders) {\n this._defaultHeaders = defaultHeaders;\n }\n get defaultHeaders() {\n return this._defaultHeaders;\n }\n get basePath() {\n return this._basePath;\n }\n setDefaultAuthentication(auth) {\n this.authentications.default = auth;\n }\n setApiKey(key, value) {\n this.authentications[InternalApiserverApiApiKeys[key]].apiKey = value;\n }\n addInterceptor(interceptor) {\n this.interceptors.push(interceptor);\n }\n /**\n * get information of a group\n */\n async getAPIGroup(options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/internal.apiserver.k8s.io/';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1APIGroup\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n}\nexports.InternalApiserverApi = InternalApiserverApi;\n//# sourceMappingURL=internalApiserverApi.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.InternalApiserverV1alpha1Api = exports.InternalApiserverV1alpha1ApiApiKeys = void 0;\nconst tslib_1 = require(\"tslib\");\nconst request_1 = tslib_1.__importDefault(require(\"request\"));\nconst models_1 = require(\"../model/models\");\nconst models_2 = require(\"../model/models\");\nconst apis_1 = require(\"./apis\");\nlet defaultBasePath = 'http://localhost';\n// ===============================================\n// This file is autogenerated - Please do not edit\n// ===============================================\nvar InternalApiserverV1alpha1ApiApiKeys;\n(function (InternalApiserverV1alpha1ApiApiKeys) {\n InternalApiserverV1alpha1ApiApiKeys[InternalApiserverV1alpha1ApiApiKeys[\"BearerToken\"] = 0] = \"BearerToken\";\n})(InternalApiserverV1alpha1ApiApiKeys = exports.InternalApiserverV1alpha1ApiApiKeys || (exports.InternalApiserverV1alpha1ApiApiKeys = {}));\nclass InternalApiserverV1alpha1Api {\n constructor(basePathOrUsername, password, basePath) {\n this._basePath = defaultBasePath;\n this._defaultHeaders = {};\n this._useQuerystring = false;\n this.authentications = {\n 'default': new models_1.VoidAuth(),\n 'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'),\n };\n this.interceptors = [];\n if (password) {\n if (basePath) {\n this.basePath = basePath;\n }\n }\n else {\n if (basePathOrUsername) {\n this.basePath = basePathOrUsername;\n }\n }\n }\n set useQuerystring(value) {\n this._useQuerystring = value;\n }\n set basePath(basePath) {\n this._basePath = basePath;\n }\n set defaultHeaders(defaultHeaders) {\n this._defaultHeaders = defaultHeaders;\n }\n get defaultHeaders() {\n return this._defaultHeaders;\n }\n get basePath() {\n return this._basePath;\n }\n setDefaultAuthentication(auth) {\n this.authentications.default = auth;\n }\n setApiKey(key, value) {\n this.authentications[InternalApiserverV1alpha1ApiApiKeys[key]].apiKey = value;\n }\n addInterceptor(interceptor) {\n this.interceptors.push(interceptor);\n }\n /**\n * create a StorageVersion\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n */\n async createStorageVersion(body, pretty, dryRun, fieldManager, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/internal.apiserver.k8s.io/v1alpha1/storageversions';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling createStorageVersion.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'POST',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1alpha1StorageVersion\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1alpha1StorageVersion\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * delete collection of StorageVersion\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @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.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @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.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @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.\n * @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.\n * @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.\n * @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\n * @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\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param body\n */\n async deleteCollectionStorageVersion(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/internal.apiserver.k8s.io/v1alpha1/storageversions';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (gracePeriodSeconds !== undefined) {\n localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, \"number\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, \"number\");\n }\n if (orphanDependents !== undefined) {\n localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, \"boolean\");\n }\n if (propagationPolicy !== undefined) {\n localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, \"string\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (resourceVersionMatch !== undefined) {\n localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1DeleteOptions\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1Status\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * delete a StorageVersion\n * @param name name of the StorageVersion\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @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.\n * @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.\n * @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.\n * @param body\n */\n async deleteStorageVersion(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/internal.apiserver.k8s.io/v1alpha1/storageversions/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling deleteStorageVersion.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (gracePeriodSeconds !== undefined) {\n localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, \"number\");\n }\n if (orphanDependents !== undefined) {\n localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, \"boolean\");\n }\n if (propagationPolicy !== undefined) {\n localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1DeleteOptions\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1Status\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * get available resources\n */\n async getAPIResources(options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/internal.apiserver.k8s.io/v1alpha1/';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1APIResourceList\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * list or watch objects of kind StorageVersion\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @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.\n * @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.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @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.\n * @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\n * @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\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n */\n async listStorageVersion(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/internal.apiserver.k8s.io/v1alpha1/storageversions';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (allowWatchBookmarks !== undefined) {\n localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, \"boolean\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, \"number\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (resourceVersionMatch !== undefined) {\n localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1alpha1StorageVersionList\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * partially update the specified StorageVersion\n * @param name name of the StorageVersion\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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).\n * @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.\n */\n async patchStorageVersion(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/internal.apiserver.k8s.io/v1alpha1/storageversions/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling patchStorageVersion.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling patchStorageVersion.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n if (force !== undefined) {\n localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"object\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1alpha1StorageVersion\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * partially update status of the specified StorageVersion\n * @param name name of the StorageVersion\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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).\n * @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.\n */\n async patchStorageVersionStatus(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/internal.apiserver.k8s.io/v1alpha1/storageversions/{name}/status'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling patchStorageVersionStatus.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling patchStorageVersionStatus.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n if (force !== undefined) {\n localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"object\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1alpha1StorageVersion\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * read the specified StorageVersion\n * @param name name of the StorageVersion\n * @param pretty If \\'true\\', then the output is pretty printed.\n */\n async readStorageVersion(name, pretty, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/internal.apiserver.k8s.io/v1alpha1/storageversions/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling readStorageVersion.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1alpha1StorageVersion\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * read status of the specified StorageVersion\n * @param name name of the StorageVersion\n * @param pretty If \\'true\\', then the output is pretty printed.\n */\n async readStorageVersionStatus(name, pretty, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/internal.apiserver.k8s.io/v1alpha1/storageversions/{name}/status'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling readStorageVersionStatus.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1alpha1StorageVersion\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * replace the specified StorageVersion\n * @param name name of the StorageVersion\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n */\n async replaceStorageVersion(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/internal.apiserver.k8s.io/v1alpha1/storageversions/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling replaceStorageVersion.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling replaceStorageVersion.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1alpha1StorageVersion\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1alpha1StorageVersion\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * replace status of the specified StorageVersion\n * @param name name of the StorageVersion\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n */\n async replaceStorageVersionStatus(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/internal.apiserver.k8s.io/v1alpha1/storageversions/{name}/status'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling replaceStorageVersionStatus.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling replaceStorageVersionStatus.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1alpha1StorageVersion\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1alpha1StorageVersion\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n}\nexports.InternalApiserverV1alpha1Api = InternalApiserverV1alpha1Api;\n//# sourceMappingURL=internalApiserverV1alpha1Api.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.LogsApi = exports.LogsApiApiKeys = void 0;\nconst tslib_1 = require(\"tslib\");\nconst request_1 = tslib_1.__importDefault(require(\"request\"));\n/* tslint:disable:no-unused-locals */\nconst models_1 = require(\"../model/models\");\nconst models_2 = require(\"../model/models\");\nconst apis_1 = require(\"./apis\");\nlet defaultBasePath = 'http://localhost';\n// ===============================================\n// This file is autogenerated - Please do not edit\n// ===============================================\nvar LogsApiApiKeys;\n(function (LogsApiApiKeys) {\n LogsApiApiKeys[LogsApiApiKeys[\"BearerToken\"] = 0] = \"BearerToken\";\n})(LogsApiApiKeys = exports.LogsApiApiKeys || (exports.LogsApiApiKeys = {}));\nclass LogsApi {\n constructor(basePathOrUsername, password, basePath) {\n this._basePath = defaultBasePath;\n this._defaultHeaders = {};\n this._useQuerystring = false;\n this.authentications = {\n 'default': new models_1.VoidAuth(),\n 'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'),\n };\n this.interceptors = [];\n if (password) {\n if (basePath) {\n this.basePath = basePath;\n }\n }\n else {\n if (basePathOrUsername) {\n this.basePath = basePathOrUsername;\n }\n }\n }\n set useQuerystring(value) {\n this._useQuerystring = value;\n }\n set basePath(basePath) {\n this._basePath = basePath;\n }\n set defaultHeaders(defaultHeaders) {\n this._defaultHeaders = defaultHeaders;\n }\n get defaultHeaders() {\n return this._defaultHeaders;\n }\n get basePath() {\n return this._basePath;\n }\n setDefaultAuthentication(auth) {\n this.authentications.default = auth;\n }\n setApiKey(key, value) {\n this.authentications[LogsApiApiKeys[key]].apiKey = value;\n }\n addInterceptor(interceptor) {\n this.interceptors.push(interceptor);\n }\n /**\n *\n * @param logpath path to the log\n */\n async logFileHandler(logpath, options = { headers: {} }) {\n const localVarPath = this.basePath + '/logs/{logpath}'\n .replace('{' + 'logpath' + '}', encodeURIComponent(String(logpath)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n let localVarFormParams = {};\n // verify required parameter 'logpath' is not null or undefined\n if (logpath === null || logpath === undefined) {\n throw new Error('Required parameter logpath was null or undefined when calling logFileHandler.');\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n *\n */\n async logFileListHandler(options = { headers: {} }) {\n const localVarPath = this.basePath + '/logs/';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n let localVarFormParams = {};\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n}\nexports.LogsApi = LogsApi;\n//# sourceMappingURL=logsApi.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.NetworkingApi = exports.NetworkingApiApiKeys = void 0;\nconst tslib_1 = require(\"tslib\");\nconst request_1 = tslib_1.__importDefault(require(\"request\"));\nconst models_1 = require(\"../model/models\");\nconst models_2 = require(\"../model/models\");\nconst apis_1 = require(\"./apis\");\nlet defaultBasePath = 'http://localhost';\n// ===============================================\n// This file is autogenerated - Please do not edit\n// ===============================================\nvar NetworkingApiApiKeys;\n(function (NetworkingApiApiKeys) {\n NetworkingApiApiKeys[NetworkingApiApiKeys[\"BearerToken\"] = 0] = \"BearerToken\";\n})(NetworkingApiApiKeys = exports.NetworkingApiApiKeys || (exports.NetworkingApiApiKeys = {}));\nclass NetworkingApi {\n constructor(basePathOrUsername, password, basePath) {\n this._basePath = defaultBasePath;\n this._defaultHeaders = {};\n this._useQuerystring = false;\n this.authentications = {\n 'default': new models_1.VoidAuth(),\n 'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'),\n };\n this.interceptors = [];\n if (password) {\n if (basePath) {\n this.basePath = basePath;\n }\n }\n else {\n if (basePathOrUsername) {\n this.basePath = basePathOrUsername;\n }\n }\n }\n set useQuerystring(value) {\n this._useQuerystring = value;\n }\n set basePath(basePath) {\n this._basePath = basePath;\n }\n set defaultHeaders(defaultHeaders) {\n this._defaultHeaders = defaultHeaders;\n }\n get defaultHeaders() {\n return this._defaultHeaders;\n }\n get basePath() {\n return this._basePath;\n }\n setDefaultAuthentication(auth) {\n this.authentications.default = auth;\n }\n setApiKey(key, value) {\n this.authentications[NetworkingApiApiKeys[key]].apiKey = value;\n }\n addInterceptor(interceptor) {\n this.interceptors.push(interceptor);\n }\n /**\n * get information of a group\n */\n async getAPIGroup(options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/networking.k8s.io/';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1APIGroup\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n}\nexports.NetworkingApi = NetworkingApi;\n//# sourceMappingURL=networkingApi.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.NetworkingV1Api = exports.NetworkingV1ApiApiKeys = void 0;\nconst tslib_1 = require(\"tslib\");\nconst request_1 = tslib_1.__importDefault(require(\"request\"));\nconst models_1 = require(\"../model/models\");\nconst models_2 = require(\"../model/models\");\nconst apis_1 = require(\"./apis\");\nlet defaultBasePath = 'http://localhost';\n// ===============================================\n// This file is autogenerated - Please do not edit\n// ===============================================\nvar NetworkingV1ApiApiKeys;\n(function (NetworkingV1ApiApiKeys) {\n NetworkingV1ApiApiKeys[NetworkingV1ApiApiKeys[\"BearerToken\"] = 0] = \"BearerToken\";\n})(NetworkingV1ApiApiKeys = exports.NetworkingV1ApiApiKeys || (exports.NetworkingV1ApiApiKeys = {}));\nclass NetworkingV1Api {\n constructor(basePathOrUsername, password, basePath) {\n this._basePath = defaultBasePath;\n this._defaultHeaders = {};\n this._useQuerystring = false;\n this.authentications = {\n 'default': new models_1.VoidAuth(),\n 'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'),\n };\n this.interceptors = [];\n if (password) {\n if (basePath) {\n this.basePath = basePath;\n }\n }\n else {\n if (basePathOrUsername) {\n this.basePath = basePathOrUsername;\n }\n }\n }\n set useQuerystring(value) {\n this._useQuerystring = value;\n }\n set basePath(basePath) {\n this._basePath = basePath;\n }\n set defaultHeaders(defaultHeaders) {\n this._defaultHeaders = defaultHeaders;\n }\n get defaultHeaders() {\n return this._defaultHeaders;\n }\n get basePath() {\n return this._basePath;\n }\n setDefaultAuthentication(auth) {\n this.authentications.default = auth;\n }\n setApiKey(key, value) {\n this.authentications[NetworkingV1ApiApiKeys[key]].apiKey = value;\n }\n addInterceptor(interceptor) {\n this.interceptors.push(interceptor);\n }\n /**\n * create an IngressClass\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n */\n async createIngressClass(body, pretty, dryRun, fieldManager, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/networking.k8s.io/v1/ingressclasses';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling createIngressClass.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'POST',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1IngressClass\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1IngressClass\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * create an Ingress\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n */\n async createNamespacedIngress(namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/networking.k8s.io/v1/namespaces/{namespace}/ingresses'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling createNamespacedIngress.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling createNamespacedIngress.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'POST',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1Ingress\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1Ingress\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * create a NetworkPolicy\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n */\n async createNamespacedNetworkPolicy(namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/networking.k8s.io/v1/namespaces/{namespace}/networkpolicies'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling createNamespacedNetworkPolicy.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling createNamespacedNetworkPolicy.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'POST',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1NetworkPolicy\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1NetworkPolicy\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * delete collection of IngressClass\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @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.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @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.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @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.\n * @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.\n * @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.\n * @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\n * @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\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param body\n */\n async deleteCollectionIngressClass(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/networking.k8s.io/v1/ingressclasses';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (gracePeriodSeconds !== undefined) {\n localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, \"number\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, \"number\");\n }\n if (orphanDependents !== undefined) {\n localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, \"boolean\");\n }\n if (propagationPolicy !== undefined) {\n localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, \"string\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (resourceVersionMatch !== undefined) {\n localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1DeleteOptions\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1Status\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * delete collection of Ingress\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @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.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @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.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @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.\n * @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.\n * @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.\n * @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\n * @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\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param body\n */\n async deleteCollectionNamespacedIngress(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/networking.k8s.io/v1/namespaces/{namespace}/ingresses'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedIngress.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (gracePeriodSeconds !== undefined) {\n localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, \"number\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, \"number\");\n }\n if (orphanDependents !== undefined) {\n localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, \"boolean\");\n }\n if (propagationPolicy !== undefined) {\n localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, \"string\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (resourceVersionMatch !== undefined) {\n localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1DeleteOptions\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1Status\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * delete collection of NetworkPolicy\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @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.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @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.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @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.\n * @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.\n * @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.\n * @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\n * @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\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param body\n */\n async deleteCollectionNamespacedNetworkPolicy(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/networking.k8s.io/v1/namespaces/{namespace}/networkpolicies'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedNetworkPolicy.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (gracePeriodSeconds !== undefined) {\n localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, \"number\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, \"number\");\n }\n if (orphanDependents !== undefined) {\n localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, \"boolean\");\n }\n if (propagationPolicy !== undefined) {\n localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, \"string\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (resourceVersionMatch !== undefined) {\n localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1DeleteOptions\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1Status\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * delete an IngressClass\n * @param name name of the IngressClass\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @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.\n * @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.\n * @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.\n * @param body\n */\n async deleteIngressClass(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/networking.k8s.io/v1/ingressclasses/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling deleteIngressClass.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (gracePeriodSeconds !== undefined) {\n localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, \"number\");\n }\n if (orphanDependents !== undefined) {\n localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, \"boolean\");\n }\n if (propagationPolicy !== undefined) {\n localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1DeleteOptions\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1Status\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * delete an Ingress\n * @param name name of the Ingress\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @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.\n * @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.\n * @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.\n * @param body\n */\n async deleteNamespacedIngress(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/networking.k8s.io/v1/namespaces/{namespace}/ingresses/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling deleteNamespacedIngress.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedIngress.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (gracePeriodSeconds !== undefined) {\n localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, \"number\");\n }\n if (orphanDependents !== undefined) {\n localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, \"boolean\");\n }\n if (propagationPolicy !== undefined) {\n localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1DeleteOptions\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1Status\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * delete a NetworkPolicy\n * @param name name of the NetworkPolicy\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @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.\n * @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.\n * @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.\n * @param body\n */\n async deleteNamespacedNetworkPolicy(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/networking.k8s.io/v1/namespaces/{namespace}/networkpolicies/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling deleteNamespacedNetworkPolicy.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedNetworkPolicy.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (gracePeriodSeconds !== undefined) {\n localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, \"number\");\n }\n if (orphanDependents !== undefined) {\n localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, \"boolean\");\n }\n if (propagationPolicy !== undefined) {\n localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1DeleteOptions\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1Status\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * get available resources\n */\n async getAPIResources(options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/networking.k8s.io/v1/';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1APIResourceList\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * list or watch objects of kind IngressClass\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @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.\n * @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.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @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.\n * @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\n * @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\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n */\n async listIngressClass(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/networking.k8s.io/v1/ingressclasses';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (allowWatchBookmarks !== undefined) {\n localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, \"boolean\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, \"number\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (resourceVersionMatch !== undefined) {\n localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1IngressClassList\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * list or watch objects of kind Ingress\n * @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.\n * @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.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @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.\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @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\n * @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\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n */\n async listIngressForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/networking.k8s.io/v1/ingresses';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n if (allowWatchBookmarks !== undefined) {\n localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, \"boolean\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, \"number\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (resourceVersionMatch !== undefined) {\n localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1IngressList\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * list or watch objects of kind Ingress\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @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.\n * @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.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @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.\n * @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\n * @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\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n */\n async listNamespacedIngress(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/networking.k8s.io/v1/namespaces/{namespace}/ingresses'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling listNamespacedIngress.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (allowWatchBookmarks !== undefined) {\n localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, \"boolean\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, \"number\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (resourceVersionMatch !== undefined) {\n localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1IngressList\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * list or watch objects of kind NetworkPolicy\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @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.\n * @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.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @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.\n * @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\n * @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\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n */\n async listNamespacedNetworkPolicy(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/networking.k8s.io/v1/namespaces/{namespace}/networkpolicies'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling listNamespacedNetworkPolicy.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (allowWatchBookmarks !== undefined) {\n localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, \"boolean\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, \"number\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (resourceVersionMatch !== undefined) {\n localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1NetworkPolicyList\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * list or watch objects of kind NetworkPolicy\n * @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.\n * @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.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @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.\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @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\n * @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\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n */\n async listNetworkPolicyForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/networking.k8s.io/v1/networkpolicies';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n if (allowWatchBookmarks !== undefined) {\n localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, \"boolean\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, \"number\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (resourceVersionMatch !== undefined) {\n localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1NetworkPolicyList\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * partially update the specified IngressClass\n * @param name name of the IngressClass\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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).\n * @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.\n */\n async patchIngressClass(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/networking.k8s.io/v1/ingressclasses/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling patchIngressClass.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling patchIngressClass.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n if (force !== undefined) {\n localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"object\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1IngressClass\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * partially update the specified Ingress\n * @param name name of the Ingress\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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).\n * @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.\n */\n async patchNamespacedIngress(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/networking.k8s.io/v1/namespaces/{namespace}/ingresses/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling patchNamespacedIngress.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedIngress.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling patchNamespacedIngress.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n if (force !== undefined) {\n localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"object\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1Ingress\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * partially update status of the specified Ingress\n * @param name name of the Ingress\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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).\n * @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.\n */\n async patchNamespacedIngressStatus(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/networking.k8s.io/v1/namespaces/{namespace}/ingresses/{name}/status'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling patchNamespacedIngressStatus.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedIngressStatus.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling patchNamespacedIngressStatus.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n if (force !== undefined) {\n localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"object\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1Ingress\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * partially update the specified NetworkPolicy\n * @param name name of the NetworkPolicy\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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).\n * @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.\n */\n async patchNamespacedNetworkPolicy(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/networking.k8s.io/v1/namespaces/{namespace}/networkpolicies/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling patchNamespacedNetworkPolicy.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedNetworkPolicy.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling patchNamespacedNetworkPolicy.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n if (force !== undefined) {\n localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"object\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1NetworkPolicy\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * read the specified IngressClass\n * @param name name of the IngressClass\n * @param pretty If \\'true\\', then the output is pretty printed.\n */\n async readIngressClass(name, pretty, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/networking.k8s.io/v1/ingressclasses/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling readIngressClass.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1IngressClass\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * read the specified Ingress\n * @param name name of the Ingress\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If \\'true\\', then the output is pretty printed.\n */\n async readNamespacedIngress(name, namespace, pretty, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/networking.k8s.io/v1/namespaces/{namespace}/ingresses/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling readNamespacedIngress.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling readNamespacedIngress.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1Ingress\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * read status of the specified Ingress\n * @param name name of the Ingress\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If \\'true\\', then the output is pretty printed.\n */\n async readNamespacedIngressStatus(name, namespace, pretty, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/networking.k8s.io/v1/namespaces/{namespace}/ingresses/{name}/status'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling readNamespacedIngressStatus.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling readNamespacedIngressStatus.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1Ingress\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * read the specified NetworkPolicy\n * @param name name of the NetworkPolicy\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If \\'true\\', then the output is pretty printed.\n */\n async readNamespacedNetworkPolicy(name, namespace, pretty, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/networking.k8s.io/v1/namespaces/{namespace}/networkpolicies/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling readNamespacedNetworkPolicy.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling readNamespacedNetworkPolicy.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1NetworkPolicy\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * replace the specified IngressClass\n * @param name name of the IngressClass\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n */\n async replaceIngressClass(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/networking.k8s.io/v1/ingressclasses/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling replaceIngressClass.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling replaceIngressClass.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1IngressClass\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1IngressClass\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * replace the specified Ingress\n * @param name name of the Ingress\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n */\n async replaceNamespacedIngress(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/networking.k8s.io/v1/namespaces/{namespace}/ingresses/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling replaceNamespacedIngress.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedIngress.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling replaceNamespacedIngress.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1Ingress\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1Ingress\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * replace status of the specified Ingress\n * @param name name of the Ingress\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n */\n async replaceNamespacedIngressStatus(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/networking.k8s.io/v1/namespaces/{namespace}/ingresses/{name}/status'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling replaceNamespacedIngressStatus.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedIngressStatus.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling replaceNamespacedIngressStatus.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1Ingress\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1Ingress\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * replace the specified NetworkPolicy\n * @param name name of the NetworkPolicy\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n */\n async replaceNamespacedNetworkPolicy(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/networking.k8s.io/v1/namespaces/{namespace}/networkpolicies/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling replaceNamespacedNetworkPolicy.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedNetworkPolicy.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling replaceNamespacedNetworkPolicy.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1NetworkPolicy\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1NetworkPolicy\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n}\nexports.NetworkingV1Api = NetworkingV1Api;\n//# sourceMappingURL=networkingV1Api.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.NodeApi = exports.NodeApiApiKeys = void 0;\nconst tslib_1 = require(\"tslib\");\nconst request_1 = tslib_1.__importDefault(require(\"request\"));\nconst models_1 = require(\"../model/models\");\nconst models_2 = require(\"../model/models\");\nconst apis_1 = require(\"./apis\");\nlet defaultBasePath = 'http://localhost';\n// ===============================================\n// This file is autogenerated - Please do not edit\n// ===============================================\nvar NodeApiApiKeys;\n(function (NodeApiApiKeys) {\n NodeApiApiKeys[NodeApiApiKeys[\"BearerToken\"] = 0] = \"BearerToken\";\n})(NodeApiApiKeys = exports.NodeApiApiKeys || (exports.NodeApiApiKeys = {}));\nclass NodeApi {\n constructor(basePathOrUsername, password, basePath) {\n this._basePath = defaultBasePath;\n this._defaultHeaders = {};\n this._useQuerystring = false;\n this.authentications = {\n 'default': new models_1.VoidAuth(),\n 'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'),\n };\n this.interceptors = [];\n if (password) {\n if (basePath) {\n this.basePath = basePath;\n }\n }\n else {\n if (basePathOrUsername) {\n this.basePath = basePathOrUsername;\n }\n }\n }\n set useQuerystring(value) {\n this._useQuerystring = value;\n }\n set basePath(basePath) {\n this._basePath = basePath;\n }\n set defaultHeaders(defaultHeaders) {\n this._defaultHeaders = defaultHeaders;\n }\n get defaultHeaders() {\n return this._defaultHeaders;\n }\n get basePath() {\n return this._basePath;\n }\n setDefaultAuthentication(auth) {\n this.authentications.default = auth;\n }\n setApiKey(key, value) {\n this.authentications[NodeApiApiKeys[key]].apiKey = value;\n }\n addInterceptor(interceptor) {\n this.interceptors.push(interceptor);\n }\n /**\n * get information of a group\n */\n async getAPIGroup(options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/node.k8s.io/';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1APIGroup\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n}\nexports.NodeApi = NodeApi;\n//# sourceMappingURL=nodeApi.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.NodeV1Api = exports.NodeV1ApiApiKeys = void 0;\nconst tslib_1 = require(\"tslib\");\nconst request_1 = tslib_1.__importDefault(require(\"request\"));\nconst models_1 = require(\"../model/models\");\nconst models_2 = require(\"../model/models\");\nconst apis_1 = require(\"./apis\");\nlet defaultBasePath = 'http://localhost';\n// ===============================================\n// This file is autogenerated - Please do not edit\n// ===============================================\nvar NodeV1ApiApiKeys;\n(function (NodeV1ApiApiKeys) {\n NodeV1ApiApiKeys[NodeV1ApiApiKeys[\"BearerToken\"] = 0] = \"BearerToken\";\n})(NodeV1ApiApiKeys = exports.NodeV1ApiApiKeys || (exports.NodeV1ApiApiKeys = {}));\nclass NodeV1Api {\n constructor(basePathOrUsername, password, basePath) {\n this._basePath = defaultBasePath;\n this._defaultHeaders = {};\n this._useQuerystring = false;\n this.authentications = {\n 'default': new models_1.VoidAuth(),\n 'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'),\n };\n this.interceptors = [];\n if (password) {\n if (basePath) {\n this.basePath = basePath;\n }\n }\n else {\n if (basePathOrUsername) {\n this.basePath = basePathOrUsername;\n }\n }\n }\n set useQuerystring(value) {\n this._useQuerystring = value;\n }\n set basePath(basePath) {\n this._basePath = basePath;\n }\n set defaultHeaders(defaultHeaders) {\n this._defaultHeaders = defaultHeaders;\n }\n get defaultHeaders() {\n return this._defaultHeaders;\n }\n get basePath() {\n return this._basePath;\n }\n setDefaultAuthentication(auth) {\n this.authentications.default = auth;\n }\n setApiKey(key, value) {\n this.authentications[NodeV1ApiApiKeys[key]].apiKey = value;\n }\n addInterceptor(interceptor) {\n this.interceptors.push(interceptor);\n }\n /**\n * create a RuntimeClass\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n */\n async createRuntimeClass(body, pretty, dryRun, fieldManager, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/node.k8s.io/v1/runtimeclasses';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling createRuntimeClass.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'POST',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1RuntimeClass\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1RuntimeClass\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * delete collection of RuntimeClass\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @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.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @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.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @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.\n * @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.\n * @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.\n * @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\n * @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\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param body\n */\n async deleteCollectionRuntimeClass(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/node.k8s.io/v1/runtimeclasses';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (gracePeriodSeconds !== undefined) {\n localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, \"number\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, \"number\");\n }\n if (orphanDependents !== undefined) {\n localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, \"boolean\");\n }\n if (propagationPolicy !== undefined) {\n localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, \"string\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (resourceVersionMatch !== undefined) {\n localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1DeleteOptions\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1Status\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * delete a RuntimeClass\n * @param name name of the RuntimeClass\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @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.\n * @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.\n * @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.\n * @param body\n */\n async deleteRuntimeClass(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/node.k8s.io/v1/runtimeclasses/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling deleteRuntimeClass.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (gracePeriodSeconds !== undefined) {\n localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, \"number\");\n }\n if (orphanDependents !== undefined) {\n localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, \"boolean\");\n }\n if (propagationPolicy !== undefined) {\n localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1DeleteOptions\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1Status\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * get available resources\n */\n async getAPIResources(options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/node.k8s.io/v1/';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1APIResourceList\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * list or watch objects of kind RuntimeClass\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @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.\n * @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.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @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.\n * @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\n * @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\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n */\n async listRuntimeClass(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/node.k8s.io/v1/runtimeclasses';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (allowWatchBookmarks !== undefined) {\n localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, \"boolean\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, \"number\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (resourceVersionMatch !== undefined) {\n localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1RuntimeClassList\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * partially update the specified RuntimeClass\n * @param name name of the RuntimeClass\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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).\n * @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.\n */\n async patchRuntimeClass(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/node.k8s.io/v1/runtimeclasses/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling patchRuntimeClass.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling patchRuntimeClass.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n if (force !== undefined) {\n localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"object\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1RuntimeClass\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * read the specified RuntimeClass\n * @param name name of the RuntimeClass\n * @param pretty If \\'true\\', then the output is pretty printed.\n */\n async readRuntimeClass(name, pretty, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/node.k8s.io/v1/runtimeclasses/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling readRuntimeClass.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1RuntimeClass\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * replace the specified RuntimeClass\n * @param name name of the RuntimeClass\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n */\n async replaceRuntimeClass(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/node.k8s.io/v1/runtimeclasses/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling replaceRuntimeClass.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling replaceRuntimeClass.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1RuntimeClass\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1RuntimeClass\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n}\nexports.NodeV1Api = NodeV1Api;\n//# sourceMappingURL=nodeV1Api.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.NodeV1alpha1Api = exports.NodeV1alpha1ApiApiKeys = void 0;\nconst tslib_1 = require(\"tslib\");\nconst request_1 = tslib_1.__importDefault(require(\"request\"));\nconst models_1 = require(\"../model/models\");\nconst models_2 = require(\"../model/models\");\nconst apis_1 = require(\"./apis\");\nlet defaultBasePath = 'http://localhost';\n// ===============================================\n// This file is autogenerated - Please do not edit\n// ===============================================\nvar NodeV1alpha1ApiApiKeys;\n(function (NodeV1alpha1ApiApiKeys) {\n NodeV1alpha1ApiApiKeys[NodeV1alpha1ApiApiKeys[\"BearerToken\"] = 0] = \"BearerToken\";\n})(NodeV1alpha1ApiApiKeys = exports.NodeV1alpha1ApiApiKeys || (exports.NodeV1alpha1ApiApiKeys = {}));\nclass NodeV1alpha1Api {\n constructor(basePathOrUsername, password, basePath) {\n this._basePath = defaultBasePath;\n this._defaultHeaders = {};\n this._useQuerystring = false;\n this.authentications = {\n 'default': new models_1.VoidAuth(),\n 'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'),\n };\n this.interceptors = [];\n if (password) {\n if (basePath) {\n this.basePath = basePath;\n }\n }\n else {\n if (basePathOrUsername) {\n this.basePath = basePathOrUsername;\n }\n }\n }\n set useQuerystring(value) {\n this._useQuerystring = value;\n }\n set basePath(basePath) {\n this._basePath = basePath;\n }\n set defaultHeaders(defaultHeaders) {\n this._defaultHeaders = defaultHeaders;\n }\n get defaultHeaders() {\n return this._defaultHeaders;\n }\n get basePath() {\n return this._basePath;\n }\n setDefaultAuthentication(auth) {\n this.authentications.default = auth;\n }\n setApiKey(key, value) {\n this.authentications[NodeV1alpha1ApiApiKeys[key]].apiKey = value;\n }\n addInterceptor(interceptor) {\n this.interceptors.push(interceptor);\n }\n /**\n * create a RuntimeClass\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n */\n async createRuntimeClass(body, pretty, dryRun, fieldManager, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/node.k8s.io/v1alpha1/runtimeclasses';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling createRuntimeClass.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'POST',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1alpha1RuntimeClass\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1alpha1RuntimeClass\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * delete collection of RuntimeClass\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @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.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @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.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @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.\n * @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.\n * @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.\n * @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\n * @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\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param body\n */\n async deleteCollectionRuntimeClass(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/node.k8s.io/v1alpha1/runtimeclasses';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (gracePeriodSeconds !== undefined) {\n localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, \"number\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, \"number\");\n }\n if (orphanDependents !== undefined) {\n localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, \"boolean\");\n }\n if (propagationPolicy !== undefined) {\n localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, \"string\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (resourceVersionMatch !== undefined) {\n localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1DeleteOptions\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1Status\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * delete a RuntimeClass\n * @param name name of the RuntimeClass\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @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.\n * @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.\n * @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.\n * @param body\n */\n async deleteRuntimeClass(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/node.k8s.io/v1alpha1/runtimeclasses/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling deleteRuntimeClass.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (gracePeriodSeconds !== undefined) {\n localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, \"number\");\n }\n if (orphanDependents !== undefined) {\n localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, \"boolean\");\n }\n if (propagationPolicy !== undefined) {\n localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1DeleteOptions\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1Status\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * get available resources\n */\n async getAPIResources(options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/node.k8s.io/v1alpha1/';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1APIResourceList\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * list or watch objects of kind RuntimeClass\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @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.\n * @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.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @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.\n * @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\n * @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\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n */\n async listRuntimeClass(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/node.k8s.io/v1alpha1/runtimeclasses';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (allowWatchBookmarks !== undefined) {\n localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, \"boolean\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, \"number\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (resourceVersionMatch !== undefined) {\n localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1alpha1RuntimeClassList\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * partially update the specified RuntimeClass\n * @param name name of the RuntimeClass\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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).\n * @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.\n */\n async patchRuntimeClass(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/node.k8s.io/v1alpha1/runtimeclasses/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling patchRuntimeClass.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling patchRuntimeClass.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n if (force !== undefined) {\n localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"object\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1alpha1RuntimeClass\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * read the specified RuntimeClass\n * @param name name of the RuntimeClass\n * @param pretty If \\'true\\', then the output is pretty printed.\n */\n async readRuntimeClass(name, pretty, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/node.k8s.io/v1alpha1/runtimeclasses/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling readRuntimeClass.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1alpha1RuntimeClass\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * replace the specified RuntimeClass\n * @param name name of the RuntimeClass\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n */\n async replaceRuntimeClass(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/node.k8s.io/v1alpha1/runtimeclasses/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling replaceRuntimeClass.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling replaceRuntimeClass.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1alpha1RuntimeClass\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1alpha1RuntimeClass\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n}\nexports.NodeV1alpha1Api = NodeV1alpha1Api;\n//# sourceMappingURL=nodeV1alpha1Api.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.NodeV1beta1Api = exports.NodeV1beta1ApiApiKeys = void 0;\nconst tslib_1 = require(\"tslib\");\nconst request_1 = tslib_1.__importDefault(require(\"request\"));\nconst models_1 = require(\"../model/models\");\nconst models_2 = require(\"../model/models\");\nconst apis_1 = require(\"./apis\");\nlet defaultBasePath = 'http://localhost';\n// ===============================================\n// This file is autogenerated - Please do not edit\n// ===============================================\nvar NodeV1beta1ApiApiKeys;\n(function (NodeV1beta1ApiApiKeys) {\n NodeV1beta1ApiApiKeys[NodeV1beta1ApiApiKeys[\"BearerToken\"] = 0] = \"BearerToken\";\n})(NodeV1beta1ApiApiKeys = exports.NodeV1beta1ApiApiKeys || (exports.NodeV1beta1ApiApiKeys = {}));\nclass NodeV1beta1Api {\n constructor(basePathOrUsername, password, basePath) {\n this._basePath = defaultBasePath;\n this._defaultHeaders = {};\n this._useQuerystring = false;\n this.authentications = {\n 'default': new models_1.VoidAuth(),\n 'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'),\n };\n this.interceptors = [];\n if (password) {\n if (basePath) {\n this.basePath = basePath;\n }\n }\n else {\n if (basePathOrUsername) {\n this.basePath = basePathOrUsername;\n }\n }\n }\n set useQuerystring(value) {\n this._useQuerystring = value;\n }\n set basePath(basePath) {\n this._basePath = basePath;\n }\n set defaultHeaders(defaultHeaders) {\n this._defaultHeaders = defaultHeaders;\n }\n get defaultHeaders() {\n return this._defaultHeaders;\n }\n get basePath() {\n return this._basePath;\n }\n setDefaultAuthentication(auth) {\n this.authentications.default = auth;\n }\n setApiKey(key, value) {\n this.authentications[NodeV1beta1ApiApiKeys[key]].apiKey = value;\n }\n addInterceptor(interceptor) {\n this.interceptors.push(interceptor);\n }\n /**\n * create a RuntimeClass\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n */\n async createRuntimeClass(body, pretty, dryRun, fieldManager, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/node.k8s.io/v1beta1/runtimeclasses';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling createRuntimeClass.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'POST',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1beta1RuntimeClass\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1beta1RuntimeClass\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * delete collection of RuntimeClass\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @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.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @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.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @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.\n * @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.\n * @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.\n * @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\n * @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\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param body\n */\n async deleteCollectionRuntimeClass(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/node.k8s.io/v1beta1/runtimeclasses';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (gracePeriodSeconds !== undefined) {\n localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, \"number\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, \"number\");\n }\n if (orphanDependents !== undefined) {\n localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, \"boolean\");\n }\n if (propagationPolicy !== undefined) {\n localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, \"string\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (resourceVersionMatch !== undefined) {\n localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1DeleteOptions\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1Status\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * delete a RuntimeClass\n * @param name name of the RuntimeClass\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @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.\n * @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.\n * @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.\n * @param body\n */\n async deleteRuntimeClass(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/node.k8s.io/v1beta1/runtimeclasses/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling deleteRuntimeClass.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (gracePeriodSeconds !== undefined) {\n localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, \"number\");\n }\n if (orphanDependents !== undefined) {\n localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, \"boolean\");\n }\n if (propagationPolicy !== undefined) {\n localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1DeleteOptions\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1Status\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * get available resources\n */\n async getAPIResources(options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/node.k8s.io/v1beta1/';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1APIResourceList\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * list or watch objects of kind RuntimeClass\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @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.\n * @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.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @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.\n * @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\n * @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\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n */\n async listRuntimeClass(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/node.k8s.io/v1beta1/runtimeclasses';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (allowWatchBookmarks !== undefined) {\n localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, \"boolean\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, \"number\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (resourceVersionMatch !== undefined) {\n localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1beta1RuntimeClassList\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * partially update the specified RuntimeClass\n * @param name name of the RuntimeClass\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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).\n * @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.\n */\n async patchRuntimeClass(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/node.k8s.io/v1beta1/runtimeclasses/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling patchRuntimeClass.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling patchRuntimeClass.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n if (force !== undefined) {\n localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"object\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1beta1RuntimeClass\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * read the specified RuntimeClass\n * @param name name of the RuntimeClass\n * @param pretty If \\'true\\', then the output is pretty printed.\n */\n async readRuntimeClass(name, pretty, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/node.k8s.io/v1beta1/runtimeclasses/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling readRuntimeClass.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1beta1RuntimeClass\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * replace the specified RuntimeClass\n * @param name name of the RuntimeClass\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n */\n async replaceRuntimeClass(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/node.k8s.io/v1beta1/runtimeclasses/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling replaceRuntimeClass.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling replaceRuntimeClass.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1beta1RuntimeClass\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1beta1RuntimeClass\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n}\nexports.NodeV1beta1Api = NodeV1beta1Api;\n//# sourceMappingURL=nodeV1beta1Api.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.OpenidApi = exports.OpenidApiApiKeys = void 0;\nconst tslib_1 = require(\"tslib\");\nconst request_1 = tslib_1.__importDefault(require(\"request\"));\n/* tslint:disable:no-unused-locals */\nconst models_1 = require(\"../model/models\");\nconst models_2 = require(\"../model/models\");\nconst apis_1 = require(\"./apis\");\nlet defaultBasePath = 'http://localhost';\n// ===============================================\n// This file is autogenerated - Please do not edit\n// ===============================================\nvar OpenidApiApiKeys;\n(function (OpenidApiApiKeys) {\n OpenidApiApiKeys[OpenidApiApiKeys[\"BearerToken\"] = 0] = \"BearerToken\";\n})(OpenidApiApiKeys = exports.OpenidApiApiKeys || (exports.OpenidApiApiKeys = {}));\nclass OpenidApi {\n constructor(basePathOrUsername, password, basePath) {\n this._basePath = defaultBasePath;\n this._defaultHeaders = {};\n this._useQuerystring = false;\n this.authentications = {\n 'default': new models_1.VoidAuth(),\n 'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'),\n };\n this.interceptors = [];\n if (password) {\n if (basePath) {\n this.basePath = basePath;\n }\n }\n else {\n if (basePathOrUsername) {\n this.basePath = basePathOrUsername;\n }\n }\n }\n set useQuerystring(value) {\n this._useQuerystring = value;\n }\n set basePath(basePath) {\n this._basePath = basePath;\n }\n set defaultHeaders(defaultHeaders) {\n this._defaultHeaders = defaultHeaders;\n }\n get defaultHeaders() {\n return this._defaultHeaders;\n }\n get basePath() {\n return this._basePath;\n }\n setDefaultAuthentication(auth) {\n this.authentications.default = auth;\n }\n setApiKey(key, value) {\n this.authentications[OpenidApiApiKeys[key]].apiKey = value;\n }\n addInterceptor(interceptor) {\n this.interceptors.push(interceptor);\n }\n /**\n * get service account issuer OpenID JSON Web Key Set (contains public token verification keys)\n */\n async getServiceAccountIssuerOpenIDKeyset(options = { headers: {} }) {\n const localVarPath = this.basePath + '/openid/v1/jwks/';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/jwk-set+json'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"string\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n}\nexports.OpenidApi = OpenidApi;\n//# sourceMappingURL=openidApi.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.PolicyApi = exports.PolicyApiApiKeys = void 0;\nconst tslib_1 = require(\"tslib\");\nconst request_1 = tslib_1.__importDefault(require(\"request\"));\nconst models_1 = require(\"../model/models\");\nconst models_2 = require(\"../model/models\");\nconst apis_1 = require(\"./apis\");\nlet defaultBasePath = 'http://localhost';\n// ===============================================\n// This file is autogenerated - Please do not edit\n// ===============================================\nvar PolicyApiApiKeys;\n(function (PolicyApiApiKeys) {\n PolicyApiApiKeys[PolicyApiApiKeys[\"BearerToken\"] = 0] = \"BearerToken\";\n})(PolicyApiApiKeys = exports.PolicyApiApiKeys || (exports.PolicyApiApiKeys = {}));\nclass PolicyApi {\n constructor(basePathOrUsername, password, basePath) {\n this._basePath = defaultBasePath;\n this._defaultHeaders = {};\n this._useQuerystring = false;\n this.authentications = {\n 'default': new models_1.VoidAuth(),\n 'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'),\n };\n this.interceptors = [];\n if (password) {\n if (basePath) {\n this.basePath = basePath;\n }\n }\n else {\n if (basePathOrUsername) {\n this.basePath = basePathOrUsername;\n }\n }\n }\n set useQuerystring(value) {\n this._useQuerystring = value;\n }\n set basePath(basePath) {\n this._basePath = basePath;\n }\n set defaultHeaders(defaultHeaders) {\n this._defaultHeaders = defaultHeaders;\n }\n get defaultHeaders() {\n return this._defaultHeaders;\n }\n get basePath() {\n return this._basePath;\n }\n setDefaultAuthentication(auth) {\n this.authentications.default = auth;\n }\n setApiKey(key, value) {\n this.authentications[PolicyApiApiKeys[key]].apiKey = value;\n }\n addInterceptor(interceptor) {\n this.interceptors.push(interceptor);\n }\n /**\n * get information of a group\n */\n async getAPIGroup(options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/policy/';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1APIGroup\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n}\nexports.PolicyApi = PolicyApi;\n//# sourceMappingURL=policyApi.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.PolicyV1Api = exports.PolicyV1ApiApiKeys = void 0;\nconst tslib_1 = require(\"tslib\");\nconst request_1 = tslib_1.__importDefault(require(\"request\"));\nconst models_1 = require(\"../model/models\");\nconst models_2 = require(\"../model/models\");\nconst apis_1 = require(\"./apis\");\nlet defaultBasePath = 'http://localhost';\n// ===============================================\n// This file is autogenerated - Please do not edit\n// ===============================================\nvar PolicyV1ApiApiKeys;\n(function (PolicyV1ApiApiKeys) {\n PolicyV1ApiApiKeys[PolicyV1ApiApiKeys[\"BearerToken\"] = 0] = \"BearerToken\";\n})(PolicyV1ApiApiKeys = exports.PolicyV1ApiApiKeys || (exports.PolicyV1ApiApiKeys = {}));\nclass PolicyV1Api {\n constructor(basePathOrUsername, password, basePath) {\n this._basePath = defaultBasePath;\n this._defaultHeaders = {};\n this._useQuerystring = false;\n this.authentications = {\n 'default': new models_1.VoidAuth(),\n 'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'),\n };\n this.interceptors = [];\n if (password) {\n if (basePath) {\n this.basePath = basePath;\n }\n }\n else {\n if (basePathOrUsername) {\n this.basePath = basePathOrUsername;\n }\n }\n }\n set useQuerystring(value) {\n this._useQuerystring = value;\n }\n set basePath(basePath) {\n this._basePath = basePath;\n }\n set defaultHeaders(defaultHeaders) {\n this._defaultHeaders = defaultHeaders;\n }\n get defaultHeaders() {\n return this._defaultHeaders;\n }\n get basePath() {\n return this._basePath;\n }\n setDefaultAuthentication(auth) {\n this.authentications.default = auth;\n }\n setApiKey(key, value) {\n this.authentications[PolicyV1ApiApiKeys[key]].apiKey = value;\n }\n addInterceptor(interceptor) {\n this.interceptors.push(interceptor);\n }\n /**\n * create a PodDisruptionBudget\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n */\n async createNamespacedPodDisruptionBudget(namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/policy/v1/namespaces/{namespace}/poddisruptionbudgets'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling createNamespacedPodDisruptionBudget.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling createNamespacedPodDisruptionBudget.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'POST',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1PodDisruptionBudget\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1PodDisruptionBudget\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * delete collection of PodDisruptionBudget\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @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.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @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.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @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.\n * @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.\n * @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.\n * @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\n * @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\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param body\n */\n async deleteCollectionNamespacedPodDisruptionBudget(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/policy/v1/namespaces/{namespace}/poddisruptionbudgets'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedPodDisruptionBudget.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (gracePeriodSeconds !== undefined) {\n localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, \"number\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, \"number\");\n }\n if (orphanDependents !== undefined) {\n localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, \"boolean\");\n }\n if (propagationPolicy !== undefined) {\n localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, \"string\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (resourceVersionMatch !== undefined) {\n localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1DeleteOptions\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1Status\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * delete a PodDisruptionBudget\n * @param name name of the PodDisruptionBudget\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @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.\n * @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.\n * @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.\n * @param body\n */\n async deleteNamespacedPodDisruptionBudget(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/policy/v1/namespaces/{namespace}/poddisruptionbudgets/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling deleteNamespacedPodDisruptionBudget.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedPodDisruptionBudget.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (gracePeriodSeconds !== undefined) {\n localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, \"number\");\n }\n if (orphanDependents !== undefined) {\n localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, \"boolean\");\n }\n if (propagationPolicy !== undefined) {\n localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1DeleteOptions\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1Status\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * get available resources\n */\n async getAPIResources(options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/policy/v1/';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1APIResourceList\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * list or watch objects of kind PodDisruptionBudget\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @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.\n * @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.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @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.\n * @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\n * @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\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n */\n async listNamespacedPodDisruptionBudget(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/policy/v1/namespaces/{namespace}/poddisruptionbudgets'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling listNamespacedPodDisruptionBudget.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (allowWatchBookmarks !== undefined) {\n localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, \"boolean\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, \"number\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (resourceVersionMatch !== undefined) {\n localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1PodDisruptionBudgetList\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * list or watch objects of kind PodDisruptionBudget\n * @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.\n * @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.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @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.\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @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\n * @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\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n */\n async listPodDisruptionBudgetForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/policy/v1/poddisruptionbudgets';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n if (allowWatchBookmarks !== undefined) {\n localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, \"boolean\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, \"number\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (resourceVersionMatch !== undefined) {\n localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1PodDisruptionBudgetList\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * partially update the specified PodDisruptionBudget\n * @param name name of the PodDisruptionBudget\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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).\n * @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.\n */\n async patchNamespacedPodDisruptionBudget(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/policy/v1/namespaces/{namespace}/poddisruptionbudgets/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling patchNamespacedPodDisruptionBudget.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedPodDisruptionBudget.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling patchNamespacedPodDisruptionBudget.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n if (force !== undefined) {\n localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"object\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1PodDisruptionBudget\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * partially update status of the specified PodDisruptionBudget\n * @param name name of the PodDisruptionBudget\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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).\n * @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.\n */\n async patchNamespacedPodDisruptionBudgetStatus(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/policy/v1/namespaces/{namespace}/poddisruptionbudgets/{name}/status'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling patchNamespacedPodDisruptionBudgetStatus.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedPodDisruptionBudgetStatus.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling patchNamespacedPodDisruptionBudgetStatus.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n if (force !== undefined) {\n localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"object\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1PodDisruptionBudget\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * read the specified PodDisruptionBudget\n * @param name name of the PodDisruptionBudget\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If \\'true\\', then the output is pretty printed.\n */\n async readNamespacedPodDisruptionBudget(name, namespace, pretty, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/policy/v1/namespaces/{namespace}/poddisruptionbudgets/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling readNamespacedPodDisruptionBudget.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling readNamespacedPodDisruptionBudget.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1PodDisruptionBudget\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * read status of the specified PodDisruptionBudget\n * @param name name of the PodDisruptionBudget\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If \\'true\\', then the output is pretty printed.\n */\n async readNamespacedPodDisruptionBudgetStatus(name, namespace, pretty, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/policy/v1/namespaces/{namespace}/poddisruptionbudgets/{name}/status'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling readNamespacedPodDisruptionBudgetStatus.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling readNamespacedPodDisruptionBudgetStatus.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1PodDisruptionBudget\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * replace the specified PodDisruptionBudget\n * @param name name of the PodDisruptionBudget\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n */\n async replaceNamespacedPodDisruptionBudget(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/policy/v1/namespaces/{namespace}/poddisruptionbudgets/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling replaceNamespacedPodDisruptionBudget.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedPodDisruptionBudget.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling replaceNamespacedPodDisruptionBudget.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1PodDisruptionBudget\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1PodDisruptionBudget\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * replace status of the specified PodDisruptionBudget\n * @param name name of the PodDisruptionBudget\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n */\n async replaceNamespacedPodDisruptionBudgetStatus(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/policy/v1/namespaces/{namespace}/poddisruptionbudgets/{name}/status'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling replaceNamespacedPodDisruptionBudgetStatus.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedPodDisruptionBudgetStatus.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling replaceNamespacedPodDisruptionBudgetStatus.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1PodDisruptionBudget\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1PodDisruptionBudget\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n}\nexports.PolicyV1Api = PolicyV1Api;\n//# sourceMappingURL=policyV1Api.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.PolicyV1beta1Api = exports.PolicyV1beta1ApiApiKeys = void 0;\nconst tslib_1 = require(\"tslib\");\nconst request_1 = tslib_1.__importDefault(require(\"request\"));\nconst models_1 = require(\"../model/models\");\nconst models_2 = require(\"../model/models\");\nconst apis_1 = require(\"./apis\");\nlet defaultBasePath = 'http://localhost';\n// ===============================================\n// This file is autogenerated - Please do not edit\n// ===============================================\nvar PolicyV1beta1ApiApiKeys;\n(function (PolicyV1beta1ApiApiKeys) {\n PolicyV1beta1ApiApiKeys[PolicyV1beta1ApiApiKeys[\"BearerToken\"] = 0] = \"BearerToken\";\n})(PolicyV1beta1ApiApiKeys = exports.PolicyV1beta1ApiApiKeys || (exports.PolicyV1beta1ApiApiKeys = {}));\nclass PolicyV1beta1Api {\n constructor(basePathOrUsername, password, basePath) {\n this._basePath = defaultBasePath;\n this._defaultHeaders = {};\n this._useQuerystring = false;\n this.authentications = {\n 'default': new models_1.VoidAuth(),\n 'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'),\n };\n this.interceptors = [];\n if (password) {\n if (basePath) {\n this.basePath = basePath;\n }\n }\n else {\n if (basePathOrUsername) {\n this.basePath = basePathOrUsername;\n }\n }\n }\n set useQuerystring(value) {\n this._useQuerystring = value;\n }\n set basePath(basePath) {\n this._basePath = basePath;\n }\n set defaultHeaders(defaultHeaders) {\n this._defaultHeaders = defaultHeaders;\n }\n get defaultHeaders() {\n return this._defaultHeaders;\n }\n get basePath() {\n return this._basePath;\n }\n setDefaultAuthentication(auth) {\n this.authentications.default = auth;\n }\n setApiKey(key, value) {\n this.authentications[PolicyV1beta1ApiApiKeys[key]].apiKey = value;\n }\n addInterceptor(interceptor) {\n this.interceptors.push(interceptor);\n }\n /**\n * create a PodDisruptionBudget\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n */\n async createNamespacedPodDisruptionBudget(namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/policy/v1beta1/namespaces/{namespace}/poddisruptionbudgets'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling createNamespacedPodDisruptionBudget.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling createNamespacedPodDisruptionBudget.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'POST',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1beta1PodDisruptionBudget\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1beta1PodDisruptionBudget\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * create a PodSecurityPolicy\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n */\n async createPodSecurityPolicy(body, pretty, dryRun, fieldManager, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/policy/v1beta1/podsecuritypolicies';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling createPodSecurityPolicy.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'POST',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1beta1PodSecurityPolicy\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1beta1PodSecurityPolicy\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * delete collection of PodDisruptionBudget\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @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.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @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.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @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.\n * @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.\n * @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.\n * @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\n * @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\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param body\n */\n async deleteCollectionNamespacedPodDisruptionBudget(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/policy/v1beta1/namespaces/{namespace}/poddisruptionbudgets'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedPodDisruptionBudget.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (gracePeriodSeconds !== undefined) {\n localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, \"number\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, \"number\");\n }\n if (orphanDependents !== undefined) {\n localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, \"boolean\");\n }\n if (propagationPolicy !== undefined) {\n localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, \"string\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (resourceVersionMatch !== undefined) {\n localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1DeleteOptions\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1Status\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * delete collection of PodSecurityPolicy\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @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.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @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.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @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.\n * @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.\n * @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.\n * @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\n * @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\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param body\n */\n async deleteCollectionPodSecurityPolicy(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/policy/v1beta1/podsecuritypolicies';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (gracePeriodSeconds !== undefined) {\n localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, \"number\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, \"number\");\n }\n if (orphanDependents !== undefined) {\n localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, \"boolean\");\n }\n if (propagationPolicy !== undefined) {\n localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, \"string\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (resourceVersionMatch !== undefined) {\n localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1DeleteOptions\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1Status\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * delete a PodDisruptionBudget\n * @param name name of the PodDisruptionBudget\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @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.\n * @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.\n * @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.\n * @param body\n */\n async deleteNamespacedPodDisruptionBudget(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/policy/v1beta1/namespaces/{namespace}/poddisruptionbudgets/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling deleteNamespacedPodDisruptionBudget.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedPodDisruptionBudget.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (gracePeriodSeconds !== undefined) {\n localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, \"number\");\n }\n if (orphanDependents !== undefined) {\n localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, \"boolean\");\n }\n if (propagationPolicy !== undefined) {\n localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1DeleteOptions\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1Status\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * delete a PodSecurityPolicy\n * @param name name of the PodSecurityPolicy\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @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.\n * @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.\n * @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.\n * @param body\n */\n async deletePodSecurityPolicy(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/policy/v1beta1/podsecuritypolicies/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling deletePodSecurityPolicy.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (gracePeriodSeconds !== undefined) {\n localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, \"number\");\n }\n if (orphanDependents !== undefined) {\n localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, \"boolean\");\n }\n if (propagationPolicy !== undefined) {\n localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1DeleteOptions\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1beta1PodSecurityPolicy\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * get available resources\n */\n async getAPIResources(options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/policy/v1beta1/';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1APIResourceList\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * list or watch objects of kind PodDisruptionBudget\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @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.\n * @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.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @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.\n * @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\n * @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\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n */\n async listNamespacedPodDisruptionBudget(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/policy/v1beta1/namespaces/{namespace}/poddisruptionbudgets'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling listNamespacedPodDisruptionBudget.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (allowWatchBookmarks !== undefined) {\n localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, \"boolean\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, \"number\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (resourceVersionMatch !== undefined) {\n localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1beta1PodDisruptionBudgetList\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * list or watch objects of kind PodDisruptionBudget\n * @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.\n * @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.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @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.\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @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\n * @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\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n */\n async listPodDisruptionBudgetForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/policy/v1beta1/poddisruptionbudgets';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n if (allowWatchBookmarks !== undefined) {\n localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, \"boolean\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, \"number\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (resourceVersionMatch !== undefined) {\n localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1beta1PodDisruptionBudgetList\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * list or watch objects of kind PodSecurityPolicy\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @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.\n * @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.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @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.\n * @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\n * @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\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n */\n async listPodSecurityPolicy(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/policy/v1beta1/podsecuritypolicies';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (allowWatchBookmarks !== undefined) {\n localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, \"boolean\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, \"number\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (resourceVersionMatch !== undefined) {\n localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1beta1PodSecurityPolicyList\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * partially update the specified PodDisruptionBudget\n * @param name name of the PodDisruptionBudget\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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).\n * @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.\n */\n async patchNamespacedPodDisruptionBudget(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/policy/v1beta1/namespaces/{namespace}/poddisruptionbudgets/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling patchNamespacedPodDisruptionBudget.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedPodDisruptionBudget.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling patchNamespacedPodDisruptionBudget.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n if (force !== undefined) {\n localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"object\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1beta1PodDisruptionBudget\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * partially update status of the specified PodDisruptionBudget\n * @param name name of the PodDisruptionBudget\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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).\n * @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.\n */\n async patchNamespacedPodDisruptionBudgetStatus(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/policy/v1beta1/namespaces/{namespace}/poddisruptionbudgets/{name}/status'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling patchNamespacedPodDisruptionBudgetStatus.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedPodDisruptionBudgetStatus.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling patchNamespacedPodDisruptionBudgetStatus.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n if (force !== undefined) {\n localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"object\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1beta1PodDisruptionBudget\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * partially update the specified PodSecurityPolicy\n * @param name name of the PodSecurityPolicy\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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).\n * @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.\n */\n async patchPodSecurityPolicy(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/policy/v1beta1/podsecuritypolicies/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling patchPodSecurityPolicy.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling patchPodSecurityPolicy.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n if (force !== undefined) {\n localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"object\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1beta1PodSecurityPolicy\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * read the specified PodDisruptionBudget\n * @param name name of the PodDisruptionBudget\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If \\'true\\', then the output is pretty printed.\n */\n async readNamespacedPodDisruptionBudget(name, namespace, pretty, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/policy/v1beta1/namespaces/{namespace}/poddisruptionbudgets/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling readNamespacedPodDisruptionBudget.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling readNamespacedPodDisruptionBudget.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1beta1PodDisruptionBudget\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * read status of the specified PodDisruptionBudget\n * @param name name of the PodDisruptionBudget\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If \\'true\\', then the output is pretty printed.\n */\n async readNamespacedPodDisruptionBudgetStatus(name, namespace, pretty, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/policy/v1beta1/namespaces/{namespace}/poddisruptionbudgets/{name}/status'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling readNamespacedPodDisruptionBudgetStatus.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling readNamespacedPodDisruptionBudgetStatus.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1beta1PodDisruptionBudget\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * read the specified PodSecurityPolicy\n * @param name name of the PodSecurityPolicy\n * @param pretty If \\'true\\', then the output is pretty printed.\n */\n async readPodSecurityPolicy(name, pretty, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/policy/v1beta1/podsecuritypolicies/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling readPodSecurityPolicy.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1beta1PodSecurityPolicy\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * replace the specified PodDisruptionBudget\n * @param name name of the PodDisruptionBudget\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n */\n async replaceNamespacedPodDisruptionBudget(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/policy/v1beta1/namespaces/{namespace}/poddisruptionbudgets/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling replaceNamespacedPodDisruptionBudget.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedPodDisruptionBudget.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling replaceNamespacedPodDisruptionBudget.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1beta1PodDisruptionBudget\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1beta1PodDisruptionBudget\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * replace status of the specified PodDisruptionBudget\n * @param name name of the PodDisruptionBudget\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n */\n async replaceNamespacedPodDisruptionBudgetStatus(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/policy/v1beta1/namespaces/{namespace}/poddisruptionbudgets/{name}/status'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling replaceNamespacedPodDisruptionBudgetStatus.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedPodDisruptionBudgetStatus.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling replaceNamespacedPodDisruptionBudgetStatus.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1beta1PodDisruptionBudget\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1beta1PodDisruptionBudget\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * replace the specified PodSecurityPolicy\n * @param name name of the PodSecurityPolicy\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n */\n async replacePodSecurityPolicy(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/policy/v1beta1/podsecuritypolicies/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling replacePodSecurityPolicy.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling replacePodSecurityPolicy.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1beta1PodSecurityPolicy\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1beta1PodSecurityPolicy\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n}\nexports.PolicyV1beta1Api = PolicyV1beta1Api;\n//# sourceMappingURL=policyV1beta1Api.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.RbacAuthorizationApi = exports.RbacAuthorizationApiApiKeys = void 0;\nconst tslib_1 = require(\"tslib\");\nconst request_1 = tslib_1.__importDefault(require(\"request\"));\nconst models_1 = require(\"../model/models\");\nconst models_2 = require(\"../model/models\");\nconst apis_1 = require(\"./apis\");\nlet defaultBasePath = 'http://localhost';\n// ===============================================\n// This file is autogenerated - Please do not edit\n// ===============================================\nvar RbacAuthorizationApiApiKeys;\n(function (RbacAuthorizationApiApiKeys) {\n RbacAuthorizationApiApiKeys[RbacAuthorizationApiApiKeys[\"BearerToken\"] = 0] = \"BearerToken\";\n})(RbacAuthorizationApiApiKeys = exports.RbacAuthorizationApiApiKeys || (exports.RbacAuthorizationApiApiKeys = {}));\nclass RbacAuthorizationApi {\n constructor(basePathOrUsername, password, basePath) {\n this._basePath = defaultBasePath;\n this._defaultHeaders = {};\n this._useQuerystring = false;\n this.authentications = {\n 'default': new models_1.VoidAuth(),\n 'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'),\n };\n this.interceptors = [];\n if (password) {\n if (basePath) {\n this.basePath = basePath;\n }\n }\n else {\n if (basePathOrUsername) {\n this.basePath = basePathOrUsername;\n }\n }\n }\n set useQuerystring(value) {\n this._useQuerystring = value;\n }\n set basePath(basePath) {\n this._basePath = basePath;\n }\n set defaultHeaders(defaultHeaders) {\n this._defaultHeaders = defaultHeaders;\n }\n get defaultHeaders() {\n return this._defaultHeaders;\n }\n get basePath() {\n return this._basePath;\n }\n setDefaultAuthentication(auth) {\n this.authentications.default = auth;\n }\n setApiKey(key, value) {\n this.authentications[RbacAuthorizationApiApiKeys[key]].apiKey = value;\n }\n addInterceptor(interceptor) {\n this.interceptors.push(interceptor);\n }\n /**\n * get information of a group\n */\n async getAPIGroup(options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1APIGroup\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n}\nexports.RbacAuthorizationApi = RbacAuthorizationApi;\n//# sourceMappingURL=rbacAuthorizationApi.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.RbacAuthorizationV1Api = exports.RbacAuthorizationV1ApiApiKeys = void 0;\nconst tslib_1 = require(\"tslib\");\nconst request_1 = tslib_1.__importDefault(require(\"request\"));\nconst models_1 = require(\"../model/models\");\nconst models_2 = require(\"../model/models\");\nconst apis_1 = require(\"./apis\");\nlet defaultBasePath = 'http://localhost';\n// ===============================================\n// This file is autogenerated - Please do not edit\n// ===============================================\nvar RbacAuthorizationV1ApiApiKeys;\n(function (RbacAuthorizationV1ApiApiKeys) {\n RbacAuthorizationV1ApiApiKeys[RbacAuthorizationV1ApiApiKeys[\"BearerToken\"] = 0] = \"BearerToken\";\n})(RbacAuthorizationV1ApiApiKeys = exports.RbacAuthorizationV1ApiApiKeys || (exports.RbacAuthorizationV1ApiApiKeys = {}));\nclass RbacAuthorizationV1Api {\n constructor(basePathOrUsername, password, basePath) {\n this._basePath = defaultBasePath;\n this._defaultHeaders = {};\n this._useQuerystring = false;\n this.authentications = {\n 'default': new models_1.VoidAuth(),\n 'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'),\n };\n this.interceptors = [];\n if (password) {\n if (basePath) {\n this.basePath = basePath;\n }\n }\n else {\n if (basePathOrUsername) {\n this.basePath = basePathOrUsername;\n }\n }\n }\n set useQuerystring(value) {\n this._useQuerystring = value;\n }\n set basePath(basePath) {\n this._basePath = basePath;\n }\n set defaultHeaders(defaultHeaders) {\n this._defaultHeaders = defaultHeaders;\n }\n get defaultHeaders() {\n return this._defaultHeaders;\n }\n get basePath() {\n return this._basePath;\n }\n setDefaultAuthentication(auth) {\n this.authentications.default = auth;\n }\n setApiKey(key, value) {\n this.authentications[RbacAuthorizationV1ApiApiKeys[key]].apiKey = value;\n }\n addInterceptor(interceptor) {\n this.interceptors.push(interceptor);\n }\n /**\n * create a ClusterRole\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n */\n async createClusterRole(body, pretty, dryRun, fieldManager, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1/clusterroles';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling createClusterRole.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'POST',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1ClusterRole\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1ClusterRole\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * create a ClusterRoleBinding\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n */\n async createClusterRoleBinding(body, pretty, dryRun, fieldManager, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1/clusterrolebindings';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling createClusterRoleBinding.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'POST',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1ClusterRoleBinding\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1ClusterRoleBinding\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * create a Role\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n */\n async createNamespacedRole(namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/roles'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling createNamespacedRole.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling createNamespacedRole.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'POST',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1Role\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1Role\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * create a RoleBinding\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n */\n async createNamespacedRoleBinding(namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/rolebindings'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling createNamespacedRoleBinding.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling createNamespacedRoleBinding.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'POST',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1RoleBinding\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1RoleBinding\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * delete a ClusterRole\n * @param name name of the ClusterRole\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @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.\n * @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.\n * @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.\n * @param body\n */\n async deleteClusterRole(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1/clusterroles/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling deleteClusterRole.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (gracePeriodSeconds !== undefined) {\n localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, \"number\");\n }\n if (orphanDependents !== undefined) {\n localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, \"boolean\");\n }\n if (propagationPolicy !== undefined) {\n localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1DeleteOptions\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1Status\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * delete a ClusterRoleBinding\n * @param name name of the ClusterRoleBinding\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @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.\n * @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.\n * @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.\n * @param body\n */\n async deleteClusterRoleBinding(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1/clusterrolebindings/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling deleteClusterRoleBinding.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (gracePeriodSeconds !== undefined) {\n localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, \"number\");\n }\n if (orphanDependents !== undefined) {\n localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, \"boolean\");\n }\n if (propagationPolicy !== undefined) {\n localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1DeleteOptions\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1Status\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * delete collection of ClusterRole\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @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.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @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.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @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.\n * @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.\n * @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.\n * @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\n * @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\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param body\n */\n async deleteCollectionClusterRole(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1/clusterroles';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (gracePeriodSeconds !== undefined) {\n localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, \"number\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, \"number\");\n }\n if (orphanDependents !== undefined) {\n localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, \"boolean\");\n }\n if (propagationPolicy !== undefined) {\n localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, \"string\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (resourceVersionMatch !== undefined) {\n localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1DeleteOptions\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1Status\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * delete collection of ClusterRoleBinding\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @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.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @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.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @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.\n * @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.\n * @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.\n * @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\n * @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\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param body\n */\n async deleteCollectionClusterRoleBinding(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1/clusterrolebindings';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (gracePeriodSeconds !== undefined) {\n localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, \"number\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, \"number\");\n }\n if (orphanDependents !== undefined) {\n localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, \"boolean\");\n }\n if (propagationPolicy !== undefined) {\n localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, \"string\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (resourceVersionMatch !== undefined) {\n localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1DeleteOptions\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1Status\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * delete collection of Role\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @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.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @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.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @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.\n * @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.\n * @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.\n * @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\n * @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\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param body\n */\n async deleteCollectionNamespacedRole(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/roles'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedRole.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (gracePeriodSeconds !== undefined) {\n localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, \"number\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, \"number\");\n }\n if (orphanDependents !== undefined) {\n localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, \"boolean\");\n }\n if (propagationPolicy !== undefined) {\n localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, \"string\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (resourceVersionMatch !== undefined) {\n localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1DeleteOptions\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1Status\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * delete collection of RoleBinding\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @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.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @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.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @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.\n * @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.\n * @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.\n * @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\n * @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\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param body\n */\n async deleteCollectionNamespacedRoleBinding(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/rolebindings'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedRoleBinding.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (gracePeriodSeconds !== undefined) {\n localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, \"number\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, \"number\");\n }\n if (orphanDependents !== undefined) {\n localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, \"boolean\");\n }\n if (propagationPolicy !== undefined) {\n localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, \"string\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (resourceVersionMatch !== undefined) {\n localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1DeleteOptions\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1Status\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * delete a Role\n * @param name name of the Role\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @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.\n * @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.\n * @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.\n * @param body\n */\n async deleteNamespacedRole(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/roles/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling deleteNamespacedRole.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedRole.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (gracePeriodSeconds !== undefined) {\n localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, \"number\");\n }\n if (orphanDependents !== undefined) {\n localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, \"boolean\");\n }\n if (propagationPolicy !== undefined) {\n localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1DeleteOptions\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1Status\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * delete a RoleBinding\n * @param name name of the RoleBinding\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @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.\n * @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.\n * @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.\n * @param body\n */\n async deleteNamespacedRoleBinding(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/rolebindings/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling deleteNamespacedRoleBinding.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedRoleBinding.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (gracePeriodSeconds !== undefined) {\n localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, \"number\");\n }\n if (orphanDependents !== undefined) {\n localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, \"boolean\");\n }\n if (propagationPolicy !== undefined) {\n localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1DeleteOptions\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1Status\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * get available resources\n */\n async getAPIResources(options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1/';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1APIResourceList\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * list or watch objects of kind ClusterRole\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @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.\n * @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.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @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.\n * @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\n * @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\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n */\n async listClusterRole(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1/clusterroles';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (allowWatchBookmarks !== undefined) {\n localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, \"boolean\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, \"number\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (resourceVersionMatch !== undefined) {\n localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1ClusterRoleList\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * list or watch objects of kind ClusterRoleBinding\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @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.\n * @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.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @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.\n * @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\n * @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\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n */\n async listClusterRoleBinding(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1/clusterrolebindings';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (allowWatchBookmarks !== undefined) {\n localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, \"boolean\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, \"number\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (resourceVersionMatch !== undefined) {\n localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1ClusterRoleBindingList\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * list or watch objects of kind Role\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @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.\n * @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.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @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.\n * @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\n * @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\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n */\n async listNamespacedRole(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/roles'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling listNamespacedRole.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (allowWatchBookmarks !== undefined) {\n localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, \"boolean\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, \"number\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (resourceVersionMatch !== undefined) {\n localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1RoleList\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * list or watch objects of kind RoleBinding\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @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.\n * @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.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @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.\n * @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\n * @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\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n */\n async listNamespacedRoleBinding(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/rolebindings'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling listNamespacedRoleBinding.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (allowWatchBookmarks !== undefined) {\n localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, \"boolean\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, \"number\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (resourceVersionMatch !== undefined) {\n localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1RoleBindingList\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * list or watch objects of kind RoleBinding\n * @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.\n * @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.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @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.\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @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\n * @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\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n */\n async listRoleBindingForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1/rolebindings';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n if (allowWatchBookmarks !== undefined) {\n localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, \"boolean\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, \"number\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (resourceVersionMatch !== undefined) {\n localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1RoleBindingList\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * list or watch objects of kind Role\n * @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.\n * @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.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @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.\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @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\n * @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\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n */\n async listRoleForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1/roles';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n if (allowWatchBookmarks !== undefined) {\n localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, \"boolean\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, \"number\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (resourceVersionMatch !== undefined) {\n localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1RoleList\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * partially update the specified ClusterRole\n * @param name name of the ClusterRole\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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).\n * @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.\n */\n async patchClusterRole(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1/clusterroles/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling patchClusterRole.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling patchClusterRole.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n if (force !== undefined) {\n localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"object\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1ClusterRole\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * partially update the specified ClusterRoleBinding\n * @param name name of the ClusterRoleBinding\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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).\n * @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.\n */\n async patchClusterRoleBinding(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1/clusterrolebindings/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling patchClusterRoleBinding.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling patchClusterRoleBinding.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n if (force !== undefined) {\n localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"object\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1ClusterRoleBinding\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * partially update the specified Role\n * @param name name of the Role\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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).\n * @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.\n */\n async patchNamespacedRole(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/roles/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling patchNamespacedRole.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedRole.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling patchNamespacedRole.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n if (force !== undefined) {\n localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"object\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1Role\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * partially update the specified RoleBinding\n * @param name name of the RoleBinding\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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).\n * @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.\n */\n async patchNamespacedRoleBinding(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/rolebindings/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling patchNamespacedRoleBinding.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedRoleBinding.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling patchNamespacedRoleBinding.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n if (force !== undefined) {\n localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"object\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1RoleBinding\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * read the specified ClusterRole\n * @param name name of the ClusterRole\n * @param pretty If \\'true\\', then the output is pretty printed.\n */\n async readClusterRole(name, pretty, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1/clusterroles/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling readClusterRole.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1ClusterRole\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * read the specified ClusterRoleBinding\n * @param name name of the ClusterRoleBinding\n * @param pretty If \\'true\\', then the output is pretty printed.\n */\n async readClusterRoleBinding(name, pretty, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1/clusterrolebindings/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling readClusterRoleBinding.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1ClusterRoleBinding\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * read the specified Role\n * @param name name of the Role\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If \\'true\\', then the output is pretty printed.\n */\n async readNamespacedRole(name, namespace, pretty, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/roles/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling readNamespacedRole.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling readNamespacedRole.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1Role\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * read the specified RoleBinding\n * @param name name of the RoleBinding\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If \\'true\\', then the output is pretty printed.\n */\n async readNamespacedRoleBinding(name, namespace, pretty, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/rolebindings/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling readNamespacedRoleBinding.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling readNamespacedRoleBinding.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1RoleBinding\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * replace the specified ClusterRole\n * @param name name of the ClusterRole\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n */\n async replaceClusterRole(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1/clusterroles/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling replaceClusterRole.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling replaceClusterRole.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1ClusterRole\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1ClusterRole\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * replace the specified ClusterRoleBinding\n * @param name name of the ClusterRoleBinding\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n */\n async replaceClusterRoleBinding(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1/clusterrolebindings/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling replaceClusterRoleBinding.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling replaceClusterRoleBinding.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1ClusterRoleBinding\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1ClusterRoleBinding\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * replace the specified Role\n * @param name name of the Role\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n */\n async replaceNamespacedRole(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/roles/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling replaceNamespacedRole.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedRole.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling replaceNamespacedRole.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1Role\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1Role\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * replace the specified RoleBinding\n * @param name name of the RoleBinding\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n */\n async replaceNamespacedRoleBinding(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1/namespaces/{namespace}/rolebindings/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling replaceNamespacedRoleBinding.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedRoleBinding.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling replaceNamespacedRoleBinding.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1RoleBinding\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1RoleBinding\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n}\nexports.RbacAuthorizationV1Api = RbacAuthorizationV1Api;\n//# sourceMappingURL=rbacAuthorizationV1Api.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.RbacAuthorizationV1alpha1Api = exports.RbacAuthorizationV1alpha1ApiApiKeys = void 0;\nconst tslib_1 = require(\"tslib\");\nconst request_1 = tslib_1.__importDefault(require(\"request\"));\nconst models_1 = require(\"../model/models\");\nconst models_2 = require(\"../model/models\");\nconst apis_1 = require(\"./apis\");\nlet defaultBasePath = 'http://localhost';\n// ===============================================\n// This file is autogenerated - Please do not edit\n// ===============================================\nvar RbacAuthorizationV1alpha1ApiApiKeys;\n(function (RbacAuthorizationV1alpha1ApiApiKeys) {\n RbacAuthorizationV1alpha1ApiApiKeys[RbacAuthorizationV1alpha1ApiApiKeys[\"BearerToken\"] = 0] = \"BearerToken\";\n})(RbacAuthorizationV1alpha1ApiApiKeys = exports.RbacAuthorizationV1alpha1ApiApiKeys || (exports.RbacAuthorizationV1alpha1ApiApiKeys = {}));\nclass RbacAuthorizationV1alpha1Api {\n constructor(basePathOrUsername, password, basePath) {\n this._basePath = defaultBasePath;\n this._defaultHeaders = {};\n this._useQuerystring = false;\n this.authentications = {\n 'default': new models_1.VoidAuth(),\n 'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'),\n };\n this.interceptors = [];\n if (password) {\n if (basePath) {\n this.basePath = basePath;\n }\n }\n else {\n if (basePathOrUsername) {\n this.basePath = basePathOrUsername;\n }\n }\n }\n set useQuerystring(value) {\n this._useQuerystring = value;\n }\n set basePath(basePath) {\n this._basePath = basePath;\n }\n set defaultHeaders(defaultHeaders) {\n this._defaultHeaders = defaultHeaders;\n }\n get defaultHeaders() {\n return this._defaultHeaders;\n }\n get basePath() {\n return this._basePath;\n }\n setDefaultAuthentication(auth) {\n this.authentications.default = auth;\n }\n setApiKey(key, value) {\n this.authentications[RbacAuthorizationV1alpha1ApiApiKeys[key]].apiKey = value;\n }\n addInterceptor(interceptor) {\n this.interceptors.push(interceptor);\n }\n /**\n * create a ClusterRole\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n */\n async createClusterRole(body, pretty, dryRun, fieldManager, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1alpha1/clusterroles';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling createClusterRole.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'POST',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1alpha1ClusterRole\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1alpha1ClusterRole\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * create a ClusterRoleBinding\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n */\n async createClusterRoleBinding(body, pretty, dryRun, fieldManager, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1alpha1/clusterrolebindings';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling createClusterRoleBinding.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'POST',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1alpha1ClusterRoleBinding\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1alpha1ClusterRoleBinding\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * create a Role\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n */\n async createNamespacedRole(namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1alpha1/namespaces/{namespace}/roles'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling createNamespacedRole.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling createNamespacedRole.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'POST',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1alpha1Role\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1alpha1Role\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * create a RoleBinding\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n */\n async createNamespacedRoleBinding(namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1alpha1/namespaces/{namespace}/rolebindings'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling createNamespacedRoleBinding.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling createNamespacedRoleBinding.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'POST',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1alpha1RoleBinding\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1alpha1RoleBinding\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * delete a ClusterRole\n * @param name name of the ClusterRole\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @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.\n * @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.\n * @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.\n * @param body\n */\n async deleteClusterRole(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1alpha1/clusterroles/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling deleteClusterRole.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (gracePeriodSeconds !== undefined) {\n localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, \"number\");\n }\n if (orphanDependents !== undefined) {\n localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, \"boolean\");\n }\n if (propagationPolicy !== undefined) {\n localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1DeleteOptions\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1Status\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * delete a ClusterRoleBinding\n * @param name name of the ClusterRoleBinding\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @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.\n * @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.\n * @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.\n * @param body\n */\n async deleteClusterRoleBinding(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1alpha1/clusterrolebindings/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling deleteClusterRoleBinding.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (gracePeriodSeconds !== undefined) {\n localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, \"number\");\n }\n if (orphanDependents !== undefined) {\n localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, \"boolean\");\n }\n if (propagationPolicy !== undefined) {\n localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1DeleteOptions\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1Status\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * delete collection of ClusterRole\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @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.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @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.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @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.\n * @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.\n * @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.\n * @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\n * @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\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param body\n */\n async deleteCollectionClusterRole(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1alpha1/clusterroles';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (gracePeriodSeconds !== undefined) {\n localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, \"number\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, \"number\");\n }\n if (orphanDependents !== undefined) {\n localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, \"boolean\");\n }\n if (propagationPolicy !== undefined) {\n localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, \"string\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (resourceVersionMatch !== undefined) {\n localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1DeleteOptions\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1Status\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * delete collection of ClusterRoleBinding\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @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.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @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.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @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.\n * @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.\n * @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.\n * @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\n * @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\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param body\n */\n async deleteCollectionClusterRoleBinding(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1alpha1/clusterrolebindings';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (gracePeriodSeconds !== undefined) {\n localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, \"number\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, \"number\");\n }\n if (orphanDependents !== undefined) {\n localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, \"boolean\");\n }\n if (propagationPolicy !== undefined) {\n localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, \"string\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (resourceVersionMatch !== undefined) {\n localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1DeleteOptions\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1Status\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * delete collection of Role\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @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.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @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.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @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.\n * @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.\n * @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.\n * @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\n * @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\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param body\n */\n async deleteCollectionNamespacedRole(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1alpha1/namespaces/{namespace}/roles'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedRole.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (gracePeriodSeconds !== undefined) {\n localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, \"number\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, \"number\");\n }\n if (orphanDependents !== undefined) {\n localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, \"boolean\");\n }\n if (propagationPolicy !== undefined) {\n localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, \"string\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (resourceVersionMatch !== undefined) {\n localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1DeleteOptions\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1Status\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * delete collection of RoleBinding\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @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.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @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.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @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.\n * @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.\n * @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.\n * @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\n * @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\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param body\n */\n async deleteCollectionNamespacedRoleBinding(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1alpha1/namespaces/{namespace}/rolebindings'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedRoleBinding.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (gracePeriodSeconds !== undefined) {\n localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, \"number\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, \"number\");\n }\n if (orphanDependents !== undefined) {\n localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, \"boolean\");\n }\n if (propagationPolicy !== undefined) {\n localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, \"string\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (resourceVersionMatch !== undefined) {\n localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1DeleteOptions\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1Status\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * delete a Role\n * @param name name of the Role\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @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.\n * @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.\n * @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.\n * @param body\n */\n async deleteNamespacedRole(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1alpha1/namespaces/{namespace}/roles/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling deleteNamespacedRole.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedRole.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (gracePeriodSeconds !== undefined) {\n localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, \"number\");\n }\n if (orphanDependents !== undefined) {\n localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, \"boolean\");\n }\n if (propagationPolicy !== undefined) {\n localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1DeleteOptions\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1Status\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * delete a RoleBinding\n * @param name name of the RoleBinding\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @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.\n * @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.\n * @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.\n * @param body\n */\n async deleteNamespacedRoleBinding(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1alpha1/namespaces/{namespace}/rolebindings/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling deleteNamespacedRoleBinding.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedRoleBinding.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (gracePeriodSeconds !== undefined) {\n localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, \"number\");\n }\n if (orphanDependents !== undefined) {\n localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, \"boolean\");\n }\n if (propagationPolicy !== undefined) {\n localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1DeleteOptions\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1Status\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * get available resources\n */\n async getAPIResources(options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1alpha1/';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1APIResourceList\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * list or watch objects of kind ClusterRole\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @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.\n * @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.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @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.\n * @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\n * @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\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n */\n async listClusterRole(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1alpha1/clusterroles';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (allowWatchBookmarks !== undefined) {\n localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, \"boolean\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, \"number\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (resourceVersionMatch !== undefined) {\n localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1alpha1ClusterRoleList\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * list or watch objects of kind ClusterRoleBinding\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @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.\n * @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.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @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.\n * @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\n * @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\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n */\n async listClusterRoleBinding(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1alpha1/clusterrolebindings';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (allowWatchBookmarks !== undefined) {\n localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, \"boolean\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, \"number\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (resourceVersionMatch !== undefined) {\n localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1alpha1ClusterRoleBindingList\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * list or watch objects of kind Role\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @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.\n * @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.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @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.\n * @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\n * @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\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n */\n async listNamespacedRole(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1alpha1/namespaces/{namespace}/roles'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling listNamespacedRole.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (allowWatchBookmarks !== undefined) {\n localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, \"boolean\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, \"number\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (resourceVersionMatch !== undefined) {\n localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1alpha1RoleList\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * list or watch objects of kind RoleBinding\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @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.\n * @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.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @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.\n * @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\n * @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\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n */\n async listNamespacedRoleBinding(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1alpha1/namespaces/{namespace}/rolebindings'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling listNamespacedRoleBinding.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (allowWatchBookmarks !== undefined) {\n localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, \"boolean\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, \"number\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (resourceVersionMatch !== undefined) {\n localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1alpha1RoleBindingList\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * list or watch objects of kind RoleBinding\n * @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.\n * @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.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @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.\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @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\n * @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\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n */\n async listRoleBindingForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1alpha1/rolebindings';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n if (allowWatchBookmarks !== undefined) {\n localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, \"boolean\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, \"number\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (resourceVersionMatch !== undefined) {\n localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1alpha1RoleBindingList\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * list or watch objects of kind Role\n * @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.\n * @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.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @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.\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @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\n * @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\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n */\n async listRoleForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1alpha1/roles';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n if (allowWatchBookmarks !== undefined) {\n localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, \"boolean\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, \"number\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (resourceVersionMatch !== undefined) {\n localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1alpha1RoleList\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * partially update the specified ClusterRole\n * @param name name of the ClusterRole\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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).\n * @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.\n */\n async patchClusterRole(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1alpha1/clusterroles/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling patchClusterRole.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling patchClusterRole.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n if (force !== undefined) {\n localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"object\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1alpha1ClusterRole\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * partially update the specified ClusterRoleBinding\n * @param name name of the ClusterRoleBinding\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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).\n * @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.\n */\n async patchClusterRoleBinding(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1alpha1/clusterrolebindings/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling patchClusterRoleBinding.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling patchClusterRoleBinding.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n if (force !== undefined) {\n localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"object\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1alpha1ClusterRoleBinding\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * partially update the specified Role\n * @param name name of the Role\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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).\n * @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.\n */\n async patchNamespacedRole(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1alpha1/namespaces/{namespace}/roles/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling patchNamespacedRole.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedRole.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling patchNamespacedRole.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n if (force !== undefined) {\n localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"object\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1alpha1Role\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * partially update the specified RoleBinding\n * @param name name of the RoleBinding\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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).\n * @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.\n */\n async patchNamespacedRoleBinding(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1alpha1/namespaces/{namespace}/rolebindings/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling patchNamespacedRoleBinding.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedRoleBinding.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling patchNamespacedRoleBinding.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n if (force !== undefined) {\n localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"object\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1alpha1RoleBinding\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * read the specified ClusterRole\n * @param name name of the ClusterRole\n * @param pretty If \\'true\\', then the output is pretty printed.\n */\n async readClusterRole(name, pretty, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1alpha1/clusterroles/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling readClusterRole.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1alpha1ClusterRole\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * read the specified ClusterRoleBinding\n * @param name name of the ClusterRoleBinding\n * @param pretty If \\'true\\', then the output is pretty printed.\n */\n async readClusterRoleBinding(name, pretty, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1alpha1/clusterrolebindings/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling readClusterRoleBinding.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1alpha1ClusterRoleBinding\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * read the specified Role\n * @param name name of the Role\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If \\'true\\', then the output is pretty printed.\n */\n async readNamespacedRole(name, namespace, pretty, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1alpha1/namespaces/{namespace}/roles/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling readNamespacedRole.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling readNamespacedRole.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1alpha1Role\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * read the specified RoleBinding\n * @param name name of the RoleBinding\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If \\'true\\', then the output is pretty printed.\n */\n async readNamespacedRoleBinding(name, namespace, pretty, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1alpha1/namespaces/{namespace}/rolebindings/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling readNamespacedRoleBinding.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling readNamespacedRoleBinding.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1alpha1RoleBinding\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * replace the specified ClusterRole\n * @param name name of the ClusterRole\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n */\n async replaceClusterRole(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1alpha1/clusterroles/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling replaceClusterRole.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling replaceClusterRole.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1alpha1ClusterRole\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1alpha1ClusterRole\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * replace the specified ClusterRoleBinding\n * @param name name of the ClusterRoleBinding\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n */\n async replaceClusterRoleBinding(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1alpha1/clusterrolebindings/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling replaceClusterRoleBinding.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling replaceClusterRoleBinding.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1alpha1ClusterRoleBinding\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1alpha1ClusterRoleBinding\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * replace the specified Role\n * @param name name of the Role\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n */\n async replaceNamespacedRole(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1alpha1/namespaces/{namespace}/roles/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling replaceNamespacedRole.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedRole.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling replaceNamespacedRole.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1alpha1Role\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1alpha1Role\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * replace the specified RoleBinding\n * @param name name of the RoleBinding\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n */\n async replaceNamespacedRoleBinding(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/rbac.authorization.k8s.io/v1alpha1/namespaces/{namespace}/rolebindings/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling replaceNamespacedRoleBinding.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedRoleBinding.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling replaceNamespacedRoleBinding.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1alpha1RoleBinding\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1alpha1RoleBinding\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n}\nexports.RbacAuthorizationV1alpha1Api = RbacAuthorizationV1alpha1Api;\n//# sourceMappingURL=rbacAuthorizationV1alpha1Api.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.SchedulingApi = exports.SchedulingApiApiKeys = void 0;\nconst tslib_1 = require(\"tslib\");\nconst request_1 = tslib_1.__importDefault(require(\"request\"));\nconst models_1 = require(\"../model/models\");\nconst models_2 = require(\"../model/models\");\nconst apis_1 = require(\"./apis\");\nlet defaultBasePath = 'http://localhost';\n// ===============================================\n// This file is autogenerated - Please do not edit\n// ===============================================\nvar SchedulingApiApiKeys;\n(function (SchedulingApiApiKeys) {\n SchedulingApiApiKeys[SchedulingApiApiKeys[\"BearerToken\"] = 0] = \"BearerToken\";\n})(SchedulingApiApiKeys = exports.SchedulingApiApiKeys || (exports.SchedulingApiApiKeys = {}));\nclass SchedulingApi {\n constructor(basePathOrUsername, password, basePath) {\n this._basePath = defaultBasePath;\n this._defaultHeaders = {};\n this._useQuerystring = false;\n this.authentications = {\n 'default': new models_1.VoidAuth(),\n 'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'),\n };\n this.interceptors = [];\n if (password) {\n if (basePath) {\n this.basePath = basePath;\n }\n }\n else {\n if (basePathOrUsername) {\n this.basePath = basePathOrUsername;\n }\n }\n }\n set useQuerystring(value) {\n this._useQuerystring = value;\n }\n set basePath(basePath) {\n this._basePath = basePath;\n }\n set defaultHeaders(defaultHeaders) {\n this._defaultHeaders = defaultHeaders;\n }\n get defaultHeaders() {\n return this._defaultHeaders;\n }\n get basePath() {\n return this._basePath;\n }\n setDefaultAuthentication(auth) {\n this.authentications.default = auth;\n }\n setApiKey(key, value) {\n this.authentications[SchedulingApiApiKeys[key]].apiKey = value;\n }\n addInterceptor(interceptor) {\n this.interceptors.push(interceptor);\n }\n /**\n * get information of a group\n */\n async getAPIGroup(options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/scheduling.k8s.io/';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1APIGroup\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n}\nexports.SchedulingApi = SchedulingApi;\n//# sourceMappingURL=schedulingApi.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.SchedulingV1Api = exports.SchedulingV1ApiApiKeys = void 0;\nconst tslib_1 = require(\"tslib\");\nconst request_1 = tslib_1.__importDefault(require(\"request\"));\nconst models_1 = require(\"../model/models\");\nconst models_2 = require(\"../model/models\");\nconst apis_1 = require(\"./apis\");\nlet defaultBasePath = 'http://localhost';\n// ===============================================\n// This file is autogenerated - Please do not edit\n// ===============================================\nvar SchedulingV1ApiApiKeys;\n(function (SchedulingV1ApiApiKeys) {\n SchedulingV1ApiApiKeys[SchedulingV1ApiApiKeys[\"BearerToken\"] = 0] = \"BearerToken\";\n})(SchedulingV1ApiApiKeys = exports.SchedulingV1ApiApiKeys || (exports.SchedulingV1ApiApiKeys = {}));\nclass SchedulingV1Api {\n constructor(basePathOrUsername, password, basePath) {\n this._basePath = defaultBasePath;\n this._defaultHeaders = {};\n this._useQuerystring = false;\n this.authentications = {\n 'default': new models_1.VoidAuth(),\n 'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'),\n };\n this.interceptors = [];\n if (password) {\n if (basePath) {\n this.basePath = basePath;\n }\n }\n else {\n if (basePathOrUsername) {\n this.basePath = basePathOrUsername;\n }\n }\n }\n set useQuerystring(value) {\n this._useQuerystring = value;\n }\n set basePath(basePath) {\n this._basePath = basePath;\n }\n set defaultHeaders(defaultHeaders) {\n this._defaultHeaders = defaultHeaders;\n }\n get defaultHeaders() {\n return this._defaultHeaders;\n }\n get basePath() {\n return this._basePath;\n }\n setDefaultAuthentication(auth) {\n this.authentications.default = auth;\n }\n setApiKey(key, value) {\n this.authentications[SchedulingV1ApiApiKeys[key]].apiKey = value;\n }\n addInterceptor(interceptor) {\n this.interceptors.push(interceptor);\n }\n /**\n * create a PriorityClass\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n */\n async createPriorityClass(body, pretty, dryRun, fieldManager, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/scheduling.k8s.io/v1/priorityclasses';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling createPriorityClass.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'POST',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1PriorityClass\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1PriorityClass\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * delete collection of PriorityClass\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @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.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @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.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @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.\n * @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.\n * @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.\n * @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\n * @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\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param body\n */\n async deleteCollectionPriorityClass(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/scheduling.k8s.io/v1/priorityclasses';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (gracePeriodSeconds !== undefined) {\n localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, \"number\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, \"number\");\n }\n if (orphanDependents !== undefined) {\n localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, \"boolean\");\n }\n if (propagationPolicy !== undefined) {\n localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, \"string\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (resourceVersionMatch !== undefined) {\n localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1DeleteOptions\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1Status\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * delete a PriorityClass\n * @param name name of the PriorityClass\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @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.\n * @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.\n * @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.\n * @param body\n */\n async deletePriorityClass(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/scheduling.k8s.io/v1/priorityclasses/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling deletePriorityClass.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (gracePeriodSeconds !== undefined) {\n localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, \"number\");\n }\n if (orphanDependents !== undefined) {\n localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, \"boolean\");\n }\n if (propagationPolicy !== undefined) {\n localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1DeleteOptions\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1Status\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * get available resources\n */\n async getAPIResources(options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/scheduling.k8s.io/v1/';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1APIResourceList\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * list or watch objects of kind PriorityClass\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @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.\n * @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.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @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.\n * @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\n * @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\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n */\n async listPriorityClass(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/scheduling.k8s.io/v1/priorityclasses';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (allowWatchBookmarks !== undefined) {\n localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, \"boolean\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, \"number\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (resourceVersionMatch !== undefined) {\n localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1PriorityClassList\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * partially update the specified PriorityClass\n * @param name name of the PriorityClass\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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).\n * @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.\n */\n async patchPriorityClass(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/scheduling.k8s.io/v1/priorityclasses/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling patchPriorityClass.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling patchPriorityClass.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n if (force !== undefined) {\n localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"object\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1PriorityClass\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * read the specified PriorityClass\n * @param name name of the PriorityClass\n * @param pretty If \\'true\\', then the output is pretty printed.\n */\n async readPriorityClass(name, pretty, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/scheduling.k8s.io/v1/priorityclasses/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling readPriorityClass.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1PriorityClass\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * replace the specified PriorityClass\n * @param name name of the PriorityClass\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n */\n async replacePriorityClass(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/scheduling.k8s.io/v1/priorityclasses/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling replacePriorityClass.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling replacePriorityClass.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1PriorityClass\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1PriorityClass\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n}\nexports.SchedulingV1Api = SchedulingV1Api;\n//# sourceMappingURL=schedulingV1Api.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.SchedulingV1alpha1Api = exports.SchedulingV1alpha1ApiApiKeys = void 0;\nconst tslib_1 = require(\"tslib\");\nconst request_1 = tslib_1.__importDefault(require(\"request\"));\nconst models_1 = require(\"../model/models\");\nconst models_2 = require(\"../model/models\");\nconst apis_1 = require(\"./apis\");\nlet defaultBasePath = 'http://localhost';\n// ===============================================\n// This file is autogenerated - Please do not edit\n// ===============================================\nvar SchedulingV1alpha1ApiApiKeys;\n(function (SchedulingV1alpha1ApiApiKeys) {\n SchedulingV1alpha1ApiApiKeys[SchedulingV1alpha1ApiApiKeys[\"BearerToken\"] = 0] = \"BearerToken\";\n})(SchedulingV1alpha1ApiApiKeys = exports.SchedulingV1alpha1ApiApiKeys || (exports.SchedulingV1alpha1ApiApiKeys = {}));\nclass SchedulingV1alpha1Api {\n constructor(basePathOrUsername, password, basePath) {\n this._basePath = defaultBasePath;\n this._defaultHeaders = {};\n this._useQuerystring = false;\n this.authentications = {\n 'default': new models_1.VoidAuth(),\n 'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'),\n };\n this.interceptors = [];\n if (password) {\n if (basePath) {\n this.basePath = basePath;\n }\n }\n else {\n if (basePathOrUsername) {\n this.basePath = basePathOrUsername;\n }\n }\n }\n set useQuerystring(value) {\n this._useQuerystring = value;\n }\n set basePath(basePath) {\n this._basePath = basePath;\n }\n set defaultHeaders(defaultHeaders) {\n this._defaultHeaders = defaultHeaders;\n }\n get defaultHeaders() {\n return this._defaultHeaders;\n }\n get basePath() {\n return this._basePath;\n }\n setDefaultAuthentication(auth) {\n this.authentications.default = auth;\n }\n setApiKey(key, value) {\n this.authentications[SchedulingV1alpha1ApiApiKeys[key]].apiKey = value;\n }\n addInterceptor(interceptor) {\n this.interceptors.push(interceptor);\n }\n /**\n * create a PriorityClass\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n */\n async createPriorityClass(body, pretty, dryRun, fieldManager, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/scheduling.k8s.io/v1alpha1/priorityclasses';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling createPriorityClass.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'POST',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1alpha1PriorityClass\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1alpha1PriorityClass\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * delete collection of PriorityClass\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @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.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @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.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @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.\n * @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.\n * @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.\n * @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\n * @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\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param body\n */\n async deleteCollectionPriorityClass(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/scheduling.k8s.io/v1alpha1/priorityclasses';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (gracePeriodSeconds !== undefined) {\n localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, \"number\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, \"number\");\n }\n if (orphanDependents !== undefined) {\n localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, \"boolean\");\n }\n if (propagationPolicy !== undefined) {\n localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, \"string\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (resourceVersionMatch !== undefined) {\n localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1DeleteOptions\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1Status\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * delete a PriorityClass\n * @param name name of the PriorityClass\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @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.\n * @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.\n * @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.\n * @param body\n */\n async deletePriorityClass(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/scheduling.k8s.io/v1alpha1/priorityclasses/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling deletePriorityClass.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (gracePeriodSeconds !== undefined) {\n localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, \"number\");\n }\n if (orphanDependents !== undefined) {\n localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, \"boolean\");\n }\n if (propagationPolicy !== undefined) {\n localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1DeleteOptions\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1Status\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * get available resources\n */\n async getAPIResources(options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/scheduling.k8s.io/v1alpha1/';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1APIResourceList\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * list or watch objects of kind PriorityClass\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @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.\n * @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.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @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.\n * @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\n * @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\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n */\n async listPriorityClass(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/scheduling.k8s.io/v1alpha1/priorityclasses';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (allowWatchBookmarks !== undefined) {\n localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, \"boolean\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, \"number\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (resourceVersionMatch !== undefined) {\n localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1alpha1PriorityClassList\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * partially update the specified PriorityClass\n * @param name name of the PriorityClass\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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).\n * @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.\n */\n async patchPriorityClass(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/scheduling.k8s.io/v1alpha1/priorityclasses/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling patchPriorityClass.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling patchPriorityClass.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n if (force !== undefined) {\n localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"object\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1alpha1PriorityClass\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * read the specified PriorityClass\n * @param name name of the PriorityClass\n * @param pretty If \\'true\\', then the output is pretty printed.\n */\n async readPriorityClass(name, pretty, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/scheduling.k8s.io/v1alpha1/priorityclasses/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling readPriorityClass.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1alpha1PriorityClass\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * replace the specified PriorityClass\n * @param name name of the PriorityClass\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n */\n async replacePriorityClass(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/scheduling.k8s.io/v1alpha1/priorityclasses/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling replacePriorityClass.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling replacePriorityClass.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1alpha1PriorityClass\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1alpha1PriorityClass\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n}\nexports.SchedulingV1alpha1Api = SchedulingV1alpha1Api;\n//# sourceMappingURL=schedulingV1alpha1Api.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.StorageApi = exports.StorageApiApiKeys = void 0;\nconst tslib_1 = require(\"tslib\");\nconst request_1 = tslib_1.__importDefault(require(\"request\"));\nconst models_1 = require(\"../model/models\");\nconst models_2 = require(\"../model/models\");\nconst apis_1 = require(\"./apis\");\nlet defaultBasePath = 'http://localhost';\n// ===============================================\n// This file is autogenerated - Please do not edit\n// ===============================================\nvar StorageApiApiKeys;\n(function (StorageApiApiKeys) {\n StorageApiApiKeys[StorageApiApiKeys[\"BearerToken\"] = 0] = \"BearerToken\";\n})(StorageApiApiKeys = exports.StorageApiApiKeys || (exports.StorageApiApiKeys = {}));\nclass StorageApi {\n constructor(basePathOrUsername, password, basePath) {\n this._basePath = defaultBasePath;\n this._defaultHeaders = {};\n this._useQuerystring = false;\n this.authentications = {\n 'default': new models_1.VoidAuth(),\n 'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'),\n };\n this.interceptors = [];\n if (password) {\n if (basePath) {\n this.basePath = basePath;\n }\n }\n else {\n if (basePathOrUsername) {\n this.basePath = basePathOrUsername;\n }\n }\n }\n set useQuerystring(value) {\n this._useQuerystring = value;\n }\n set basePath(basePath) {\n this._basePath = basePath;\n }\n set defaultHeaders(defaultHeaders) {\n this._defaultHeaders = defaultHeaders;\n }\n get defaultHeaders() {\n return this._defaultHeaders;\n }\n get basePath() {\n return this._basePath;\n }\n setDefaultAuthentication(auth) {\n this.authentications.default = auth;\n }\n setApiKey(key, value) {\n this.authentications[StorageApiApiKeys[key]].apiKey = value;\n }\n addInterceptor(interceptor) {\n this.interceptors.push(interceptor);\n }\n /**\n * get information of a group\n */\n async getAPIGroup(options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/storage.k8s.io/';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1APIGroup\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n}\nexports.StorageApi = StorageApi;\n//# sourceMappingURL=storageApi.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.StorageV1Api = exports.StorageV1ApiApiKeys = void 0;\nconst tslib_1 = require(\"tslib\");\nconst request_1 = tslib_1.__importDefault(require(\"request\"));\nconst models_1 = require(\"../model/models\");\nconst models_2 = require(\"../model/models\");\nconst apis_1 = require(\"./apis\");\nlet defaultBasePath = 'http://localhost';\n// ===============================================\n// This file is autogenerated - Please do not edit\n// ===============================================\nvar StorageV1ApiApiKeys;\n(function (StorageV1ApiApiKeys) {\n StorageV1ApiApiKeys[StorageV1ApiApiKeys[\"BearerToken\"] = 0] = \"BearerToken\";\n})(StorageV1ApiApiKeys = exports.StorageV1ApiApiKeys || (exports.StorageV1ApiApiKeys = {}));\nclass StorageV1Api {\n constructor(basePathOrUsername, password, basePath) {\n this._basePath = defaultBasePath;\n this._defaultHeaders = {};\n this._useQuerystring = false;\n this.authentications = {\n 'default': new models_1.VoidAuth(),\n 'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'),\n };\n this.interceptors = [];\n if (password) {\n if (basePath) {\n this.basePath = basePath;\n }\n }\n else {\n if (basePathOrUsername) {\n this.basePath = basePathOrUsername;\n }\n }\n }\n set useQuerystring(value) {\n this._useQuerystring = value;\n }\n set basePath(basePath) {\n this._basePath = basePath;\n }\n set defaultHeaders(defaultHeaders) {\n this._defaultHeaders = defaultHeaders;\n }\n get defaultHeaders() {\n return this._defaultHeaders;\n }\n get basePath() {\n return this._basePath;\n }\n setDefaultAuthentication(auth) {\n this.authentications.default = auth;\n }\n setApiKey(key, value) {\n this.authentications[StorageV1ApiApiKeys[key]].apiKey = value;\n }\n addInterceptor(interceptor) {\n this.interceptors.push(interceptor);\n }\n /**\n * create a CSIDriver\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n */\n async createCSIDriver(body, pretty, dryRun, fieldManager, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/storage.k8s.io/v1/csidrivers';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling createCSIDriver.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'POST',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1CSIDriver\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1CSIDriver\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * create a CSINode\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n */\n async createCSINode(body, pretty, dryRun, fieldManager, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/storage.k8s.io/v1/csinodes';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling createCSINode.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'POST',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1CSINode\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1CSINode\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * create a StorageClass\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n */\n async createStorageClass(body, pretty, dryRun, fieldManager, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/storage.k8s.io/v1/storageclasses';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling createStorageClass.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'POST',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1StorageClass\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1StorageClass\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * create a VolumeAttachment\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n */\n async createVolumeAttachment(body, pretty, dryRun, fieldManager, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/storage.k8s.io/v1/volumeattachments';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling createVolumeAttachment.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'POST',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1VolumeAttachment\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1VolumeAttachment\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * delete a CSIDriver\n * @param name name of the CSIDriver\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @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.\n * @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.\n * @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.\n * @param body\n */\n async deleteCSIDriver(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/storage.k8s.io/v1/csidrivers/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling deleteCSIDriver.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (gracePeriodSeconds !== undefined) {\n localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, \"number\");\n }\n if (orphanDependents !== undefined) {\n localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, \"boolean\");\n }\n if (propagationPolicy !== undefined) {\n localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1DeleteOptions\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1CSIDriver\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * delete a CSINode\n * @param name name of the CSINode\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @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.\n * @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.\n * @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.\n * @param body\n */\n async deleteCSINode(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/storage.k8s.io/v1/csinodes/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling deleteCSINode.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (gracePeriodSeconds !== undefined) {\n localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, \"number\");\n }\n if (orphanDependents !== undefined) {\n localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, \"boolean\");\n }\n if (propagationPolicy !== undefined) {\n localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1DeleteOptions\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1CSINode\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * delete collection of CSIDriver\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @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.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @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.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @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.\n * @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.\n * @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.\n * @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\n * @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\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param body\n */\n async deleteCollectionCSIDriver(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/storage.k8s.io/v1/csidrivers';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (gracePeriodSeconds !== undefined) {\n localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, \"number\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, \"number\");\n }\n if (orphanDependents !== undefined) {\n localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, \"boolean\");\n }\n if (propagationPolicy !== undefined) {\n localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, \"string\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (resourceVersionMatch !== undefined) {\n localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1DeleteOptions\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1Status\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * delete collection of CSINode\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @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.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @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.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @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.\n * @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.\n * @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.\n * @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\n * @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\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param body\n */\n async deleteCollectionCSINode(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/storage.k8s.io/v1/csinodes';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (gracePeriodSeconds !== undefined) {\n localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, \"number\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, \"number\");\n }\n if (orphanDependents !== undefined) {\n localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, \"boolean\");\n }\n if (propagationPolicy !== undefined) {\n localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, \"string\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (resourceVersionMatch !== undefined) {\n localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1DeleteOptions\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1Status\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * delete collection of StorageClass\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @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.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @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.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @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.\n * @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.\n * @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.\n * @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\n * @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\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param body\n */\n async deleteCollectionStorageClass(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/storage.k8s.io/v1/storageclasses';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (gracePeriodSeconds !== undefined) {\n localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, \"number\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, \"number\");\n }\n if (orphanDependents !== undefined) {\n localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, \"boolean\");\n }\n if (propagationPolicy !== undefined) {\n localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, \"string\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (resourceVersionMatch !== undefined) {\n localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1DeleteOptions\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1Status\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * delete collection of VolumeAttachment\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @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.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @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.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @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.\n * @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.\n * @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.\n * @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\n * @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\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param body\n */\n async deleteCollectionVolumeAttachment(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/storage.k8s.io/v1/volumeattachments';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (gracePeriodSeconds !== undefined) {\n localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, \"number\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, \"number\");\n }\n if (orphanDependents !== undefined) {\n localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, \"boolean\");\n }\n if (propagationPolicy !== undefined) {\n localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, \"string\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (resourceVersionMatch !== undefined) {\n localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1DeleteOptions\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1Status\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * delete a StorageClass\n * @param name name of the StorageClass\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @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.\n * @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.\n * @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.\n * @param body\n */\n async deleteStorageClass(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/storage.k8s.io/v1/storageclasses/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling deleteStorageClass.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (gracePeriodSeconds !== undefined) {\n localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, \"number\");\n }\n if (orphanDependents !== undefined) {\n localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, \"boolean\");\n }\n if (propagationPolicy !== undefined) {\n localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1DeleteOptions\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1StorageClass\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * delete a VolumeAttachment\n * @param name name of the VolumeAttachment\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @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.\n * @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.\n * @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.\n * @param body\n */\n async deleteVolumeAttachment(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/storage.k8s.io/v1/volumeattachments/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling deleteVolumeAttachment.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (gracePeriodSeconds !== undefined) {\n localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, \"number\");\n }\n if (orphanDependents !== undefined) {\n localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, \"boolean\");\n }\n if (propagationPolicy !== undefined) {\n localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1DeleteOptions\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1VolumeAttachment\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * get available resources\n */\n async getAPIResources(options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/storage.k8s.io/v1/';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1APIResourceList\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * list or watch objects of kind CSIDriver\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @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.\n * @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.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @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.\n * @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\n * @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\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n */\n async listCSIDriver(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/storage.k8s.io/v1/csidrivers';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (allowWatchBookmarks !== undefined) {\n localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, \"boolean\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, \"number\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (resourceVersionMatch !== undefined) {\n localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1CSIDriverList\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * list or watch objects of kind CSINode\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @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.\n * @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.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @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.\n * @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\n * @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\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n */\n async listCSINode(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/storage.k8s.io/v1/csinodes';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (allowWatchBookmarks !== undefined) {\n localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, \"boolean\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, \"number\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (resourceVersionMatch !== undefined) {\n localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1CSINodeList\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * list or watch objects of kind StorageClass\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @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.\n * @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.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @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.\n * @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\n * @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\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n */\n async listStorageClass(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/storage.k8s.io/v1/storageclasses';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (allowWatchBookmarks !== undefined) {\n localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, \"boolean\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, \"number\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (resourceVersionMatch !== undefined) {\n localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1StorageClassList\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * list or watch objects of kind VolumeAttachment\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @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.\n * @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.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @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.\n * @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\n * @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\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n */\n async listVolumeAttachment(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/storage.k8s.io/v1/volumeattachments';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (allowWatchBookmarks !== undefined) {\n localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, \"boolean\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, \"number\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (resourceVersionMatch !== undefined) {\n localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1VolumeAttachmentList\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * partially update the specified CSIDriver\n * @param name name of the CSIDriver\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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).\n * @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.\n */\n async patchCSIDriver(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/storage.k8s.io/v1/csidrivers/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling patchCSIDriver.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling patchCSIDriver.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n if (force !== undefined) {\n localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"object\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1CSIDriver\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * partially update the specified CSINode\n * @param name name of the CSINode\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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).\n * @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.\n */\n async patchCSINode(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/storage.k8s.io/v1/csinodes/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling patchCSINode.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling patchCSINode.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n if (force !== undefined) {\n localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"object\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1CSINode\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * partially update the specified StorageClass\n * @param name name of the StorageClass\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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).\n * @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.\n */\n async patchStorageClass(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/storage.k8s.io/v1/storageclasses/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling patchStorageClass.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling patchStorageClass.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n if (force !== undefined) {\n localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"object\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1StorageClass\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * partially update the specified VolumeAttachment\n * @param name name of the VolumeAttachment\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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).\n * @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.\n */\n async patchVolumeAttachment(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/storage.k8s.io/v1/volumeattachments/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling patchVolumeAttachment.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling patchVolumeAttachment.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n if (force !== undefined) {\n localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"object\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1VolumeAttachment\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * partially update status of the specified VolumeAttachment\n * @param name name of the VolumeAttachment\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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).\n * @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.\n */\n async patchVolumeAttachmentStatus(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/storage.k8s.io/v1/volumeattachments/{name}/status'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling patchVolumeAttachmentStatus.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling patchVolumeAttachmentStatus.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n if (force !== undefined) {\n localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"object\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1VolumeAttachment\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * read the specified CSIDriver\n * @param name name of the CSIDriver\n * @param pretty If \\'true\\', then the output is pretty printed.\n */\n async readCSIDriver(name, pretty, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/storage.k8s.io/v1/csidrivers/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling readCSIDriver.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1CSIDriver\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * read the specified CSINode\n * @param name name of the CSINode\n * @param pretty If \\'true\\', then the output is pretty printed.\n */\n async readCSINode(name, pretty, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/storage.k8s.io/v1/csinodes/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling readCSINode.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1CSINode\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * read the specified StorageClass\n * @param name name of the StorageClass\n * @param pretty If \\'true\\', then the output is pretty printed.\n */\n async readStorageClass(name, pretty, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/storage.k8s.io/v1/storageclasses/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling readStorageClass.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1StorageClass\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * read the specified VolumeAttachment\n * @param name name of the VolumeAttachment\n * @param pretty If \\'true\\', then the output is pretty printed.\n */\n async readVolumeAttachment(name, pretty, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/storage.k8s.io/v1/volumeattachments/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling readVolumeAttachment.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1VolumeAttachment\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * read status of the specified VolumeAttachment\n * @param name name of the VolumeAttachment\n * @param pretty If \\'true\\', then the output is pretty printed.\n */\n async readVolumeAttachmentStatus(name, pretty, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/storage.k8s.io/v1/volumeattachments/{name}/status'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling readVolumeAttachmentStatus.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1VolumeAttachment\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * replace the specified CSIDriver\n * @param name name of the CSIDriver\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n */\n async replaceCSIDriver(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/storage.k8s.io/v1/csidrivers/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling replaceCSIDriver.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling replaceCSIDriver.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1CSIDriver\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1CSIDriver\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * replace the specified CSINode\n * @param name name of the CSINode\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n */\n async replaceCSINode(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/storage.k8s.io/v1/csinodes/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling replaceCSINode.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling replaceCSINode.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1CSINode\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1CSINode\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * replace the specified StorageClass\n * @param name name of the StorageClass\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n */\n async replaceStorageClass(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/storage.k8s.io/v1/storageclasses/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling replaceStorageClass.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling replaceStorageClass.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1StorageClass\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1StorageClass\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * replace the specified VolumeAttachment\n * @param name name of the VolumeAttachment\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n */\n async replaceVolumeAttachment(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/storage.k8s.io/v1/volumeattachments/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling replaceVolumeAttachment.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling replaceVolumeAttachment.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1VolumeAttachment\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1VolumeAttachment\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * replace status of the specified VolumeAttachment\n * @param name name of the VolumeAttachment\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n */\n async replaceVolumeAttachmentStatus(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/storage.k8s.io/v1/volumeattachments/{name}/status'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling replaceVolumeAttachmentStatus.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling replaceVolumeAttachmentStatus.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1VolumeAttachment\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1VolumeAttachment\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n}\nexports.StorageV1Api = StorageV1Api;\n//# sourceMappingURL=storageV1Api.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.StorageV1alpha1Api = exports.StorageV1alpha1ApiApiKeys = void 0;\nconst tslib_1 = require(\"tslib\");\nconst request_1 = tslib_1.__importDefault(require(\"request\"));\nconst models_1 = require(\"../model/models\");\nconst models_2 = require(\"../model/models\");\nconst apis_1 = require(\"./apis\");\nlet defaultBasePath = 'http://localhost';\n// ===============================================\n// This file is autogenerated - Please do not edit\n// ===============================================\nvar StorageV1alpha1ApiApiKeys;\n(function (StorageV1alpha1ApiApiKeys) {\n StorageV1alpha1ApiApiKeys[StorageV1alpha1ApiApiKeys[\"BearerToken\"] = 0] = \"BearerToken\";\n})(StorageV1alpha1ApiApiKeys = exports.StorageV1alpha1ApiApiKeys || (exports.StorageV1alpha1ApiApiKeys = {}));\nclass StorageV1alpha1Api {\n constructor(basePathOrUsername, password, basePath) {\n this._basePath = defaultBasePath;\n this._defaultHeaders = {};\n this._useQuerystring = false;\n this.authentications = {\n 'default': new models_1.VoidAuth(),\n 'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'),\n };\n this.interceptors = [];\n if (password) {\n if (basePath) {\n this.basePath = basePath;\n }\n }\n else {\n if (basePathOrUsername) {\n this.basePath = basePathOrUsername;\n }\n }\n }\n set useQuerystring(value) {\n this._useQuerystring = value;\n }\n set basePath(basePath) {\n this._basePath = basePath;\n }\n set defaultHeaders(defaultHeaders) {\n this._defaultHeaders = defaultHeaders;\n }\n get defaultHeaders() {\n return this._defaultHeaders;\n }\n get basePath() {\n return this._basePath;\n }\n setDefaultAuthentication(auth) {\n this.authentications.default = auth;\n }\n setApiKey(key, value) {\n this.authentications[StorageV1alpha1ApiApiKeys[key]].apiKey = value;\n }\n addInterceptor(interceptor) {\n this.interceptors.push(interceptor);\n }\n /**\n * create a CSIStorageCapacity\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n */\n async createNamespacedCSIStorageCapacity(namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/storage.k8s.io/v1alpha1/namespaces/{namespace}/csistoragecapacities'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling createNamespacedCSIStorageCapacity.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling createNamespacedCSIStorageCapacity.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'POST',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1alpha1CSIStorageCapacity\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1alpha1CSIStorageCapacity\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * create a VolumeAttachment\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n */\n async createVolumeAttachment(body, pretty, dryRun, fieldManager, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/storage.k8s.io/v1alpha1/volumeattachments';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling createVolumeAttachment.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'POST',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1alpha1VolumeAttachment\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1alpha1VolumeAttachment\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * delete collection of CSIStorageCapacity\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @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.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @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.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @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.\n * @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.\n * @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.\n * @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\n * @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\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param body\n */\n async deleteCollectionNamespacedCSIStorageCapacity(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/storage.k8s.io/v1alpha1/namespaces/{namespace}/csistoragecapacities'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedCSIStorageCapacity.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (gracePeriodSeconds !== undefined) {\n localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, \"number\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, \"number\");\n }\n if (orphanDependents !== undefined) {\n localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, \"boolean\");\n }\n if (propagationPolicy !== undefined) {\n localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, \"string\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (resourceVersionMatch !== undefined) {\n localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1DeleteOptions\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1Status\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * delete collection of VolumeAttachment\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @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.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @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.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @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.\n * @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.\n * @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.\n * @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\n * @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\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param body\n */\n async deleteCollectionVolumeAttachment(pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/storage.k8s.io/v1alpha1/volumeattachments';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (gracePeriodSeconds !== undefined) {\n localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, \"number\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, \"number\");\n }\n if (orphanDependents !== undefined) {\n localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, \"boolean\");\n }\n if (propagationPolicy !== undefined) {\n localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, \"string\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (resourceVersionMatch !== undefined) {\n localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1DeleteOptions\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1Status\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * delete a CSIStorageCapacity\n * @param name name of the CSIStorageCapacity\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @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.\n * @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.\n * @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.\n * @param body\n */\n async deleteNamespacedCSIStorageCapacity(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/storage.k8s.io/v1alpha1/namespaces/{namespace}/csistoragecapacities/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling deleteNamespacedCSIStorageCapacity.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedCSIStorageCapacity.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (gracePeriodSeconds !== undefined) {\n localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, \"number\");\n }\n if (orphanDependents !== undefined) {\n localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, \"boolean\");\n }\n if (propagationPolicy !== undefined) {\n localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1DeleteOptions\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1Status\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * delete a VolumeAttachment\n * @param name name of the VolumeAttachment\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @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.\n * @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.\n * @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.\n * @param body\n */\n async deleteVolumeAttachment(name, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/storage.k8s.io/v1alpha1/volumeattachments/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling deleteVolumeAttachment.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (gracePeriodSeconds !== undefined) {\n localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, \"number\");\n }\n if (orphanDependents !== undefined) {\n localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, \"boolean\");\n }\n if (propagationPolicy !== undefined) {\n localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1DeleteOptions\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1alpha1VolumeAttachment\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * get available resources\n */\n async getAPIResources(options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/storage.k8s.io/v1alpha1/';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1APIResourceList\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * list or watch objects of kind CSIStorageCapacity\n * @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.\n * @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.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @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.\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @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\n * @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\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n */\n async listCSIStorageCapacityForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/storage.k8s.io/v1alpha1/csistoragecapacities';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n if (allowWatchBookmarks !== undefined) {\n localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, \"boolean\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, \"number\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (resourceVersionMatch !== undefined) {\n localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1alpha1CSIStorageCapacityList\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * list or watch objects of kind CSIStorageCapacity\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @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.\n * @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.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @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.\n * @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\n * @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\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n */\n async listNamespacedCSIStorageCapacity(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/storage.k8s.io/v1alpha1/namespaces/{namespace}/csistoragecapacities'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling listNamespacedCSIStorageCapacity.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (allowWatchBookmarks !== undefined) {\n localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, \"boolean\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, \"number\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (resourceVersionMatch !== undefined) {\n localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1alpha1CSIStorageCapacityList\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * list or watch objects of kind VolumeAttachment\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @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.\n * @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.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @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.\n * @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\n * @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\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n */\n async listVolumeAttachment(pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/storage.k8s.io/v1alpha1/volumeattachments';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (allowWatchBookmarks !== undefined) {\n localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, \"boolean\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, \"number\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (resourceVersionMatch !== undefined) {\n localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1alpha1VolumeAttachmentList\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * partially update the specified CSIStorageCapacity\n * @param name name of the CSIStorageCapacity\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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).\n * @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.\n */\n async patchNamespacedCSIStorageCapacity(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/storage.k8s.io/v1alpha1/namespaces/{namespace}/csistoragecapacities/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling patchNamespacedCSIStorageCapacity.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedCSIStorageCapacity.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling patchNamespacedCSIStorageCapacity.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n if (force !== undefined) {\n localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"object\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1alpha1CSIStorageCapacity\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * partially update the specified VolumeAttachment\n * @param name name of the VolumeAttachment\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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).\n * @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.\n */\n async patchVolumeAttachment(name, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/storage.k8s.io/v1alpha1/volumeattachments/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling patchVolumeAttachment.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling patchVolumeAttachment.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n if (force !== undefined) {\n localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"object\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1alpha1VolumeAttachment\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * read the specified CSIStorageCapacity\n * @param name name of the CSIStorageCapacity\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If \\'true\\', then the output is pretty printed.\n */\n async readNamespacedCSIStorageCapacity(name, namespace, pretty, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/storage.k8s.io/v1alpha1/namespaces/{namespace}/csistoragecapacities/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling readNamespacedCSIStorageCapacity.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling readNamespacedCSIStorageCapacity.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1alpha1CSIStorageCapacity\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * read the specified VolumeAttachment\n * @param name name of the VolumeAttachment\n * @param pretty If \\'true\\', then the output is pretty printed.\n */\n async readVolumeAttachment(name, pretty, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/storage.k8s.io/v1alpha1/volumeattachments/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling readVolumeAttachment.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1alpha1VolumeAttachment\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * replace the specified CSIStorageCapacity\n * @param name name of the CSIStorageCapacity\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n */\n async replaceNamespacedCSIStorageCapacity(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/storage.k8s.io/v1alpha1/namespaces/{namespace}/csistoragecapacities/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling replaceNamespacedCSIStorageCapacity.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedCSIStorageCapacity.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling replaceNamespacedCSIStorageCapacity.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1alpha1CSIStorageCapacity\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1alpha1CSIStorageCapacity\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * replace the specified VolumeAttachment\n * @param name name of the VolumeAttachment\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n */\n async replaceVolumeAttachment(name, body, pretty, dryRun, fieldManager, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/storage.k8s.io/v1alpha1/volumeattachments/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling replaceVolumeAttachment.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling replaceVolumeAttachment.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1alpha1VolumeAttachment\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1alpha1VolumeAttachment\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n}\nexports.StorageV1alpha1Api = StorageV1alpha1Api;\n//# sourceMappingURL=storageV1alpha1Api.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.StorageV1beta1Api = exports.StorageV1beta1ApiApiKeys = void 0;\nconst tslib_1 = require(\"tslib\");\nconst request_1 = tslib_1.__importDefault(require(\"request\"));\nconst models_1 = require(\"../model/models\");\nconst models_2 = require(\"../model/models\");\nconst apis_1 = require(\"./apis\");\nlet defaultBasePath = 'http://localhost';\n// ===============================================\n// This file is autogenerated - Please do not edit\n// ===============================================\nvar StorageV1beta1ApiApiKeys;\n(function (StorageV1beta1ApiApiKeys) {\n StorageV1beta1ApiApiKeys[StorageV1beta1ApiApiKeys[\"BearerToken\"] = 0] = \"BearerToken\";\n})(StorageV1beta1ApiApiKeys = exports.StorageV1beta1ApiApiKeys || (exports.StorageV1beta1ApiApiKeys = {}));\nclass StorageV1beta1Api {\n constructor(basePathOrUsername, password, basePath) {\n this._basePath = defaultBasePath;\n this._defaultHeaders = {};\n this._useQuerystring = false;\n this.authentications = {\n 'default': new models_1.VoidAuth(),\n 'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'),\n };\n this.interceptors = [];\n if (password) {\n if (basePath) {\n this.basePath = basePath;\n }\n }\n else {\n if (basePathOrUsername) {\n this.basePath = basePathOrUsername;\n }\n }\n }\n set useQuerystring(value) {\n this._useQuerystring = value;\n }\n set basePath(basePath) {\n this._basePath = basePath;\n }\n set defaultHeaders(defaultHeaders) {\n this._defaultHeaders = defaultHeaders;\n }\n get defaultHeaders() {\n return this._defaultHeaders;\n }\n get basePath() {\n return this._basePath;\n }\n setDefaultAuthentication(auth) {\n this.authentications.default = auth;\n }\n setApiKey(key, value) {\n this.authentications[StorageV1beta1ApiApiKeys[key]].apiKey = value;\n }\n addInterceptor(interceptor) {\n this.interceptors.push(interceptor);\n }\n /**\n * create a CSIStorageCapacity\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n */\n async createNamespacedCSIStorageCapacity(namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/storage.k8s.io/v1beta1/namespaces/{namespace}/csistoragecapacities'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling createNamespacedCSIStorageCapacity.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling createNamespacedCSIStorageCapacity.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'POST',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1beta1CSIStorageCapacity\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1beta1CSIStorageCapacity\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * delete collection of CSIStorageCapacity\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @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.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @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.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @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.\n * @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.\n * @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.\n * @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\n * @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\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param body\n */\n async deleteCollectionNamespacedCSIStorageCapacity(namespace, pretty, _continue, dryRun, fieldSelector, gracePeriodSeconds, labelSelector, limit, orphanDependents, propagationPolicy, resourceVersion, resourceVersionMatch, timeoutSeconds, body, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/storage.k8s.io/v1beta1/namespaces/{namespace}/csistoragecapacities'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling deleteCollectionNamespacedCSIStorageCapacity.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (gracePeriodSeconds !== undefined) {\n localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, \"number\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, \"number\");\n }\n if (orphanDependents !== undefined) {\n localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, \"boolean\");\n }\n if (propagationPolicy !== undefined) {\n localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, \"string\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (resourceVersionMatch !== undefined) {\n localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1DeleteOptions\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1Status\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * delete a CSIStorageCapacity\n * @param name name of the CSIStorageCapacity\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @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.\n * @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.\n * @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.\n * @param body\n */\n async deleteNamespacedCSIStorageCapacity(name, namespace, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/storage.k8s.io/v1beta1/namespaces/{namespace}/csistoragecapacities/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling deleteNamespacedCSIStorageCapacity.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling deleteNamespacedCSIStorageCapacity.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (gracePeriodSeconds !== undefined) {\n localVarQueryParameters['gracePeriodSeconds'] = models_1.ObjectSerializer.serialize(gracePeriodSeconds, \"number\");\n }\n if (orphanDependents !== undefined) {\n localVarQueryParameters['orphanDependents'] = models_1.ObjectSerializer.serialize(orphanDependents, \"boolean\");\n }\n if (propagationPolicy !== undefined) {\n localVarQueryParameters['propagationPolicy'] = models_1.ObjectSerializer.serialize(propagationPolicy, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1DeleteOptions\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1Status\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * get available resources\n */\n async getAPIResources(options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/storage.k8s.io/v1beta1/';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1APIResourceList\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * list or watch objects of kind CSIStorageCapacity\n * @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.\n * @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.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @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.\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @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\n * @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\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n */\n async listCSIStorageCapacityForAllNamespaces(allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, pretty, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/storage.k8s.io/v1beta1/csistoragecapacities';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n if (allowWatchBookmarks !== undefined) {\n localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, \"boolean\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, \"number\");\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (resourceVersionMatch !== undefined) {\n localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1beta1CSIStorageCapacityList\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * list or watch objects of kind CSIStorageCapacity\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @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.\n * @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.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @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.\n * @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\n * @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\n * @param timeoutSeconds Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.\n * @param watch Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.\n */\n async listNamespacedCSIStorageCapacity(namespace, pretty, allowWatchBookmarks, _continue, fieldSelector, labelSelector, limit, resourceVersion, resourceVersionMatch, timeoutSeconds, watch, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/storage.k8s.io/v1beta1/namespaces/{namespace}/csistoragecapacities'\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf', 'application/json;stream=watch', 'application/vnd.kubernetes.protobuf;stream=watch'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling listNamespacedCSIStorageCapacity.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (allowWatchBookmarks !== undefined) {\n localVarQueryParameters['allowWatchBookmarks'] = models_1.ObjectSerializer.serialize(allowWatchBookmarks, \"boolean\");\n }\n if (_continue !== undefined) {\n localVarQueryParameters['continue'] = models_1.ObjectSerializer.serialize(_continue, \"string\");\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters['fieldSelector'] = models_1.ObjectSerializer.serialize(fieldSelector, \"string\");\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters['labelSelector'] = models_1.ObjectSerializer.serialize(labelSelector, \"string\");\n }\n if (limit !== undefined) {\n localVarQueryParameters['limit'] = models_1.ObjectSerializer.serialize(limit, \"number\");\n }\n if (resourceVersion !== undefined) {\n localVarQueryParameters['resourceVersion'] = models_1.ObjectSerializer.serialize(resourceVersion, \"string\");\n }\n if (resourceVersionMatch !== undefined) {\n localVarQueryParameters['resourceVersionMatch'] = models_1.ObjectSerializer.serialize(resourceVersionMatch, \"string\");\n }\n if (timeoutSeconds !== undefined) {\n localVarQueryParameters['timeoutSeconds'] = models_1.ObjectSerializer.serialize(timeoutSeconds, \"number\");\n }\n if (watch !== undefined) {\n localVarQueryParameters['watch'] = models_1.ObjectSerializer.serialize(watch, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1beta1CSIStorageCapacityList\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * partially update the specified CSIStorageCapacity\n * @param name name of the CSIStorageCapacity\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. 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).\n * @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.\n */\n async patchNamespacedCSIStorageCapacity(name, namespace, body, pretty, dryRun, fieldManager, force, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/storage.k8s.io/v1beta1/namespaces/{namespace}/csistoragecapacities/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling patchNamespacedCSIStorageCapacity.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling patchNamespacedCSIStorageCapacity.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling patchNamespacedCSIStorageCapacity.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n if (force !== undefined) {\n localVarQueryParameters['force'] = models_1.ObjectSerializer.serialize(force, \"boolean\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"object\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1beta1CSIStorageCapacity\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * read the specified CSIStorageCapacity\n * @param name name of the CSIStorageCapacity\n * @param namespace object name and auth scope, such as for teams and projects\n * @param pretty If \\'true\\', then the output is pretty printed.\n */\n async readNamespacedCSIStorageCapacity(name, namespace, pretty, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/storage.k8s.io/v1beta1/namespaces/{namespace}/csistoragecapacities/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling readNamespacedCSIStorageCapacity.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling readNamespacedCSIStorageCapacity.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1beta1CSIStorageCapacity\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n /**\n * replace the specified CSIStorageCapacity\n * @param name name of the CSIStorageCapacity\n * @param namespace object name and auth scope, such as for teams and projects\n * @param body\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.\n */\n async replaceNamespacedCSIStorageCapacity(name, namespace, body, pretty, dryRun, fieldManager, options = { headers: {} }) {\n const localVarPath = this.basePath + '/apis/storage.k8s.io/v1beta1/namespaces/{namespace}/csistoragecapacities/{name}'\n .replace('{' + 'name' + '}', encodeURIComponent(String(name)))\n .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace)));\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json', 'application/yaml', 'application/vnd.kubernetes.protobuf'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n // verify required parameter 'name' is not null or undefined\n if (name === null || name === undefined) {\n throw new Error('Required parameter name was null or undefined when calling replaceNamespacedCSIStorageCapacity.');\n }\n // verify required parameter 'namespace' is not null or undefined\n if (namespace === null || namespace === undefined) {\n throw new Error('Required parameter namespace was null or undefined when calling replaceNamespacedCSIStorageCapacity.');\n }\n // verify required parameter 'body' is not null or undefined\n if (body === null || body === undefined) {\n throw new Error('Required parameter body was null or undefined when calling replaceNamespacedCSIStorageCapacity.');\n }\n if (pretty !== undefined) {\n localVarQueryParameters['pretty'] = models_1.ObjectSerializer.serialize(pretty, \"string\");\n }\n if (dryRun !== undefined) {\n localVarQueryParameters['dryRun'] = models_1.ObjectSerializer.serialize(dryRun, \"string\");\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters['fieldManager'] = models_1.ObjectSerializer.serialize(fieldManager, \"string\");\n }\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: models_1.ObjectSerializer.serialize(body, \"V1beta1CSIStorageCapacity\")\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"V1beta1CSIStorageCapacity\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n}\nexports.StorageV1beta1Api = StorageV1beta1Api;\n//# sourceMappingURL=storageV1beta1Api.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.VersionApi = exports.VersionApiApiKeys = void 0;\nconst tslib_1 = require(\"tslib\");\nconst request_1 = tslib_1.__importDefault(require(\"request\"));\nconst models_1 = require(\"../model/models\");\nconst models_2 = require(\"../model/models\");\nconst apis_1 = require(\"./apis\");\nlet defaultBasePath = 'http://localhost';\n// ===============================================\n// This file is autogenerated - Please do not edit\n// ===============================================\nvar VersionApiApiKeys;\n(function (VersionApiApiKeys) {\n VersionApiApiKeys[VersionApiApiKeys[\"BearerToken\"] = 0] = \"BearerToken\";\n})(VersionApiApiKeys = exports.VersionApiApiKeys || (exports.VersionApiApiKeys = {}));\nclass VersionApi {\n constructor(basePathOrUsername, password, basePath) {\n this._basePath = defaultBasePath;\n this._defaultHeaders = {};\n this._useQuerystring = false;\n this.authentications = {\n 'default': new models_1.VoidAuth(),\n 'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'),\n };\n this.interceptors = [];\n if (password) {\n if (basePath) {\n this.basePath = basePath;\n }\n }\n else {\n if (basePathOrUsername) {\n this.basePath = basePathOrUsername;\n }\n }\n }\n set useQuerystring(value) {\n this._useQuerystring = value;\n }\n set basePath(basePath) {\n this._basePath = basePath;\n }\n set defaultHeaders(defaultHeaders) {\n this._defaultHeaders = defaultHeaders;\n }\n get defaultHeaders() {\n return this._defaultHeaders;\n }\n get basePath() {\n return this._basePath;\n }\n setDefaultAuthentication(auth) {\n this.authentications.default = auth;\n }\n setApiKey(key, value) {\n this.authentications[VersionApiApiKeys[key]].apiKey = value;\n }\n addInterceptor(interceptor) {\n this.interceptors.push(interceptor);\n }\n /**\n * get the code version\n */\n async getCode(options = { headers: {} }) {\n const localVarPath = this.basePath + '/version/';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"VersionInfo\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n}\nexports.VersionApi = VersionApi;\n//# sourceMappingURL=versionApi.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.WellKnownApi = exports.WellKnownApiApiKeys = void 0;\nconst tslib_1 = require(\"tslib\");\nconst request_1 = tslib_1.__importDefault(require(\"request\"));\n/* tslint:disable:no-unused-locals */\nconst models_1 = require(\"../model/models\");\nconst models_2 = require(\"../model/models\");\nconst apis_1 = require(\"./apis\");\nlet defaultBasePath = 'http://localhost';\n// ===============================================\n// This file is autogenerated - Please do not edit\n// ===============================================\nvar WellKnownApiApiKeys;\n(function (WellKnownApiApiKeys) {\n WellKnownApiApiKeys[WellKnownApiApiKeys[\"BearerToken\"] = 0] = \"BearerToken\";\n})(WellKnownApiApiKeys = exports.WellKnownApiApiKeys || (exports.WellKnownApiApiKeys = {}));\nclass WellKnownApi {\n constructor(basePathOrUsername, password, basePath) {\n this._basePath = defaultBasePath;\n this._defaultHeaders = {};\n this._useQuerystring = false;\n this.authentications = {\n 'default': new models_1.VoidAuth(),\n 'BearerToken': new models_2.ApiKeyAuth('header', 'authorization'),\n };\n this.interceptors = [];\n if (password) {\n if (basePath) {\n this.basePath = basePath;\n }\n }\n else {\n if (basePathOrUsername) {\n this.basePath = basePathOrUsername;\n }\n }\n }\n set useQuerystring(value) {\n this._useQuerystring = value;\n }\n set basePath(basePath) {\n this._basePath = basePath;\n }\n set defaultHeaders(defaultHeaders) {\n this._defaultHeaders = defaultHeaders;\n }\n get defaultHeaders() {\n return this._defaultHeaders;\n }\n get basePath() {\n return this._basePath;\n }\n setDefaultAuthentication(auth) {\n this.authentications.default = auth;\n }\n setApiKey(key, value) {\n this.authentications[WellKnownApiApiKeys[key]].apiKey = value;\n }\n addInterceptor(interceptor) {\n this.interceptors.push(interceptor);\n }\n /**\n * get service account issuer OpenID configuration, also known as the \\'OIDC discovery doc\\'\n */\n async getServiceAccountIssuerOpenIDConfiguration(options = { headers: {} }) {\n const localVarPath = this.basePath + '/.well-known/openid-configuration/';\n let localVarQueryParameters = {};\n let localVarHeaderParams = Object.assign({}, this._defaultHeaders);\n const produces = ['application/json'];\n // give precedence to 'application/json'\n if (produces.indexOf('application/json') >= 0) {\n localVarHeaderParams.Accept = 'application/json';\n }\n else {\n localVarHeaderParams.Accept = produces.join(',');\n }\n let localVarFormParams = {};\n Object.assign(localVarHeaderParams, options.headers);\n let localVarUseFormData = false;\n let localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(localVarRequestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));\n }\n return interceptorPromise.then(() => {\n if (Object.keys(localVarFormParams).length) {\n if (localVarUseFormData) {\n localVarRequestOptions.formData = localVarFormParams;\n }\n else {\n localVarRequestOptions.form = localVarFormParams;\n }\n }\n return new Promise((resolve, reject) => {\n request_1.default(localVarRequestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n body = models_1.ObjectSerializer.deserialize(body, \"string\");\n resolve({ response: response, body: body });\n }\n else {\n reject(new apis_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n });\n }\n}\nexports.WellKnownApi = WellKnownApi;\n//# sourceMappingURL=wellKnownApi.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.AdmissionregistrationV1ServiceReference = void 0;\n/**\n* ServiceReference holds a reference to Service.legacy.k8s.io\n*/\nclass AdmissionregistrationV1ServiceReference {\n static getAttributeTypeMap() {\n return AdmissionregistrationV1ServiceReference.attributeTypeMap;\n }\n}\nexports.AdmissionregistrationV1ServiceReference = AdmissionregistrationV1ServiceReference;\nAdmissionregistrationV1ServiceReference.discriminator = undefined;\nAdmissionregistrationV1ServiceReference.attributeTypeMap = [\n {\n \"name\": \"name\",\n \"baseName\": \"name\",\n \"type\": \"string\"\n },\n {\n \"name\": \"namespace\",\n \"baseName\": \"namespace\",\n \"type\": \"string\"\n },\n {\n \"name\": \"path\",\n \"baseName\": \"path\",\n \"type\": \"string\"\n },\n {\n \"name\": \"port\",\n \"baseName\": \"port\",\n \"type\": \"number\"\n }\n];\n//# sourceMappingURL=admissionregistrationV1ServiceReference.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.AdmissionregistrationV1WebhookClientConfig = void 0;\n/**\n* WebhookClientConfig contains the information to make a TLS connection with the webhook\n*/\nclass AdmissionregistrationV1WebhookClientConfig {\n static getAttributeTypeMap() {\n return AdmissionregistrationV1WebhookClientConfig.attributeTypeMap;\n }\n}\nexports.AdmissionregistrationV1WebhookClientConfig = AdmissionregistrationV1WebhookClientConfig;\nAdmissionregistrationV1WebhookClientConfig.discriminator = undefined;\nAdmissionregistrationV1WebhookClientConfig.attributeTypeMap = [\n {\n \"name\": \"caBundle\",\n \"baseName\": \"caBundle\",\n \"type\": \"string\"\n },\n {\n \"name\": \"service\",\n \"baseName\": \"service\",\n \"type\": \"AdmissionregistrationV1ServiceReference\"\n },\n {\n \"name\": \"url\",\n \"baseName\": \"url\",\n \"type\": \"string\"\n }\n];\n//# sourceMappingURL=admissionregistrationV1WebhookClientConfig.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ApiextensionsV1ServiceReference = void 0;\n/**\n* ServiceReference holds a reference to Service.legacy.k8s.io\n*/\nclass ApiextensionsV1ServiceReference {\n static getAttributeTypeMap() {\n return ApiextensionsV1ServiceReference.attributeTypeMap;\n }\n}\nexports.ApiextensionsV1ServiceReference = ApiextensionsV1ServiceReference;\nApiextensionsV1ServiceReference.discriminator = undefined;\nApiextensionsV1ServiceReference.attributeTypeMap = [\n {\n \"name\": \"name\",\n \"baseName\": \"name\",\n \"type\": \"string\"\n },\n {\n \"name\": \"namespace\",\n \"baseName\": \"namespace\",\n \"type\": \"string\"\n },\n {\n \"name\": \"path\",\n \"baseName\": \"path\",\n \"type\": \"string\"\n },\n {\n \"name\": \"port\",\n \"baseName\": \"port\",\n \"type\": \"number\"\n }\n];\n//# sourceMappingURL=apiextensionsV1ServiceReference.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ApiextensionsV1WebhookClientConfig = void 0;\n/**\n* WebhookClientConfig contains the information to make a TLS connection with the webhook.\n*/\nclass ApiextensionsV1WebhookClientConfig {\n static getAttributeTypeMap() {\n return ApiextensionsV1WebhookClientConfig.attributeTypeMap;\n }\n}\nexports.ApiextensionsV1WebhookClientConfig = ApiextensionsV1WebhookClientConfig;\nApiextensionsV1WebhookClientConfig.discriminator = undefined;\nApiextensionsV1WebhookClientConfig.attributeTypeMap = [\n {\n \"name\": \"caBundle\",\n \"baseName\": \"caBundle\",\n \"type\": \"string\"\n },\n {\n \"name\": \"service\",\n \"baseName\": \"service\",\n \"type\": \"ApiextensionsV1ServiceReference\"\n },\n {\n \"name\": \"url\",\n \"baseName\": \"url\",\n \"type\": \"string\"\n }\n];\n//# sourceMappingURL=apiextensionsV1WebhookClientConfig.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ApiregistrationV1ServiceReference = void 0;\n/**\n* ServiceReference holds a reference to Service.legacy.k8s.io\n*/\nclass ApiregistrationV1ServiceReference {\n static getAttributeTypeMap() {\n return ApiregistrationV1ServiceReference.attributeTypeMap;\n }\n}\nexports.ApiregistrationV1ServiceReference = ApiregistrationV1ServiceReference;\nApiregistrationV1ServiceReference.discriminator = undefined;\nApiregistrationV1ServiceReference.attributeTypeMap = [\n {\n \"name\": \"name\",\n \"baseName\": \"name\",\n \"type\": \"string\"\n },\n {\n \"name\": \"namespace\",\n \"baseName\": \"namespace\",\n \"type\": \"string\"\n },\n {\n \"name\": \"port\",\n \"baseName\": \"port\",\n \"type\": \"number\"\n }\n];\n//# sourceMappingURL=apiregistrationV1ServiceReference.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.AuthenticationV1TokenRequest = void 0;\n/**\n* TokenRequest requests a token for a given service account.\n*/\nclass AuthenticationV1TokenRequest {\n static getAttributeTypeMap() {\n return AuthenticationV1TokenRequest.attributeTypeMap;\n }\n}\nexports.AuthenticationV1TokenRequest = AuthenticationV1TokenRequest;\nAuthenticationV1TokenRequest.discriminator = undefined;\nAuthenticationV1TokenRequest.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ObjectMeta\"\n },\n {\n \"name\": \"spec\",\n \"baseName\": \"spec\",\n \"type\": \"V1TokenRequestSpec\"\n },\n {\n \"name\": \"status\",\n \"baseName\": \"status\",\n \"type\": \"V1TokenRequestStatus\"\n }\n];\n//# sourceMappingURL=authenticationV1TokenRequest.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.CoreV1EndpointPort = void 0;\n/**\n* EndpointPort is a tuple that describes a single port.\n*/\nclass CoreV1EndpointPort {\n static getAttributeTypeMap() {\n return CoreV1EndpointPort.attributeTypeMap;\n }\n}\nexports.CoreV1EndpointPort = CoreV1EndpointPort;\nCoreV1EndpointPort.discriminator = undefined;\nCoreV1EndpointPort.attributeTypeMap = [\n {\n \"name\": \"appProtocol\",\n \"baseName\": \"appProtocol\",\n \"type\": \"string\"\n },\n {\n \"name\": \"name\",\n \"baseName\": \"name\",\n \"type\": \"string\"\n },\n {\n \"name\": \"port\",\n \"baseName\": \"port\",\n \"type\": \"number\"\n },\n {\n \"name\": \"protocol\",\n \"baseName\": \"protocol\",\n \"type\": \"string\"\n }\n];\n//# sourceMappingURL=coreV1EndpointPort.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.CoreV1Event = void 0;\n/**\n* 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.\n*/\nclass CoreV1Event {\n static getAttributeTypeMap() {\n return CoreV1Event.attributeTypeMap;\n }\n}\nexports.CoreV1Event = CoreV1Event;\nCoreV1Event.discriminator = undefined;\nCoreV1Event.attributeTypeMap = [\n {\n \"name\": \"action\",\n \"baseName\": \"action\",\n \"type\": \"string\"\n },\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"count\",\n \"baseName\": \"count\",\n \"type\": \"number\"\n },\n {\n \"name\": \"eventTime\",\n \"baseName\": \"eventTime\",\n \"type\": \"Date\"\n },\n {\n \"name\": \"firstTimestamp\",\n \"baseName\": \"firstTimestamp\",\n \"type\": \"Date\"\n },\n {\n \"name\": \"involvedObject\",\n \"baseName\": \"involvedObject\",\n \"type\": \"V1ObjectReference\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"lastTimestamp\",\n \"baseName\": \"lastTimestamp\",\n \"type\": \"Date\"\n },\n {\n \"name\": \"message\",\n \"baseName\": \"message\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ObjectMeta\"\n },\n {\n \"name\": \"reason\",\n \"baseName\": \"reason\",\n \"type\": \"string\"\n },\n {\n \"name\": \"related\",\n \"baseName\": \"related\",\n \"type\": \"V1ObjectReference\"\n },\n {\n \"name\": \"reportingComponent\",\n \"baseName\": \"reportingComponent\",\n \"type\": \"string\"\n },\n {\n \"name\": \"reportingInstance\",\n \"baseName\": \"reportingInstance\",\n \"type\": \"string\"\n },\n {\n \"name\": \"series\",\n \"baseName\": \"series\",\n \"type\": \"CoreV1EventSeries\"\n },\n {\n \"name\": \"source\",\n \"baseName\": \"source\",\n \"type\": \"V1EventSource\"\n },\n {\n \"name\": \"type\",\n \"baseName\": \"type\",\n \"type\": \"string\"\n }\n];\n//# sourceMappingURL=coreV1Event.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.CoreV1EventList = void 0;\n/**\n* EventList is a list of events.\n*/\nclass CoreV1EventList {\n static getAttributeTypeMap() {\n return CoreV1EventList.attributeTypeMap;\n }\n}\nexports.CoreV1EventList = CoreV1EventList;\nCoreV1EventList.discriminator = undefined;\nCoreV1EventList.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"items\",\n \"baseName\": \"items\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ListMeta\"\n }\n];\n//# sourceMappingURL=coreV1EventList.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.CoreV1EventSeries = void 0;\n/**\n* EventSeries contain information on series of events, i.e. thing that was/is happening continuously for some time.\n*/\nclass CoreV1EventSeries {\n static getAttributeTypeMap() {\n return CoreV1EventSeries.attributeTypeMap;\n }\n}\nexports.CoreV1EventSeries = CoreV1EventSeries;\nCoreV1EventSeries.discriminator = undefined;\nCoreV1EventSeries.attributeTypeMap = [\n {\n \"name\": \"count\",\n \"baseName\": \"count\",\n \"type\": \"number\"\n },\n {\n \"name\": \"lastObservedTime\",\n \"baseName\": \"lastObservedTime\",\n \"type\": \"Date\"\n }\n];\n//# sourceMappingURL=coreV1EventSeries.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.DiscoveryV1EndpointPort = void 0;\n/**\n* EndpointPort represents a Port used by an EndpointSlice\n*/\nclass DiscoveryV1EndpointPort {\n static getAttributeTypeMap() {\n return DiscoveryV1EndpointPort.attributeTypeMap;\n }\n}\nexports.DiscoveryV1EndpointPort = DiscoveryV1EndpointPort;\nDiscoveryV1EndpointPort.discriminator = undefined;\nDiscoveryV1EndpointPort.attributeTypeMap = [\n {\n \"name\": \"appProtocol\",\n \"baseName\": \"appProtocol\",\n \"type\": \"string\"\n },\n {\n \"name\": \"name\",\n \"baseName\": \"name\",\n \"type\": \"string\"\n },\n {\n \"name\": \"port\",\n \"baseName\": \"port\",\n \"type\": \"number\"\n },\n {\n \"name\": \"protocol\",\n \"baseName\": \"protocol\",\n \"type\": \"string\"\n }\n];\n//# sourceMappingURL=discoveryV1EndpointPort.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.EventsV1Event = void 0;\n/**\n* 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.\n*/\nclass EventsV1Event {\n static getAttributeTypeMap() {\n return EventsV1Event.attributeTypeMap;\n }\n}\nexports.EventsV1Event = EventsV1Event;\nEventsV1Event.discriminator = undefined;\nEventsV1Event.attributeTypeMap = [\n {\n \"name\": \"action\",\n \"baseName\": \"action\",\n \"type\": \"string\"\n },\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"deprecatedCount\",\n \"baseName\": \"deprecatedCount\",\n \"type\": \"number\"\n },\n {\n \"name\": \"deprecatedFirstTimestamp\",\n \"baseName\": \"deprecatedFirstTimestamp\",\n \"type\": \"Date\"\n },\n {\n \"name\": \"deprecatedLastTimestamp\",\n \"baseName\": \"deprecatedLastTimestamp\",\n \"type\": \"Date\"\n },\n {\n \"name\": \"deprecatedSource\",\n \"baseName\": \"deprecatedSource\",\n \"type\": \"V1EventSource\"\n },\n {\n \"name\": \"eventTime\",\n \"baseName\": \"eventTime\",\n \"type\": \"Date\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ObjectMeta\"\n },\n {\n \"name\": \"note\",\n \"baseName\": \"note\",\n \"type\": \"string\"\n },\n {\n \"name\": \"reason\",\n \"baseName\": \"reason\",\n \"type\": \"string\"\n },\n {\n \"name\": \"regarding\",\n \"baseName\": \"regarding\",\n \"type\": \"V1ObjectReference\"\n },\n {\n \"name\": \"related\",\n \"baseName\": \"related\",\n \"type\": \"V1ObjectReference\"\n },\n {\n \"name\": \"reportingController\",\n \"baseName\": \"reportingController\",\n \"type\": \"string\"\n },\n {\n \"name\": \"reportingInstance\",\n \"baseName\": \"reportingInstance\",\n \"type\": \"string\"\n },\n {\n \"name\": \"series\",\n \"baseName\": \"series\",\n \"type\": \"EventsV1EventSeries\"\n },\n {\n \"name\": \"type\",\n \"baseName\": \"type\",\n \"type\": \"string\"\n }\n];\n//# sourceMappingURL=eventsV1Event.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.EventsV1EventList = void 0;\n/**\n* EventList is a list of Event objects.\n*/\nclass EventsV1EventList {\n static getAttributeTypeMap() {\n return EventsV1EventList.attributeTypeMap;\n }\n}\nexports.EventsV1EventList = EventsV1EventList;\nEventsV1EventList.discriminator = undefined;\nEventsV1EventList.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"items\",\n \"baseName\": \"items\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ListMeta\"\n }\n];\n//# sourceMappingURL=eventsV1EventList.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.EventsV1EventSeries = void 0;\n/**\n* 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.\n*/\nclass EventsV1EventSeries {\n static getAttributeTypeMap() {\n return EventsV1EventSeries.attributeTypeMap;\n }\n}\nexports.EventsV1EventSeries = EventsV1EventSeries;\nEventsV1EventSeries.discriminator = undefined;\nEventsV1EventSeries.attributeTypeMap = [\n {\n \"name\": \"count\",\n \"baseName\": \"count\",\n \"type\": \"number\"\n },\n {\n \"name\": \"lastObservedTime\",\n \"baseName\": \"lastObservedTime\",\n \"type\": \"Date\"\n }\n];\n//# sourceMappingURL=eventsV1EventSeries.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.VoidAuth = exports.OAuth = exports.ApiKeyAuth = exports.HttpBearerAuth = exports.HttpBasicAuth = exports.ObjectSerializer = void 0;\nconst tslib_1 = require(\"tslib\");\ntslib_1.__exportStar(require(\"./admissionregistrationV1ServiceReference\"), exports);\ntslib_1.__exportStar(require(\"./admissionregistrationV1WebhookClientConfig\"), exports);\ntslib_1.__exportStar(require(\"./apiextensionsV1ServiceReference\"), exports);\ntslib_1.__exportStar(require(\"./apiextensionsV1WebhookClientConfig\"), exports);\ntslib_1.__exportStar(require(\"./apiregistrationV1ServiceReference\"), exports);\ntslib_1.__exportStar(require(\"./authenticationV1TokenRequest\"), exports);\ntslib_1.__exportStar(require(\"./coreV1EndpointPort\"), exports);\ntslib_1.__exportStar(require(\"./coreV1Event\"), exports);\ntslib_1.__exportStar(require(\"./coreV1EventList\"), exports);\ntslib_1.__exportStar(require(\"./coreV1EventSeries\"), exports);\ntslib_1.__exportStar(require(\"./discoveryV1EndpointPort\"), exports);\ntslib_1.__exportStar(require(\"./eventsV1Event\"), exports);\ntslib_1.__exportStar(require(\"./eventsV1EventList\"), exports);\ntslib_1.__exportStar(require(\"./eventsV1EventSeries\"), exports);\ntslib_1.__exportStar(require(\"./storageV1TokenRequest\"), exports);\ntslib_1.__exportStar(require(\"./v1APIGroup\"), exports);\ntslib_1.__exportStar(require(\"./v1APIGroupList\"), exports);\ntslib_1.__exportStar(require(\"./v1APIResource\"), exports);\ntslib_1.__exportStar(require(\"./v1APIResourceList\"), exports);\ntslib_1.__exportStar(require(\"./v1APIService\"), exports);\ntslib_1.__exportStar(require(\"./v1APIServiceCondition\"), exports);\ntslib_1.__exportStar(require(\"./v1APIServiceList\"), exports);\ntslib_1.__exportStar(require(\"./v1APIServiceSpec\"), exports);\ntslib_1.__exportStar(require(\"./v1APIServiceStatus\"), exports);\ntslib_1.__exportStar(require(\"./v1APIVersions\"), exports);\ntslib_1.__exportStar(require(\"./v1AWSElasticBlockStoreVolumeSource\"), exports);\ntslib_1.__exportStar(require(\"./v1Affinity\"), exports);\ntslib_1.__exportStar(require(\"./v1AggregationRule\"), exports);\ntslib_1.__exportStar(require(\"./v1AttachedVolume\"), exports);\ntslib_1.__exportStar(require(\"./v1AzureDiskVolumeSource\"), exports);\ntslib_1.__exportStar(require(\"./v1AzureFilePersistentVolumeSource\"), exports);\ntslib_1.__exportStar(require(\"./v1AzureFileVolumeSource\"), exports);\ntslib_1.__exportStar(require(\"./v1Binding\"), exports);\ntslib_1.__exportStar(require(\"./v1BoundObjectReference\"), exports);\ntslib_1.__exportStar(require(\"./v1CSIDriver\"), exports);\ntslib_1.__exportStar(require(\"./v1CSIDriverList\"), exports);\ntslib_1.__exportStar(require(\"./v1CSIDriverSpec\"), exports);\ntslib_1.__exportStar(require(\"./v1CSINode\"), exports);\ntslib_1.__exportStar(require(\"./v1CSINodeDriver\"), exports);\ntslib_1.__exportStar(require(\"./v1CSINodeList\"), exports);\ntslib_1.__exportStar(require(\"./v1CSINodeSpec\"), exports);\ntslib_1.__exportStar(require(\"./v1CSIPersistentVolumeSource\"), exports);\ntslib_1.__exportStar(require(\"./v1CSIVolumeSource\"), exports);\ntslib_1.__exportStar(require(\"./v1Capabilities\"), exports);\ntslib_1.__exportStar(require(\"./v1CephFSPersistentVolumeSource\"), exports);\ntslib_1.__exportStar(require(\"./v1CephFSVolumeSource\"), exports);\ntslib_1.__exportStar(require(\"./v1CertificateSigningRequest\"), exports);\ntslib_1.__exportStar(require(\"./v1CertificateSigningRequestCondition\"), exports);\ntslib_1.__exportStar(require(\"./v1CertificateSigningRequestList\"), exports);\ntslib_1.__exportStar(require(\"./v1CertificateSigningRequestSpec\"), exports);\ntslib_1.__exportStar(require(\"./v1CertificateSigningRequestStatus\"), exports);\ntslib_1.__exportStar(require(\"./v1CinderPersistentVolumeSource\"), exports);\ntslib_1.__exportStar(require(\"./v1CinderVolumeSource\"), exports);\ntslib_1.__exportStar(require(\"./v1ClientIPConfig\"), exports);\ntslib_1.__exportStar(require(\"./v1ClusterRole\"), exports);\ntslib_1.__exportStar(require(\"./v1ClusterRoleBinding\"), exports);\ntslib_1.__exportStar(require(\"./v1ClusterRoleBindingList\"), exports);\ntslib_1.__exportStar(require(\"./v1ClusterRoleList\"), exports);\ntslib_1.__exportStar(require(\"./v1ComponentCondition\"), exports);\ntslib_1.__exportStar(require(\"./v1ComponentStatus\"), exports);\ntslib_1.__exportStar(require(\"./v1ComponentStatusList\"), exports);\ntslib_1.__exportStar(require(\"./v1Condition\"), exports);\ntslib_1.__exportStar(require(\"./v1ConfigMap\"), exports);\ntslib_1.__exportStar(require(\"./v1ConfigMapEnvSource\"), exports);\ntslib_1.__exportStar(require(\"./v1ConfigMapKeySelector\"), exports);\ntslib_1.__exportStar(require(\"./v1ConfigMapList\"), exports);\ntslib_1.__exportStar(require(\"./v1ConfigMapNodeConfigSource\"), exports);\ntslib_1.__exportStar(require(\"./v1ConfigMapProjection\"), exports);\ntslib_1.__exportStar(require(\"./v1ConfigMapVolumeSource\"), exports);\ntslib_1.__exportStar(require(\"./v1Container\"), exports);\ntslib_1.__exportStar(require(\"./v1ContainerImage\"), exports);\ntslib_1.__exportStar(require(\"./v1ContainerPort\"), exports);\ntslib_1.__exportStar(require(\"./v1ContainerState\"), exports);\ntslib_1.__exportStar(require(\"./v1ContainerStateRunning\"), exports);\ntslib_1.__exportStar(require(\"./v1ContainerStateTerminated\"), exports);\ntslib_1.__exportStar(require(\"./v1ContainerStateWaiting\"), exports);\ntslib_1.__exportStar(require(\"./v1ContainerStatus\"), exports);\ntslib_1.__exportStar(require(\"./v1ControllerRevision\"), exports);\ntslib_1.__exportStar(require(\"./v1ControllerRevisionList\"), exports);\ntslib_1.__exportStar(require(\"./v1CronJob\"), exports);\ntslib_1.__exportStar(require(\"./v1CronJobList\"), exports);\ntslib_1.__exportStar(require(\"./v1CronJobSpec\"), exports);\ntslib_1.__exportStar(require(\"./v1CronJobStatus\"), exports);\ntslib_1.__exportStar(require(\"./v1CrossVersionObjectReference\"), exports);\ntslib_1.__exportStar(require(\"./v1CustomResourceColumnDefinition\"), exports);\ntslib_1.__exportStar(require(\"./v1CustomResourceConversion\"), exports);\ntslib_1.__exportStar(require(\"./v1CustomResourceDefinition\"), exports);\ntslib_1.__exportStar(require(\"./v1CustomResourceDefinitionCondition\"), exports);\ntslib_1.__exportStar(require(\"./v1CustomResourceDefinitionList\"), exports);\ntslib_1.__exportStar(require(\"./v1CustomResourceDefinitionNames\"), exports);\ntslib_1.__exportStar(require(\"./v1CustomResourceDefinitionSpec\"), exports);\ntslib_1.__exportStar(require(\"./v1CustomResourceDefinitionStatus\"), exports);\ntslib_1.__exportStar(require(\"./v1CustomResourceDefinitionVersion\"), exports);\ntslib_1.__exportStar(require(\"./v1CustomResourceSubresourceScale\"), exports);\ntslib_1.__exportStar(require(\"./v1CustomResourceSubresources\"), exports);\ntslib_1.__exportStar(require(\"./v1CustomResourceValidation\"), exports);\ntslib_1.__exportStar(require(\"./v1DaemonEndpoint\"), exports);\ntslib_1.__exportStar(require(\"./v1DaemonSet\"), exports);\ntslib_1.__exportStar(require(\"./v1DaemonSetCondition\"), exports);\ntslib_1.__exportStar(require(\"./v1DaemonSetList\"), exports);\ntslib_1.__exportStar(require(\"./v1DaemonSetSpec\"), exports);\ntslib_1.__exportStar(require(\"./v1DaemonSetStatus\"), exports);\ntslib_1.__exportStar(require(\"./v1DaemonSetUpdateStrategy\"), exports);\ntslib_1.__exportStar(require(\"./v1DeleteOptions\"), exports);\ntslib_1.__exportStar(require(\"./v1Deployment\"), exports);\ntslib_1.__exportStar(require(\"./v1DeploymentCondition\"), exports);\ntslib_1.__exportStar(require(\"./v1DeploymentList\"), exports);\ntslib_1.__exportStar(require(\"./v1DeploymentSpec\"), exports);\ntslib_1.__exportStar(require(\"./v1DeploymentStatus\"), exports);\ntslib_1.__exportStar(require(\"./v1DeploymentStrategy\"), exports);\ntslib_1.__exportStar(require(\"./v1DownwardAPIProjection\"), exports);\ntslib_1.__exportStar(require(\"./v1DownwardAPIVolumeFile\"), exports);\ntslib_1.__exportStar(require(\"./v1DownwardAPIVolumeSource\"), exports);\ntslib_1.__exportStar(require(\"./v1EmptyDirVolumeSource\"), exports);\ntslib_1.__exportStar(require(\"./v1Endpoint\"), exports);\ntslib_1.__exportStar(require(\"./v1EndpointAddress\"), exports);\ntslib_1.__exportStar(require(\"./v1EndpointConditions\"), exports);\ntslib_1.__exportStar(require(\"./v1EndpointHints\"), exports);\ntslib_1.__exportStar(require(\"./v1EndpointSlice\"), exports);\ntslib_1.__exportStar(require(\"./v1EndpointSliceList\"), exports);\ntslib_1.__exportStar(require(\"./v1EndpointSubset\"), exports);\ntslib_1.__exportStar(require(\"./v1Endpoints\"), exports);\ntslib_1.__exportStar(require(\"./v1EndpointsList\"), exports);\ntslib_1.__exportStar(require(\"./v1EnvFromSource\"), exports);\ntslib_1.__exportStar(require(\"./v1EnvVar\"), exports);\ntslib_1.__exportStar(require(\"./v1EnvVarSource\"), exports);\ntslib_1.__exportStar(require(\"./v1EphemeralContainer\"), exports);\ntslib_1.__exportStar(require(\"./v1EphemeralVolumeSource\"), exports);\ntslib_1.__exportStar(require(\"./v1EventSource\"), exports);\ntslib_1.__exportStar(require(\"./v1Eviction\"), exports);\ntslib_1.__exportStar(require(\"./v1ExecAction\"), exports);\ntslib_1.__exportStar(require(\"./v1ExternalDocumentation\"), exports);\ntslib_1.__exportStar(require(\"./v1FCVolumeSource\"), exports);\ntslib_1.__exportStar(require(\"./v1FlexPersistentVolumeSource\"), exports);\ntslib_1.__exportStar(require(\"./v1FlexVolumeSource\"), exports);\ntslib_1.__exportStar(require(\"./v1FlockerVolumeSource\"), exports);\ntslib_1.__exportStar(require(\"./v1ForZone\"), exports);\ntslib_1.__exportStar(require(\"./v1GCEPersistentDiskVolumeSource\"), exports);\ntslib_1.__exportStar(require(\"./v1GitRepoVolumeSource\"), exports);\ntslib_1.__exportStar(require(\"./v1GlusterfsPersistentVolumeSource\"), exports);\ntslib_1.__exportStar(require(\"./v1GlusterfsVolumeSource\"), exports);\ntslib_1.__exportStar(require(\"./v1GroupVersionForDiscovery\"), exports);\ntslib_1.__exportStar(require(\"./v1HTTPGetAction\"), exports);\ntslib_1.__exportStar(require(\"./v1HTTPHeader\"), exports);\ntslib_1.__exportStar(require(\"./v1HTTPIngressPath\"), exports);\ntslib_1.__exportStar(require(\"./v1HTTPIngressRuleValue\"), exports);\ntslib_1.__exportStar(require(\"./v1Handler\"), exports);\ntslib_1.__exportStar(require(\"./v1HorizontalPodAutoscaler\"), exports);\ntslib_1.__exportStar(require(\"./v1HorizontalPodAutoscalerList\"), exports);\ntslib_1.__exportStar(require(\"./v1HorizontalPodAutoscalerSpec\"), exports);\ntslib_1.__exportStar(require(\"./v1HorizontalPodAutoscalerStatus\"), exports);\ntslib_1.__exportStar(require(\"./v1HostAlias\"), exports);\ntslib_1.__exportStar(require(\"./v1HostPathVolumeSource\"), exports);\ntslib_1.__exportStar(require(\"./v1IPBlock\"), exports);\ntslib_1.__exportStar(require(\"./v1ISCSIPersistentVolumeSource\"), exports);\ntslib_1.__exportStar(require(\"./v1ISCSIVolumeSource\"), exports);\ntslib_1.__exportStar(require(\"./v1Ingress\"), exports);\ntslib_1.__exportStar(require(\"./v1IngressBackend\"), exports);\ntslib_1.__exportStar(require(\"./v1IngressClass\"), exports);\ntslib_1.__exportStar(require(\"./v1IngressClassList\"), exports);\ntslib_1.__exportStar(require(\"./v1IngressClassParametersReference\"), exports);\ntslib_1.__exportStar(require(\"./v1IngressClassSpec\"), exports);\ntslib_1.__exportStar(require(\"./v1IngressList\"), exports);\ntslib_1.__exportStar(require(\"./v1IngressRule\"), exports);\ntslib_1.__exportStar(require(\"./v1IngressServiceBackend\"), exports);\ntslib_1.__exportStar(require(\"./v1IngressSpec\"), exports);\ntslib_1.__exportStar(require(\"./v1IngressStatus\"), exports);\ntslib_1.__exportStar(require(\"./v1IngressTLS\"), exports);\ntslib_1.__exportStar(require(\"./v1JSONSchemaProps\"), exports);\ntslib_1.__exportStar(require(\"./v1Job\"), exports);\ntslib_1.__exportStar(require(\"./v1JobCondition\"), exports);\ntslib_1.__exportStar(require(\"./v1JobList\"), exports);\ntslib_1.__exportStar(require(\"./v1JobSpec\"), exports);\ntslib_1.__exportStar(require(\"./v1JobStatus\"), exports);\ntslib_1.__exportStar(require(\"./v1JobTemplateSpec\"), exports);\ntslib_1.__exportStar(require(\"./v1KeyToPath\"), exports);\ntslib_1.__exportStar(require(\"./v1LabelSelector\"), exports);\ntslib_1.__exportStar(require(\"./v1LabelSelectorRequirement\"), exports);\ntslib_1.__exportStar(require(\"./v1Lease\"), exports);\ntslib_1.__exportStar(require(\"./v1LeaseList\"), exports);\ntslib_1.__exportStar(require(\"./v1LeaseSpec\"), exports);\ntslib_1.__exportStar(require(\"./v1Lifecycle\"), exports);\ntslib_1.__exportStar(require(\"./v1LimitRange\"), exports);\ntslib_1.__exportStar(require(\"./v1LimitRangeItem\"), exports);\ntslib_1.__exportStar(require(\"./v1LimitRangeList\"), exports);\ntslib_1.__exportStar(require(\"./v1LimitRangeSpec\"), exports);\ntslib_1.__exportStar(require(\"./v1ListMeta\"), exports);\ntslib_1.__exportStar(require(\"./v1LoadBalancerIngress\"), exports);\ntslib_1.__exportStar(require(\"./v1LoadBalancerStatus\"), exports);\ntslib_1.__exportStar(require(\"./v1LocalObjectReference\"), exports);\ntslib_1.__exportStar(require(\"./v1LocalSubjectAccessReview\"), exports);\ntslib_1.__exportStar(require(\"./v1LocalVolumeSource\"), exports);\ntslib_1.__exportStar(require(\"./v1ManagedFieldsEntry\"), exports);\ntslib_1.__exportStar(require(\"./v1MutatingWebhook\"), exports);\ntslib_1.__exportStar(require(\"./v1MutatingWebhookConfiguration\"), exports);\ntslib_1.__exportStar(require(\"./v1MutatingWebhookConfigurationList\"), exports);\ntslib_1.__exportStar(require(\"./v1NFSVolumeSource\"), exports);\ntslib_1.__exportStar(require(\"./v1Namespace\"), exports);\ntslib_1.__exportStar(require(\"./v1NamespaceCondition\"), exports);\ntslib_1.__exportStar(require(\"./v1NamespaceList\"), exports);\ntslib_1.__exportStar(require(\"./v1NamespaceSpec\"), exports);\ntslib_1.__exportStar(require(\"./v1NamespaceStatus\"), exports);\ntslib_1.__exportStar(require(\"./v1NetworkPolicy\"), exports);\ntslib_1.__exportStar(require(\"./v1NetworkPolicyEgressRule\"), exports);\ntslib_1.__exportStar(require(\"./v1NetworkPolicyIngressRule\"), exports);\ntslib_1.__exportStar(require(\"./v1NetworkPolicyList\"), exports);\ntslib_1.__exportStar(require(\"./v1NetworkPolicyPeer\"), exports);\ntslib_1.__exportStar(require(\"./v1NetworkPolicyPort\"), exports);\ntslib_1.__exportStar(require(\"./v1NetworkPolicySpec\"), exports);\ntslib_1.__exportStar(require(\"./v1Node\"), exports);\ntslib_1.__exportStar(require(\"./v1NodeAddress\"), exports);\ntslib_1.__exportStar(require(\"./v1NodeAffinity\"), exports);\ntslib_1.__exportStar(require(\"./v1NodeCondition\"), exports);\ntslib_1.__exportStar(require(\"./v1NodeConfigSource\"), exports);\ntslib_1.__exportStar(require(\"./v1NodeConfigStatus\"), exports);\ntslib_1.__exportStar(require(\"./v1NodeDaemonEndpoints\"), exports);\ntslib_1.__exportStar(require(\"./v1NodeList\"), exports);\ntslib_1.__exportStar(require(\"./v1NodeSelector\"), exports);\ntslib_1.__exportStar(require(\"./v1NodeSelectorRequirement\"), exports);\ntslib_1.__exportStar(require(\"./v1NodeSelectorTerm\"), exports);\ntslib_1.__exportStar(require(\"./v1NodeSpec\"), exports);\ntslib_1.__exportStar(require(\"./v1NodeStatus\"), exports);\ntslib_1.__exportStar(require(\"./v1NodeSystemInfo\"), exports);\ntslib_1.__exportStar(require(\"./v1NonResourceAttributes\"), exports);\ntslib_1.__exportStar(require(\"./v1NonResourceRule\"), exports);\ntslib_1.__exportStar(require(\"./v1ObjectFieldSelector\"), exports);\ntslib_1.__exportStar(require(\"./v1ObjectMeta\"), exports);\ntslib_1.__exportStar(require(\"./v1ObjectReference\"), exports);\ntslib_1.__exportStar(require(\"./v1Overhead\"), exports);\ntslib_1.__exportStar(require(\"./v1OwnerReference\"), exports);\ntslib_1.__exportStar(require(\"./v1PersistentVolume\"), exports);\ntslib_1.__exportStar(require(\"./v1PersistentVolumeClaim\"), exports);\ntslib_1.__exportStar(require(\"./v1PersistentVolumeClaimCondition\"), exports);\ntslib_1.__exportStar(require(\"./v1PersistentVolumeClaimList\"), exports);\ntslib_1.__exportStar(require(\"./v1PersistentVolumeClaimSpec\"), exports);\ntslib_1.__exportStar(require(\"./v1PersistentVolumeClaimStatus\"), exports);\ntslib_1.__exportStar(require(\"./v1PersistentVolumeClaimTemplate\"), exports);\ntslib_1.__exportStar(require(\"./v1PersistentVolumeClaimVolumeSource\"), exports);\ntslib_1.__exportStar(require(\"./v1PersistentVolumeList\"), exports);\ntslib_1.__exportStar(require(\"./v1PersistentVolumeSpec\"), exports);\ntslib_1.__exportStar(require(\"./v1PersistentVolumeStatus\"), exports);\ntslib_1.__exportStar(require(\"./v1PhotonPersistentDiskVolumeSource\"), exports);\ntslib_1.__exportStar(require(\"./v1Pod\"), exports);\ntslib_1.__exportStar(require(\"./v1PodAffinity\"), exports);\ntslib_1.__exportStar(require(\"./v1PodAffinityTerm\"), exports);\ntslib_1.__exportStar(require(\"./v1PodAntiAffinity\"), exports);\ntslib_1.__exportStar(require(\"./v1PodCondition\"), exports);\ntslib_1.__exportStar(require(\"./v1PodDNSConfig\"), exports);\ntslib_1.__exportStar(require(\"./v1PodDNSConfigOption\"), exports);\ntslib_1.__exportStar(require(\"./v1PodDisruptionBudget\"), exports);\ntslib_1.__exportStar(require(\"./v1PodDisruptionBudgetList\"), exports);\ntslib_1.__exportStar(require(\"./v1PodDisruptionBudgetSpec\"), exports);\ntslib_1.__exportStar(require(\"./v1PodDisruptionBudgetStatus\"), exports);\ntslib_1.__exportStar(require(\"./v1PodIP\"), exports);\ntslib_1.__exportStar(require(\"./v1PodList\"), exports);\ntslib_1.__exportStar(require(\"./v1PodReadinessGate\"), exports);\ntslib_1.__exportStar(require(\"./v1PodSecurityContext\"), exports);\ntslib_1.__exportStar(require(\"./v1PodSpec\"), exports);\ntslib_1.__exportStar(require(\"./v1PodStatus\"), exports);\ntslib_1.__exportStar(require(\"./v1PodTemplate\"), exports);\ntslib_1.__exportStar(require(\"./v1PodTemplateList\"), exports);\ntslib_1.__exportStar(require(\"./v1PodTemplateSpec\"), exports);\ntslib_1.__exportStar(require(\"./v1PolicyRule\"), exports);\ntslib_1.__exportStar(require(\"./v1PortStatus\"), exports);\ntslib_1.__exportStar(require(\"./v1PortworxVolumeSource\"), exports);\ntslib_1.__exportStar(require(\"./v1Preconditions\"), exports);\ntslib_1.__exportStar(require(\"./v1PreferredSchedulingTerm\"), exports);\ntslib_1.__exportStar(require(\"./v1PriorityClass\"), exports);\ntslib_1.__exportStar(require(\"./v1PriorityClassList\"), exports);\ntslib_1.__exportStar(require(\"./v1Probe\"), exports);\ntslib_1.__exportStar(require(\"./v1ProjectedVolumeSource\"), exports);\ntslib_1.__exportStar(require(\"./v1QuobyteVolumeSource\"), exports);\ntslib_1.__exportStar(require(\"./v1RBDPersistentVolumeSource\"), exports);\ntslib_1.__exportStar(require(\"./v1RBDVolumeSource\"), exports);\ntslib_1.__exportStar(require(\"./v1ReplicaSet\"), exports);\ntslib_1.__exportStar(require(\"./v1ReplicaSetCondition\"), exports);\ntslib_1.__exportStar(require(\"./v1ReplicaSetList\"), exports);\ntslib_1.__exportStar(require(\"./v1ReplicaSetSpec\"), exports);\ntslib_1.__exportStar(require(\"./v1ReplicaSetStatus\"), exports);\ntslib_1.__exportStar(require(\"./v1ReplicationController\"), exports);\ntslib_1.__exportStar(require(\"./v1ReplicationControllerCondition\"), exports);\ntslib_1.__exportStar(require(\"./v1ReplicationControllerList\"), exports);\ntslib_1.__exportStar(require(\"./v1ReplicationControllerSpec\"), exports);\ntslib_1.__exportStar(require(\"./v1ReplicationControllerStatus\"), exports);\ntslib_1.__exportStar(require(\"./v1ResourceAttributes\"), exports);\ntslib_1.__exportStar(require(\"./v1ResourceFieldSelector\"), exports);\ntslib_1.__exportStar(require(\"./v1ResourceQuota\"), exports);\ntslib_1.__exportStar(require(\"./v1ResourceQuotaList\"), exports);\ntslib_1.__exportStar(require(\"./v1ResourceQuotaSpec\"), exports);\ntslib_1.__exportStar(require(\"./v1ResourceQuotaStatus\"), exports);\ntslib_1.__exportStar(require(\"./v1ResourceRequirements\"), exports);\ntslib_1.__exportStar(require(\"./v1ResourceRule\"), exports);\ntslib_1.__exportStar(require(\"./v1Role\"), exports);\ntslib_1.__exportStar(require(\"./v1RoleBinding\"), exports);\ntslib_1.__exportStar(require(\"./v1RoleBindingList\"), exports);\ntslib_1.__exportStar(require(\"./v1RoleList\"), exports);\ntslib_1.__exportStar(require(\"./v1RoleRef\"), exports);\ntslib_1.__exportStar(require(\"./v1RollingUpdateDaemonSet\"), exports);\ntslib_1.__exportStar(require(\"./v1RollingUpdateDeployment\"), exports);\ntslib_1.__exportStar(require(\"./v1RollingUpdateStatefulSetStrategy\"), exports);\ntslib_1.__exportStar(require(\"./v1RuleWithOperations\"), exports);\ntslib_1.__exportStar(require(\"./v1RuntimeClass\"), exports);\ntslib_1.__exportStar(require(\"./v1RuntimeClassList\"), exports);\ntslib_1.__exportStar(require(\"./v1SELinuxOptions\"), exports);\ntslib_1.__exportStar(require(\"./v1Scale\"), exports);\ntslib_1.__exportStar(require(\"./v1ScaleIOPersistentVolumeSource\"), exports);\ntslib_1.__exportStar(require(\"./v1ScaleIOVolumeSource\"), exports);\ntslib_1.__exportStar(require(\"./v1ScaleSpec\"), exports);\ntslib_1.__exportStar(require(\"./v1ScaleStatus\"), exports);\ntslib_1.__exportStar(require(\"./v1Scheduling\"), exports);\ntslib_1.__exportStar(require(\"./v1ScopeSelector\"), exports);\ntslib_1.__exportStar(require(\"./v1ScopedResourceSelectorRequirement\"), exports);\ntslib_1.__exportStar(require(\"./v1SeccompProfile\"), exports);\ntslib_1.__exportStar(require(\"./v1Secret\"), exports);\ntslib_1.__exportStar(require(\"./v1SecretEnvSource\"), exports);\ntslib_1.__exportStar(require(\"./v1SecretKeySelector\"), exports);\ntslib_1.__exportStar(require(\"./v1SecretList\"), exports);\ntslib_1.__exportStar(require(\"./v1SecretProjection\"), exports);\ntslib_1.__exportStar(require(\"./v1SecretReference\"), exports);\ntslib_1.__exportStar(require(\"./v1SecretVolumeSource\"), exports);\ntslib_1.__exportStar(require(\"./v1SecurityContext\"), exports);\ntslib_1.__exportStar(require(\"./v1SelfSubjectAccessReview\"), exports);\ntslib_1.__exportStar(require(\"./v1SelfSubjectAccessReviewSpec\"), exports);\ntslib_1.__exportStar(require(\"./v1SelfSubjectRulesReview\"), exports);\ntslib_1.__exportStar(require(\"./v1SelfSubjectRulesReviewSpec\"), exports);\ntslib_1.__exportStar(require(\"./v1ServerAddressByClientCIDR\"), exports);\ntslib_1.__exportStar(require(\"./v1Service\"), exports);\ntslib_1.__exportStar(require(\"./v1ServiceAccount\"), exports);\ntslib_1.__exportStar(require(\"./v1ServiceAccountList\"), exports);\ntslib_1.__exportStar(require(\"./v1ServiceAccountTokenProjection\"), exports);\ntslib_1.__exportStar(require(\"./v1ServiceBackendPort\"), exports);\ntslib_1.__exportStar(require(\"./v1ServiceList\"), exports);\ntslib_1.__exportStar(require(\"./v1ServicePort\"), exports);\ntslib_1.__exportStar(require(\"./v1ServiceSpec\"), exports);\ntslib_1.__exportStar(require(\"./v1ServiceStatus\"), exports);\ntslib_1.__exportStar(require(\"./v1SessionAffinityConfig\"), exports);\ntslib_1.__exportStar(require(\"./v1StatefulSet\"), exports);\ntslib_1.__exportStar(require(\"./v1StatefulSetCondition\"), exports);\ntslib_1.__exportStar(require(\"./v1StatefulSetList\"), exports);\ntslib_1.__exportStar(require(\"./v1StatefulSetSpec\"), exports);\ntslib_1.__exportStar(require(\"./v1StatefulSetStatus\"), exports);\ntslib_1.__exportStar(require(\"./v1StatefulSetUpdateStrategy\"), exports);\ntslib_1.__exportStar(require(\"./v1Status\"), exports);\ntslib_1.__exportStar(require(\"./v1StatusCause\"), exports);\ntslib_1.__exportStar(require(\"./v1StatusDetails\"), exports);\ntslib_1.__exportStar(require(\"./v1StorageClass\"), exports);\ntslib_1.__exportStar(require(\"./v1StorageClassList\"), exports);\ntslib_1.__exportStar(require(\"./v1StorageOSPersistentVolumeSource\"), exports);\ntslib_1.__exportStar(require(\"./v1StorageOSVolumeSource\"), exports);\ntslib_1.__exportStar(require(\"./v1Subject\"), exports);\ntslib_1.__exportStar(require(\"./v1SubjectAccessReview\"), exports);\ntslib_1.__exportStar(require(\"./v1SubjectAccessReviewSpec\"), exports);\ntslib_1.__exportStar(require(\"./v1SubjectAccessReviewStatus\"), exports);\ntslib_1.__exportStar(require(\"./v1SubjectRulesReviewStatus\"), exports);\ntslib_1.__exportStar(require(\"./v1Sysctl\"), exports);\ntslib_1.__exportStar(require(\"./v1TCPSocketAction\"), exports);\ntslib_1.__exportStar(require(\"./v1Taint\"), exports);\ntslib_1.__exportStar(require(\"./v1TokenRequestSpec\"), exports);\ntslib_1.__exportStar(require(\"./v1TokenRequestStatus\"), exports);\ntslib_1.__exportStar(require(\"./v1TokenReview\"), exports);\ntslib_1.__exportStar(require(\"./v1TokenReviewSpec\"), exports);\ntslib_1.__exportStar(require(\"./v1TokenReviewStatus\"), exports);\ntslib_1.__exportStar(require(\"./v1Toleration\"), exports);\ntslib_1.__exportStar(require(\"./v1TopologySelectorLabelRequirement\"), exports);\ntslib_1.__exportStar(require(\"./v1TopologySelectorTerm\"), exports);\ntslib_1.__exportStar(require(\"./v1TopologySpreadConstraint\"), exports);\ntslib_1.__exportStar(require(\"./v1TypedLocalObjectReference\"), exports);\ntslib_1.__exportStar(require(\"./v1UncountedTerminatedPods\"), exports);\ntslib_1.__exportStar(require(\"./v1UserInfo\"), exports);\ntslib_1.__exportStar(require(\"./v1ValidatingWebhook\"), exports);\ntslib_1.__exportStar(require(\"./v1ValidatingWebhookConfiguration\"), exports);\ntslib_1.__exportStar(require(\"./v1ValidatingWebhookConfigurationList\"), exports);\ntslib_1.__exportStar(require(\"./v1Volume\"), exports);\ntslib_1.__exportStar(require(\"./v1VolumeAttachment\"), exports);\ntslib_1.__exportStar(require(\"./v1VolumeAttachmentList\"), exports);\ntslib_1.__exportStar(require(\"./v1VolumeAttachmentSource\"), exports);\ntslib_1.__exportStar(require(\"./v1VolumeAttachmentSpec\"), exports);\ntslib_1.__exportStar(require(\"./v1VolumeAttachmentStatus\"), exports);\ntslib_1.__exportStar(require(\"./v1VolumeDevice\"), exports);\ntslib_1.__exportStar(require(\"./v1VolumeError\"), exports);\ntslib_1.__exportStar(require(\"./v1VolumeMount\"), exports);\ntslib_1.__exportStar(require(\"./v1VolumeNodeAffinity\"), exports);\ntslib_1.__exportStar(require(\"./v1VolumeNodeResources\"), exports);\ntslib_1.__exportStar(require(\"./v1VolumeProjection\"), exports);\ntslib_1.__exportStar(require(\"./v1VsphereVirtualDiskVolumeSource\"), exports);\ntslib_1.__exportStar(require(\"./v1WatchEvent\"), exports);\ntslib_1.__exportStar(require(\"./v1WebhookConversion\"), exports);\ntslib_1.__exportStar(require(\"./v1WeightedPodAffinityTerm\"), exports);\ntslib_1.__exportStar(require(\"./v1WindowsSecurityContextOptions\"), exports);\ntslib_1.__exportStar(require(\"./v1alpha1AggregationRule\"), exports);\ntslib_1.__exportStar(require(\"./v1alpha1CSIStorageCapacity\"), exports);\ntslib_1.__exportStar(require(\"./v1alpha1CSIStorageCapacityList\"), exports);\ntslib_1.__exportStar(require(\"./v1alpha1ClusterRole\"), exports);\ntslib_1.__exportStar(require(\"./v1alpha1ClusterRoleBinding\"), exports);\ntslib_1.__exportStar(require(\"./v1alpha1ClusterRoleBindingList\"), exports);\ntslib_1.__exportStar(require(\"./v1alpha1ClusterRoleList\"), exports);\ntslib_1.__exportStar(require(\"./v1alpha1Overhead\"), exports);\ntslib_1.__exportStar(require(\"./v1alpha1PolicyRule\"), exports);\ntslib_1.__exportStar(require(\"./v1alpha1PriorityClass\"), exports);\ntslib_1.__exportStar(require(\"./v1alpha1PriorityClassList\"), exports);\ntslib_1.__exportStar(require(\"./v1alpha1Role\"), exports);\ntslib_1.__exportStar(require(\"./v1alpha1RoleBinding\"), exports);\ntslib_1.__exportStar(require(\"./v1alpha1RoleBindingList\"), exports);\ntslib_1.__exportStar(require(\"./v1alpha1RoleList\"), exports);\ntslib_1.__exportStar(require(\"./v1alpha1RoleRef\"), exports);\ntslib_1.__exportStar(require(\"./v1alpha1RuntimeClass\"), exports);\ntslib_1.__exportStar(require(\"./v1alpha1RuntimeClassList\"), exports);\ntslib_1.__exportStar(require(\"./v1alpha1RuntimeClassSpec\"), exports);\ntslib_1.__exportStar(require(\"./v1alpha1Scheduling\"), exports);\ntslib_1.__exportStar(require(\"./v1alpha1ServerStorageVersion\"), exports);\ntslib_1.__exportStar(require(\"./v1alpha1StorageVersion\"), exports);\ntslib_1.__exportStar(require(\"./v1alpha1StorageVersionCondition\"), exports);\ntslib_1.__exportStar(require(\"./v1alpha1StorageVersionList\"), exports);\ntslib_1.__exportStar(require(\"./v1alpha1StorageVersionStatus\"), exports);\ntslib_1.__exportStar(require(\"./v1alpha1Subject\"), exports);\ntslib_1.__exportStar(require(\"./v1alpha1VolumeAttachment\"), exports);\ntslib_1.__exportStar(require(\"./v1alpha1VolumeAttachmentList\"), exports);\ntslib_1.__exportStar(require(\"./v1alpha1VolumeAttachmentSource\"), exports);\ntslib_1.__exportStar(require(\"./v1alpha1VolumeAttachmentSpec\"), exports);\ntslib_1.__exportStar(require(\"./v1alpha1VolumeAttachmentStatus\"), exports);\ntslib_1.__exportStar(require(\"./v1alpha1VolumeError\"), exports);\ntslib_1.__exportStar(require(\"./v1beta1AllowedCSIDriver\"), exports);\ntslib_1.__exportStar(require(\"./v1beta1AllowedFlexVolume\"), exports);\ntslib_1.__exportStar(require(\"./v1beta1AllowedHostPath\"), exports);\ntslib_1.__exportStar(require(\"./v1beta1CSIStorageCapacity\"), exports);\ntslib_1.__exportStar(require(\"./v1beta1CSIStorageCapacityList\"), exports);\ntslib_1.__exportStar(require(\"./v1beta1CronJob\"), exports);\ntslib_1.__exportStar(require(\"./v1beta1CronJobList\"), exports);\ntslib_1.__exportStar(require(\"./v1beta1CronJobSpec\"), exports);\ntslib_1.__exportStar(require(\"./v1beta1CronJobStatus\"), exports);\ntslib_1.__exportStar(require(\"./v1beta1Endpoint\"), exports);\ntslib_1.__exportStar(require(\"./v1beta1EndpointConditions\"), exports);\ntslib_1.__exportStar(require(\"./v1beta1EndpointHints\"), exports);\ntslib_1.__exportStar(require(\"./v1beta1EndpointPort\"), exports);\ntslib_1.__exportStar(require(\"./v1beta1EndpointSlice\"), exports);\ntslib_1.__exportStar(require(\"./v1beta1EndpointSliceList\"), exports);\ntslib_1.__exportStar(require(\"./v1beta1Event\"), exports);\ntslib_1.__exportStar(require(\"./v1beta1EventList\"), exports);\ntslib_1.__exportStar(require(\"./v1beta1EventSeries\"), exports);\ntslib_1.__exportStar(require(\"./v1beta1FSGroupStrategyOptions\"), exports);\ntslib_1.__exportStar(require(\"./v1beta1FlowDistinguisherMethod\"), exports);\ntslib_1.__exportStar(require(\"./v1beta1FlowSchema\"), exports);\ntslib_1.__exportStar(require(\"./v1beta1FlowSchemaCondition\"), exports);\ntslib_1.__exportStar(require(\"./v1beta1FlowSchemaList\"), exports);\ntslib_1.__exportStar(require(\"./v1beta1FlowSchemaSpec\"), exports);\ntslib_1.__exportStar(require(\"./v1beta1FlowSchemaStatus\"), exports);\ntslib_1.__exportStar(require(\"./v1beta1ForZone\"), exports);\ntslib_1.__exportStar(require(\"./v1beta1GroupSubject\"), exports);\ntslib_1.__exportStar(require(\"./v1beta1HostPortRange\"), exports);\ntslib_1.__exportStar(require(\"./v1beta1IDRange\"), exports);\ntslib_1.__exportStar(require(\"./v1beta1JobTemplateSpec\"), exports);\ntslib_1.__exportStar(require(\"./v1beta1LimitResponse\"), exports);\ntslib_1.__exportStar(require(\"./v1beta1LimitedPriorityLevelConfiguration\"), exports);\ntslib_1.__exportStar(require(\"./v1beta1NonResourcePolicyRule\"), exports);\ntslib_1.__exportStar(require(\"./v1beta1Overhead\"), exports);\ntslib_1.__exportStar(require(\"./v1beta1PodDisruptionBudget\"), exports);\ntslib_1.__exportStar(require(\"./v1beta1PodDisruptionBudgetList\"), exports);\ntslib_1.__exportStar(require(\"./v1beta1PodDisruptionBudgetSpec\"), exports);\ntslib_1.__exportStar(require(\"./v1beta1PodDisruptionBudgetStatus\"), exports);\ntslib_1.__exportStar(require(\"./v1beta1PodSecurityPolicy\"), exports);\ntslib_1.__exportStar(require(\"./v1beta1PodSecurityPolicyList\"), exports);\ntslib_1.__exportStar(require(\"./v1beta1PodSecurityPolicySpec\"), exports);\ntslib_1.__exportStar(require(\"./v1beta1PolicyRulesWithSubjects\"), exports);\ntslib_1.__exportStar(require(\"./v1beta1PriorityLevelConfiguration\"), exports);\ntslib_1.__exportStar(require(\"./v1beta1PriorityLevelConfigurationCondition\"), exports);\ntslib_1.__exportStar(require(\"./v1beta1PriorityLevelConfigurationList\"), exports);\ntslib_1.__exportStar(require(\"./v1beta1PriorityLevelConfigurationReference\"), exports);\ntslib_1.__exportStar(require(\"./v1beta1PriorityLevelConfigurationSpec\"), exports);\ntslib_1.__exportStar(require(\"./v1beta1PriorityLevelConfigurationStatus\"), exports);\ntslib_1.__exportStar(require(\"./v1beta1QueuingConfiguration\"), exports);\ntslib_1.__exportStar(require(\"./v1beta1ResourcePolicyRule\"), exports);\ntslib_1.__exportStar(require(\"./v1beta1RunAsGroupStrategyOptions\"), exports);\ntslib_1.__exportStar(require(\"./v1beta1RunAsUserStrategyOptions\"), exports);\ntslib_1.__exportStar(require(\"./v1beta1RuntimeClass\"), exports);\ntslib_1.__exportStar(require(\"./v1beta1RuntimeClassList\"), exports);\ntslib_1.__exportStar(require(\"./v1beta1RuntimeClassStrategyOptions\"), exports);\ntslib_1.__exportStar(require(\"./v1beta1SELinuxStrategyOptions\"), exports);\ntslib_1.__exportStar(require(\"./v1beta1Scheduling\"), exports);\ntslib_1.__exportStar(require(\"./v1beta1ServiceAccountSubject\"), exports);\ntslib_1.__exportStar(require(\"./v1beta1Subject\"), exports);\ntslib_1.__exportStar(require(\"./v1beta1SupplementalGroupsStrategyOptions\"), exports);\ntslib_1.__exportStar(require(\"./v1beta1UserSubject\"), exports);\ntslib_1.__exportStar(require(\"./v2beta1ContainerResourceMetricSource\"), exports);\ntslib_1.__exportStar(require(\"./v2beta1ContainerResourceMetricStatus\"), exports);\ntslib_1.__exportStar(require(\"./v2beta1CrossVersionObjectReference\"), exports);\ntslib_1.__exportStar(require(\"./v2beta1ExternalMetricSource\"), exports);\ntslib_1.__exportStar(require(\"./v2beta1ExternalMetricStatus\"), exports);\ntslib_1.__exportStar(require(\"./v2beta1HorizontalPodAutoscaler\"), exports);\ntslib_1.__exportStar(require(\"./v2beta1HorizontalPodAutoscalerCondition\"), exports);\ntslib_1.__exportStar(require(\"./v2beta1HorizontalPodAutoscalerList\"), exports);\ntslib_1.__exportStar(require(\"./v2beta1HorizontalPodAutoscalerSpec\"), exports);\ntslib_1.__exportStar(require(\"./v2beta1HorizontalPodAutoscalerStatus\"), exports);\ntslib_1.__exportStar(require(\"./v2beta1MetricSpec\"), exports);\ntslib_1.__exportStar(require(\"./v2beta1MetricStatus\"), exports);\ntslib_1.__exportStar(require(\"./v2beta1ObjectMetricSource\"), exports);\ntslib_1.__exportStar(require(\"./v2beta1ObjectMetricStatus\"), exports);\ntslib_1.__exportStar(require(\"./v2beta1PodsMetricSource\"), exports);\ntslib_1.__exportStar(require(\"./v2beta1PodsMetricStatus\"), exports);\ntslib_1.__exportStar(require(\"./v2beta1ResourceMetricSource\"), exports);\ntslib_1.__exportStar(require(\"./v2beta1ResourceMetricStatus\"), exports);\ntslib_1.__exportStar(require(\"./v2beta2ContainerResourceMetricSource\"), exports);\ntslib_1.__exportStar(require(\"./v2beta2ContainerResourceMetricStatus\"), exports);\ntslib_1.__exportStar(require(\"./v2beta2CrossVersionObjectReference\"), exports);\ntslib_1.__exportStar(require(\"./v2beta2ExternalMetricSource\"), exports);\ntslib_1.__exportStar(require(\"./v2beta2ExternalMetricStatus\"), exports);\ntslib_1.__exportStar(require(\"./v2beta2HPAScalingPolicy\"), exports);\ntslib_1.__exportStar(require(\"./v2beta2HPAScalingRules\"), exports);\ntslib_1.__exportStar(require(\"./v2beta2HorizontalPodAutoscaler\"), exports);\ntslib_1.__exportStar(require(\"./v2beta2HorizontalPodAutoscalerBehavior\"), exports);\ntslib_1.__exportStar(require(\"./v2beta2HorizontalPodAutoscalerCondition\"), exports);\ntslib_1.__exportStar(require(\"./v2beta2HorizontalPodAutoscalerList\"), exports);\ntslib_1.__exportStar(require(\"./v2beta2HorizontalPodAutoscalerSpec\"), exports);\ntslib_1.__exportStar(require(\"./v2beta2HorizontalPodAutoscalerStatus\"), exports);\ntslib_1.__exportStar(require(\"./v2beta2MetricIdentifier\"), exports);\ntslib_1.__exportStar(require(\"./v2beta2MetricSpec\"), exports);\ntslib_1.__exportStar(require(\"./v2beta2MetricStatus\"), exports);\ntslib_1.__exportStar(require(\"./v2beta2MetricTarget\"), exports);\ntslib_1.__exportStar(require(\"./v2beta2MetricValueStatus\"), exports);\ntslib_1.__exportStar(require(\"./v2beta2ObjectMetricSource\"), exports);\ntslib_1.__exportStar(require(\"./v2beta2ObjectMetricStatus\"), exports);\ntslib_1.__exportStar(require(\"./v2beta2PodsMetricSource\"), exports);\ntslib_1.__exportStar(require(\"./v2beta2PodsMetricStatus\"), exports);\ntslib_1.__exportStar(require(\"./v2beta2ResourceMetricSource\"), exports);\ntslib_1.__exportStar(require(\"./v2beta2ResourceMetricStatus\"), exports);\ntslib_1.__exportStar(require(\"./versionInfo\"), exports);\nconst admissionregistrationV1ServiceReference_1 = require(\"./admissionregistrationV1ServiceReference\");\nconst admissionregistrationV1WebhookClientConfig_1 = require(\"./admissionregistrationV1WebhookClientConfig\");\nconst apiextensionsV1ServiceReference_1 = require(\"./apiextensionsV1ServiceReference\");\nconst apiextensionsV1WebhookClientConfig_1 = require(\"./apiextensionsV1WebhookClientConfig\");\nconst apiregistrationV1ServiceReference_1 = require(\"./apiregistrationV1ServiceReference\");\nconst authenticationV1TokenRequest_1 = require(\"./authenticationV1TokenRequest\");\nconst coreV1EndpointPort_1 = require(\"./coreV1EndpointPort\");\nconst coreV1Event_1 = require(\"./coreV1Event\");\nconst coreV1EventList_1 = require(\"./coreV1EventList\");\nconst coreV1EventSeries_1 = require(\"./coreV1EventSeries\");\nconst discoveryV1EndpointPort_1 = require(\"./discoveryV1EndpointPort\");\nconst eventsV1Event_1 = require(\"./eventsV1Event\");\nconst eventsV1EventList_1 = require(\"./eventsV1EventList\");\nconst eventsV1EventSeries_1 = require(\"./eventsV1EventSeries\");\nconst storageV1TokenRequest_1 = require(\"./storageV1TokenRequest\");\nconst v1APIGroup_1 = require(\"./v1APIGroup\");\nconst v1APIGroupList_1 = require(\"./v1APIGroupList\");\nconst v1APIResource_1 = require(\"./v1APIResource\");\nconst v1APIResourceList_1 = require(\"./v1APIResourceList\");\nconst v1APIService_1 = require(\"./v1APIService\");\nconst v1APIServiceCondition_1 = require(\"./v1APIServiceCondition\");\nconst v1APIServiceList_1 = require(\"./v1APIServiceList\");\nconst v1APIServiceSpec_1 = require(\"./v1APIServiceSpec\");\nconst v1APIServiceStatus_1 = require(\"./v1APIServiceStatus\");\nconst v1APIVersions_1 = require(\"./v1APIVersions\");\nconst v1AWSElasticBlockStoreVolumeSource_1 = require(\"./v1AWSElasticBlockStoreVolumeSource\");\nconst v1Affinity_1 = require(\"./v1Affinity\");\nconst v1AggregationRule_1 = require(\"./v1AggregationRule\");\nconst v1AttachedVolume_1 = require(\"./v1AttachedVolume\");\nconst v1AzureDiskVolumeSource_1 = require(\"./v1AzureDiskVolumeSource\");\nconst v1AzureFilePersistentVolumeSource_1 = require(\"./v1AzureFilePersistentVolumeSource\");\nconst v1AzureFileVolumeSource_1 = require(\"./v1AzureFileVolumeSource\");\nconst v1Binding_1 = require(\"./v1Binding\");\nconst v1BoundObjectReference_1 = require(\"./v1BoundObjectReference\");\nconst v1CSIDriver_1 = require(\"./v1CSIDriver\");\nconst v1CSIDriverList_1 = require(\"./v1CSIDriverList\");\nconst v1CSIDriverSpec_1 = require(\"./v1CSIDriverSpec\");\nconst v1CSINode_1 = require(\"./v1CSINode\");\nconst v1CSINodeDriver_1 = require(\"./v1CSINodeDriver\");\nconst v1CSINodeList_1 = require(\"./v1CSINodeList\");\nconst v1CSINodeSpec_1 = require(\"./v1CSINodeSpec\");\nconst v1CSIPersistentVolumeSource_1 = require(\"./v1CSIPersistentVolumeSource\");\nconst v1CSIVolumeSource_1 = require(\"./v1CSIVolumeSource\");\nconst v1Capabilities_1 = require(\"./v1Capabilities\");\nconst v1CephFSPersistentVolumeSource_1 = require(\"./v1CephFSPersistentVolumeSource\");\nconst v1CephFSVolumeSource_1 = require(\"./v1CephFSVolumeSource\");\nconst v1CertificateSigningRequest_1 = require(\"./v1CertificateSigningRequest\");\nconst v1CertificateSigningRequestCondition_1 = require(\"./v1CertificateSigningRequestCondition\");\nconst v1CertificateSigningRequestList_1 = require(\"./v1CertificateSigningRequestList\");\nconst v1CertificateSigningRequestSpec_1 = require(\"./v1CertificateSigningRequestSpec\");\nconst v1CertificateSigningRequestStatus_1 = require(\"./v1CertificateSigningRequestStatus\");\nconst v1CinderPersistentVolumeSource_1 = require(\"./v1CinderPersistentVolumeSource\");\nconst v1CinderVolumeSource_1 = require(\"./v1CinderVolumeSource\");\nconst v1ClientIPConfig_1 = require(\"./v1ClientIPConfig\");\nconst v1ClusterRole_1 = require(\"./v1ClusterRole\");\nconst v1ClusterRoleBinding_1 = require(\"./v1ClusterRoleBinding\");\nconst v1ClusterRoleBindingList_1 = require(\"./v1ClusterRoleBindingList\");\nconst v1ClusterRoleList_1 = require(\"./v1ClusterRoleList\");\nconst v1ComponentCondition_1 = require(\"./v1ComponentCondition\");\nconst v1ComponentStatus_1 = require(\"./v1ComponentStatus\");\nconst v1ComponentStatusList_1 = require(\"./v1ComponentStatusList\");\nconst v1Condition_1 = require(\"./v1Condition\");\nconst v1ConfigMap_1 = require(\"./v1ConfigMap\");\nconst v1ConfigMapEnvSource_1 = require(\"./v1ConfigMapEnvSource\");\nconst v1ConfigMapKeySelector_1 = require(\"./v1ConfigMapKeySelector\");\nconst v1ConfigMapList_1 = require(\"./v1ConfigMapList\");\nconst v1ConfigMapNodeConfigSource_1 = require(\"./v1ConfigMapNodeConfigSource\");\nconst v1ConfigMapProjection_1 = require(\"./v1ConfigMapProjection\");\nconst v1ConfigMapVolumeSource_1 = require(\"./v1ConfigMapVolumeSource\");\nconst v1Container_1 = require(\"./v1Container\");\nconst v1ContainerImage_1 = require(\"./v1ContainerImage\");\nconst v1ContainerPort_1 = require(\"./v1ContainerPort\");\nconst v1ContainerState_1 = require(\"./v1ContainerState\");\nconst v1ContainerStateRunning_1 = require(\"./v1ContainerStateRunning\");\nconst v1ContainerStateTerminated_1 = require(\"./v1ContainerStateTerminated\");\nconst v1ContainerStateWaiting_1 = require(\"./v1ContainerStateWaiting\");\nconst v1ContainerStatus_1 = require(\"./v1ContainerStatus\");\nconst v1ControllerRevision_1 = require(\"./v1ControllerRevision\");\nconst v1ControllerRevisionList_1 = require(\"./v1ControllerRevisionList\");\nconst v1CronJob_1 = require(\"./v1CronJob\");\nconst v1CronJobList_1 = require(\"./v1CronJobList\");\nconst v1CronJobSpec_1 = require(\"./v1CronJobSpec\");\nconst v1CronJobStatus_1 = require(\"./v1CronJobStatus\");\nconst v1CrossVersionObjectReference_1 = require(\"./v1CrossVersionObjectReference\");\nconst v1CustomResourceColumnDefinition_1 = require(\"./v1CustomResourceColumnDefinition\");\nconst v1CustomResourceConversion_1 = require(\"./v1CustomResourceConversion\");\nconst v1CustomResourceDefinition_1 = require(\"./v1CustomResourceDefinition\");\nconst v1CustomResourceDefinitionCondition_1 = require(\"./v1CustomResourceDefinitionCondition\");\nconst v1CustomResourceDefinitionList_1 = require(\"./v1CustomResourceDefinitionList\");\nconst v1CustomResourceDefinitionNames_1 = require(\"./v1CustomResourceDefinitionNames\");\nconst v1CustomResourceDefinitionSpec_1 = require(\"./v1CustomResourceDefinitionSpec\");\nconst v1CustomResourceDefinitionStatus_1 = require(\"./v1CustomResourceDefinitionStatus\");\nconst v1CustomResourceDefinitionVersion_1 = require(\"./v1CustomResourceDefinitionVersion\");\nconst v1CustomResourceSubresourceScale_1 = require(\"./v1CustomResourceSubresourceScale\");\nconst v1CustomResourceSubresources_1 = require(\"./v1CustomResourceSubresources\");\nconst v1CustomResourceValidation_1 = require(\"./v1CustomResourceValidation\");\nconst v1DaemonEndpoint_1 = require(\"./v1DaemonEndpoint\");\nconst v1DaemonSet_1 = require(\"./v1DaemonSet\");\nconst v1DaemonSetCondition_1 = require(\"./v1DaemonSetCondition\");\nconst v1DaemonSetList_1 = require(\"./v1DaemonSetList\");\nconst v1DaemonSetSpec_1 = require(\"./v1DaemonSetSpec\");\nconst v1DaemonSetStatus_1 = require(\"./v1DaemonSetStatus\");\nconst v1DaemonSetUpdateStrategy_1 = require(\"./v1DaemonSetUpdateStrategy\");\nconst v1DeleteOptions_1 = require(\"./v1DeleteOptions\");\nconst v1Deployment_1 = require(\"./v1Deployment\");\nconst v1DeploymentCondition_1 = require(\"./v1DeploymentCondition\");\nconst v1DeploymentList_1 = require(\"./v1DeploymentList\");\nconst v1DeploymentSpec_1 = require(\"./v1DeploymentSpec\");\nconst v1DeploymentStatus_1 = require(\"./v1DeploymentStatus\");\nconst v1DeploymentStrategy_1 = require(\"./v1DeploymentStrategy\");\nconst v1DownwardAPIProjection_1 = require(\"./v1DownwardAPIProjection\");\nconst v1DownwardAPIVolumeFile_1 = require(\"./v1DownwardAPIVolumeFile\");\nconst v1DownwardAPIVolumeSource_1 = require(\"./v1DownwardAPIVolumeSource\");\nconst v1EmptyDirVolumeSource_1 = require(\"./v1EmptyDirVolumeSource\");\nconst v1Endpoint_1 = require(\"./v1Endpoint\");\nconst v1EndpointAddress_1 = require(\"./v1EndpointAddress\");\nconst v1EndpointConditions_1 = require(\"./v1EndpointConditions\");\nconst v1EndpointHints_1 = require(\"./v1EndpointHints\");\nconst v1EndpointSlice_1 = require(\"./v1EndpointSlice\");\nconst v1EndpointSliceList_1 = require(\"./v1EndpointSliceList\");\nconst v1EndpointSubset_1 = require(\"./v1EndpointSubset\");\nconst v1Endpoints_1 = require(\"./v1Endpoints\");\nconst v1EndpointsList_1 = require(\"./v1EndpointsList\");\nconst v1EnvFromSource_1 = require(\"./v1EnvFromSource\");\nconst v1EnvVar_1 = require(\"./v1EnvVar\");\nconst v1EnvVarSource_1 = require(\"./v1EnvVarSource\");\nconst v1EphemeralContainer_1 = require(\"./v1EphemeralContainer\");\nconst v1EphemeralVolumeSource_1 = require(\"./v1EphemeralVolumeSource\");\nconst v1EventSource_1 = require(\"./v1EventSource\");\nconst v1Eviction_1 = require(\"./v1Eviction\");\nconst v1ExecAction_1 = require(\"./v1ExecAction\");\nconst v1ExternalDocumentation_1 = require(\"./v1ExternalDocumentation\");\nconst v1FCVolumeSource_1 = require(\"./v1FCVolumeSource\");\nconst v1FlexPersistentVolumeSource_1 = require(\"./v1FlexPersistentVolumeSource\");\nconst v1FlexVolumeSource_1 = require(\"./v1FlexVolumeSource\");\nconst v1FlockerVolumeSource_1 = require(\"./v1FlockerVolumeSource\");\nconst v1ForZone_1 = require(\"./v1ForZone\");\nconst v1GCEPersistentDiskVolumeSource_1 = require(\"./v1GCEPersistentDiskVolumeSource\");\nconst v1GitRepoVolumeSource_1 = require(\"./v1GitRepoVolumeSource\");\nconst v1GlusterfsPersistentVolumeSource_1 = require(\"./v1GlusterfsPersistentVolumeSource\");\nconst v1GlusterfsVolumeSource_1 = require(\"./v1GlusterfsVolumeSource\");\nconst v1GroupVersionForDiscovery_1 = require(\"./v1GroupVersionForDiscovery\");\nconst v1HTTPGetAction_1 = require(\"./v1HTTPGetAction\");\nconst v1HTTPHeader_1 = require(\"./v1HTTPHeader\");\nconst v1HTTPIngressPath_1 = require(\"./v1HTTPIngressPath\");\nconst v1HTTPIngressRuleValue_1 = require(\"./v1HTTPIngressRuleValue\");\nconst v1Handler_1 = require(\"./v1Handler\");\nconst v1HorizontalPodAutoscaler_1 = require(\"./v1HorizontalPodAutoscaler\");\nconst v1HorizontalPodAutoscalerList_1 = require(\"./v1HorizontalPodAutoscalerList\");\nconst v1HorizontalPodAutoscalerSpec_1 = require(\"./v1HorizontalPodAutoscalerSpec\");\nconst v1HorizontalPodAutoscalerStatus_1 = require(\"./v1HorizontalPodAutoscalerStatus\");\nconst v1HostAlias_1 = require(\"./v1HostAlias\");\nconst v1HostPathVolumeSource_1 = require(\"./v1HostPathVolumeSource\");\nconst v1IPBlock_1 = require(\"./v1IPBlock\");\nconst v1ISCSIPersistentVolumeSource_1 = require(\"./v1ISCSIPersistentVolumeSource\");\nconst v1ISCSIVolumeSource_1 = require(\"./v1ISCSIVolumeSource\");\nconst v1Ingress_1 = require(\"./v1Ingress\");\nconst v1IngressBackend_1 = require(\"./v1IngressBackend\");\nconst v1IngressClass_1 = require(\"./v1IngressClass\");\nconst v1IngressClassList_1 = require(\"./v1IngressClassList\");\nconst v1IngressClassParametersReference_1 = require(\"./v1IngressClassParametersReference\");\nconst v1IngressClassSpec_1 = require(\"./v1IngressClassSpec\");\nconst v1IngressList_1 = require(\"./v1IngressList\");\nconst v1IngressRule_1 = require(\"./v1IngressRule\");\nconst v1IngressServiceBackend_1 = require(\"./v1IngressServiceBackend\");\nconst v1IngressSpec_1 = require(\"./v1IngressSpec\");\nconst v1IngressStatus_1 = require(\"./v1IngressStatus\");\nconst v1IngressTLS_1 = require(\"./v1IngressTLS\");\nconst v1JSONSchemaProps_1 = require(\"./v1JSONSchemaProps\");\nconst v1Job_1 = require(\"./v1Job\");\nconst v1JobCondition_1 = require(\"./v1JobCondition\");\nconst v1JobList_1 = require(\"./v1JobList\");\nconst v1JobSpec_1 = require(\"./v1JobSpec\");\nconst v1JobStatus_1 = require(\"./v1JobStatus\");\nconst v1JobTemplateSpec_1 = require(\"./v1JobTemplateSpec\");\nconst v1KeyToPath_1 = require(\"./v1KeyToPath\");\nconst v1LabelSelector_1 = require(\"./v1LabelSelector\");\nconst v1LabelSelectorRequirement_1 = require(\"./v1LabelSelectorRequirement\");\nconst v1Lease_1 = require(\"./v1Lease\");\nconst v1LeaseList_1 = require(\"./v1LeaseList\");\nconst v1LeaseSpec_1 = require(\"./v1LeaseSpec\");\nconst v1Lifecycle_1 = require(\"./v1Lifecycle\");\nconst v1LimitRange_1 = require(\"./v1LimitRange\");\nconst v1LimitRangeItem_1 = require(\"./v1LimitRangeItem\");\nconst v1LimitRangeList_1 = require(\"./v1LimitRangeList\");\nconst v1LimitRangeSpec_1 = require(\"./v1LimitRangeSpec\");\nconst v1ListMeta_1 = require(\"./v1ListMeta\");\nconst v1LoadBalancerIngress_1 = require(\"./v1LoadBalancerIngress\");\nconst v1LoadBalancerStatus_1 = require(\"./v1LoadBalancerStatus\");\nconst v1LocalObjectReference_1 = require(\"./v1LocalObjectReference\");\nconst v1LocalSubjectAccessReview_1 = require(\"./v1LocalSubjectAccessReview\");\nconst v1LocalVolumeSource_1 = require(\"./v1LocalVolumeSource\");\nconst v1ManagedFieldsEntry_1 = require(\"./v1ManagedFieldsEntry\");\nconst v1MutatingWebhook_1 = require(\"./v1MutatingWebhook\");\nconst v1MutatingWebhookConfiguration_1 = require(\"./v1MutatingWebhookConfiguration\");\nconst v1MutatingWebhookConfigurationList_1 = require(\"./v1MutatingWebhookConfigurationList\");\nconst v1NFSVolumeSource_1 = require(\"./v1NFSVolumeSource\");\nconst v1Namespace_1 = require(\"./v1Namespace\");\nconst v1NamespaceCondition_1 = require(\"./v1NamespaceCondition\");\nconst v1NamespaceList_1 = require(\"./v1NamespaceList\");\nconst v1NamespaceSpec_1 = require(\"./v1NamespaceSpec\");\nconst v1NamespaceStatus_1 = require(\"./v1NamespaceStatus\");\nconst v1NetworkPolicy_1 = require(\"./v1NetworkPolicy\");\nconst v1NetworkPolicyEgressRule_1 = require(\"./v1NetworkPolicyEgressRule\");\nconst v1NetworkPolicyIngressRule_1 = require(\"./v1NetworkPolicyIngressRule\");\nconst v1NetworkPolicyList_1 = require(\"./v1NetworkPolicyList\");\nconst v1NetworkPolicyPeer_1 = require(\"./v1NetworkPolicyPeer\");\nconst v1NetworkPolicyPort_1 = require(\"./v1NetworkPolicyPort\");\nconst v1NetworkPolicySpec_1 = require(\"./v1NetworkPolicySpec\");\nconst v1Node_1 = require(\"./v1Node\");\nconst v1NodeAddress_1 = require(\"./v1NodeAddress\");\nconst v1NodeAffinity_1 = require(\"./v1NodeAffinity\");\nconst v1NodeCondition_1 = require(\"./v1NodeCondition\");\nconst v1NodeConfigSource_1 = require(\"./v1NodeConfigSource\");\nconst v1NodeConfigStatus_1 = require(\"./v1NodeConfigStatus\");\nconst v1NodeDaemonEndpoints_1 = require(\"./v1NodeDaemonEndpoints\");\nconst v1NodeList_1 = require(\"./v1NodeList\");\nconst v1NodeSelector_1 = require(\"./v1NodeSelector\");\nconst v1NodeSelectorRequirement_1 = require(\"./v1NodeSelectorRequirement\");\nconst v1NodeSelectorTerm_1 = require(\"./v1NodeSelectorTerm\");\nconst v1NodeSpec_1 = require(\"./v1NodeSpec\");\nconst v1NodeStatus_1 = require(\"./v1NodeStatus\");\nconst v1NodeSystemInfo_1 = require(\"./v1NodeSystemInfo\");\nconst v1NonResourceAttributes_1 = require(\"./v1NonResourceAttributes\");\nconst v1NonResourceRule_1 = require(\"./v1NonResourceRule\");\nconst v1ObjectFieldSelector_1 = require(\"./v1ObjectFieldSelector\");\nconst v1ObjectMeta_1 = require(\"./v1ObjectMeta\");\nconst v1ObjectReference_1 = require(\"./v1ObjectReference\");\nconst v1Overhead_1 = require(\"./v1Overhead\");\nconst v1OwnerReference_1 = require(\"./v1OwnerReference\");\nconst v1PersistentVolume_1 = require(\"./v1PersistentVolume\");\nconst v1PersistentVolumeClaim_1 = require(\"./v1PersistentVolumeClaim\");\nconst v1PersistentVolumeClaimCondition_1 = require(\"./v1PersistentVolumeClaimCondition\");\nconst v1PersistentVolumeClaimList_1 = require(\"./v1PersistentVolumeClaimList\");\nconst v1PersistentVolumeClaimSpec_1 = require(\"./v1PersistentVolumeClaimSpec\");\nconst v1PersistentVolumeClaimStatus_1 = require(\"./v1PersistentVolumeClaimStatus\");\nconst v1PersistentVolumeClaimTemplate_1 = require(\"./v1PersistentVolumeClaimTemplate\");\nconst v1PersistentVolumeClaimVolumeSource_1 = require(\"./v1PersistentVolumeClaimVolumeSource\");\nconst v1PersistentVolumeList_1 = require(\"./v1PersistentVolumeList\");\nconst v1PersistentVolumeSpec_1 = require(\"./v1PersistentVolumeSpec\");\nconst v1PersistentVolumeStatus_1 = require(\"./v1PersistentVolumeStatus\");\nconst v1PhotonPersistentDiskVolumeSource_1 = require(\"./v1PhotonPersistentDiskVolumeSource\");\nconst v1Pod_1 = require(\"./v1Pod\");\nconst v1PodAffinity_1 = require(\"./v1PodAffinity\");\nconst v1PodAffinityTerm_1 = require(\"./v1PodAffinityTerm\");\nconst v1PodAntiAffinity_1 = require(\"./v1PodAntiAffinity\");\nconst v1PodCondition_1 = require(\"./v1PodCondition\");\nconst v1PodDNSConfig_1 = require(\"./v1PodDNSConfig\");\nconst v1PodDNSConfigOption_1 = require(\"./v1PodDNSConfigOption\");\nconst v1PodDisruptionBudget_1 = require(\"./v1PodDisruptionBudget\");\nconst v1PodDisruptionBudgetList_1 = require(\"./v1PodDisruptionBudgetList\");\nconst v1PodDisruptionBudgetSpec_1 = require(\"./v1PodDisruptionBudgetSpec\");\nconst v1PodDisruptionBudgetStatus_1 = require(\"./v1PodDisruptionBudgetStatus\");\nconst v1PodIP_1 = require(\"./v1PodIP\");\nconst v1PodList_1 = require(\"./v1PodList\");\nconst v1PodReadinessGate_1 = require(\"./v1PodReadinessGate\");\nconst v1PodSecurityContext_1 = require(\"./v1PodSecurityContext\");\nconst v1PodSpec_1 = require(\"./v1PodSpec\");\nconst v1PodStatus_1 = require(\"./v1PodStatus\");\nconst v1PodTemplate_1 = require(\"./v1PodTemplate\");\nconst v1PodTemplateList_1 = require(\"./v1PodTemplateList\");\nconst v1PodTemplateSpec_1 = require(\"./v1PodTemplateSpec\");\nconst v1PolicyRule_1 = require(\"./v1PolicyRule\");\nconst v1PortStatus_1 = require(\"./v1PortStatus\");\nconst v1PortworxVolumeSource_1 = require(\"./v1PortworxVolumeSource\");\nconst v1Preconditions_1 = require(\"./v1Preconditions\");\nconst v1PreferredSchedulingTerm_1 = require(\"./v1PreferredSchedulingTerm\");\nconst v1PriorityClass_1 = require(\"./v1PriorityClass\");\nconst v1PriorityClassList_1 = require(\"./v1PriorityClassList\");\nconst v1Probe_1 = require(\"./v1Probe\");\nconst v1ProjectedVolumeSource_1 = require(\"./v1ProjectedVolumeSource\");\nconst v1QuobyteVolumeSource_1 = require(\"./v1QuobyteVolumeSource\");\nconst v1RBDPersistentVolumeSource_1 = require(\"./v1RBDPersistentVolumeSource\");\nconst v1RBDVolumeSource_1 = require(\"./v1RBDVolumeSource\");\nconst v1ReplicaSet_1 = require(\"./v1ReplicaSet\");\nconst v1ReplicaSetCondition_1 = require(\"./v1ReplicaSetCondition\");\nconst v1ReplicaSetList_1 = require(\"./v1ReplicaSetList\");\nconst v1ReplicaSetSpec_1 = require(\"./v1ReplicaSetSpec\");\nconst v1ReplicaSetStatus_1 = require(\"./v1ReplicaSetStatus\");\nconst v1ReplicationController_1 = require(\"./v1ReplicationController\");\nconst v1ReplicationControllerCondition_1 = require(\"./v1ReplicationControllerCondition\");\nconst v1ReplicationControllerList_1 = require(\"./v1ReplicationControllerList\");\nconst v1ReplicationControllerSpec_1 = require(\"./v1ReplicationControllerSpec\");\nconst v1ReplicationControllerStatus_1 = require(\"./v1ReplicationControllerStatus\");\nconst v1ResourceAttributes_1 = require(\"./v1ResourceAttributes\");\nconst v1ResourceFieldSelector_1 = require(\"./v1ResourceFieldSelector\");\nconst v1ResourceQuota_1 = require(\"./v1ResourceQuota\");\nconst v1ResourceQuotaList_1 = require(\"./v1ResourceQuotaList\");\nconst v1ResourceQuotaSpec_1 = require(\"./v1ResourceQuotaSpec\");\nconst v1ResourceQuotaStatus_1 = require(\"./v1ResourceQuotaStatus\");\nconst v1ResourceRequirements_1 = require(\"./v1ResourceRequirements\");\nconst v1ResourceRule_1 = require(\"./v1ResourceRule\");\nconst v1Role_1 = require(\"./v1Role\");\nconst v1RoleBinding_1 = require(\"./v1RoleBinding\");\nconst v1RoleBindingList_1 = require(\"./v1RoleBindingList\");\nconst v1RoleList_1 = require(\"./v1RoleList\");\nconst v1RoleRef_1 = require(\"./v1RoleRef\");\nconst v1RollingUpdateDaemonSet_1 = require(\"./v1RollingUpdateDaemonSet\");\nconst v1RollingUpdateDeployment_1 = require(\"./v1RollingUpdateDeployment\");\nconst v1RollingUpdateStatefulSetStrategy_1 = require(\"./v1RollingUpdateStatefulSetStrategy\");\nconst v1RuleWithOperations_1 = require(\"./v1RuleWithOperations\");\nconst v1RuntimeClass_1 = require(\"./v1RuntimeClass\");\nconst v1RuntimeClassList_1 = require(\"./v1RuntimeClassList\");\nconst v1SELinuxOptions_1 = require(\"./v1SELinuxOptions\");\nconst v1Scale_1 = require(\"./v1Scale\");\nconst v1ScaleIOPersistentVolumeSource_1 = require(\"./v1ScaleIOPersistentVolumeSource\");\nconst v1ScaleIOVolumeSource_1 = require(\"./v1ScaleIOVolumeSource\");\nconst v1ScaleSpec_1 = require(\"./v1ScaleSpec\");\nconst v1ScaleStatus_1 = require(\"./v1ScaleStatus\");\nconst v1Scheduling_1 = require(\"./v1Scheduling\");\nconst v1ScopeSelector_1 = require(\"./v1ScopeSelector\");\nconst v1ScopedResourceSelectorRequirement_1 = require(\"./v1ScopedResourceSelectorRequirement\");\nconst v1SeccompProfile_1 = require(\"./v1SeccompProfile\");\nconst v1Secret_1 = require(\"./v1Secret\");\nconst v1SecretEnvSource_1 = require(\"./v1SecretEnvSource\");\nconst v1SecretKeySelector_1 = require(\"./v1SecretKeySelector\");\nconst v1SecretList_1 = require(\"./v1SecretList\");\nconst v1SecretProjection_1 = require(\"./v1SecretProjection\");\nconst v1SecretReference_1 = require(\"./v1SecretReference\");\nconst v1SecretVolumeSource_1 = require(\"./v1SecretVolumeSource\");\nconst v1SecurityContext_1 = require(\"./v1SecurityContext\");\nconst v1SelfSubjectAccessReview_1 = require(\"./v1SelfSubjectAccessReview\");\nconst v1SelfSubjectAccessReviewSpec_1 = require(\"./v1SelfSubjectAccessReviewSpec\");\nconst v1SelfSubjectRulesReview_1 = require(\"./v1SelfSubjectRulesReview\");\nconst v1SelfSubjectRulesReviewSpec_1 = require(\"./v1SelfSubjectRulesReviewSpec\");\nconst v1ServerAddressByClientCIDR_1 = require(\"./v1ServerAddressByClientCIDR\");\nconst v1Service_1 = require(\"./v1Service\");\nconst v1ServiceAccount_1 = require(\"./v1ServiceAccount\");\nconst v1ServiceAccountList_1 = require(\"./v1ServiceAccountList\");\nconst v1ServiceAccountTokenProjection_1 = require(\"./v1ServiceAccountTokenProjection\");\nconst v1ServiceBackendPort_1 = require(\"./v1ServiceBackendPort\");\nconst v1ServiceList_1 = require(\"./v1ServiceList\");\nconst v1ServicePort_1 = require(\"./v1ServicePort\");\nconst v1ServiceSpec_1 = require(\"./v1ServiceSpec\");\nconst v1ServiceStatus_1 = require(\"./v1ServiceStatus\");\nconst v1SessionAffinityConfig_1 = require(\"./v1SessionAffinityConfig\");\nconst v1StatefulSet_1 = require(\"./v1StatefulSet\");\nconst v1StatefulSetCondition_1 = require(\"./v1StatefulSetCondition\");\nconst v1StatefulSetList_1 = require(\"./v1StatefulSetList\");\nconst v1StatefulSetSpec_1 = require(\"./v1StatefulSetSpec\");\nconst v1StatefulSetStatus_1 = require(\"./v1StatefulSetStatus\");\nconst v1StatefulSetUpdateStrategy_1 = require(\"./v1StatefulSetUpdateStrategy\");\nconst v1Status_1 = require(\"./v1Status\");\nconst v1StatusCause_1 = require(\"./v1StatusCause\");\nconst v1StatusDetails_1 = require(\"./v1StatusDetails\");\nconst v1StorageClass_1 = require(\"./v1StorageClass\");\nconst v1StorageClassList_1 = require(\"./v1StorageClassList\");\nconst v1StorageOSPersistentVolumeSource_1 = require(\"./v1StorageOSPersistentVolumeSource\");\nconst v1StorageOSVolumeSource_1 = require(\"./v1StorageOSVolumeSource\");\nconst v1Subject_1 = require(\"./v1Subject\");\nconst v1SubjectAccessReview_1 = require(\"./v1SubjectAccessReview\");\nconst v1SubjectAccessReviewSpec_1 = require(\"./v1SubjectAccessReviewSpec\");\nconst v1SubjectAccessReviewStatus_1 = require(\"./v1SubjectAccessReviewStatus\");\nconst v1SubjectRulesReviewStatus_1 = require(\"./v1SubjectRulesReviewStatus\");\nconst v1Sysctl_1 = require(\"./v1Sysctl\");\nconst v1TCPSocketAction_1 = require(\"./v1TCPSocketAction\");\nconst v1Taint_1 = require(\"./v1Taint\");\nconst v1TokenRequestSpec_1 = require(\"./v1TokenRequestSpec\");\nconst v1TokenRequestStatus_1 = require(\"./v1TokenRequestStatus\");\nconst v1TokenReview_1 = require(\"./v1TokenReview\");\nconst v1TokenReviewSpec_1 = require(\"./v1TokenReviewSpec\");\nconst v1TokenReviewStatus_1 = require(\"./v1TokenReviewStatus\");\nconst v1Toleration_1 = require(\"./v1Toleration\");\nconst v1TopologySelectorLabelRequirement_1 = require(\"./v1TopologySelectorLabelRequirement\");\nconst v1TopologySelectorTerm_1 = require(\"./v1TopologySelectorTerm\");\nconst v1TopologySpreadConstraint_1 = require(\"./v1TopologySpreadConstraint\");\nconst v1TypedLocalObjectReference_1 = require(\"./v1TypedLocalObjectReference\");\nconst v1UncountedTerminatedPods_1 = require(\"./v1UncountedTerminatedPods\");\nconst v1UserInfo_1 = require(\"./v1UserInfo\");\nconst v1ValidatingWebhook_1 = require(\"./v1ValidatingWebhook\");\nconst v1ValidatingWebhookConfiguration_1 = require(\"./v1ValidatingWebhookConfiguration\");\nconst v1ValidatingWebhookConfigurationList_1 = require(\"./v1ValidatingWebhookConfigurationList\");\nconst v1Volume_1 = require(\"./v1Volume\");\nconst v1VolumeAttachment_1 = require(\"./v1VolumeAttachment\");\nconst v1VolumeAttachmentList_1 = require(\"./v1VolumeAttachmentList\");\nconst v1VolumeAttachmentSource_1 = require(\"./v1VolumeAttachmentSource\");\nconst v1VolumeAttachmentSpec_1 = require(\"./v1VolumeAttachmentSpec\");\nconst v1VolumeAttachmentStatus_1 = require(\"./v1VolumeAttachmentStatus\");\nconst v1VolumeDevice_1 = require(\"./v1VolumeDevice\");\nconst v1VolumeError_1 = require(\"./v1VolumeError\");\nconst v1VolumeMount_1 = require(\"./v1VolumeMount\");\nconst v1VolumeNodeAffinity_1 = require(\"./v1VolumeNodeAffinity\");\nconst v1VolumeNodeResources_1 = require(\"./v1VolumeNodeResources\");\nconst v1VolumeProjection_1 = require(\"./v1VolumeProjection\");\nconst v1VsphereVirtualDiskVolumeSource_1 = require(\"./v1VsphereVirtualDiskVolumeSource\");\nconst v1WatchEvent_1 = require(\"./v1WatchEvent\");\nconst v1WebhookConversion_1 = require(\"./v1WebhookConversion\");\nconst v1WeightedPodAffinityTerm_1 = require(\"./v1WeightedPodAffinityTerm\");\nconst v1WindowsSecurityContextOptions_1 = require(\"./v1WindowsSecurityContextOptions\");\nconst v1alpha1AggregationRule_1 = require(\"./v1alpha1AggregationRule\");\nconst v1alpha1CSIStorageCapacity_1 = require(\"./v1alpha1CSIStorageCapacity\");\nconst v1alpha1CSIStorageCapacityList_1 = require(\"./v1alpha1CSIStorageCapacityList\");\nconst v1alpha1ClusterRole_1 = require(\"./v1alpha1ClusterRole\");\nconst v1alpha1ClusterRoleBinding_1 = require(\"./v1alpha1ClusterRoleBinding\");\nconst v1alpha1ClusterRoleBindingList_1 = require(\"./v1alpha1ClusterRoleBindingList\");\nconst v1alpha1ClusterRoleList_1 = require(\"./v1alpha1ClusterRoleList\");\nconst v1alpha1Overhead_1 = require(\"./v1alpha1Overhead\");\nconst v1alpha1PolicyRule_1 = require(\"./v1alpha1PolicyRule\");\nconst v1alpha1PriorityClass_1 = require(\"./v1alpha1PriorityClass\");\nconst v1alpha1PriorityClassList_1 = require(\"./v1alpha1PriorityClassList\");\nconst v1alpha1Role_1 = require(\"./v1alpha1Role\");\nconst v1alpha1RoleBinding_1 = require(\"./v1alpha1RoleBinding\");\nconst v1alpha1RoleBindingList_1 = require(\"./v1alpha1RoleBindingList\");\nconst v1alpha1RoleList_1 = require(\"./v1alpha1RoleList\");\nconst v1alpha1RoleRef_1 = require(\"./v1alpha1RoleRef\");\nconst v1alpha1RuntimeClass_1 = require(\"./v1alpha1RuntimeClass\");\nconst v1alpha1RuntimeClassList_1 = require(\"./v1alpha1RuntimeClassList\");\nconst v1alpha1RuntimeClassSpec_1 = require(\"./v1alpha1RuntimeClassSpec\");\nconst v1alpha1Scheduling_1 = require(\"./v1alpha1Scheduling\");\nconst v1alpha1ServerStorageVersion_1 = require(\"./v1alpha1ServerStorageVersion\");\nconst v1alpha1StorageVersion_1 = require(\"./v1alpha1StorageVersion\");\nconst v1alpha1StorageVersionCondition_1 = require(\"./v1alpha1StorageVersionCondition\");\nconst v1alpha1StorageVersionList_1 = require(\"./v1alpha1StorageVersionList\");\nconst v1alpha1StorageVersionStatus_1 = require(\"./v1alpha1StorageVersionStatus\");\nconst v1alpha1Subject_1 = require(\"./v1alpha1Subject\");\nconst v1alpha1VolumeAttachment_1 = require(\"./v1alpha1VolumeAttachment\");\nconst v1alpha1VolumeAttachmentList_1 = require(\"./v1alpha1VolumeAttachmentList\");\nconst v1alpha1VolumeAttachmentSource_1 = require(\"./v1alpha1VolumeAttachmentSource\");\nconst v1alpha1VolumeAttachmentSpec_1 = require(\"./v1alpha1VolumeAttachmentSpec\");\nconst v1alpha1VolumeAttachmentStatus_1 = require(\"./v1alpha1VolumeAttachmentStatus\");\nconst v1alpha1VolumeError_1 = require(\"./v1alpha1VolumeError\");\nconst v1beta1AllowedCSIDriver_1 = require(\"./v1beta1AllowedCSIDriver\");\nconst v1beta1AllowedFlexVolume_1 = require(\"./v1beta1AllowedFlexVolume\");\nconst v1beta1AllowedHostPath_1 = require(\"./v1beta1AllowedHostPath\");\nconst v1beta1CSIStorageCapacity_1 = require(\"./v1beta1CSIStorageCapacity\");\nconst v1beta1CSIStorageCapacityList_1 = require(\"./v1beta1CSIStorageCapacityList\");\nconst v1beta1CronJob_1 = require(\"./v1beta1CronJob\");\nconst v1beta1CronJobList_1 = require(\"./v1beta1CronJobList\");\nconst v1beta1CronJobSpec_1 = require(\"./v1beta1CronJobSpec\");\nconst v1beta1CronJobStatus_1 = require(\"./v1beta1CronJobStatus\");\nconst v1beta1Endpoint_1 = require(\"./v1beta1Endpoint\");\nconst v1beta1EndpointConditions_1 = require(\"./v1beta1EndpointConditions\");\nconst v1beta1EndpointHints_1 = require(\"./v1beta1EndpointHints\");\nconst v1beta1EndpointPort_1 = require(\"./v1beta1EndpointPort\");\nconst v1beta1EndpointSlice_1 = require(\"./v1beta1EndpointSlice\");\nconst v1beta1EndpointSliceList_1 = require(\"./v1beta1EndpointSliceList\");\nconst v1beta1Event_1 = require(\"./v1beta1Event\");\nconst v1beta1EventList_1 = require(\"./v1beta1EventList\");\nconst v1beta1EventSeries_1 = require(\"./v1beta1EventSeries\");\nconst v1beta1FSGroupStrategyOptions_1 = require(\"./v1beta1FSGroupStrategyOptions\");\nconst v1beta1FlowDistinguisherMethod_1 = require(\"./v1beta1FlowDistinguisherMethod\");\nconst v1beta1FlowSchema_1 = require(\"./v1beta1FlowSchema\");\nconst v1beta1FlowSchemaCondition_1 = require(\"./v1beta1FlowSchemaCondition\");\nconst v1beta1FlowSchemaList_1 = require(\"./v1beta1FlowSchemaList\");\nconst v1beta1FlowSchemaSpec_1 = require(\"./v1beta1FlowSchemaSpec\");\nconst v1beta1FlowSchemaStatus_1 = require(\"./v1beta1FlowSchemaStatus\");\nconst v1beta1ForZone_1 = require(\"./v1beta1ForZone\");\nconst v1beta1GroupSubject_1 = require(\"./v1beta1GroupSubject\");\nconst v1beta1HostPortRange_1 = require(\"./v1beta1HostPortRange\");\nconst v1beta1IDRange_1 = require(\"./v1beta1IDRange\");\nconst v1beta1JobTemplateSpec_1 = require(\"./v1beta1JobTemplateSpec\");\nconst v1beta1LimitResponse_1 = require(\"./v1beta1LimitResponse\");\nconst v1beta1LimitedPriorityLevelConfiguration_1 = require(\"./v1beta1LimitedPriorityLevelConfiguration\");\nconst v1beta1NonResourcePolicyRule_1 = require(\"./v1beta1NonResourcePolicyRule\");\nconst v1beta1Overhead_1 = require(\"./v1beta1Overhead\");\nconst v1beta1PodDisruptionBudget_1 = require(\"./v1beta1PodDisruptionBudget\");\nconst v1beta1PodDisruptionBudgetList_1 = require(\"./v1beta1PodDisruptionBudgetList\");\nconst v1beta1PodDisruptionBudgetSpec_1 = require(\"./v1beta1PodDisruptionBudgetSpec\");\nconst v1beta1PodDisruptionBudgetStatus_1 = require(\"./v1beta1PodDisruptionBudgetStatus\");\nconst v1beta1PodSecurityPolicy_1 = require(\"./v1beta1PodSecurityPolicy\");\nconst v1beta1PodSecurityPolicyList_1 = require(\"./v1beta1PodSecurityPolicyList\");\nconst v1beta1PodSecurityPolicySpec_1 = require(\"./v1beta1PodSecurityPolicySpec\");\nconst v1beta1PolicyRulesWithSubjects_1 = require(\"./v1beta1PolicyRulesWithSubjects\");\nconst v1beta1PriorityLevelConfiguration_1 = require(\"./v1beta1PriorityLevelConfiguration\");\nconst v1beta1PriorityLevelConfigurationCondition_1 = require(\"./v1beta1PriorityLevelConfigurationCondition\");\nconst v1beta1PriorityLevelConfigurationList_1 = require(\"./v1beta1PriorityLevelConfigurationList\");\nconst v1beta1PriorityLevelConfigurationReference_1 = require(\"./v1beta1PriorityLevelConfigurationReference\");\nconst v1beta1PriorityLevelConfigurationSpec_1 = require(\"./v1beta1PriorityLevelConfigurationSpec\");\nconst v1beta1PriorityLevelConfigurationStatus_1 = require(\"./v1beta1PriorityLevelConfigurationStatus\");\nconst v1beta1QueuingConfiguration_1 = require(\"./v1beta1QueuingConfiguration\");\nconst v1beta1ResourcePolicyRule_1 = require(\"./v1beta1ResourcePolicyRule\");\nconst v1beta1RunAsGroupStrategyOptions_1 = require(\"./v1beta1RunAsGroupStrategyOptions\");\nconst v1beta1RunAsUserStrategyOptions_1 = require(\"./v1beta1RunAsUserStrategyOptions\");\nconst v1beta1RuntimeClass_1 = require(\"./v1beta1RuntimeClass\");\nconst v1beta1RuntimeClassList_1 = require(\"./v1beta1RuntimeClassList\");\nconst v1beta1RuntimeClassStrategyOptions_1 = require(\"./v1beta1RuntimeClassStrategyOptions\");\nconst v1beta1SELinuxStrategyOptions_1 = require(\"./v1beta1SELinuxStrategyOptions\");\nconst v1beta1Scheduling_1 = require(\"./v1beta1Scheduling\");\nconst v1beta1ServiceAccountSubject_1 = require(\"./v1beta1ServiceAccountSubject\");\nconst v1beta1Subject_1 = require(\"./v1beta1Subject\");\nconst v1beta1SupplementalGroupsStrategyOptions_1 = require(\"./v1beta1SupplementalGroupsStrategyOptions\");\nconst v1beta1UserSubject_1 = require(\"./v1beta1UserSubject\");\nconst v2beta1ContainerResourceMetricSource_1 = require(\"./v2beta1ContainerResourceMetricSource\");\nconst v2beta1ContainerResourceMetricStatus_1 = require(\"./v2beta1ContainerResourceMetricStatus\");\nconst v2beta1CrossVersionObjectReference_1 = require(\"./v2beta1CrossVersionObjectReference\");\nconst v2beta1ExternalMetricSource_1 = require(\"./v2beta1ExternalMetricSource\");\nconst v2beta1ExternalMetricStatus_1 = require(\"./v2beta1ExternalMetricStatus\");\nconst v2beta1HorizontalPodAutoscaler_1 = require(\"./v2beta1HorizontalPodAutoscaler\");\nconst v2beta1HorizontalPodAutoscalerCondition_1 = require(\"./v2beta1HorizontalPodAutoscalerCondition\");\nconst v2beta1HorizontalPodAutoscalerList_1 = require(\"./v2beta1HorizontalPodAutoscalerList\");\nconst v2beta1HorizontalPodAutoscalerSpec_1 = require(\"./v2beta1HorizontalPodAutoscalerSpec\");\nconst v2beta1HorizontalPodAutoscalerStatus_1 = require(\"./v2beta1HorizontalPodAutoscalerStatus\");\nconst v2beta1MetricSpec_1 = require(\"./v2beta1MetricSpec\");\nconst v2beta1MetricStatus_1 = require(\"./v2beta1MetricStatus\");\nconst v2beta1ObjectMetricSource_1 = require(\"./v2beta1ObjectMetricSource\");\nconst v2beta1ObjectMetricStatus_1 = require(\"./v2beta1ObjectMetricStatus\");\nconst v2beta1PodsMetricSource_1 = require(\"./v2beta1PodsMetricSource\");\nconst v2beta1PodsMetricStatus_1 = require(\"./v2beta1PodsMetricStatus\");\nconst v2beta1ResourceMetricSource_1 = require(\"./v2beta1ResourceMetricSource\");\nconst v2beta1ResourceMetricStatus_1 = require(\"./v2beta1ResourceMetricStatus\");\nconst v2beta2ContainerResourceMetricSource_1 = require(\"./v2beta2ContainerResourceMetricSource\");\nconst v2beta2ContainerResourceMetricStatus_1 = require(\"./v2beta2ContainerResourceMetricStatus\");\nconst v2beta2CrossVersionObjectReference_1 = require(\"./v2beta2CrossVersionObjectReference\");\nconst v2beta2ExternalMetricSource_1 = require(\"./v2beta2ExternalMetricSource\");\nconst v2beta2ExternalMetricStatus_1 = require(\"./v2beta2ExternalMetricStatus\");\nconst v2beta2HPAScalingPolicy_1 = require(\"./v2beta2HPAScalingPolicy\");\nconst v2beta2HPAScalingRules_1 = require(\"./v2beta2HPAScalingRules\");\nconst v2beta2HorizontalPodAutoscaler_1 = require(\"./v2beta2HorizontalPodAutoscaler\");\nconst v2beta2HorizontalPodAutoscalerBehavior_1 = require(\"./v2beta2HorizontalPodAutoscalerBehavior\");\nconst v2beta2HorizontalPodAutoscalerCondition_1 = require(\"./v2beta2HorizontalPodAutoscalerCondition\");\nconst v2beta2HorizontalPodAutoscalerList_1 = require(\"./v2beta2HorizontalPodAutoscalerList\");\nconst v2beta2HorizontalPodAutoscalerSpec_1 = require(\"./v2beta2HorizontalPodAutoscalerSpec\");\nconst v2beta2HorizontalPodAutoscalerStatus_1 = require(\"./v2beta2HorizontalPodAutoscalerStatus\");\nconst v2beta2MetricIdentifier_1 = require(\"./v2beta2MetricIdentifier\");\nconst v2beta2MetricSpec_1 = require(\"./v2beta2MetricSpec\");\nconst v2beta2MetricStatus_1 = require(\"./v2beta2MetricStatus\");\nconst v2beta2MetricTarget_1 = require(\"./v2beta2MetricTarget\");\nconst v2beta2MetricValueStatus_1 = require(\"./v2beta2MetricValueStatus\");\nconst v2beta2ObjectMetricSource_1 = require(\"./v2beta2ObjectMetricSource\");\nconst v2beta2ObjectMetricStatus_1 = require(\"./v2beta2ObjectMetricStatus\");\nconst v2beta2PodsMetricSource_1 = require(\"./v2beta2PodsMetricSource\");\nconst v2beta2PodsMetricStatus_1 = require(\"./v2beta2PodsMetricStatus\");\nconst v2beta2ResourceMetricSource_1 = require(\"./v2beta2ResourceMetricSource\");\nconst v2beta2ResourceMetricStatus_1 = require(\"./v2beta2ResourceMetricStatus\");\nconst versionInfo_1 = require(\"./versionInfo\");\n/* tslint:disable:no-unused-variable */\nlet primitives = [\n \"string\",\n \"boolean\",\n \"double\",\n \"integer\",\n \"long\",\n \"float\",\n \"number\",\n \"any\"\n];\nlet enumsMap = {};\nlet typeMap = {\n \"AdmissionregistrationV1ServiceReference\": admissionregistrationV1ServiceReference_1.AdmissionregistrationV1ServiceReference,\n \"AdmissionregistrationV1WebhookClientConfig\": admissionregistrationV1WebhookClientConfig_1.AdmissionregistrationV1WebhookClientConfig,\n \"ApiextensionsV1ServiceReference\": apiextensionsV1ServiceReference_1.ApiextensionsV1ServiceReference,\n \"ApiextensionsV1WebhookClientConfig\": apiextensionsV1WebhookClientConfig_1.ApiextensionsV1WebhookClientConfig,\n \"ApiregistrationV1ServiceReference\": apiregistrationV1ServiceReference_1.ApiregistrationV1ServiceReference,\n \"AuthenticationV1TokenRequest\": authenticationV1TokenRequest_1.AuthenticationV1TokenRequest,\n \"CoreV1EndpointPort\": coreV1EndpointPort_1.CoreV1EndpointPort,\n \"CoreV1Event\": coreV1Event_1.CoreV1Event,\n \"CoreV1EventList\": coreV1EventList_1.CoreV1EventList,\n \"CoreV1EventSeries\": coreV1EventSeries_1.CoreV1EventSeries,\n \"DiscoveryV1EndpointPort\": discoveryV1EndpointPort_1.DiscoveryV1EndpointPort,\n \"EventsV1Event\": eventsV1Event_1.EventsV1Event,\n \"EventsV1EventList\": eventsV1EventList_1.EventsV1EventList,\n \"EventsV1EventSeries\": eventsV1EventSeries_1.EventsV1EventSeries,\n \"StorageV1TokenRequest\": storageV1TokenRequest_1.StorageV1TokenRequest,\n \"V1APIGroup\": v1APIGroup_1.V1APIGroup,\n \"V1APIGroupList\": v1APIGroupList_1.V1APIGroupList,\n \"V1APIResource\": v1APIResource_1.V1APIResource,\n \"V1APIResourceList\": v1APIResourceList_1.V1APIResourceList,\n \"V1APIService\": v1APIService_1.V1APIService,\n \"V1APIServiceCondition\": v1APIServiceCondition_1.V1APIServiceCondition,\n \"V1APIServiceList\": v1APIServiceList_1.V1APIServiceList,\n \"V1APIServiceSpec\": v1APIServiceSpec_1.V1APIServiceSpec,\n \"V1APIServiceStatus\": v1APIServiceStatus_1.V1APIServiceStatus,\n \"V1APIVersions\": v1APIVersions_1.V1APIVersions,\n \"V1AWSElasticBlockStoreVolumeSource\": v1AWSElasticBlockStoreVolumeSource_1.V1AWSElasticBlockStoreVolumeSource,\n \"V1Affinity\": v1Affinity_1.V1Affinity,\n \"V1AggregationRule\": v1AggregationRule_1.V1AggregationRule,\n \"V1AttachedVolume\": v1AttachedVolume_1.V1AttachedVolume,\n \"V1AzureDiskVolumeSource\": v1AzureDiskVolumeSource_1.V1AzureDiskVolumeSource,\n \"V1AzureFilePersistentVolumeSource\": v1AzureFilePersistentVolumeSource_1.V1AzureFilePersistentVolumeSource,\n \"V1AzureFileVolumeSource\": v1AzureFileVolumeSource_1.V1AzureFileVolumeSource,\n \"V1Binding\": v1Binding_1.V1Binding,\n \"V1BoundObjectReference\": v1BoundObjectReference_1.V1BoundObjectReference,\n \"V1CSIDriver\": v1CSIDriver_1.V1CSIDriver,\n \"V1CSIDriverList\": v1CSIDriverList_1.V1CSIDriverList,\n \"V1CSIDriverSpec\": v1CSIDriverSpec_1.V1CSIDriverSpec,\n \"V1CSINode\": v1CSINode_1.V1CSINode,\n \"V1CSINodeDriver\": v1CSINodeDriver_1.V1CSINodeDriver,\n \"V1CSINodeList\": v1CSINodeList_1.V1CSINodeList,\n \"V1CSINodeSpec\": v1CSINodeSpec_1.V1CSINodeSpec,\n \"V1CSIPersistentVolumeSource\": v1CSIPersistentVolumeSource_1.V1CSIPersistentVolumeSource,\n \"V1CSIVolumeSource\": v1CSIVolumeSource_1.V1CSIVolumeSource,\n \"V1Capabilities\": v1Capabilities_1.V1Capabilities,\n \"V1CephFSPersistentVolumeSource\": v1CephFSPersistentVolumeSource_1.V1CephFSPersistentVolumeSource,\n \"V1CephFSVolumeSource\": v1CephFSVolumeSource_1.V1CephFSVolumeSource,\n \"V1CertificateSigningRequest\": v1CertificateSigningRequest_1.V1CertificateSigningRequest,\n \"V1CertificateSigningRequestCondition\": v1CertificateSigningRequestCondition_1.V1CertificateSigningRequestCondition,\n \"V1CertificateSigningRequestList\": v1CertificateSigningRequestList_1.V1CertificateSigningRequestList,\n \"V1CertificateSigningRequestSpec\": v1CertificateSigningRequestSpec_1.V1CertificateSigningRequestSpec,\n \"V1CertificateSigningRequestStatus\": v1CertificateSigningRequestStatus_1.V1CertificateSigningRequestStatus,\n \"V1CinderPersistentVolumeSource\": v1CinderPersistentVolumeSource_1.V1CinderPersistentVolumeSource,\n \"V1CinderVolumeSource\": v1CinderVolumeSource_1.V1CinderVolumeSource,\n \"V1ClientIPConfig\": v1ClientIPConfig_1.V1ClientIPConfig,\n \"V1ClusterRole\": v1ClusterRole_1.V1ClusterRole,\n \"V1ClusterRoleBinding\": v1ClusterRoleBinding_1.V1ClusterRoleBinding,\n \"V1ClusterRoleBindingList\": v1ClusterRoleBindingList_1.V1ClusterRoleBindingList,\n \"V1ClusterRoleList\": v1ClusterRoleList_1.V1ClusterRoleList,\n \"V1ComponentCondition\": v1ComponentCondition_1.V1ComponentCondition,\n \"V1ComponentStatus\": v1ComponentStatus_1.V1ComponentStatus,\n \"V1ComponentStatusList\": v1ComponentStatusList_1.V1ComponentStatusList,\n \"V1Condition\": v1Condition_1.V1Condition,\n \"V1ConfigMap\": v1ConfigMap_1.V1ConfigMap,\n \"V1ConfigMapEnvSource\": v1ConfigMapEnvSource_1.V1ConfigMapEnvSource,\n \"V1ConfigMapKeySelector\": v1ConfigMapKeySelector_1.V1ConfigMapKeySelector,\n \"V1ConfigMapList\": v1ConfigMapList_1.V1ConfigMapList,\n \"V1ConfigMapNodeConfigSource\": v1ConfigMapNodeConfigSource_1.V1ConfigMapNodeConfigSource,\n \"V1ConfigMapProjection\": v1ConfigMapProjection_1.V1ConfigMapProjection,\n \"V1ConfigMapVolumeSource\": v1ConfigMapVolumeSource_1.V1ConfigMapVolumeSource,\n \"V1Container\": v1Container_1.V1Container,\n \"V1ContainerImage\": v1ContainerImage_1.V1ContainerImage,\n \"V1ContainerPort\": v1ContainerPort_1.V1ContainerPort,\n \"V1ContainerState\": v1ContainerState_1.V1ContainerState,\n \"V1ContainerStateRunning\": v1ContainerStateRunning_1.V1ContainerStateRunning,\n \"V1ContainerStateTerminated\": v1ContainerStateTerminated_1.V1ContainerStateTerminated,\n \"V1ContainerStateWaiting\": v1ContainerStateWaiting_1.V1ContainerStateWaiting,\n \"V1ContainerStatus\": v1ContainerStatus_1.V1ContainerStatus,\n \"V1ControllerRevision\": v1ControllerRevision_1.V1ControllerRevision,\n \"V1ControllerRevisionList\": v1ControllerRevisionList_1.V1ControllerRevisionList,\n \"V1CronJob\": v1CronJob_1.V1CronJob,\n \"V1CronJobList\": v1CronJobList_1.V1CronJobList,\n \"V1CronJobSpec\": v1CronJobSpec_1.V1CronJobSpec,\n \"V1CronJobStatus\": v1CronJobStatus_1.V1CronJobStatus,\n \"V1CrossVersionObjectReference\": v1CrossVersionObjectReference_1.V1CrossVersionObjectReference,\n \"V1CustomResourceColumnDefinition\": v1CustomResourceColumnDefinition_1.V1CustomResourceColumnDefinition,\n \"V1CustomResourceConversion\": v1CustomResourceConversion_1.V1CustomResourceConversion,\n \"V1CustomResourceDefinition\": v1CustomResourceDefinition_1.V1CustomResourceDefinition,\n \"V1CustomResourceDefinitionCondition\": v1CustomResourceDefinitionCondition_1.V1CustomResourceDefinitionCondition,\n \"V1CustomResourceDefinitionList\": v1CustomResourceDefinitionList_1.V1CustomResourceDefinitionList,\n \"V1CustomResourceDefinitionNames\": v1CustomResourceDefinitionNames_1.V1CustomResourceDefinitionNames,\n \"V1CustomResourceDefinitionSpec\": v1CustomResourceDefinitionSpec_1.V1CustomResourceDefinitionSpec,\n \"V1CustomResourceDefinitionStatus\": v1CustomResourceDefinitionStatus_1.V1CustomResourceDefinitionStatus,\n \"V1CustomResourceDefinitionVersion\": v1CustomResourceDefinitionVersion_1.V1CustomResourceDefinitionVersion,\n \"V1CustomResourceSubresourceScale\": v1CustomResourceSubresourceScale_1.V1CustomResourceSubresourceScale,\n \"V1CustomResourceSubresources\": v1CustomResourceSubresources_1.V1CustomResourceSubresources,\n \"V1CustomResourceValidation\": v1CustomResourceValidation_1.V1CustomResourceValidation,\n \"V1DaemonEndpoint\": v1DaemonEndpoint_1.V1DaemonEndpoint,\n \"V1DaemonSet\": v1DaemonSet_1.V1DaemonSet,\n \"V1DaemonSetCondition\": v1DaemonSetCondition_1.V1DaemonSetCondition,\n \"V1DaemonSetList\": v1DaemonSetList_1.V1DaemonSetList,\n \"V1DaemonSetSpec\": v1DaemonSetSpec_1.V1DaemonSetSpec,\n \"V1DaemonSetStatus\": v1DaemonSetStatus_1.V1DaemonSetStatus,\n \"V1DaemonSetUpdateStrategy\": v1DaemonSetUpdateStrategy_1.V1DaemonSetUpdateStrategy,\n \"V1DeleteOptions\": v1DeleteOptions_1.V1DeleteOptions,\n \"V1Deployment\": v1Deployment_1.V1Deployment,\n \"V1DeploymentCondition\": v1DeploymentCondition_1.V1DeploymentCondition,\n \"V1DeploymentList\": v1DeploymentList_1.V1DeploymentList,\n \"V1DeploymentSpec\": v1DeploymentSpec_1.V1DeploymentSpec,\n \"V1DeploymentStatus\": v1DeploymentStatus_1.V1DeploymentStatus,\n \"V1DeploymentStrategy\": v1DeploymentStrategy_1.V1DeploymentStrategy,\n \"V1DownwardAPIProjection\": v1DownwardAPIProjection_1.V1DownwardAPIProjection,\n \"V1DownwardAPIVolumeFile\": v1DownwardAPIVolumeFile_1.V1DownwardAPIVolumeFile,\n \"V1DownwardAPIVolumeSource\": v1DownwardAPIVolumeSource_1.V1DownwardAPIVolumeSource,\n \"V1EmptyDirVolumeSource\": v1EmptyDirVolumeSource_1.V1EmptyDirVolumeSource,\n \"V1Endpoint\": v1Endpoint_1.V1Endpoint,\n \"V1EndpointAddress\": v1EndpointAddress_1.V1EndpointAddress,\n \"V1EndpointConditions\": v1EndpointConditions_1.V1EndpointConditions,\n \"V1EndpointHints\": v1EndpointHints_1.V1EndpointHints,\n \"V1EndpointSlice\": v1EndpointSlice_1.V1EndpointSlice,\n \"V1EndpointSliceList\": v1EndpointSliceList_1.V1EndpointSliceList,\n \"V1EndpointSubset\": v1EndpointSubset_1.V1EndpointSubset,\n \"V1Endpoints\": v1Endpoints_1.V1Endpoints,\n \"V1EndpointsList\": v1EndpointsList_1.V1EndpointsList,\n \"V1EnvFromSource\": v1EnvFromSource_1.V1EnvFromSource,\n \"V1EnvVar\": v1EnvVar_1.V1EnvVar,\n \"V1EnvVarSource\": v1EnvVarSource_1.V1EnvVarSource,\n \"V1EphemeralContainer\": v1EphemeralContainer_1.V1EphemeralContainer,\n \"V1EphemeralVolumeSource\": v1EphemeralVolumeSource_1.V1EphemeralVolumeSource,\n \"V1EventSource\": v1EventSource_1.V1EventSource,\n \"V1Eviction\": v1Eviction_1.V1Eviction,\n \"V1ExecAction\": v1ExecAction_1.V1ExecAction,\n \"V1ExternalDocumentation\": v1ExternalDocumentation_1.V1ExternalDocumentation,\n \"V1FCVolumeSource\": v1FCVolumeSource_1.V1FCVolumeSource,\n \"V1FlexPersistentVolumeSource\": v1FlexPersistentVolumeSource_1.V1FlexPersistentVolumeSource,\n \"V1FlexVolumeSource\": v1FlexVolumeSource_1.V1FlexVolumeSource,\n \"V1FlockerVolumeSource\": v1FlockerVolumeSource_1.V1FlockerVolumeSource,\n \"V1ForZone\": v1ForZone_1.V1ForZone,\n \"V1GCEPersistentDiskVolumeSource\": v1GCEPersistentDiskVolumeSource_1.V1GCEPersistentDiskVolumeSource,\n \"V1GitRepoVolumeSource\": v1GitRepoVolumeSource_1.V1GitRepoVolumeSource,\n \"V1GlusterfsPersistentVolumeSource\": v1GlusterfsPersistentVolumeSource_1.V1GlusterfsPersistentVolumeSource,\n \"V1GlusterfsVolumeSource\": v1GlusterfsVolumeSource_1.V1GlusterfsVolumeSource,\n \"V1GroupVersionForDiscovery\": v1GroupVersionForDiscovery_1.V1GroupVersionForDiscovery,\n \"V1HTTPGetAction\": v1HTTPGetAction_1.V1HTTPGetAction,\n \"V1HTTPHeader\": v1HTTPHeader_1.V1HTTPHeader,\n \"V1HTTPIngressPath\": v1HTTPIngressPath_1.V1HTTPIngressPath,\n \"V1HTTPIngressRuleValue\": v1HTTPIngressRuleValue_1.V1HTTPIngressRuleValue,\n \"V1Handler\": v1Handler_1.V1Handler,\n \"V1HorizontalPodAutoscaler\": v1HorizontalPodAutoscaler_1.V1HorizontalPodAutoscaler,\n \"V1HorizontalPodAutoscalerList\": v1HorizontalPodAutoscalerList_1.V1HorizontalPodAutoscalerList,\n \"V1HorizontalPodAutoscalerSpec\": v1HorizontalPodAutoscalerSpec_1.V1HorizontalPodAutoscalerSpec,\n \"V1HorizontalPodAutoscalerStatus\": v1HorizontalPodAutoscalerStatus_1.V1HorizontalPodAutoscalerStatus,\n \"V1HostAlias\": v1HostAlias_1.V1HostAlias,\n \"V1HostPathVolumeSource\": v1HostPathVolumeSource_1.V1HostPathVolumeSource,\n \"V1IPBlock\": v1IPBlock_1.V1IPBlock,\n \"V1ISCSIPersistentVolumeSource\": v1ISCSIPersistentVolumeSource_1.V1ISCSIPersistentVolumeSource,\n \"V1ISCSIVolumeSource\": v1ISCSIVolumeSource_1.V1ISCSIVolumeSource,\n \"V1Ingress\": v1Ingress_1.V1Ingress,\n \"V1IngressBackend\": v1IngressBackend_1.V1IngressBackend,\n \"V1IngressClass\": v1IngressClass_1.V1IngressClass,\n \"V1IngressClassList\": v1IngressClassList_1.V1IngressClassList,\n \"V1IngressClassParametersReference\": v1IngressClassParametersReference_1.V1IngressClassParametersReference,\n \"V1IngressClassSpec\": v1IngressClassSpec_1.V1IngressClassSpec,\n \"V1IngressList\": v1IngressList_1.V1IngressList,\n \"V1IngressRule\": v1IngressRule_1.V1IngressRule,\n \"V1IngressServiceBackend\": v1IngressServiceBackend_1.V1IngressServiceBackend,\n \"V1IngressSpec\": v1IngressSpec_1.V1IngressSpec,\n \"V1IngressStatus\": v1IngressStatus_1.V1IngressStatus,\n \"V1IngressTLS\": v1IngressTLS_1.V1IngressTLS,\n \"V1JSONSchemaProps\": v1JSONSchemaProps_1.V1JSONSchemaProps,\n \"V1Job\": v1Job_1.V1Job,\n \"V1JobCondition\": v1JobCondition_1.V1JobCondition,\n \"V1JobList\": v1JobList_1.V1JobList,\n \"V1JobSpec\": v1JobSpec_1.V1JobSpec,\n \"V1JobStatus\": v1JobStatus_1.V1JobStatus,\n \"V1JobTemplateSpec\": v1JobTemplateSpec_1.V1JobTemplateSpec,\n \"V1KeyToPath\": v1KeyToPath_1.V1KeyToPath,\n \"V1LabelSelector\": v1LabelSelector_1.V1LabelSelector,\n \"V1LabelSelectorRequirement\": v1LabelSelectorRequirement_1.V1LabelSelectorRequirement,\n \"V1Lease\": v1Lease_1.V1Lease,\n \"V1LeaseList\": v1LeaseList_1.V1LeaseList,\n \"V1LeaseSpec\": v1LeaseSpec_1.V1LeaseSpec,\n \"V1Lifecycle\": v1Lifecycle_1.V1Lifecycle,\n \"V1LimitRange\": v1LimitRange_1.V1LimitRange,\n \"V1LimitRangeItem\": v1LimitRangeItem_1.V1LimitRangeItem,\n \"V1LimitRangeList\": v1LimitRangeList_1.V1LimitRangeList,\n \"V1LimitRangeSpec\": v1LimitRangeSpec_1.V1LimitRangeSpec,\n \"V1ListMeta\": v1ListMeta_1.V1ListMeta,\n \"V1LoadBalancerIngress\": v1LoadBalancerIngress_1.V1LoadBalancerIngress,\n \"V1LoadBalancerStatus\": v1LoadBalancerStatus_1.V1LoadBalancerStatus,\n \"V1LocalObjectReference\": v1LocalObjectReference_1.V1LocalObjectReference,\n \"V1LocalSubjectAccessReview\": v1LocalSubjectAccessReview_1.V1LocalSubjectAccessReview,\n \"V1LocalVolumeSource\": v1LocalVolumeSource_1.V1LocalVolumeSource,\n \"V1ManagedFieldsEntry\": v1ManagedFieldsEntry_1.V1ManagedFieldsEntry,\n \"V1MutatingWebhook\": v1MutatingWebhook_1.V1MutatingWebhook,\n \"V1MutatingWebhookConfiguration\": v1MutatingWebhookConfiguration_1.V1MutatingWebhookConfiguration,\n \"V1MutatingWebhookConfigurationList\": v1MutatingWebhookConfigurationList_1.V1MutatingWebhookConfigurationList,\n \"V1NFSVolumeSource\": v1NFSVolumeSource_1.V1NFSVolumeSource,\n \"V1Namespace\": v1Namespace_1.V1Namespace,\n \"V1NamespaceCondition\": v1NamespaceCondition_1.V1NamespaceCondition,\n \"V1NamespaceList\": v1NamespaceList_1.V1NamespaceList,\n \"V1NamespaceSpec\": v1NamespaceSpec_1.V1NamespaceSpec,\n \"V1NamespaceStatus\": v1NamespaceStatus_1.V1NamespaceStatus,\n \"V1NetworkPolicy\": v1NetworkPolicy_1.V1NetworkPolicy,\n \"V1NetworkPolicyEgressRule\": v1NetworkPolicyEgressRule_1.V1NetworkPolicyEgressRule,\n \"V1NetworkPolicyIngressRule\": v1NetworkPolicyIngressRule_1.V1NetworkPolicyIngressRule,\n \"V1NetworkPolicyList\": v1NetworkPolicyList_1.V1NetworkPolicyList,\n \"V1NetworkPolicyPeer\": v1NetworkPolicyPeer_1.V1NetworkPolicyPeer,\n \"V1NetworkPolicyPort\": v1NetworkPolicyPort_1.V1NetworkPolicyPort,\n \"V1NetworkPolicySpec\": v1NetworkPolicySpec_1.V1NetworkPolicySpec,\n \"V1Node\": v1Node_1.V1Node,\n \"V1NodeAddress\": v1NodeAddress_1.V1NodeAddress,\n \"V1NodeAffinity\": v1NodeAffinity_1.V1NodeAffinity,\n \"V1NodeCondition\": v1NodeCondition_1.V1NodeCondition,\n \"V1NodeConfigSource\": v1NodeConfigSource_1.V1NodeConfigSource,\n \"V1NodeConfigStatus\": v1NodeConfigStatus_1.V1NodeConfigStatus,\n \"V1NodeDaemonEndpoints\": v1NodeDaemonEndpoints_1.V1NodeDaemonEndpoints,\n \"V1NodeList\": v1NodeList_1.V1NodeList,\n \"V1NodeSelector\": v1NodeSelector_1.V1NodeSelector,\n \"V1NodeSelectorRequirement\": v1NodeSelectorRequirement_1.V1NodeSelectorRequirement,\n \"V1NodeSelectorTerm\": v1NodeSelectorTerm_1.V1NodeSelectorTerm,\n \"V1NodeSpec\": v1NodeSpec_1.V1NodeSpec,\n \"V1NodeStatus\": v1NodeStatus_1.V1NodeStatus,\n \"V1NodeSystemInfo\": v1NodeSystemInfo_1.V1NodeSystemInfo,\n \"V1NonResourceAttributes\": v1NonResourceAttributes_1.V1NonResourceAttributes,\n \"V1NonResourceRule\": v1NonResourceRule_1.V1NonResourceRule,\n \"V1ObjectFieldSelector\": v1ObjectFieldSelector_1.V1ObjectFieldSelector,\n \"V1ObjectMeta\": v1ObjectMeta_1.V1ObjectMeta,\n \"V1ObjectReference\": v1ObjectReference_1.V1ObjectReference,\n \"V1Overhead\": v1Overhead_1.V1Overhead,\n \"V1OwnerReference\": v1OwnerReference_1.V1OwnerReference,\n \"V1PersistentVolume\": v1PersistentVolume_1.V1PersistentVolume,\n \"V1PersistentVolumeClaim\": v1PersistentVolumeClaim_1.V1PersistentVolumeClaim,\n \"V1PersistentVolumeClaimCondition\": v1PersistentVolumeClaimCondition_1.V1PersistentVolumeClaimCondition,\n \"V1PersistentVolumeClaimList\": v1PersistentVolumeClaimList_1.V1PersistentVolumeClaimList,\n \"V1PersistentVolumeClaimSpec\": v1PersistentVolumeClaimSpec_1.V1PersistentVolumeClaimSpec,\n \"V1PersistentVolumeClaimStatus\": v1PersistentVolumeClaimStatus_1.V1PersistentVolumeClaimStatus,\n \"V1PersistentVolumeClaimTemplate\": v1PersistentVolumeClaimTemplate_1.V1PersistentVolumeClaimTemplate,\n \"V1PersistentVolumeClaimVolumeSource\": v1PersistentVolumeClaimVolumeSource_1.V1PersistentVolumeClaimVolumeSource,\n \"V1PersistentVolumeList\": v1PersistentVolumeList_1.V1PersistentVolumeList,\n \"V1PersistentVolumeSpec\": v1PersistentVolumeSpec_1.V1PersistentVolumeSpec,\n \"V1PersistentVolumeStatus\": v1PersistentVolumeStatus_1.V1PersistentVolumeStatus,\n \"V1PhotonPersistentDiskVolumeSource\": v1PhotonPersistentDiskVolumeSource_1.V1PhotonPersistentDiskVolumeSource,\n \"V1Pod\": v1Pod_1.V1Pod,\n \"V1PodAffinity\": v1PodAffinity_1.V1PodAffinity,\n \"V1PodAffinityTerm\": v1PodAffinityTerm_1.V1PodAffinityTerm,\n \"V1PodAntiAffinity\": v1PodAntiAffinity_1.V1PodAntiAffinity,\n \"V1PodCondition\": v1PodCondition_1.V1PodCondition,\n \"V1PodDNSConfig\": v1PodDNSConfig_1.V1PodDNSConfig,\n \"V1PodDNSConfigOption\": v1PodDNSConfigOption_1.V1PodDNSConfigOption,\n \"V1PodDisruptionBudget\": v1PodDisruptionBudget_1.V1PodDisruptionBudget,\n \"V1PodDisruptionBudgetList\": v1PodDisruptionBudgetList_1.V1PodDisruptionBudgetList,\n \"V1PodDisruptionBudgetSpec\": v1PodDisruptionBudgetSpec_1.V1PodDisruptionBudgetSpec,\n \"V1PodDisruptionBudgetStatus\": v1PodDisruptionBudgetStatus_1.V1PodDisruptionBudgetStatus,\n \"V1PodIP\": v1PodIP_1.V1PodIP,\n \"V1PodList\": v1PodList_1.V1PodList,\n \"V1PodReadinessGate\": v1PodReadinessGate_1.V1PodReadinessGate,\n \"V1PodSecurityContext\": v1PodSecurityContext_1.V1PodSecurityContext,\n \"V1PodSpec\": v1PodSpec_1.V1PodSpec,\n \"V1PodStatus\": v1PodStatus_1.V1PodStatus,\n \"V1PodTemplate\": v1PodTemplate_1.V1PodTemplate,\n \"V1PodTemplateList\": v1PodTemplateList_1.V1PodTemplateList,\n \"V1PodTemplateSpec\": v1PodTemplateSpec_1.V1PodTemplateSpec,\n \"V1PolicyRule\": v1PolicyRule_1.V1PolicyRule,\n \"V1PortStatus\": v1PortStatus_1.V1PortStatus,\n \"V1PortworxVolumeSource\": v1PortworxVolumeSource_1.V1PortworxVolumeSource,\n \"V1Preconditions\": v1Preconditions_1.V1Preconditions,\n \"V1PreferredSchedulingTerm\": v1PreferredSchedulingTerm_1.V1PreferredSchedulingTerm,\n \"V1PriorityClass\": v1PriorityClass_1.V1PriorityClass,\n \"V1PriorityClassList\": v1PriorityClassList_1.V1PriorityClassList,\n \"V1Probe\": v1Probe_1.V1Probe,\n \"V1ProjectedVolumeSource\": v1ProjectedVolumeSource_1.V1ProjectedVolumeSource,\n \"V1QuobyteVolumeSource\": v1QuobyteVolumeSource_1.V1QuobyteVolumeSource,\n \"V1RBDPersistentVolumeSource\": v1RBDPersistentVolumeSource_1.V1RBDPersistentVolumeSource,\n \"V1RBDVolumeSource\": v1RBDVolumeSource_1.V1RBDVolumeSource,\n \"V1ReplicaSet\": v1ReplicaSet_1.V1ReplicaSet,\n \"V1ReplicaSetCondition\": v1ReplicaSetCondition_1.V1ReplicaSetCondition,\n \"V1ReplicaSetList\": v1ReplicaSetList_1.V1ReplicaSetList,\n \"V1ReplicaSetSpec\": v1ReplicaSetSpec_1.V1ReplicaSetSpec,\n \"V1ReplicaSetStatus\": v1ReplicaSetStatus_1.V1ReplicaSetStatus,\n \"V1ReplicationController\": v1ReplicationController_1.V1ReplicationController,\n \"V1ReplicationControllerCondition\": v1ReplicationControllerCondition_1.V1ReplicationControllerCondition,\n \"V1ReplicationControllerList\": v1ReplicationControllerList_1.V1ReplicationControllerList,\n \"V1ReplicationControllerSpec\": v1ReplicationControllerSpec_1.V1ReplicationControllerSpec,\n \"V1ReplicationControllerStatus\": v1ReplicationControllerStatus_1.V1ReplicationControllerStatus,\n \"V1ResourceAttributes\": v1ResourceAttributes_1.V1ResourceAttributes,\n \"V1ResourceFieldSelector\": v1ResourceFieldSelector_1.V1ResourceFieldSelector,\n \"V1ResourceQuota\": v1ResourceQuota_1.V1ResourceQuota,\n \"V1ResourceQuotaList\": v1ResourceQuotaList_1.V1ResourceQuotaList,\n \"V1ResourceQuotaSpec\": v1ResourceQuotaSpec_1.V1ResourceQuotaSpec,\n \"V1ResourceQuotaStatus\": v1ResourceQuotaStatus_1.V1ResourceQuotaStatus,\n \"V1ResourceRequirements\": v1ResourceRequirements_1.V1ResourceRequirements,\n \"V1ResourceRule\": v1ResourceRule_1.V1ResourceRule,\n \"V1Role\": v1Role_1.V1Role,\n \"V1RoleBinding\": v1RoleBinding_1.V1RoleBinding,\n \"V1RoleBindingList\": v1RoleBindingList_1.V1RoleBindingList,\n \"V1RoleList\": v1RoleList_1.V1RoleList,\n \"V1RoleRef\": v1RoleRef_1.V1RoleRef,\n \"V1RollingUpdateDaemonSet\": v1RollingUpdateDaemonSet_1.V1RollingUpdateDaemonSet,\n \"V1RollingUpdateDeployment\": v1RollingUpdateDeployment_1.V1RollingUpdateDeployment,\n \"V1RollingUpdateStatefulSetStrategy\": v1RollingUpdateStatefulSetStrategy_1.V1RollingUpdateStatefulSetStrategy,\n \"V1RuleWithOperations\": v1RuleWithOperations_1.V1RuleWithOperations,\n \"V1RuntimeClass\": v1RuntimeClass_1.V1RuntimeClass,\n \"V1RuntimeClassList\": v1RuntimeClassList_1.V1RuntimeClassList,\n \"V1SELinuxOptions\": v1SELinuxOptions_1.V1SELinuxOptions,\n \"V1Scale\": v1Scale_1.V1Scale,\n \"V1ScaleIOPersistentVolumeSource\": v1ScaleIOPersistentVolumeSource_1.V1ScaleIOPersistentVolumeSource,\n \"V1ScaleIOVolumeSource\": v1ScaleIOVolumeSource_1.V1ScaleIOVolumeSource,\n \"V1ScaleSpec\": v1ScaleSpec_1.V1ScaleSpec,\n \"V1ScaleStatus\": v1ScaleStatus_1.V1ScaleStatus,\n \"V1Scheduling\": v1Scheduling_1.V1Scheduling,\n \"V1ScopeSelector\": v1ScopeSelector_1.V1ScopeSelector,\n \"V1ScopedResourceSelectorRequirement\": v1ScopedResourceSelectorRequirement_1.V1ScopedResourceSelectorRequirement,\n \"V1SeccompProfile\": v1SeccompProfile_1.V1SeccompProfile,\n \"V1Secret\": v1Secret_1.V1Secret,\n \"V1SecretEnvSource\": v1SecretEnvSource_1.V1SecretEnvSource,\n \"V1SecretKeySelector\": v1SecretKeySelector_1.V1SecretKeySelector,\n \"V1SecretList\": v1SecretList_1.V1SecretList,\n \"V1SecretProjection\": v1SecretProjection_1.V1SecretProjection,\n \"V1SecretReference\": v1SecretReference_1.V1SecretReference,\n \"V1SecretVolumeSource\": v1SecretVolumeSource_1.V1SecretVolumeSource,\n \"V1SecurityContext\": v1SecurityContext_1.V1SecurityContext,\n \"V1SelfSubjectAccessReview\": v1SelfSubjectAccessReview_1.V1SelfSubjectAccessReview,\n \"V1SelfSubjectAccessReviewSpec\": v1SelfSubjectAccessReviewSpec_1.V1SelfSubjectAccessReviewSpec,\n \"V1SelfSubjectRulesReview\": v1SelfSubjectRulesReview_1.V1SelfSubjectRulesReview,\n \"V1SelfSubjectRulesReviewSpec\": v1SelfSubjectRulesReviewSpec_1.V1SelfSubjectRulesReviewSpec,\n \"V1ServerAddressByClientCIDR\": v1ServerAddressByClientCIDR_1.V1ServerAddressByClientCIDR,\n \"V1Service\": v1Service_1.V1Service,\n \"V1ServiceAccount\": v1ServiceAccount_1.V1ServiceAccount,\n \"V1ServiceAccountList\": v1ServiceAccountList_1.V1ServiceAccountList,\n \"V1ServiceAccountTokenProjection\": v1ServiceAccountTokenProjection_1.V1ServiceAccountTokenProjection,\n \"V1ServiceBackendPort\": v1ServiceBackendPort_1.V1ServiceBackendPort,\n \"V1ServiceList\": v1ServiceList_1.V1ServiceList,\n \"V1ServicePort\": v1ServicePort_1.V1ServicePort,\n \"V1ServiceSpec\": v1ServiceSpec_1.V1ServiceSpec,\n \"V1ServiceStatus\": v1ServiceStatus_1.V1ServiceStatus,\n \"V1SessionAffinityConfig\": v1SessionAffinityConfig_1.V1SessionAffinityConfig,\n \"V1StatefulSet\": v1StatefulSet_1.V1StatefulSet,\n \"V1StatefulSetCondition\": v1StatefulSetCondition_1.V1StatefulSetCondition,\n \"V1StatefulSetList\": v1StatefulSetList_1.V1StatefulSetList,\n \"V1StatefulSetSpec\": v1StatefulSetSpec_1.V1StatefulSetSpec,\n \"V1StatefulSetStatus\": v1StatefulSetStatus_1.V1StatefulSetStatus,\n \"V1StatefulSetUpdateStrategy\": v1StatefulSetUpdateStrategy_1.V1StatefulSetUpdateStrategy,\n \"V1Status\": v1Status_1.V1Status,\n \"V1StatusCause\": v1StatusCause_1.V1StatusCause,\n \"V1StatusDetails\": v1StatusDetails_1.V1StatusDetails,\n \"V1StorageClass\": v1StorageClass_1.V1StorageClass,\n \"V1StorageClassList\": v1StorageClassList_1.V1StorageClassList,\n \"V1StorageOSPersistentVolumeSource\": v1StorageOSPersistentVolumeSource_1.V1StorageOSPersistentVolumeSource,\n \"V1StorageOSVolumeSource\": v1StorageOSVolumeSource_1.V1StorageOSVolumeSource,\n \"V1Subject\": v1Subject_1.V1Subject,\n \"V1SubjectAccessReview\": v1SubjectAccessReview_1.V1SubjectAccessReview,\n \"V1SubjectAccessReviewSpec\": v1SubjectAccessReviewSpec_1.V1SubjectAccessReviewSpec,\n \"V1SubjectAccessReviewStatus\": v1SubjectAccessReviewStatus_1.V1SubjectAccessReviewStatus,\n \"V1SubjectRulesReviewStatus\": v1SubjectRulesReviewStatus_1.V1SubjectRulesReviewStatus,\n \"V1Sysctl\": v1Sysctl_1.V1Sysctl,\n \"V1TCPSocketAction\": v1TCPSocketAction_1.V1TCPSocketAction,\n \"V1Taint\": v1Taint_1.V1Taint,\n \"V1TokenRequestSpec\": v1TokenRequestSpec_1.V1TokenRequestSpec,\n \"V1TokenRequestStatus\": v1TokenRequestStatus_1.V1TokenRequestStatus,\n \"V1TokenReview\": v1TokenReview_1.V1TokenReview,\n \"V1TokenReviewSpec\": v1TokenReviewSpec_1.V1TokenReviewSpec,\n \"V1TokenReviewStatus\": v1TokenReviewStatus_1.V1TokenReviewStatus,\n \"V1Toleration\": v1Toleration_1.V1Toleration,\n \"V1TopologySelectorLabelRequirement\": v1TopologySelectorLabelRequirement_1.V1TopologySelectorLabelRequirement,\n \"V1TopologySelectorTerm\": v1TopologySelectorTerm_1.V1TopologySelectorTerm,\n \"V1TopologySpreadConstraint\": v1TopologySpreadConstraint_1.V1TopologySpreadConstraint,\n \"V1TypedLocalObjectReference\": v1TypedLocalObjectReference_1.V1TypedLocalObjectReference,\n \"V1UncountedTerminatedPods\": v1UncountedTerminatedPods_1.V1UncountedTerminatedPods,\n \"V1UserInfo\": v1UserInfo_1.V1UserInfo,\n \"V1ValidatingWebhook\": v1ValidatingWebhook_1.V1ValidatingWebhook,\n \"V1ValidatingWebhookConfiguration\": v1ValidatingWebhookConfiguration_1.V1ValidatingWebhookConfiguration,\n \"V1ValidatingWebhookConfigurationList\": v1ValidatingWebhookConfigurationList_1.V1ValidatingWebhookConfigurationList,\n \"V1Volume\": v1Volume_1.V1Volume,\n \"V1VolumeAttachment\": v1VolumeAttachment_1.V1VolumeAttachment,\n \"V1VolumeAttachmentList\": v1VolumeAttachmentList_1.V1VolumeAttachmentList,\n \"V1VolumeAttachmentSource\": v1VolumeAttachmentSource_1.V1VolumeAttachmentSource,\n \"V1VolumeAttachmentSpec\": v1VolumeAttachmentSpec_1.V1VolumeAttachmentSpec,\n \"V1VolumeAttachmentStatus\": v1VolumeAttachmentStatus_1.V1VolumeAttachmentStatus,\n \"V1VolumeDevice\": v1VolumeDevice_1.V1VolumeDevice,\n \"V1VolumeError\": v1VolumeError_1.V1VolumeError,\n \"V1VolumeMount\": v1VolumeMount_1.V1VolumeMount,\n \"V1VolumeNodeAffinity\": v1VolumeNodeAffinity_1.V1VolumeNodeAffinity,\n \"V1VolumeNodeResources\": v1VolumeNodeResources_1.V1VolumeNodeResources,\n \"V1VolumeProjection\": v1VolumeProjection_1.V1VolumeProjection,\n \"V1VsphereVirtualDiskVolumeSource\": v1VsphereVirtualDiskVolumeSource_1.V1VsphereVirtualDiskVolumeSource,\n \"V1WatchEvent\": v1WatchEvent_1.V1WatchEvent,\n \"V1WebhookConversion\": v1WebhookConversion_1.V1WebhookConversion,\n \"V1WeightedPodAffinityTerm\": v1WeightedPodAffinityTerm_1.V1WeightedPodAffinityTerm,\n \"V1WindowsSecurityContextOptions\": v1WindowsSecurityContextOptions_1.V1WindowsSecurityContextOptions,\n \"V1alpha1AggregationRule\": v1alpha1AggregationRule_1.V1alpha1AggregationRule,\n \"V1alpha1CSIStorageCapacity\": v1alpha1CSIStorageCapacity_1.V1alpha1CSIStorageCapacity,\n \"V1alpha1CSIStorageCapacityList\": v1alpha1CSIStorageCapacityList_1.V1alpha1CSIStorageCapacityList,\n \"V1alpha1ClusterRole\": v1alpha1ClusterRole_1.V1alpha1ClusterRole,\n \"V1alpha1ClusterRoleBinding\": v1alpha1ClusterRoleBinding_1.V1alpha1ClusterRoleBinding,\n \"V1alpha1ClusterRoleBindingList\": v1alpha1ClusterRoleBindingList_1.V1alpha1ClusterRoleBindingList,\n \"V1alpha1ClusterRoleList\": v1alpha1ClusterRoleList_1.V1alpha1ClusterRoleList,\n \"V1alpha1Overhead\": v1alpha1Overhead_1.V1alpha1Overhead,\n \"V1alpha1PolicyRule\": v1alpha1PolicyRule_1.V1alpha1PolicyRule,\n \"V1alpha1PriorityClass\": v1alpha1PriorityClass_1.V1alpha1PriorityClass,\n \"V1alpha1PriorityClassList\": v1alpha1PriorityClassList_1.V1alpha1PriorityClassList,\n \"V1alpha1Role\": v1alpha1Role_1.V1alpha1Role,\n \"V1alpha1RoleBinding\": v1alpha1RoleBinding_1.V1alpha1RoleBinding,\n \"V1alpha1RoleBindingList\": v1alpha1RoleBindingList_1.V1alpha1RoleBindingList,\n \"V1alpha1RoleList\": v1alpha1RoleList_1.V1alpha1RoleList,\n \"V1alpha1RoleRef\": v1alpha1RoleRef_1.V1alpha1RoleRef,\n \"V1alpha1RuntimeClass\": v1alpha1RuntimeClass_1.V1alpha1RuntimeClass,\n \"V1alpha1RuntimeClassList\": v1alpha1RuntimeClassList_1.V1alpha1RuntimeClassList,\n \"V1alpha1RuntimeClassSpec\": v1alpha1RuntimeClassSpec_1.V1alpha1RuntimeClassSpec,\n \"V1alpha1Scheduling\": v1alpha1Scheduling_1.V1alpha1Scheduling,\n \"V1alpha1ServerStorageVersion\": v1alpha1ServerStorageVersion_1.V1alpha1ServerStorageVersion,\n \"V1alpha1StorageVersion\": v1alpha1StorageVersion_1.V1alpha1StorageVersion,\n \"V1alpha1StorageVersionCondition\": v1alpha1StorageVersionCondition_1.V1alpha1StorageVersionCondition,\n \"V1alpha1StorageVersionList\": v1alpha1StorageVersionList_1.V1alpha1StorageVersionList,\n \"V1alpha1StorageVersionStatus\": v1alpha1StorageVersionStatus_1.V1alpha1StorageVersionStatus,\n \"V1alpha1Subject\": v1alpha1Subject_1.V1alpha1Subject,\n \"V1alpha1VolumeAttachment\": v1alpha1VolumeAttachment_1.V1alpha1VolumeAttachment,\n \"V1alpha1VolumeAttachmentList\": v1alpha1VolumeAttachmentList_1.V1alpha1VolumeAttachmentList,\n \"V1alpha1VolumeAttachmentSource\": v1alpha1VolumeAttachmentSource_1.V1alpha1VolumeAttachmentSource,\n \"V1alpha1VolumeAttachmentSpec\": v1alpha1VolumeAttachmentSpec_1.V1alpha1VolumeAttachmentSpec,\n \"V1alpha1VolumeAttachmentStatus\": v1alpha1VolumeAttachmentStatus_1.V1alpha1VolumeAttachmentStatus,\n \"V1alpha1VolumeError\": v1alpha1VolumeError_1.V1alpha1VolumeError,\n \"V1beta1AllowedCSIDriver\": v1beta1AllowedCSIDriver_1.V1beta1AllowedCSIDriver,\n \"V1beta1AllowedFlexVolume\": v1beta1AllowedFlexVolume_1.V1beta1AllowedFlexVolume,\n \"V1beta1AllowedHostPath\": v1beta1AllowedHostPath_1.V1beta1AllowedHostPath,\n \"V1beta1CSIStorageCapacity\": v1beta1CSIStorageCapacity_1.V1beta1CSIStorageCapacity,\n \"V1beta1CSIStorageCapacityList\": v1beta1CSIStorageCapacityList_1.V1beta1CSIStorageCapacityList,\n \"V1beta1CronJob\": v1beta1CronJob_1.V1beta1CronJob,\n \"V1beta1CronJobList\": v1beta1CronJobList_1.V1beta1CronJobList,\n \"V1beta1CronJobSpec\": v1beta1CronJobSpec_1.V1beta1CronJobSpec,\n \"V1beta1CronJobStatus\": v1beta1CronJobStatus_1.V1beta1CronJobStatus,\n \"V1beta1Endpoint\": v1beta1Endpoint_1.V1beta1Endpoint,\n \"V1beta1EndpointConditions\": v1beta1EndpointConditions_1.V1beta1EndpointConditions,\n \"V1beta1EndpointHints\": v1beta1EndpointHints_1.V1beta1EndpointHints,\n \"V1beta1EndpointPort\": v1beta1EndpointPort_1.V1beta1EndpointPort,\n \"V1beta1EndpointSlice\": v1beta1EndpointSlice_1.V1beta1EndpointSlice,\n \"V1beta1EndpointSliceList\": v1beta1EndpointSliceList_1.V1beta1EndpointSliceList,\n \"V1beta1Event\": v1beta1Event_1.V1beta1Event,\n \"V1beta1EventList\": v1beta1EventList_1.V1beta1EventList,\n \"V1beta1EventSeries\": v1beta1EventSeries_1.V1beta1EventSeries,\n \"V1beta1FSGroupStrategyOptions\": v1beta1FSGroupStrategyOptions_1.V1beta1FSGroupStrategyOptions,\n \"V1beta1FlowDistinguisherMethod\": v1beta1FlowDistinguisherMethod_1.V1beta1FlowDistinguisherMethod,\n \"V1beta1FlowSchema\": v1beta1FlowSchema_1.V1beta1FlowSchema,\n \"V1beta1FlowSchemaCondition\": v1beta1FlowSchemaCondition_1.V1beta1FlowSchemaCondition,\n \"V1beta1FlowSchemaList\": v1beta1FlowSchemaList_1.V1beta1FlowSchemaList,\n \"V1beta1FlowSchemaSpec\": v1beta1FlowSchemaSpec_1.V1beta1FlowSchemaSpec,\n \"V1beta1FlowSchemaStatus\": v1beta1FlowSchemaStatus_1.V1beta1FlowSchemaStatus,\n \"V1beta1ForZone\": v1beta1ForZone_1.V1beta1ForZone,\n \"V1beta1GroupSubject\": v1beta1GroupSubject_1.V1beta1GroupSubject,\n \"V1beta1HostPortRange\": v1beta1HostPortRange_1.V1beta1HostPortRange,\n \"V1beta1IDRange\": v1beta1IDRange_1.V1beta1IDRange,\n \"V1beta1JobTemplateSpec\": v1beta1JobTemplateSpec_1.V1beta1JobTemplateSpec,\n \"V1beta1LimitResponse\": v1beta1LimitResponse_1.V1beta1LimitResponse,\n \"V1beta1LimitedPriorityLevelConfiguration\": v1beta1LimitedPriorityLevelConfiguration_1.V1beta1LimitedPriorityLevelConfiguration,\n \"V1beta1NonResourcePolicyRule\": v1beta1NonResourcePolicyRule_1.V1beta1NonResourcePolicyRule,\n \"V1beta1Overhead\": v1beta1Overhead_1.V1beta1Overhead,\n \"V1beta1PodDisruptionBudget\": v1beta1PodDisruptionBudget_1.V1beta1PodDisruptionBudget,\n \"V1beta1PodDisruptionBudgetList\": v1beta1PodDisruptionBudgetList_1.V1beta1PodDisruptionBudgetList,\n \"V1beta1PodDisruptionBudgetSpec\": v1beta1PodDisruptionBudgetSpec_1.V1beta1PodDisruptionBudgetSpec,\n \"V1beta1PodDisruptionBudgetStatus\": v1beta1PodDisruptionBudgetStatus_1.V1beta1PodDisruptionBudgetStatus,\n \"V1beta1PodSecurityPolicy\": v1beta1PodSecurityPolicy_1.V1beta1PodSecurityPolicy,\n \"V1beta1PodSecurityPolicyList\": v1beta1PodSecurityPolicyList_1.V1beta1PodSecurityPolicyList,\n \"V1beta1PodSecurityPolicySpec\": v1beta1PodSecurityPolicySpec_1.V1beta1PodSecurityPolicySpec,\n \"V1beta1PolicyRulesWithSubjects\": v1beta1PolicyRulesWithSubjects_1.V1beta1PolicyRulesWithSubjects,\n \"V1beta1PriorityLevelConfiguration\": v1beta1PriorityLevelConfiguration_1.V1beta1PriorityLevelConfiguration,\n \"V1beta1PriorityLevelConfigurationCondition\": v1beta1PriorityLevelConfigurationCondition_1.V1beta1PriorityLevelConfigurationCondition,\n \"V1beta1PriorityLevelConfigurationList\": v1beta1PriorityLevelConfigurationList_1.V1beta1PriorityLevelConfigurationList,\n \"V1beta1PriorityLevelConfigurationReference\": v1beta1PriorityLevelConfigurationReference_1.V1beta1PriorityLevelConfigurationReference,\n \"V1beta1PriorityLevelConfigurationSpec\": v1beta1PriorityLevelConfigurationSpec_1.V1beta1PriorityLevelConfigurationSpec,\n \"V1beta1PriorityLevelConfigurationStatus\": v1beta1PriorityLevelConfigurationStatus_1.V1beta1PriorityLevelConfigurationStatus,\n \"V1beta1QueuingConfiguration\": v1beta1QueuingConfiguration_1.V1beta1QueuingConfiguration,\n \"V1beta1ResourcePolicyRule\": v1beta1ResourcePolicyRule_1.V1beta1ResourcePolicyRule,\n \"V1beta1RunAsGroupStrategyOptions\": v1beta1RunAsGroupStrategyOptions_1.V1beta1RunAsGroupStrategyOptions,\n \"V1beta1RunAsUserStrategyOptions\": v1beta1RunAsUserStrategyOptions_1.V1beta1RunAsUserStrategyOptions,\n \"V1beta1RuntimeClass\": v1beta1RuntimeClass_1.V1beta1RuntimeClass,\n \"V1beta1RuntimeClassList\": v1beta1RuntimeClassList_1.V1beta1RuntimeClassList,\n \"V1beta1RuntimeClassStrategyOptions\": v1beta1RuntimeClassStrategyOptions_1.V1beta1RuntimeClassStrategyOptions,\n \"V1beta1SELinuxStrategyOptions\": v1beta1SELinuxStrategyOptions_1.V1beta1SELinuxStrategyOptions,\n \"V1beta1Scheduling\": v1beta1Scheduling_1.V1beta1Scheduling,\n \"V1beta1ServiceAccountSubject\": v1beta1ServiceAccountSubject_1.V1beta1ServiceAccountSubject,\n \"V1beta1Subject\": v1beta1Subject_1.V1beta1Subject,\n \"V1beta1SupplementalGroupsStrategyOptions\": v1beta1SupplementalGroupsStrategyOptions_1.V1beta1SupplementalGroupsStrategyOptions,\n \"V1beta1UserSubject\": v1beta1UserSubject_1.V1beta1UserSubject,\n \"V2beta1ContainerResourceMetricSource\": v2beta1ContainerResourceMetricSource_1.V2beta1ContainerResourceMetricSource,\n \"V2beta1ContainerResourceMetricStatus\": v2beta1ContainerResourceMetricStatus_1.V2beta1ContainerResourceMetricStatus,\n \"V2beta1CrossVersionObjectReference\": v2beta1CrossVersionObjectReference_1.V2beta1CrossVersionObjectReference,\n \"V2beta1ExternalMetricSource\": v2beta1ExternalMetricSource_1.V2beta1ExternalMetricSource,\n \"V2beta1ExternalMetricStatus\": v2beta1ExternalMetricStatus_1.V2beta1ExternalMetricStatus,\n \"V2beta1HorizontalPodAutoscaler\": v2beta1HorizontalPodAutoscaler_1.V2beta1HorizontalPodAutoscaler,\n \"V2beta1HorizontalPodAutoscalerCondition\": v2beta1HorizontalPodAutoscalerCondition_1.V2beta1HorizontalPodAutoscalerCondition,\n \"V2beta1HorizontalPodAutoscalerList\": v2beta1HorizontalPodAutoscalerList_1.V2beta1HorizontalPodAutoscalerList,\n \"V2beta1HorizontalPodAutoscalerSpec\": v2beta1HorizontalPodAutoscalerSpec_1.V2beta1HorizontalPodAutoscalerSpec,\n \"V2beta1HorizontalPodAutoscalerStatus\": v2beta1HorizontalPodAutoscalerStatus_1.V2beta1HorizontalPodAutoscalerStatus,\n \"V2beta1MetricSpec\": v2beta1MetricSpec_1.V2beta1MetricSpec,\n \"V2beta1MetricStatus\": v2beta1MetricStatus_1.V2beta1MetricStatus,\n \"V2beta1ObjectMetricSource\": v2beta1ObjectMetricSource_1.V2beta1ObjectMetricSource,\n \"V2beta1ObjectMetricStatus\": v2beta1ObjectMetricStatus_1.V2beta1ObjectMetricStatus,\n \"V2beta1PodsMetricSource\": v2beta1PodsMetricSource_1.V2beta1PodsMetricSource,\n \"V2beta1PodsMetricStatus\": v2beta1PodsMetricStatus_1.V2beta1PodsMetricStatus,\n \"V2beta1ResourceMetricSource\": v2beta1ResourceMetricSource_1.V2beta1ResourceMetricSource,\n \"V2beta1ResourceMetricStatus\": v2beta1ResourceMetricStatus_1.V2beta1ResourceMetricStatus,\n \"V2beta2ContainerResourceMetricSource\": v2beta2ContainerResourceMetricSource_1.V2beta2ContainerResourceMetricSource,\n \"V2beta2ContainerResourceMetricStatus\": v2beta2ContainerResourceMetricStatus_1.V2beta2ContainerResourceMetricStatus,\n \"V2beta2CrossVersionObjectReference\": v2beta2CrossVersionObjectReference_1.V2beta2CrossVersionObjectReference,\n \"V2beta2ExternalMetricSource\": v2beta2ExternalMetricSource_1.V2beta2ExternalMetricSource,\n \"V2beta2ExternalMetricStatus\": v2beta2ExternalMetricStatus_1.V2beta2ExternalMetricStatus,\n \"V2beta2HPAScalingPolicy\": v2beta2HPAScalingPolicy_1.V2beta2HPAScalingPolicy,\n \"V2beta2HPAScalingRules\": v2beta2HPAScalingRules_1.V2beta2HPAScalingRules,\n \"V2beta2HorizontalPodAutoscaler\": v2beta2HorizontalPodAutoscaler_1.V2beta2HorizontalPodAutoscaler,\n \"V2beta2HorizontalPodAutoscalerBehavior\": v2beta2HorizontalPodAutoscalerBehavior_1.V2beta2HorizontalPodAutoscalerBehavior,\n \"V2beta2HorizontalPodAutoscalerCondition\": v2beta2HorizontalPodAutoscalerCondition_1.V2beta2HorizontalPodAutoscalerCondition,\n \"V2beta2HorizontalPodAutoscalerList\": v2beta2HorizontalPodAutoscalerList_1.V2beta2HorizontalPodAutoscalerList,\n \"V2beta2HorizontalPodAutoscalerSpec\": v2beta2HorizontalPodAutoscalerSpec_1.V2beta2HorizontalPodAutoscalerSpec,\n \"V2beta2HorizontalPodAutoscalerStatus\": v2beta2HorizontalPodAutoscalerStatus_1.V2beta2HorizontalPodAutoscalerStatus,\n \"V2beta2MetricIdentifier\": v2beta2MetricIdentifier_1.V2beta2MetricIdentifier,\n \"V2beta2MetricSpec\": v2beta2MetricSpec_1.V2beta2MetricSpec,\n \"V2beta2MetricStatus\": v2beta2MetricStatus_1.V2beta2MetricStatus,\n \"V2beta2MetricTarget\": v2beta2MetricTarget_1.V2beta2MetricTarget,\n \"V2beta2MetricValueStatus\": v2beta2MetricValueStatus_1.V2beta2MetricValueStatus,\n \"V2beta2ObjectMetricSource\": v2beta2ObjectMetricSource_1.V2beta2ObjectMetricSource,\n \"V2beta2ObjectMetricStatus\": v2beta2ObjectMetricStatus_1.V2beta2ObjectMetricStatus,\n \"V2beta2PodsMetricSource\": v2beta2PodsMetricSource_1.V2beta2PodsMetricSource,\n \"V2beta2PodsMetricStatus\": v2beta2PodsMetricStatus_1.V2beta2PodsMetricStatus,\n \"V2beta2ResourceMetricSource\": v2beta2ResourceMetricSource_1.V2beta2ResourceMetricSource,\n \"V2beta2ResourceMetricStatus\": v2beta2ResourceMetricStatus_1.V2beta2ResourceMetricStatus,\n \"VersionInfo\": versionInfo_1.VersionInfo,\n};\nclass ObjectSerializer {\n static findCorrectType(data, expectedType) {\n if (data == undefined) {\n return expectedType;\n }\n else if (primitives.indexOf(expectedType.toLowerCase()) !== -1) {\n return expectedType;\n }\n else if (expectedType === \"Date\") {\n return expectedType;\n }\n else {\n if (enumsMap[expectedType]) {\n return expectedType;\n }\n if (!typeMap[expectedType]) {\n return expectedType; // w/e we don't know the type\n }\n // Check the discriminator\n let discriminatorProperty = typeMap[expectedType].discriminator;\n if (discriminatorProperty == null) {\n return expectedType; // the type does not have a discriminator. use it.\n }\n else {\n if (data[discriminatorProperty]) {\n var discriminatorType = data[discriminatorProperty];\n if (typeMap[discriminatorType]) {\n return discriminatorType; // use the type given in the discriminator\n }\n else {\n return expectedType; // discriminator did not map to a type\n }\n }\n else {\n return expectedType; // discriminator was not present (or an empty string)\n }\n }\n }\n }\n static serialize(data, type) {\n if (data == undefined) {\n return data;\n }\n else if (primitives.indexOf(type.toLowerCase()) !== -1) {\n return data;\n }\n else if (type.lastIndexOf(\"Array<\", 0) === 0) { // string.startsWith pre es6\n let subType = type.replace(\"Array<\", \"\"); // Array => Type>\n subType = subType.substring(0, subType.length - 1); // Type> => Type\n let transformedData = [];\n for (let index = 0; index < data.length; index++) {\n let datum = data[index];\n transformedData.push(ObjectSerializer.serialize(datum, subType));\n }\n return transformedData;\n }\n else if (type === \"Date\") {\n return data.toISOString();\n }\n else {\n if (enumsMap[type]) {\n return data;\n }\n if (!typeMap[type]) { // in case we dont know the type\n return data;\n }\n // Get the actual type of this object\n type = this.findCorrectType(data, type);\n // get the map for the correct type.\n let attributeTypes = typeMap[type].getAttributeTypeMap();\n let instance = {};\n for (let index = 0; index < attributeTypes.length; index++) {\n let attributeType = attributeTypes[index];\n instance[attributeType.baseName] = ObjectSerializer.serialize(data[attributeType.name], attributeType.type);\n }\n return instance;\n }\n }\n static deserialize(data, type) {\n // polymorphism may change the actual type.\n type = ObjectSerializer.findCorrectType(data, type);\n if (data == undefined) {\n return data;\n }\n else if (primitives.indexOf(type.toLowerCase()) !== -1) {\n return data;\n }\n else if (type.lastIndexOf(\"Array<\", 0) === 0) { // string.startsWith pre es6\n let subType = type.replace(\"Array<\", \"\"); // Array => Type>\n subType = subType.substring(0, subType.length - 1); // Type> => Type\n let transformedData = [];\n for (let index = 0; index < data.length; index++) {\n let datum = data[index];\n transformedData.push(ObjectSerializer.deserialize(datum, subType));\n }\n return transformedData;\n }\n else if (type === \"Date\") {\n return new Date(data);\n }\n else {\n if (enumsMap[type]) { // is Enum\n return data;\n }\n if (!typeMap[type]) { // dont know the type\n return data;\n }\n let instance = new typeMap[type]();\n let attributeTypes = typeMap[type].getAttributeTypeMap();\n for (let index = 0; index < attributeTypes.length; index++) {\n let attributeType = attributeTypes[index];\n instance[attributeType.name] = ObjectSerializer.deserialize(data[attributeType.baseName], attributeType.type);\n }\n return instance;\n }\n }\n}\nexports.ObjectSerializer = ObjectSerializer;\nclass HttpBasicAuth {\n constructor() {\n this.username = '';\n this.password = '';\n }\n applyToRequest(requestOptions) {\n requestOptions.auth = {\n username: this.username, password: this.password\n };\n }\n}\nexports.HttpBasicAuth = HttpBasicAuth;\nclass HttpBearerAuth {\n constructor() {\n this.accessToken = '';\n }\n applyToRequest(requestOptions) {\n if (requestOptions && requestOptions.headers) {\n const accessToken = typeof this.accessToken === 'function'\n ? this.accessToken()\n : this.accessToken;\n requestOptions.headers[\"Authorization\"] = \"Bearer \" + accessToken;\n }\n }\n}\nexports.HttpBearerAuth = HttpBearerAuth;\nclass ApiKeyAuth {\n constructor(location, paramName) {\n this.location = location;\n this.paramName = paramName;\n this.apiKey = '';\n }\n applyToRequest(requestOptions) {\n if (this.location == \"query\") {\n requestOptions.qs[this.paramName] = this.apiKey;\n }\n else if (this.location == \"header\" && requestOptions && requestOptions.headers) {\n requestOptions.headers[this.paramName] = this.apiKey;\n }\n else if (this.location == 'cookie' && requestOptions && requestOptions.headers) {\n if (requestOptions.headers['Cookie']) {\n requestOptions.headers['Cookie'] += '; ' + this.paramName + '=' + encodeURIComponent(this.apiKey);\n }\n else {\n requestOptions.headers['Cookie'] = this.paramName + '=' + encodeURIComponent(this.apiKey);\n }\n }\n }\n}\nexports.ApiKeyAuth = ApiKeyAuth;\nclass OAuth {\n constructor() {\n this.accessToken = '';\n }\n applyToRequest(requestOptions) {\n if (requestOptions && requestOptions.headers) {\n requestOptions.headers[\"Authorization\"] = \"Bearer \" + this.accessToken;\n }\n }\n}\nexports.OAuth = OAuth;\nclass VoidAuth {\n constructor() {\n this.username = '';\n this.password = '';\n }\n applyToRequest(_) {\n // Do nothing\n }\n}\nexports.VoidAuth = VoidAuth;\n//# sourceMappingURL=models.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.StorageV1TokenRequest = void 0;\n/**\n* TokenRequest contains parameters of a service account token.\n*/\nclass StorageV1TokenRequest {\n static getAttributeTypeMap() {\n return StorageV1TokenRequest.attributeTypeMap;\n }\n}\nexports.StorageV1TokenRequest = StorageV1TokenRequest;\nStorageV1TokenRequest.discriminator = undefined;\nStorageV1TokenRequest.attributeTypeMap = [\n {\n \"name\": \"audience\",\n \"baseName\": \"audience\",\n \"type\": \"string\"\n },\n {\n \"name\": \"expirationSeconds\",\n \"baseName\": \"expirationSeconds\",\n \"type\": \"number\"\n }\n];\n//# sourceMappingURL=storageV1TokenRequest.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1APIGroup = void 0;\n/**\n* APIGroup contains the name, the supported versions, and the preferred version of a group.\n*/\nclass V1APIGroup {\n static getAttributeTypeMap() {\n return V1APIGroup.attributeTypeMap;\n }\n}\nexports.V1APIGroup = V1APIGroup;\nV1APIGroup.discriminator = undefined;\nV1APIGroup.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"name\",\n \"baseName\": \"name\",\n \"type\": \"string\"\n },\n {\n \"name\": \"preferredVersion\",\n \"baseName\": \"preferredVersion\",\n \"type\": \"V1GroupVersionForDiscovery\"\n },\n {\n \"name\": \"serverAddressByClientCIDRs\",\n \"baseName\": \"serverAddressByClientCIDRs\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"versions\",\n \"baseName\": \"versions\",\n \"type\": \"Array\"\n }\n];\n//# sourceMappingURL=v1APIGroup.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1APIGroupList = void 0;\n/**\n* APIGroupList is a list of APIGroup, to allow clients to discover the API at /apis.\n*/\nclass V1APIGroupList {\n static getAttributeTypeMap() {\n return V1APIGroupList.attributeTypeMap;\n }\n}\nexports.V1APIGroupList = V1APIGroupList;\nV1APIGroupList.discriminator = undefined;\nV1APIGroupList.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"groups\",\n \"baseName\": \"groups\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n }\n];\n//# sourceMappingURL=v1APIGroupList.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1APIResource = void 0;\n/**\n* APIResource specifies the name of a resource and whether it is namespaced.\n*/\nclass V1APIResource {\n static getAttributeTypeMap() {\n return V1APIResource.attributeTypeMap;\n }\n}\nexports.V1APIResource = V1APIResource;\nV1APIResource.discriminator = undefined;\nV1APIResource.attributeTypeMap = [\n {\n \"name\": \"categories\",\n \"baseName\": \"categories\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"group\",\n \"baseName\": \"group\",\n \"type\": \"string\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"name\",\n \"baseName\": \"name\",\n \"type\": \"string\"\n },\n {\n \"name\": \"namespaced\",\n \"baseName\": \"namespaced\",\n \"type\": \"boolean\"\n },\n {\n \"name\": \"shortNames\",\n \"baseName\": \"shortNames\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"singularName\",\n \"baseName\": \"singularName\",\n \"type\": \"string\"\n },\n {\n \"name\": \"storageVersionHash\",\n \"baseName\": \"storageVersionHash\",\n \"type\": \"string\"\n },\n {\n \"name\": \"verbs\",\n \"baseName\": \"verbs\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"version\",\n \"baseName\": \"version\",\n \"type\": \"string\"\n }\n];\n//# sourceMappingURL=v1APIResource.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1APIResourceList = void 0;\n/**\n* 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.\n*/\nclass V1APIResourceList {\n static getAttributeTypeMap() {\n return V1APIResourceList.attributeTypeMap;\n }\n}\nexports.V1APIResourceList = V1APIResourceList;\nV1APIResourceList.discriminator = undefined;\nV1APIResourceList.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"groupVersion\",\n \"baseName\": \"groupVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"resources\",\n \"baseName\": \"resources\",\n \"type\": \"Array\"\n }\n];\n//# sourceMappingURL=v1APIResourceList.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1APIService = void 0;\n/**\n* APIService represents a server for a particular GroupVersion. Name must be \\\"version.group\\\".\n*/\nclass V1APIService {\n static getAttributeTypeMap() {\n return V1APIService.attributeTypeMap;\n }\n}\nexports.V1APIService = V1APIService;\nV1APIService.discriminator = undefined;\nV1APIService.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ObjectMeta\"\n },\n {\n \"name\": \"spec\",\n \"baseName\": \"spec\",\n \"type\": \"V1APIServiceSpec\"\n },\n {\n \"name\": \"status\",\n \"baseName\": \"status\",\n \"type\": \"V1APIServiceStatus\"\n }\n];\n//# sourceMappingURL=v1APIService.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1APIServiceCondition = void 0;\n/**\n* APIServiceCondition describes the state of an APIService at a particular point\n*/\nclass V1APIServiceCondition {\n static getAttributeTypeMap() {\n return V1APIServiceCondition.attributeTypeMap;\n }\n}\nexports.V1APIServiceCondition = V1APIServiceCondition;\nV1APIServiceCondition.discriminator = undefined;\nV1APIServiceCondition.attributeTypeMap = [\n {\n \"name\": \"lastTransitionTime\",\n \"baseName\": \"lastTransitionTime\",\n \"type\": \"Date\"\n },\n {\n \"name\": \"message\",\n \"baseName\": \"message\",\n \"type\": \"string\"\n },\n {\n \"name\": \"reason\",\n \"baseName\": \"reason\",\n \"type\": \"string\"\n },\n {\n \"name\": \"status\",\n \"baseName\": \"status\",\n \"type\": \"string\"\n },\n {\n \"name\": \"type\",\n \"baseName\": \"type\",\n \"type\": \"string\"\n }\n];\n//# sourceMappingURL=v1APIServiceCondition.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1APIServiceList = void 0;\n/**\n* APIServiceList is a list of APIService objects.\n*/\nclass V1APIServiceList {\n static getAttributeTypeMap() {\n return V1APIServiceList.attributeTypeMap;\n }\n}\nexports.V1APIServiceList = V1APIServiceList;\nV1APIServiceList.discriminator = undefined;\nV1APIServiceList.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"items\",\n \"baseName\": \"items\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ListMeta\"\n }\n];\n//# sourceMappingURL=v1APIServiceList.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1APIServiceSpec = void 0;\n/**\n* APIServiceSpec contains information for locating and communicating with a server. Only https is supported, though you are able to disable certificate verification.\n*/\nclass V1APIServiceSpec {\n static getAttributeTypeMap() {\n return V1APIServiceSpec.attributeTypeMap;\n }\n}\nexports.V1APIServiceSpec = V1APIServiceSpec;\nV1APIServiceSpec.discriminator = undefined;\nV1APIServiceSpec.attributeTypeMap = [\n {\n \"name\": \"caBundle\",\n \"baseName\": \"caBundle\",\n \"type\": \"string\"\n },\n {\n \"name\": \"group\",\n \"baseName\": \"group\",\n \"type\": \"string\"\n },\n {\n \"name\": \"groupPriorityMinimum\",\n \"baseName\": \"groupPriorityMinimum\",\n \"type\": \"number\"\n },\n {\n \"name\": \"insecureSkipTLSVerify\",\n \"baseName\": \"insecureSkipTLSVerify\",\n \"type\": \"boolean\"\n },\n {\n \"name\": \"service\",\n \"baseName\": \"service\",\n \"type\": \"ApiregistrationV1ServiceReference\"\n },\n {\n \"name\": \"version\",\n \"baseName\": \"version\",\n \"type\": \"string\"\n },\n {\n \"name\": \"versionPriority\",\n \"baseName\": \"versionPriority\",\n \"type\": \"number\"\n }\n];\n//# sourceMappingURL=v1APIServiceSpec.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1APIServiceStatus = void 0;\n/**\n* APIServiceStatus contains derived information about an API server\n*/\nclass V1APIServiceStatus {\n static getAttributeTypeMap() {\n return V1APIServiceStatus.attributeTypeMap;\n }\n}\nexports.V1APIServiceStatus = V1APIServiceStatus;\nV1APIServiceStatus.discriminator = undefined;\nV1APIServiceStatus.attributeTypeMap = [\n {\n \"name\": \"conditions\",\n \"baseName\": \"conditions\",\n \"type\": \"Array\"\n }\n];\n//# sourceMappingURL=v1APIServiceStatus.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1APIVersions = void 0;\n/**\n* 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.\n*/\nclass V1APIVersions {\n static getAttributeTypeMap() {\n return V1APIVersions.attributeTypeMap;\n }\n}\nexports.V1APIVersions = V1APIVersions;\nV1APIVersions.discriminator = undefined;\nV1APIVersions.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"serverAddressByClientCIDRs\",\n \"baseName\": \"serverAddressByClientCIDRs\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"versions\",\n \"baseName\": \"versions\",\n \"type\": \"Array\"\n }\n];\n//# sourceMappingURL=v1APIVersions.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1AWSElasticBlockStoreVolumeSource = void 0;\n/**\n* 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.\n*/\nclass V1AWSElasticBlockStoreVolumeSource {\n static getAttributeTypeMap() {\n return V1AWSElasticBlockStoreVolumeSource.attributeTypeMap;\n }\n}\nexports.V1AWSElasticBlockStoreVolumeSource = V1AWSElasticBlockStoreVolumeSource;\nV1AWSElasticBlockStoreVolumeSource.discriminator = undefined;\nV1AWSElasticBlockStoreVolumeSource.attributeTypeMap = [\n {\n \"name\": \"fsType\",\n \"baseName\": \"fsType\",\n \"type\": \"string\"\n },\n {\n \"name\": \"partition\",\n \"baseName\": \"partition\",\n \"type\": \"number\"\n },\n {\n \"name\": \"readOnly\",\n \"baseName\": \"readOnly\",\n \"type\": \"boolean\"\n },\n {\n \"name\": \"volumeID\",\n \"baseName\": \"volumeID\",\n \"type\": \"string\"\n }\n];\n//# sourceMappingURL=v1AWSElasticBlockStoreVolumeSource.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1Affinity = void 0;\n/**\n* Affinity is a group of affinity scheduling rules.\n*/\nclass V1Affinity {\n static getAttributeTypeMap() {\n return V1Affinity.attributeTypeMap;\n }\n}\nexports.V1Affinity = V1Affinity;\nV1Affinity.discriminator = undefined;\nV1Affinity.attributeTypeMap = [\n {\n \"name\": \"nodeAffinity\",\n \"baseName\": \"nodeAffinity\",\n \"type\": \"V1NodeAffinity\"\n },\n {\n \"name\": \"podAffinity\",\n \"baseName\": \"podAffinity\",\n \"type\": \"V1PodAffinity\"\n },\n {\n \"name\": \"podAntiAffinity\",\n \"baseName\": \"podAntiAffinity\",\n \"type\": \"V1PodAntiAffinity\"\n }\n];\n//# sourceMappingURL=v1Affinity.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1AggregationRule = void 0;\n/**\n* AggregationRule describes how to locate ClusterRoles to aggregate into the ClusterRole\n*/\nclass V1AggregationRule {\n static getAttributeTypeMap() {\n return V1AggregationRule.attributeTypeMap;\n }\n}\nexports.V1AggregationRule = V1AggregationRule;\nV1AggregationRule.discriminator = undefined;\nV1AggregationRule.attributeTypeMap = [\n {\n \"name\": \"clusterRoleSelectors\",\n \"baseName\": \"clusterRoleSelectors\",\n \"type\": \"Array\"\n }\n];\n//# sourceMappingURL=v1AggregationRule.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1AttachedVolume = void 0;\n/**\n* AttachedVolume describes a volume attached to a node\n*/\nclass V1AttachedVolume {\n static getAttributeTypeMap() {\n return V1AttachedVolume.attributeTypeMap;\n }\n}\nexports.V1AttachedVolume = V1AttachedVolume;\nV1AttachedVolume.discriminator = undefined;\nV1AttachedVolume.attributeTypeMap = [\n {\n \"name\": \"devicePath\",\n \"baseName\": \"devicePath\",\n \"type\": \"string\"\n },\n {\n \"name\": \"name\",\n \"baseName\": \"name\",\n \"type\": \"string\"\n }\n];\n//# sourceMappingURL=v1AttachedVolume.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1AzureDiskVolumeSource = void 0;\n/**\n* AzureDisk represents an Azure Data Disk mount on the host and bind mount to the pod.\n*/\nclass V1AzureDiskVolumeSource {\n static getAttributeTypeMap() {\n return V1AzureDiskVolumeSource.attributeTypeMap;\n }\n}\nexports.V1AzureDiskVolumeSource = V1AzureDiskVolumeSource;\nV1AzureDiskVolumeSource.discriminator = undefined;\nV1AzureDiskVolumeSource.attributeTypeMap = [\n {\n \"name\": \"cachingMode\",\n \"baseName\": \"cachingMode\",\n \"type\": \"string\"\n },\n {\n \"name\": \"diskName\",\n \"baseName\": \"diskName\",\n \"type\": \"string\"\n },\n {\n \"name\": \"diskURI\",\n \"baseName\": \"diskURI\",\n \"type\": \"string\"\n },\n {\n \"name\": \"fsType\",\n \"baseName\": \"fsType\",\n \"type\": \"string\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"readOnly\",\n \"baseName\": \"readOnly\",\n \"type\": \"boolean\"\n }\n];\n//# sourceMappingURL=v1AzureDiskVolumeSource.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1AzureFilePersistentVolumeSource = void 0;\n/**\n* AzureFile represents an Azure File Service mount on the host and bind mount to the pod.\n*/\nclass V1AzureFilePersistentVolumeSource {\n static getAttributeTypeMap() {\n return V1AzureFilePersistentVolumeSource.attributeTypeMap;\n }\n}\nexports.V1AzureFilePersistentVolumeSource = V1AzureFilePersistentVolumeSource;\nV1AzureFilePersistentVolumeSource.discriminator = undefined;\nV1AzureFilePersistentVolumeSource.attributeTypeMap = [\n {\n \"name\": \"readOnly\",\n \"baseName\": \"readOnly\",\n \"type\": \"boolean\"\n },\n {\n \"name\": \"secretName\",\n \"baseName\": \"secretName\",\n \"type\": \"string\"\n },\n {\n \"name\": \"secretNamespace\",\n \"baseName\": \"secretNamespace\",\n \"type\": \"string\"\n },\n {\n \"name\": \"shareName\",\n \"baseName\": \"shareName\",\n \"type\": \"string\"\n }\n];\n//# sourceMappingURL=v1AzureFilePersistentVolumeSource.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1AzureFileVolumeSource = void 0;\n/**\n* AzureFile represents an Azure File Service mount on the host and bind mount to the pod.\n*/\nclass V1AzureFileVolumeSource {\n static getAttributeTypeMap() {\n return V1AzureFileVolumeSource.attributeTypeMap;\n }\n}\nexports.V1AzureFileVolumeSource = V1AzureFileVolumeSource;\nV1AzureFileVolumeSource.discriminator = undefined;\nV1AzureFileVolumeSource.attributeTypeMap = [\n {\n \"name\": \"readOnly\",\n \"baseName\": \"readOnly\",\n \"type\": \"boolean\"\n },\n {\n \"name\": \"secretName\",\n \"baseName\": \"secretName\",\n \"type\": \"string\"\n },\n {\n \"name\": \"shareName\",\n \"baseName\": \"shareName\",\n \"type\": \"string\"\n }\n];\n//# sourceMappingURL=v1AzureFileVolumeSource.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1Binding = void 0;\n/**\n* 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.\n*/\nclass V1Binding {\n static getAttributeTypeMap() {\n return V1Binding.attributeTypeMap;\n }\n}\nexports.V1Binding = V1Binding;\nV1Binding.discriminator = undefined;\nV1Binding.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ObjectMeta\"\n },\n {\n \"name\": \"target\",\n \"baseName\": \"target\",\n \"type\": \"V1ObjectReference\"\n }\n];\n//# sourceMappingURL=v1Binding.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1BoundObjectReference = void 0;\n/**\n* BoundObjectReference is a reference to an object that a token is bound to.\n*/\nclass V1BoundObjectReference {\n static getAttributeTypeMap() {\n return V1BoundObjectReference.attributeTypeMap;\n }\n}\nexports.V1BoundObjectReference = V1BoundObjectReference;\nV1BoundObjectReference.discriminator = undefined;\nV1BoundObjectReference.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"name\",\n \"baseName\": \"name\",\n \"type\": \"string\"\n },\n {\n \"name\": \"uid\",\n \"baseName\": \"uid\",\n \"type\": \"string\"\n }\n];\n//# sourceMappingURL=v1BoundObjectReference.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1CSIDriver = void 0;\n/**\n* 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.\n*/\nclass V1CSIDriver {\n static getAttributeTypeMap() {\n return V1CSIDriver.attributeTypeMap;\n }\n}\nexports.V1CSIDriver = V1CSIDriver;\nV1CSIDriver.discriminator = undefined;\nV1CSIDriver.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ObjectMeta\"\n },\n {\n \"name\": \"spec\",\n \"baseName\": \"spec\",\n \"type\": \"V1CSIDriverSpec\"\n }\n];\n//# sourceMappingURL=v1CSIDriver.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1CSIDriverList = void 0;\n/**\n* CSIDriverList is a collection of CSIDriver objects.\n*/\nclass V1CSIDriverList {\n static getAttributeTypeMap() {\n return V1CSIDriverList.attributeTypeMap;\n }\n}\nexports.V1CSIDriverList = V1CSIDriverList;\nV1CSIDriverList.discriminator = undefined;\nV1CSIDriverList.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"items\",\n \"baseName\": \"items\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ListMeta\"\n }\n];\n//# sourceMappingURL=v1CSIDriverList.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1CSIDriverSpec = void 0;\n/**\n* CSIDriverSpec is the specification of a CSIDriver.\n*/\nclass V1CSIDriverSpec {\n static getAttributeTypeMap() {\n return V1CSIDriverSpec.attributeTypeMap;\n }\n}\nexports.V1CSIDriverSpec = V1CSIDriverSpec;\nV1CSIDriverSpec.discriminator = undefined;\nV1CSIDriverSpec.attributeTypeMap = [\n {\n \"name\": \"attachRequired\",\n \"baseName\": \"attachRequired\",\n \"type\": \"boolean\"\n },\n {\n \"name\": \"fsGroupPolicy\",\n \"baseName\": \"fsGroupPolicy\",\n \"type\": \"string\"\n },\n {\n \"name\": \"podInfoOnMount\",\n \"baseName\": \"podInfoOnMount\",\n \"type\": \"boolean\"\n },\n {\n \"name\": \"requiresRepublish\",\n \"baseName\": \"requiresRepublish\",\n \"type\": \"boolean\"\n },\n {\n \"name\": \"storageCapacity\",\n \"baseName\": \"storageCapacity\",\n \"type\": \"boolean\"\n },\n {\n \"name\": \"tokenRequests\",\n \"baseName\": \"tokenRequests\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"volumeLifecycleModes\",\n \"baseName\": \"volumeLifecycleModes\",\n \"type\": \"Array\"\n }\n];\n//# sourceMappingURL=v1CSIDriverSpec.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1CSINode = void 0;\n/**\n* 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.\n*/\nclass V1CSINode {\n static getAttributeTypeMap() {\n return V1CSINode.attributeTypeMap;\n }\n}\nexports.V1CSINode = V1CSINode;\nV1CSINode.discriminator = undefined;\nV1CSINode.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ObjectMeta\"\n },\n {\n \"name\": \"spec\",\n \"baseName\": \"spec\",\n \"type\": \"V1CSINodeSpec\"\n }\n];\n//# sourceMappingURL=v1CSINode.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1CSINodeDriver = void 0;\n/**\n* CSINodeDriver holds information about the specification of one CSI driver installed on a node\n*/\nclass V1CSINodeDriver {\n static getAttributeTypeMap() {\n return V1CSINodeDriver.attributeTypeMap;\n }\n}\nexports.V1CSINodeDriver = V1CSINodeDriver;\nV1CSINodeDriver.discriminator = undefined;\nV1CSINodeDriver.attributeTypeMap = [\n {\n \"name\": \"allocatable\",\n \"baseName\": \"allocatable\",\n \"type\": \"V1VolumeNodeResources\"\n },\n {\n \"name\": \"name\",\n \"baseName\": \"name\",\n \"type\": \"string\"\n },\n {\n \"name\": \"nodeID\",\n \"baseName\": \"nodeID\",\n \"type\": \"string\"\n },\n {\n \"name\": \"topologyKeys\",\n \"baseName\": \"topologyKeys\",\n \"type\": \"Array\"\n }\n];\n//# sourceMappingURL=v1CSINodeDriver.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1CSINodeList = void 0;\n/**\n* CSINodeList is a collection of CSINode objects.\n*/\nclass V1CSINodeList {\n static getAttributeTypeMap() {\n return V1CSINodeList.attributeTypeMap;\n }\n}\nexports.V1CSINodeList = V1CSINodeList;\nV1CSINodeList.discriminator = undefined;\nV1CSINodeList.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"items\",\n \"baseName\": \"items\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ListMeta\"\n }\n];\n//# sourceMappingURL=v1CSINodeList.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1CSINodeSpec = void 0;\n/**\n* CSINodeSpec holds information about the specification of all CSI drivers installed on a node\n*/\nclass V1CSINodeSpec {\n static getAttributeTypeMap() {\n return V1CSINodeSpec.attributeTypeMap;\n }\n}\nexports.V1CSINodeSpec = V1CSINodeSpec;\nV1CSINodeSpec.discriminator = undefined;\nV1CSINodeSpec.attributeTypeMap = [\n {\n \"name\": \"drivers\",\n \"baseName\": \"drivers\",\n \"type\": \"Array\"\n }\n];\n//# sourceMappingURL=v1CSINodeSpec.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1CSIPersistentVolumeSource = void 0;\n/**\n* Represents storage that is managed by an external CSI volume driver (Beta feature)\n*/\nclass V1CSIPersistentVolumeSource {\n static getAttributeTypeMap() {\n return V1CSIPersistentVolumeSource.attributeTypeMap;\n }\n}\nexports.V1CSIPersistentVolumeSource = V1CSIPersistentVolumeSource;\nV1CSIPersistentVolumeSource.discriminator = undefined;\nV1CSIPersistentVolumeSource.attributeTypeMap = [\n {\n \"name\": \"controllerExpandSecretRef\",\n \"baseName\": \"controllerExpandSecretRef\",\n \"type\": \"V1SecretReference\"\n },\n {\n \"name\": \"controllerPublishSecretRef\",\n \"baseName\": \"controllerPublishSecretRef\",\n \"type\": \"V1SecretReference\"\n },\n {\n \"name\": \"driver\",\n \"baseName\": \"driver\",\n \"type\": \"string\"\n },\n {\n \"name\": \"fsType\",\n \"baseName\": \"fsType\",\n \"type\": \"string\"\n },\n {\n \"name\": \"nodePublishSecretRef\",\n \"baseName\": \"nodePublishSecretRef\",\n \"type\": \"V1SecretReference\"\n },\n {\n \"name\": \"nodeStageSecretRef\",\n \"baseName\": \"nodeStageSecretRef\",\n \"type\": \"V1SecretReference\"\n },\n {\n \"name\": \"readOnly\",\n \"baseName\": \"readOnly\",\n \"type\": \"boolean\"\n },\n {\n \"name\": \"volumeAttributes\",\n \"baseName\": \"volumeAttributes\",\n \"type\": \"{ [key: string]: string; }\"\n },\n {\n \"name\": \"volumeHandle\",\n \"baseName\": \"volumeHandle\",\n \"type\": \"string\"\n }\n];\n//# sourceMappingURL=v1CSIPersistentVolumeSource.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1CSIVolumeSource = void 0;\n/**\n* Represents a source location of a volume to mount, managed by an external CSI driver\n*/\nclass V1CSIVolumeSource {\n static getAttributeTypeMap() {\n return V1CSIVolumeSource.attributeTypeMap;\n }\n}\nexports.V1CSIVolumeSource = V1CSIVolumeSource;\nV1CSIVolumeSource.discriminator = undefined;\nV1CSIVolumeSource.attributeTypeMap = [\n {\n \"name\": \"driver\",\n \"baseName\": \"driver\",\n \"type\": \"string\"\n },\n {\n \"name\": \"fsType\",\n \"baseName\": \"fsType\",\n \"type\": \"string\"\n },\n {\n \"name\": \"nodePublishSecretRef\",\n \"baseName\": \"nodePublishSecretRef\",\n \"type\": \"V1LocalObjectReference\"\n },\n {\n \"name\": \"readOnly\",\n \"baseName\": \"readOnly\",\n \"type\": \"boolean\"\n },\n {\n \"name\": \"volumeAttributes\",\n \"baseName\": \"volumeAttributes\",\n \"type\": \"{ [key: string]: string; }\"\n }\n];\n//# sourceMappingURL=v1CSIVolumeSource.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1Capabilities = void 0;\n/**\n* Adds and removes POSIX capabilities from running containers.\n*/\nclass V1Capabilities {\n static getAttributeTypeMap() {\n return V1Capabilities.attributeTypeMap;\n }\n}\nexports.V1Capabilities = V1Capabilities;\nV1Capabilities.discriminator = undefined;\nV1Capabilities.attributeTypeMap = [\n {\n \"name\": \"add\",\n \"baseName\": \"add\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"drop\",\n \"baseName\": \"drop\",\n \"type\": \"Array\"\n }\n];\n//# sourceMappingURL=v1Capabilities.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1CephFSPersistentVolumeSource = void 0;\n/**\n* Represents a Ceph Filesystem mount that lasts the lifetime of a pod Cephfs volumes do not support ownership management or SELinux relabeling.\n*/\nclass V1CephFSPersistentVolumeSource {\n static getAttributeTypeMap() {\n return V1CephFSPersistentVolumeSource.attributeTypeMap;\n }\n}\nexports.V1CephFSPersistentVolumeSource = V1CephFSPersistentVolumeSource;\nV1CephFSPersistentVolumeSource.discriminator = undefined;\nV1CephFSPersistentVolumeSource.attributeTypeMap = [\n {\n \"name\": \"monitors\",\n \"baseName\": \"monitors\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"path\",\n \"baseName\": \"path\",\n \"type\": \"string\"\n },\n {\n \"name\": \"readOnly\",\n \"baseName\": \"readOnly\",\n \"type\": \"boolean\"\n },\n {\n \"name\": \"secretFile\",\n \"baseName\": \"secretFile\",\n \"type\": \"string\"\n },\n {\n \"name\": \"secretRef\",\n \"baseName\": \"secretRef\",\n \"type\": \"V1SecretReference\"\n },\n {\n \"name\": \"user\",\n \"baseName\": \"user\",\n \"type\": \"string\"\n }\n];\n//# sourceMappingURL=v1CephFSPersistentVolumeSource.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1CephFSVolumeSource = void 0;\n/**\n* Represents a Ceph Filesystem mount that lasts the lifetime of a pod Cephfs volumes do not support ownership management or SELinux relabeling.\n*/\nclass V1CephFSVolumeSource {\n static getAttributeTypeMap() {\n return V1CephFSVolumeSource.attributeTypeMap;\n }\n}\nexports.V1CephFSVolumeSource = V1CephFSVolumeSource;\nV1CephFSVolumeSource.discriminator = undefined;\nV1CephFSVolumeSource.attributeTypeMap = [\n {\n \"name\": \"monitors\",\n \"baseName\": \"monitors\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"path\",\n \"baseName\": \"path\",\n \"type\": \"string\"\n },\n {\n \"name\": \"readOnly\",\n \"baseName\": \"readOnly\",\n \"type\": \"boolean\"\n },\n {\n \"name\": \"secretFile\",\n \"baseName\": \"secretFile\",\n \"type\": \"string\"\n },\n {\n \"name\": \"secretRef\",\n \"baseName\": \"secretRef\",\n \"type\": \"V1LocalObjectReference\"\n },\n {\n \"name\": \"user\",\n \"baseName\": \"user\",\n \"type\": \"string\"\n }\n];\n//# sourceMappingURL=v1CephFSVolumeSource.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1CertificateSigningRequest = void 0;\n/**\n* 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.\n*/\nclass V1CertificateSigningRequest {\n static getAttributeTypeMap() {\n return V1CertificateSigningRequest.attributeTypeMap;\n }\n}\nexports.V1CertificateSigningRequest = V1CertificateSigningRequest;\nV1CertificateSigningRequest.discriminator = undefined;\nV1CertificateSigningRequest.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ObjectMeta\"\n },\n {\n \"name\": \"spec\",\n \"baseName\": \"spec\",\n \"type\": \"V1CertificateSigningRequestSpec\"\n },\n {\n \"name\": \"status\",\n \"baseName\": \"status\",\n \"type\": \"V1CertificateSigningRequestStatus\"\n }\n];\n//# sourceMappingURL=v1CertificateSigningRequest.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1CertificateSigningRequestCondition = void 0;\n/**\n* CertificateSigningRequestCondition describes a condition of a CertificateSigningRequest object\n*/\nclass V1CertificateSigningRequestCondition {\n static getAttributeTypeMap() {\n return V1CertificateSigningRequestCondition.attributeTypeMap;\n }\n}\nexports.V1CertificateSigningRequestCondition = V1CertificateSigningRequestCondition;\nV1CertificateSigningRequestCondition.discriminator = undefined;\nV1CertificateSigningRequestCondition.attributeTypeMap = [\n {\n \"name\": \"lastTransitionTime\",\n \"baseName\": \"lastTransitionTime\",\n \"type\": \"Date\"\n },\n {\n \"name\": \"lastUpdateTime\",\n \"baseName\": \"lastUpdateTime\",\n \"type\": \"Date\"\n },\n {\n \"name\": \"message\",\n \"baseName\": \"message\",\n \"type\": \"string\"\n },\n {\n \"name\": \"reason\",\n \"baseName\": \"reason\",\n \"type\": \"string\"\n },\n {\n \"name\": \"status\",\n \"baseName\": \"status\",\n \"type\": \"string\"\n },\n {\n \"name\": \"type\",\n \"baseName\": \"type\",\n \"type\": \"string\"\n }\n];\n//# sourceMappingURL=v1CertificateSigningRequestCondition.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1CertificateSigningRequestList = void 0;\n/**\n* CertificateSigningRequestList is a collection of CertificateSigningRequest objects\n*/\nclass V1CertificateSigningRequestList {\n static getAttributeTypeMap() {\n return V1CertificateSigningRequestList.attributeTypeMap;\n }\n}\nexports.V1CertificateSigningRequestList = V1CertificateSigningRequestList;\nV1CertificateSigningRequestList.discriminator = undefined;\nV1CertificateSigningRequestList.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"items\",\n \"baseName\": \"items\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ListMeta\"\n }\n];\n//# sourceMappingURL=v1CertificateSigningRequestList.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1CertificateSigningRequestSpec = void 0;\n/**\n* CertificateSigningRequestSpec contains the certificate request.\n*/\nclass V1CertificateSigningRequestSpec {\n static getAttributeTypeMap() {\n return V1CertificateSigningRequestSpec.attributeTypeMap;\n }\n}\nexports.V1CertificateSigningRequestSpec = V1CertificateSigningRequestSpec;\nV1CertificateSigningRequestSpec.discriminator = undefined;\nV1CertificateSigningRequestSpec.attributeTypeMap = [\n {\n \"name\": \"expirationSeconds\",\n \"baseName\": \"expirationSeconds\",\n \"type\": \"number\"\n },\n {\n \"name\": \"extra\",\n \"baseName\": \"extra\",\n \"type\": \"{ [key: string]: Array; }\"\n },\n {\n \"name\": \"groups\",\n \"baseName\": \"groups\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"request\",\n \"baseName\": \"request\",\n \"type\": \"string\"\n },\n {\n \"name\": \"signerName\",\n \"baseName\": \"signerName\",\n \"type\": \"string\"\n },\n {\n \"name\": \"uid\",\n \"baseName\": \"uid\",\n \"type\": \"string\"\n },\n {\n \"name\": \"usages\",\n \"baseName\": \"usages\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"username\",\n \"baseName\": \"username\",\n \"type\": \"string\"\n }\n];\n//# sourceMappingURL=v1CertificateSigningRequestSpec.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1CertificateSigningRequestStatus = void 0;\n/**\n* CertificateSigningRequestStatus contains conditions used to indicate approved/denied/failed status of the request, and the issued certificate.\n*/\nclass V1CertificateSigningRequestStatus {\n static getAttributeTypeMap() {\n return V1CertificateSigningRequestStatus.attributeTypeMap;\n }\n}\nexports.V1CertificateSigningRequestStatus = V1CertificateSigningRequestStatus;\nV1CertificateSigningRequestStatus.discriminator = undefined;\nV1CertificateSigningRequestStatus.attributeTypeMap = [\n {\n \"name\": \"certificate\",\n \"baseName\": \"certificate\",\n \"type\": \"string\"\n },\n {\n \"name\": \"conditions\",\n \"baseName\": \"conditions\",\n \"type\": \"Array\"\n }\n];\n//# sourceMappingURL=v1CertificateSigningRequestStatus.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1CinderPersistentVolumeSource = void 0;\n/**\n* 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.\n*/\nclass V1CinderPersistentVolumeSource {\n static getAttributeTypeMap() {\n return V1CinderPersistentVolumeSource.attributeTypeMap;\n }\n}\nexports.V1CinderPersistentVolumeSource = V1CinderPersistentVolumeSource;\nV1CinderPersistentVolumeSource.discriminator = undefined;\nV1CinderPersistentVolumeSource.attributeTypeMap = [\n {\n \"name\": \"fsType\",\n \"baseName\": \"fsType\",\n \"type\": \"string\"\n },\n {\n \"name\": \"readOnly\",\n \"baseName\": \"readOnly\",\n \"type\": \"boolean\"\n },\n {\n \"name\": \"secretRef\",\n \"baseName\": \"secretRef\",\n \"type\": \"V1SecretReference\"\n },\n {\n \"name\": \"volumeID\",\n \"baseName\": \"volumeID\",\n \"type\": \"string\"\n }\n];\n//# sourceMappingURL=v1CinderPersistentVolumeSource.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1CinderVolumeSource = void 0;\n/**\n* 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.\n*/\nclass V1CinderVolumeSource {\n static getAttributeTypeMap() {\n return V1CinderVolumeSource.attributeTypeMap;\n }\n}\nexports.V1CinderVolumeSource = V1CinderVolumeSource;\nV1CinderVolumeSource.discriminator = undefined;\nV1CinderVolumeSource.attributeTypeMap = [\n {\n \"name\": \"fsType\",\n \"baseName\": \"fsType\",\n \"type\": \"string\"\n },\n {\n \"name\": \"readOnly\",\n \"baseName\": \"readOnly\",\n \"type\": \"boolean\"\n },\n {\n \"name\": \"secretRef\",\n \"baseName\": \"secretRef\",\n \"type\": \"V1LocalObjectReference\"\n },\n {\n \"name\": \"volumeID\",\n \"baseName\": \"volumeID\",\n \"type\": \"string\"\n }\n];\n//# sourceMappingURL=v1CinderVolumeSource.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1ClientIPConfig = void 0;\n/**\n* ClientIPConfig represents the configurations of Client IP based session affinity.\n*/\nclass V1ClientIPConfig {\n static getAttributeTypeMap() {\n return V1ClientIPConfig.attributeTypeMap;\n }\n}\nexports.V1ClientIPConfig = V1ClientIPConfig;\nV1ClientIPConfig.discriminator = undefined;\nV1ClientIPConfig.attributeTypeMap = [\n {\n \"name\": \"timeoutSeconds\",\n \"baseName\": \"timeoutSeconds\",\n \"type\": \"number\"\n }\n];\n//# sourceMappingURL=v1ClientIPConfig.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1ClusterRole = void 0;\n/**\n* ClusterRole is a cluster level, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding or ClusterRoleBinding.\n*/\nclass V1ClusterRole {\n static getAttributeTypeMap() {\n return V1ClusterRole.attributeTypeMap;\n }\n}\nexports.V1ClusterRole = V1ClusterRole;\nV1ClusterRole.discriminator = undefined;\nV1ClusterRole.attributeTypeMap = [\n {\n \"name\": \"aggregationRule\",\n \"baseName\": \"aggregationRule\",\n \"type\": \"V1AggregationRule\"\n },\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ObjectMeta\"\n },\n {\n \"name\": \"rules\",\n \"baseName\": \"rules\",\n \"type\": \"Array\"\n }\n];\n//# sourceMappingURL=v1ClusterRole.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1ClusterRoleBinding = void 0;\n/**\n* ClusterRoleBinding references a ClusterRole, but not contain it. It can reference a ClusterRole in the global namespace, and adds who information via Subject.\n*/\nclass V1ClusterRoleBinding {\n static getAttributeTypeMap() {\n return V1ClusterRoleBinding.attributeTypeMap;\n }\n}\nexports.V1ClusterRoleBinding = V1ClusterRoleBinding;\nV1ClusterRoleBinding.discriminator = undefined;\nV1ClusterRoleBinding.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ObjectMeta\"\n },\n {\n \"name\": \"roleRef\",\n \"baseName\": \"roleRef\",\n \"type\": \"V1RoleRef\"\n },\n {\n \"name\": \"subjects\",\n \"baseName\": \"subjects\",\n \"type\": \"Array\"\n }\n];\n//# sourceMappingURL=v1ClusterRoleBinding.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1ClusterRoleBindingList = void 0;\n/**\n* ClusterRoleBindingList is a collection of ClusterRoleBindings\n*/\nclass V1ClusterRoleBindingList {\n static getAttributeTypeMap() {\n return V1ClusterRoleBindingList.attributeTypeMap;\n }\n}\nexports.V1ClusterRoleBindingList = V1ClusterRoleBindingList;\nV1ClusterRoleBindingList.discriminator = undefined;\nV1ClusterRoleBindingList.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"items\",\n \"baseName\": \"items\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ListMeta\"\n }\n];\n//# sourceMappingURL=v1ClusterRoleBindingList.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1ClusterRoleList = void 0;\n/**\n* ClusterRoleList is a collection of ClusterRoles\n*/\nclass V1ClusterRoleList {\n static getAttributeTypeMap() {\n return V1ClusterRoleList.attributeTypeMap;\n }\n}\nexports.V1ClusterRoleList = V1ClusterRoleList;\nV1ClusterRoleList.discriminator = undefined;\nV1ClusterRoleList.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"items\",\n \"baseName\": \"items\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ListMeta\"\n }\n];\n//# sourceMappingURL=v1ClusterRoleList.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1ComponentCondition = void 0;\n/**\n* Information about the condition of a component.\n*/\nclass V1ComponentCondition {\n static getAttributeTypeMap() {\n return V1ComponentCondition.attributeTypeMap;\n }\n}\nexports.V1ComponentCondition = V1ComponentCondition;\nV1ComponentCondition.discriminator = undefined;\nV1ComponentCondition.attributeTypeMap = [\n {\n \"name\": \"error\",\n \"baseName\": \"error\",\n \"type\": \"string\"\n },\n {\n \"name\": \"message\",\n \"baseName\": \"message\",\n \"type\": \"string\"\n },\n {\n \"name\": \"status\",\n \"baseName\": \"status\",\n \"type\": \"string\"\n },\n {\n \"name\": \"type\",\n \"baseName\": \"type\",\n \"type\": \"string\"\n }\n];\n//# sourceMappingURL=v1ComponentCondition.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1ComponentStatus = void 0;\n/**\n* ComponentStatus (and ComponentStatusList) holds the cluster validation info. Deprecated: This API is deprecated in v1.19+\n*/\nclass V1ComponentStatus {\n static getAttributeTypeMap() {\n return V1ComponentStatus.attributeTypeMap;\n }\n}\nexports.V1ComponentStatus = V1ComponentStatus;\nV1ComponentStatus.discriminator = undefined;\nV1ComponentStatus.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"conditions\",\n \"baseName\": \"conditions\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ObjectMeta\"\n }\n];\n//# sourceMappingURL=v1ComponentStatus.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1ComponentStatusList = void 0;\n/**\n* Status of all the conditions for the component as a list of ComponentStatus objects. Deprecated: This API is deprecated in v1.19+\n*/\nclass V1ComponentStatusList {\n static getAttributeTypeMap() {\n return V1ComponentStatusList.attributeTypeMap;\n }\n}\nexports.V1ComponentStatusList = V1ComponentStatusList;\nV1ComponentStatusList.discriminator = undefined;\nV1ComponentStatusList.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"items\",\n \"baseName\": \"items\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ListMeta\"\n }\n];\n//# sourceMappingURL=v1ComponentStatusList.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1Condition = void 0;\n/**\n* Condition contains details for one aspect of the current state of this API Resource.\n*/\nclass V1Condition {\n static getAttributeTypeMap() {\n return V1Condition.attributeTypeMap;\n }\n}\nexports.V1Condition = V1Condition;\nV1Condition.discriminator = undefined;\nV1Condition.attributeTypeMap = [\n {\n \"name\": \"lastTransitionTime\",\n \"baseName\": \"lastTransitionTime\",\n \"type\": \"Date\"\n },\n {\n \"name\": \"message\",\n \"baseName\": \"message\",\n \"type\": \"string\"\n },\n {\n \"name\": \"observedGeneration\",\n \"baseName\": \"observedGeneration\",\n \"type\": \"number\"\n },\n {\n \"name\": \"reason\",\n \"baseName\": \"reason\",\n \"type\": \"string\"\n },\n {\n \"name\": \"status\",\n \"baseName\": \"status\",\n \"type\": \"string\"\n },\n {\n \"name\": \"type\",\n \"baseName\": \"type\",\n \"type\": \"string\"\n }\n];\n//# sourceMappingURL=v1Condition.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1ConfigMap = void 0;\n/**\n* ConfigMap holds configuration data for pods to consume.\n*/\nclass V1ConfigMap {\n static getAttributeTypeMap() {\n return V1ConfigMap.attributeTypeMap;\n }\n}\nexports.V1ConfigMap = V1ConfigMap;\nV1ConfigMap.discriminator = undefined;\nV1ConfigMap.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"binaryData\",\n \"baseName\": \"binaryData\",\n \"type\": \"{ [key: string]: string; }\"\n },\n {\n \"name\": \"data\",\n \"baseName\": \"data\",\n \"type\": \"{ [key: string]: string; }\"\n },\n {\n \"name\": \"immutable\",\n \"baseName\": \"immutable\",\n \"type\": \"boolean\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ObjectMeta\"\n }\n];\n//# sourceMappingURL=v1ConfigMap.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1ConfigMapEnvSource = void 0;\n/**\n* 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.\n*/\nclass V1ConfigMapEnvSource {\n static getAttributeTypeMap() {\n return V1ConfigMapEnvSource.attributeTypeMap;\n }\n}\nexports.V1ConfigMapEnvSource = V1ConfigMapEnvSource;\nV1ConfigMapEnvSource.discriminator = undefined;\nV1ConfigMapEnvSource.attributeTypeMap = [\n {\n \"name\": \"name\",\n \"baseName\": \"name\",\n \"type\": \"string\"\n },\n {\n \"name\": \"optional\",\n \"baseName\": \"optional\",\n \"type\": \"boolean\"\n }\n];\n//# sourceMappingURL=v1ConfigMapEnvSource.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1ConfigMapKeySelector = void 0;\n/**\n* Selects a key from a ConfigMap.\n*/\nclass V1ConfigMapKeySelector {\n static getAttributeTypeMap() {\n return V1ConfigMapKeySelector.attributeTypeMap;\n }\n}\nexports.V1ConfigMapKeySelector = V1ConfigMapKeySelector;\nV1ConfigMapKeySelector.discriminator = undefined;\nV1ConfigMapKeySelector.attributeTypeMap = [\n {\n \"name\": \"key\",\n \"baseName\": \"key\",\n \"type\": \"string\"\n },\n {\n \"name\": \"name\",\n \"baseName\": \"name\",\n \"type\": \"string\"\n },\n {\n \"name\": \"optional\",\n \"baseName\": \"optional\",\n \"type\": \"boolean\"\n }\n];\n//# sourceMappingURL=v1ConfigMapKeySelector.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1ConfigMapList = void 0;\n/**\n* ConfigMapList is a resource containing a list of ConfigMap objects.\n*/\nclass V1ConfigMapList {\n static getAttributeTypeMap() {\n return V1ConfigMapList.attributeTypeMap;\n }\n}\nexports.V1ConfigMapList = V1ConfigMapList;\nV1ConfigMapList.discriminator = undefined;\nV1ConfigMapList.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"items\",\n \"baseName\": \"items\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ListMeta\"\n }\n];\n//# sourceMappingURL=v1ConfigMapList.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1ConfigMapNodeConfigSource = void 0;\n/**\n* 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\n*/\nclass V1ConfigMapNodeConfigSource {\n static getAttributeTypeMap() {\n return V1ConfigMapNodeConfigSource.attributeTypeMap;\n }\n}\nexports.V1ConfigMapNodeConfigSource = V1ConfigMapNodeConfigSource;\nV1ConfigMapNodeConfigSource.discriminator = undefined;\nV1ConfigMapNodeConfigSource.attributeTypeMap = [\n {\n \"name\": \"kubeletConfigKey\",\n \"baseName\": \"kubeletConfigKey\",\n \"type\": \"string\"\n },\n {\n \"name\": \"name\",\n \"baseName\": \"name\",\n \"type\": \"string\"\n },\n {\n \"name\": \"namespace\",\n \"baseName\": \"namespace\",\n \"type\": \"string\"\n },\n {\n \"name\": \"resourceVersion\",\n \"baseName\": \"resourceVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"uid\",\n \"baseName\": \"uid\",\n \"type\": \"string\"\n }\n];\n//# sourceMappingURL=v1ConfigMapNodeConfigSource.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1ConfigMapProjection = void 0;\n/**\n* 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.\n*/\nclass V1ConfigMapProjection {\n static getAttributeTypeMap() {\n return V1ConfigMapProjection.attributeTypeMap;\n }\n}\nexports.V1ConfigMapProjection = V1ConfigMapProjection;\nV1ConfigMapProjection.discriminator = undefined;\nV1ConfigMapProjection.attributeTypeMap = [\n {\n \"name\": \"items\",\n \"baseName\": \"items\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"name\",\n \"baseName\": \"name\",\n \"type\": \"string\"\n },\n {\n \"name\": \"optional\",\n \"baseName\": \"optional\",\n \"type\": \"boolean\"\n }\n];\n//# sourceMappingURL=v1ConfigMapProjection.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1ConfigMapVolumeSource = void 0;\n/**\n* 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.\n*/\nclass V1ConfigMapVolumeSource {\n static getAttributeTypeMap() {\n return V1ConfigMapVolumeSource.attributeTypeMap;\n }\n}\nexports.V1ConfigMapVolumeSource = V1ConfigMapVolumeSource;\nV1ConfigMapVolumeSource.discriminator = undefined;\nV1ConfigMapVolumeSource.attributeTypeMap = [\n {\n \"name\": \"defaultMode\",\n \"baseName\": \"defaultMode\",\n \"type\": \"number\"\n },\n {\n \"name\": \"items\",\n \"baseName\": \"items\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"name\",\n \"baseName\": \"name\",\n \"type\": \"string\"\n },\n {\n \"name\": \"optional\",\n \"baseName\": \"optional\",\n \"type\": \"boolean\"\n }\n];\n//# sourceMappingURL=v1ConfigMapVolumeSource.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1Container = void 0;\n/**\n* A single application container that you want to run within a pod.\n*/\nclass V1Container {\n static getAttributeTypeMap() {\n return V1Container.attributeTypeMap;\n }\n}\nexports.V1Container = V1Container;\nV1Container.discriminator = undefined;\nV1Container.attributeTypeMap = [\n {\n \"name\": \"args\",\n \"baseName\": \"args\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"command\",\n \"baseName\": \"command\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"env\",\n \"baseName\": \"env\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"envFrom\",\n \"baseName\": \"envFrom\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"image\",\n \"baseName\": \"image\",\n \"type\": \"string\"\n },\n {\n \"name\": \"imagePullPolicy\",\n \"baseName\": \"imagePullPolicy\",\n \"type\": \"string\"\n },\n {\n \"name\": \"lifecycle\",\n \"baseName\": \"lifecycle\",\n \"type\": \"V1Lifecycle\"\n },\n {\n \"name\": \"livenessProbe\",\n \"baseName\": \"livenessProbe\",\n \"type\": \"V1Probe\"\n },\n {\n \"name\": \"name\",\n \"baseName\": \"name\",\n \"type\": \"string\"\n },\n {\n \"name\": \"ports\",\n \"baseName\": \"ports\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"readinessProbe\",\n \"baseName\": \"readinessProbe\",\n \"type\": \"V1Probe\"\n },\n {\n \"name\": \"resources\",\n \"baseName\": \"resources\",\n \"type\": \"V1ResourceRequirements\"\n },\n {\n \"name\": \"securityContext\",\n \"baseName\": \"securityContext\",\n \"type\": \"V1SecurityContext\"\n },\n {\n \"name\": \"startupProbe\",\n \"baseName\": \"startupProbe\",\n \"type\": \"V1Probe\"\n },\n {\n \"name\": \"stdin\",\n \"baseName\": \"stdin\",\n \"type\": \"boolean\"\n },\n {\n \"name\": \"stdinOnce\",\n \"baseName\": \"stdinOnce\",\n \"type\": \"boolean\"\n },\n {\n \"name\": \"terminationMessagePath\",\n \"baseName\": \"terminationMessagePath\",\n \"type\": \"string\"\n },\n {\n \"name\": \"terminationMessagePolicy\",\n \"baseName\": \"terminationMessagePolicy\",\n \"type\": \"string\"\n },\n {\n \"name\": \"tty\",\n \"baseName\": \"tty\",\n \"type\": \"boolean\"\n },\n {\n \"name\": \"volumeDevices\",\n \"baseName\": \"volumeDevices\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"volumeMounts\",\n \"baseName\": \"volumeMounts\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"workingDir\",\n \"baseName\": \"workingDir\",\n \"type\": \"string\"\n }\n];\n//# sourceMappingURL=v1Container.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1ContainerImage = void 0;\n/**\n* Describe a container image\n*/\nclass V1ContainerImage {\n static getAttributeTypeMap() {\n return V1ContainerImage.attributeTypeMap;\n }\n}\nexports.V1ContainerImage = V1ContainerImage;\nV1ContainerImage.discriminator = undefined;\nV1ContainerImage.attributeTypeMap = [\n {\n \"name\": \"names\",\n \"baseName\": \"names\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"sizeBytes\",\n \"baseName\": \"sizeBytes\",\n \"type\": \"number\"\n }\n];\n//# sourceMappingURL=v1ContainerImage.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1ContainerPort = void 0;\n/**\n* ContainerPort represents a network port in a single container.\n*/\nclass V1ContainerPort {\n static getAttributeTypeMap() {\n return V1ContainerPort.attributeTypeMap;\n }\n}\nexports.V1ContainerPort = V1ContainerPort;\nV1ContainerPort.discriminator = undefined;\nV1ContainerPort.attributeTypeMap = [\n {\n \"name\": \"containerPort\",\n \"baseName\": \"containerPort\",\n \"type\": \"number\"\n },\n {\n \"name\": \"hostIP\",\n \"baseName\": \"hostIP\",\n \"type\": \"string\"\n },\n {\n \"name\": \"hostPort\",\n \"baseName\": \"hostPort\",\n \"type\": \"number\"\n },\n {\n \"name\": \"name\",\n \"baseName\": \"name\",\n \"type\": \"string\"\n },\n {\n \"name\": \"protocol\",\n \"baseName\": \"protocol\",\n \"type\": \"string\"\n }\n];\n//# sourceMappingURL=v1ContainerPort.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1ContainerState = void 0;\n/**\n* 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.\n*/\nclass V1ContainerState {\n static getAttributeTypeMap() {\n return V1ContainerState.attributeTypeMap;\n }\n}\nexports.V1ContainerState = V1ContainerState;\nV1ContainerState.discriminator = undefined;\nV1ContainerState.attributeTypeMap = [\n {\n \"name\": \"running\",\n \"baseName\": \"running\",\n \"type\": \"V1ContainerStateRunning\"\n },\n {\n \"name\": \"terminated\",\n \"baseName\": \"terminated\",\n \"type\": \"V1ContainerStateTerminated\"\n },\n {\n \"name\": \"waiting\",\n \"baseName\": \"waiting\",\n \"type\": \"V1ContainerStateWaiting\"\n }\n];\n//# sourceMappingURL=v1ContainerState.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1ContainerStateRunning = void 0;\n/**\n* ContainerStateRunning is a running state of a container.\n*/\nclass V1ContainerStateRunning {\n static getAttributeTypeMap() {\n return V1ContainerStateRunning.attributeTypeMap;\n }\n}\nexports.V1ContainerStateRunning = V1ContainerStateRunning;\nV1ContainerStateRunning.discriminator = undefined;\nV1ContainerStateRunning.attributeTypeMap = [\n {\n \"name\": \"startedAt\",\n \"baseName\": \"startedAt\",\n \"type\": \"Date\"\n }\n];\n//# sourceMappingURL=v1ContainerStateRunning.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1ContainerStateTerminated = void 0;\n/**\n* ContainerStateTerminated is a terminated state of a container.\n*/\nclass V1ContainerStateTerminated {\n static getAttributeTypeMap() {\n return V1ContainerStateTerminated.attributeTypeMap;\n }\n}\nexports.V1ContainerStateTerminated = V1ContainerStateTerminated;\nV1ContainerStateTerminated.discriminator = undefined;\nV1ContainerStateTerminated.attributeTypeMap = [\n {\n \"name\": \"containerID\",\n \"baseName\": \"containerID\",\n \"type\": \"string\"\n },\n {\n \"name\": \"exitCode\",\n \"baseName\": \"exitCode\",\n \"type\": \"number\"\n },\n {\n \"name\": \"finishedAt\",\n \"baseName\": \"finishedAt\",\n \"type\": \"Date\"\n },\n {\n \"name\": \"message\",\n \"baseName\": \"message\",\n \"type\": \"string\"\n },\n {\n \"name\": \"reason\",\n \"baseName\": \"reason\",\n \"type\": \"string\"\n },\n {\n \"name\": \"signal\",\n \"baseName\": \"signal\",\n \"type\": \"number\"\n },\n {\n \"name\": \"startedAt\",\n \"baseName\": \"startedAt\",\n \"type\": \"Date\"\n }\n];\n//# sourceMappingURL=v1ContainerStateTerminated.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1ContainerStateWaiting = void 0;\n/**\n* ContainerStateWaiting is a waiting state of a container.\n*/\nclass V1ContainerStateWaiting {\n static getAttributeTypeMap() {\n return V1ContainerStateWaiting.attributeTypeMap;\n }\n}\nexports.V1ContainerStateWaiting = V1ContainerStateWaiting;\nV1ContainerStateWaiting.discriminator = undefined;\nV1ContainerStateWaiting.attributeTypeMap = [\n {\n \"name\": \"message\",\n \"baseName\": \"message\",\n \"type\": \"string\"\n },\n {\n \"name\": \"reason\",\n \"baseName\": \"reason\",\n \"type\": \"string\"\n }\n];\n//# sourceMappingURL=v1ContainerStateWaiting.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1ContainerStatus = void 0;\n/**\n* ContainerStatus contains details for the current status of this container.\n*/\nclass V1ContainerStatus {\n static getAttributeTypeMap() {\n return V1ContainerStatus.attributeTypeMap;\n }\n}\nexports.V1ContainerStatus = V1ContainerStatus;\nV1ContainerStatus.discriminator = undefined;\nV1ContainerStatus.attributeTypeMap = [\n {\n \"name\": \"containerID\",\n \"baseName\": \"containerID\",\n \"type\": \"string\"\n },\n {\n \"name\": \"image\",\n \"baseName\": \"image\",\n \"type\": \"string\"\n },\n {\n \"name\": \"imageID\",\n \"baseName\": \"imageID\",\n \"type\": \"string\"\n },\n {\n \"name\": \"lastState\",\n \"baseName\": \"lastState\",\n \"type\": \"V1ContainerState\"\n },\n {\n \"name\": \"name\",\n \"baseName\": \"name\",\n \"type\": \"string\"\n },\n {\n \"name\": \"ready\",\n \"baseName\": \"ready\",\n \"type\": \"boolean\"\n },\n {\n \"name\": \"restartCount\",\n \"baseName\": \"restartCount\",\n \"type\": \"number\"\n },\n {\n \"name\": \"started\",\n \"baseName\": \"started\",\n \"type\": \"boolean\"\n },\n {\n \"name\": \"state\",\n \"baseName\": \"state\",\n \"type\": \"V1ContainerState\"\n }\n];\n//# sourceMappingURL=v1ContainerStatus.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1ControllerRevision = void 0;\n/**\n* 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.\n*/\nclass V1ControllerRevision {\n static getAttributeTypeMap() {\n return V1ControllerRevision.attributeTypeMap;\n }\n}\nexports.V1ControllerRevision = V1ControllerRevision;\nV1ControllerRevision.discriminator = undefined;\nV1ControllerRevision.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"data\",\n \"baseName\": \"data\",\n \"type\": \"object\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ObjectMeta\"\n },\n {\n \"name\": \"revision\",\n \"baseName\": \"revision\",\n \"type\": \"number\"\n }\n];\n//# sourceMappingURL=v1ControllerRevision.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1ControllerRevisionList = void 0;\n/**\n* ControllerRevisionList is a resource containing a list of ControllerRevision objects.\n*/\nclass V1ControllerRevisionList {\n static getAttributeTypeMap() {\n return V1ControllerRevisionList.attributeTypeMap;\n }\n}\nexports.V1ControllerRevisionList = V1ControllerRevisionList;\nV1ControllerRevisionList.discriminator = undefined;\nV1ControllerRevisionList.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"items\",\n \"baseName\": \"items\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ListMeta\"\n }\n];\n//# sourceMappingURL=v1ControllerRevisionList.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1CronJob = void 0;\n/**\n* CronJob represents the configuration of a single cron job.\n*/\nclass V1CronJob {\n static getAttributeTypeMap() {\n return V1CronJob.attributeTypeMap;\n }\n}\nexports.V1CronJob = V1CronJob;\nV1CronJob.discriminator = undefined;\nV1CronJob.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ObjectMeta\"\n },\n {\n \"name\": \"spec\",\n \"baseName\": \"spec\",\n \"type\": \"V1CronJobSpec\"\n },\n {\n \"name\": \"status\",\n \"baseName\": \"status\",\n \"type\": \"V1CronJobStatus\"\n }\n];\n//# sourceMappingURL=v1CronJob.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1CronJobList = void 0;\n/**\n* CronJobList is a collection of cron jobs.\n*/\nclass V1CronJobList {\n static getAttributeTypeMap() {\n return V1CronJobList.attributeTypeMap;\n }\n}\nexports.V1CronJobList = V1CronJobList;\nV1CronJobList.discriminator = undefined;\nV1CronJobList.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"items\",\n \"baseName\": \"items\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ListMeta\"\n }\n];\n//# sourceMappingURL=v1CronJobList.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1CronJobSpec = void 0;\n/**\n* CronJobSpec describes how the job execution will look like and when it will actually run.\n*/\nclass V1CronJobSpec {\n static getAttributeTypeMap() {\n return V1CronJobSpec.attributeTypeMap;\n }\n}\nexports.V1CronJobSpec = V1CronJobSpec;\nV1CronJobSpec.discriminator = undefined;\nV1CronJobSpec.attributeTypeMap = [\n {\n \"name\": \"concurrencyPolicy\",\n \"baseName\": \"concurrencyPolicy\",\n \"type\": \"string\"\n },\n {\n \"name\": \"failedJobsHistoryLimit\",\n \"baseName\": \"failedJobsHistoryLimit\",\n \"type\": \"number\"\n },\n {\n \"name\": \"jobTemplate\",\n \"baseName\": \"jobTemplate\",\n \"type\": \"V1JobTemplateSpec\"\n },\n {\n \"name\": \"schedule\",\n \"baseName\": \"schedule\",\n \"type\": \"string\"\n },\n {\n \"name\": \"startingDeadlineSeconds\",\n \"baseName\": \"startingDeadlineSeconds\",\n \"type\": \"number\"\n },\n {\n \"name\": \"successfulJobsHistoryLimit\",\n \"baseName\": \"successfulJobsHistoryLimit\",\n \"type\": \"number\"\n },\n {\n \"name\": \"suspend\",\n \"baseName\": \"suspend\",\n \"type\": \"boolean\"\n }\n];\n//# sourceMappingURL=v1CronJobSpec.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1CronJobStatus = void 0;\n/**\n* CronJobStatus represents the current state of a cron job.\n*/\nclass V1CronJobStatus {\n static getAttributeTypeMap() {\n return V1CronJobStatus.attributeTypeMap;\n }\n}\nexports.V1CronJobStatus = V1CronJobStatus;\nV1CronJobStatus.discriminator = undefined;\nV1CronJobStatus.attributeTypeMap = [\n {\n \"name\": \"active\",\n \"baseName\": \"active\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"lastScheduleTime\",\n \"baseName\": \"lastScheduleTime\",\n \"type\": \"Date\"\n },\n {\n \"name\": \"lastSuccessfulTime\",\n \"baseName\": \"lastSuccessfulTime\",\n \"type\": \"Date\"\n }\n];\n//# sourceMappingURL=v1CronJobStatus.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1CrossVersionObjectReference = void 0;\n/**\n* CrossVersionObjectReference contains enough information to let you identify the referred resource.\n*/\nclass V1CrossVersionObjectReference {\n static getAttributeTypeMap() {\n return V1CrossVersionObjectReference.attributeTypeMap;\n }\n}\nexports.V1CrossVersionObjectReference = V1CrossVersionObjectReference;\nV1CrossVersionObjectReference.discriminator = undefined;\nV1CrossVersionObjectReference.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"name\",\n \"baseName\": \"name\",\n \"type\": \"string\"\n }\n];\n//# sourceMappingURL=v1CrossVersionObjectReference.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1CustomResourceColumnDefinition = void 0;\n/**\n* CustomResourceColumnDefinition specifies a column for server side printing.\n*/\nclass V1CustomResourceColumnDefinition {\n static getAttributeTypeMap() {\n return V1CustomResourceColumnDefinition.attributeTypeMap;\n }\n}\nexports.V1CustomResourceColumnDefinition = V1CustomResourceColumnDefinition;\nV1CustomResourceColumnDefinition.discriminator = undefined;\nV1CustomResourceColumnDefinition.attributeTypeMap = [\n {\n \"name\": \"description\",\n \"baseName\": \"description\",\n \"type\": \"string\"\n },\n {\n \"name\": \"format\",\n \"baseName\": \"format\",\n \"type\": \"string\"\n },\n {\n \"name\": \"jsonPath\",\n \"baseName\": \"jsonPath\",\n \"type\": \"string\"\n },\n {\n \"name\": \"name\",\n \"baseName\": \"name\",\n \"type\": \"string\"\n },\n {\n \"name\": \"priority\",\n \"baseName\": \"priority\",\n \"type\": \"number\"\n },\n {\n \"name\": \"type\",\n \"baseName\": \"type\",\n \"type\": \"string\"\n }\n];\n//# sourceMappingURL=v1CustomResourceColumnDefinition.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1CustomResourceConversion = void 0;\n/**\n* CustomResourceConversion describes how to convert different versions of a CR.\n*/\nclass V1CustomResourceConversion {\n static getAttributeTypeMap() {\n return V1CustomResourceConversion.attributeTypeMap;\n }\n}\nexports.V1CustomResourceConversion = V1CustomResourceConversion;\nV1CustomResourceConversion.discriminator = undefined;\nV1CustomResourceConversion.attributeTypeMap = [\n {\n \"name\": \"strategy\",\n \"baseName\": \"strategy\",\n \"type\": \"string\"\n },\n {\n \"name\": \"webhook\",\n \"baseName\": \"webhook\",\n \"type\": \"V1WebhookConversion\"\n }\n];\n//# sourceMappingURL=v1CustomResourceConversion.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1CustomResourceDefinition = void 0;\n/**\n* CustomResourceDefinition represents a resource that should be exposed on the API server. Its name MUST be in the format <.spec.name>.<.spec.group>.\n*/\nclass V1CustomResourceDefinition {\n static getAttributeTypeMap() {\n return V1CustomResourceDefinition.attributeTypeMap;\n }\n}\nexports.V1CustomResourceDefinition = V1CustomResourceDefinition;\nV1CustomResourceDefinition.discriminator = undefined;\nV1CustomResourceDefinition.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ObjectMeta\"\n },\n {\n \"name\": \"spec\",\n \"baseName\": \"spec\",\n \"type\": \"V1CustomResourceDefinitionSpec\"\n },\n {\n \"name\": \"status\",\n \"baseName\": \"status\",\n \"type\": \"V1CustomResourceDefinitionStatus\"\n }\n];\n//# sourceMappingURL=v1CustomResourceDefinition.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1CustomResourceDefinitionCondition = void 0;\n/**\n* CustomResourceDefinitionCondition contains details for the current condition of this pod.\n*/\nclass V1CustomResourceDefinitionCondition {\n static getAttributeTypeMap() {\n return V1CustomResourceDefinitionCondition.attributeTypeMap;\n }\n}\nexports.V1CustomResourceDefinitionCondition = V1CustomResourceDefinitionCondition;\nV1CustomResourceDefinitionCondition.discriminator = undefined;\nV1CustomResourceDefinitionCondition.attributeTypeMap = [\n {\n \"name\": \"lastTransitionTime\",\n \"baseName\": \"lastTransitionTime\",\n \"type\": \"Date\"\n },\n {\n \"name\": \"message\",\n \"baseName\": \"message\",\n \"type\": \"string\"\n },\n {\n \"name\": \"reason\",\n \"baseName\": \"reason\",\n \"type\": \"string\"\n },\n {\n \"name\": \"status\",\n \"baseName\": \"status\",\n \"type\": \"string\"\n },\n {\n \"name\": \"type\",\n \"baseName\": \"type\",\n \"type\": \"string\"\n }\n];\n//# sourceMappingURL=v1CustomResourceDefinitionCondition.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1CustomResourceDefinitionList = void 0;\n/**\n* CustomResourceDefinitionList is a list of CustomResourceDefinition objects.\n*/\nclass V1CustomResourceDefinitionList {\n static getAttributeTypeMap() {\n return V1CustomResourceDefinitionList.attributeTypeMap;\n }\n}\nexports.V1CustomResourceDefinitionList = V1CustomResourceDefinitionList;\nV1CustomResourceDefinitionList.discriminator = undefined;\nV1CustomResourceDefinitionList.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"items\",\n \"baseName\": \"items\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ListMeta\"\n }\n];\n//# sourceMappingURL=v1CustomResourceDefinitionList.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1CustomResourceDefinitionNames = void 0;\n/**\n* CustomResourceDefinitionNames indicates the names to serve this CustomResourceDefinition\n*/\nclass V1CustomResourceDefinitionNames {\n static getAttributeTypeMap() {\n return V1CustomResourceDefinitionNames.attributeTypeMap;\n }\n}\nexports.V1CustomResourceDefinitionNames = V1CustomResourceDefinitionNames;\nV1CustomResourceDefinitionNames.discriminator = undefined;\nV1CustomResourceDefinitionNames.attributeTypeMap = [\n {\n \"name\": \"categories\",\n \"baseName\": \"categories\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"listKind\",\n \"baseName\": \"listKind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"plural\",\n \"baseName\": \"plural\",\n \"type\": \"string\"\n },\n {\n \"name\": \"shortNames\",\n \"baseName\": \"shortNames\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"singular\",\n \"baseName\": \"singular\",\n \"type\": \"string\"\n }\n];\n//# sourceMappingURL=v1CustomResourceDefinitionNames.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1CustomResourceDefinitionSpec = void 0;\n/**\n* CustomResourceDefinitionSpec describes how a user wants their resource to appear\n*/\nclass V1CustomResourceDefinitionSpec {\n static getAttributeTypeMap() {\n return V1CustomResourceDefinitionSpec.attributeTypeMap;\n }\n}\nexports.V1CustomResourceDefinitionSpec = V1CustomResourceDefinitionSpec;\nV1CustomResourceDefinitionSpec.discriminator = undefined;\nV1CustomResourceDefinitionSpec.attributeTypeMap = [\n {\n \"name\": \"conversion\",\n \"baseName\": \"conversion\",\n \"type\": \"V1CustomResourceConversion\"\n },\n {\n \"name\": \"group\",\n \"baseName\": \"group\",\n \"type\": \"string\"\n },\n {\n \"name\": \"names\",\n \"baseName\": \"names\",\n \"type\": \"V1CustomResourceDefinitionNames\"\n },\n {\n \"name\": \"preserveUnknownFields\",\n \"baseName\": \"preserveUnknownFields\",\n \"type\": \"boolean\"\n },\n {\n \"name\": \"scope\",\n \"baseName\": \"scope\",\n \"type\": \"string\"\n },\n {\n \"name\": \"versions\",\n \"baseName\": \"versions\",\n \"type\": \"Array\"\n }\n];\n//# sourceMappingURL=v1CustomResourceDefinitionSpec.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1CustomResourceDefinitionStatus = void 0;\n/**\n* CustomResourceDefinitionStatus indicates the state of the CustomResourceDefinition\n*/\nclass V1CustomResourceDefinitionStatus {\n static getAttributeTypeMap() {\n return V1CustomResourceDefinitionStatus.attributeTypeMap;\n }\n}\nexports.V1CustomResourceDefinitionStatus = V1CustomResourceDefinitionStatus;\nV1CustomResourceDefinitionStatus.discriminator = undefined;\nV1CustomResourceDefinitionStatus.attributeTypeMap = [\n {\n \"name\": \"acceptedNames\",\n \"baseName\": \"acceptedNames\",\n \"type\": \"V1CustomResourceDefinitionNames\"\n },\n {\n \"name\": \"conditions\",\n \"baseName\": \"conditions\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"storedVersions\",\n \"baseName\": \"storedVersions\",\n \"type\": \"Array\"\n }\n];\n//# sourceMappingURL=v1CustomResourceDefinitionStatus.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1CustomResourceDefinitionVersion = void 0;\n/**\n* CustomResourceDefinitionVersion describes a version for CRD.\n*/\nclass V1CustomResourceDefinitionVersion {\n static getAttributeTypeMap() {\n return V1CustomResourceDefinitionVersion.attributeTypeMap;\n }\n}\nexports.V1CustomResourceDefinitionVersion = V1CustomResourceDefinitionVersion;\nV1CustomResourceDefinitionVersion.discriminator = undefined;\nV1CustomResourceDefinitionVersion.attributeTypeMap = [\n {\n \"name\": \"additionalPrinterColumns\",\n \"baseName\": \"additionalPrinterColumns\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"deprecated\",\n \"baseName\": \"deprecated\",\n \"type\": \"boolean\"\n },\n {\n \"name\": \"deprecationWarning\",\n \"baseName\": \"deprecationWarning\",\n \"type\": \"string\"\n },\n {\n \"name\": \"name\",\n \"baseName\": \"name\",\n \"type\": \"string\"\n },\n {\n \"name\": \"schema\",\n \"baseName\": \"schema\",\n \"type\": \"V1CustomResourceValidation\"\n },\n {\n \"name\": \"served\",\n \"baseName\": \"served\",\n \"type\": \"boolean\"\n },\n {\n \"name\": \"storage\",\n \"baseName\": \"storage\",\n \"type\": \"boolean\"\n },\n {\n \"name\": \"subresources\",\n \"baseName\": \"subresources\",\n \"type\": \"V1CustomResourceSubresources\"\n }\n];\n//# sourceMappingURL=v1CustomResourceDefinitionVersion.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1CustomResourceSubresourceScale = void 0;\n/**\n* CustomResourceSubresourceScale defines how to serve the scale subresource for CustomResources.\n*/\nclass V1CustomResourceSubresourceScale {\n static getAttributeTypeMap() {\n return V1CustomResourceSubresourceScale.attributeTypeMap;\n }\n}\nexports.V1CustomResourceSubresourceScale = V1CustomResourceSubresourceScale;\nV1CustomResourceSubresourceScale.discriminator = undefined;\nV1CustomResourceSubresourceScale.attributeTypeMap = [\n {\n \"name\": \"labelSelectorPath\",\n \"baseName\": \"labelSelectorPath\",\n \"type\": \"string\"\n },\n {\n \"name\": \"specReplicasPath\",\n \"baseName\": \"specReplicasPath\",\n \"type\": \"string\"\n },\n {\n \"name\": \"statusReplicasPath\",\n \"baseName\": \"statusReplicasPath\",\n \"type\": \"string\"\n }\n];\n//# sourceMappingURL=v1CustomResourceSubresourceScale.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1CustomResourceSubresources = void 0;\n/**\n* CustomResourceSubresources defines the status and scale subresources for CustomResources.\n*/\nclass V1CustomResourceSubresources {\n static getAttributeTypeMap() {\n return V1CustomResourceSubresources.attributeTypeMap;\n }\n}\nexports.V1CustomResourceSubresources = V1CustomResourceSubresources;\nV1CustomResourceSubresources.discriminator = undefined;\nV1CustomResourceSubresources.attributeTypeMap = [\n {\n \"name\": \"scale\",\n \"baseName\": \"scale\",\n \"type\": \"V1CustomResourceSubresourceScale\"\n },\n {\n \"name\": \"status\",\n \"baseName\": \"status\",\n \"type\": \"object\"\n }\n];\n//# sourceMappingURL=v1CustomResourceSubresources.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1CustomResourceValidation = void 0;\n/**\n* CustomResourceValidation is a list of validation methods for CustomResources.\n*/\nclass V1CustomResourceValidation {\n static getAttributeTypeMap() {\n return V1CustomResourceValidation.attributeTypeMap;\n }\n}\nexports.V1CustomResourceValidation = V1CustomResourceValidation;\nV1CustomResourceValidation.discriminator = undefined;\nV1CustomResourceValidation.attributeTypeMap = [\n {\n \"name\": \"openAPIV3Schema\",\n \"baseName\": \"openAPIV3Schema\",\n \"type\": \"V1JSONSchemaProps\"\n }\n];\n//# sourceMappingURL=v1CustomResourceValidation.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1DaemonEndpoint = void 0;\n/**\n* DaemonEndpoint contains information about a single Daemon endpoint.\n*/\nclass V1DaemonEndpoint {\n static getAttributeTypeMap() {\n return V1DaemonEndpoint.attributeTypeMap;\n }\n}\nexports.V1DaemonEndpoint = V1DaemonEndpoint;\nV1DaemonEndpoint.discriminator = undefined;\nV1DaemonEndpoint.attributeTypeMap = [\n {\n \"name\": \"Port\",\n \"baseName\": \"Port\",\n \"type\": \"number\"\n }\n];\n//# sourceMappingURL=v1DaemonEndpoint.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1DaemonSet = void 0;\n/**\n* DaemonSet represents the configuration of a daemon set.\n*/\nclass V1DaemonSet {\n static getAttributeTypeMap() {\n return V1DaemonSet.attributeTypeMap;\n }\n}\nexports.V1DaemonSet = V1DaemonSet;\nV1DaemonSet.discriminator = undefined;\nV1DaemonSet.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ObjectMeta\"\n },\n {\n \"name\": \"spec\",\n \"baseName\": \"spec\",\n \"type\": \"V1DaemonSetSpec\"\n },\n {\n \"name\": \"status\",\n \"baseName\": \"status\",\n \"type\": \"V1DaemonSetStatus\"\n }\n];\n//# sourceMappingURL=v1DaemonSet.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1DaemonSetCondition = void 0;\n/**\n* DaemonSetCondition describes the state of a DaemonSet at a certain point.\n*/\nclass V1DaemonSetCondition {\n static getAttributeTypeMap() {\n return V1DaemonSetCondition.attributeTypeMap;\n }\n}\nexports.V1DaemonSetCondition = V1DaemonSetCondition;\nV1DaemonSetCondition.discriminator = undefined;\nV1DaemonSetCondition.attributeTypeMap = [\n {\n \"name\": \"lastTransitionTime\",\n \"baseName\": \"lastTransitionTime\",\n \"type\": \"Date\"\n },\n {\n \"name\": \"message\",\n \"baseName\": \"message\",\n \"type\": \"string\"\n },\n {\n \"name\": \"reason\",\n \"baseName\": \"reason\",\n \"type\": \"string\"\n },\n {\n \"name\": \"status\",\n \"baseName\": \"status\",\n \"type\": \"string\"\n },\n {\n \"name\": \"type\",\n \"baseName\": \"type\",\n \"type\": \"string\"\n }\n];\n//# sourceMappingURL=v1DaemonSetCondition.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1DaemonSetList = void 0;\n/**\n* DaemonSetList is a collection of daemon sets.\n*/\nclass V1DaemonSetList {\n static getAttributeTypeMap() {\n return V1DaemonSetList.attributeTypeMap;\n }\n}\nexports.V1DaemonSetList = V1DaemonSetList;\nV1DaemonSetList.discriminator = undefined;\nV1DaemonSetList.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"items\",\n \"baseName\": \"items\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ListMeta\"\n }\n];\n//# sourceMappingURL=v1DaemonSetList.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1DaemonSetSpec = void 0;\n/**\n* DaemonSetSpec is the specification of a daemon set.\n*/\nclass V1DaemonSetSpec {\n static getAttributeTypeMap() {\n return V1DaemonSetSpec.attributeTypeMap;\n }\n}\nexports.V1DaemonSetSpec = V1DaemonSetSpec;\nV1DaemonSetSpec.discriminator = undefined;\nV1DaemonSetSpec.attributeTypeMap = [\n {\n \"name\": \"minReadySeconds\",\n \"baseName\": \"minReadySeconds\",\n \"type\": \"number\"\n },\n {\n \"name\": \"revisionHistoryLimit\",\n \"baseName\": \"revisionHistoryLimit\",\n \"type\": \"number\"\n },\n {\n \"name\": \"selector\",\n \"baseName\": \"selector\",\n \"type\": \"V1LabelSelector\"\n },\n {\n \"name\": \"template\",\n \"baseName\": \"template\",\n \"type\": \"V1PodTemplateSpec\"\n },\n {\n \"name\": \"updateStrategy\",\n \"baseName\": \"updateStrategy\",\n \"type\": \"V1DaemonSetUpdateStrategy\"\n }\n];\n//# sourceMappingURL=v1DaemonSetSpec.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1DaemonSetStatus = void 0;\n/**\n* DaemonSetStatus represents the current status of a daemon set.\n*/\nclass V1DaemonSetStatus {\n static getAttributeTypeMap() {\n return V1DaemonSetStatus.attributeTypeMap;\n }\n}\nexports.V1DaemonSetStatus = V1DaemonSetStatus;\nV1DaemonSetStatus.discriminator = undefined;\nV1DaemonSetStatus.attributeTypeMap = [\n {\n \"name\": \"collisionCount\",\n \"baseName\": \"collisionCount\",\n \"type\": \"number\"\n },\n {\n \"name\": \"conditions\",\n \"baseName\": \"conditions\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"currentNumberScheduled\",\n \"baseName\": \"currentNumberScheduled\",\n \"type\": \"number\"\n },\n {\n \"name\": \"desiredNumberScheduled\",\n \"baseName\": \"desiredNumberScheduled\",\n \"type\": \"number\"\n },\n {\n \"name\": \"numberAvailable\",\n \"baseName\": \"numberAvailable\",\n \"type\": \"number\"\n },\n {\n \"name\": \"numberMisscheduled\",\n \"baseName\": \"numberMisscheduled\",\n \"type\": \"number\"\n },\n {\n \"name\": \"numberReady\",\n \"baseName\": \"numberReady\",\n \"type\": \"number\"\n },\n {\n \"name\": \"numberUnavailable\",\n \"baseName\": \"numberUnavailable\",\n \"type\": \"number\"\n },\n {\n \"name\": \"observedGeneration\",\n \"baseName\": \"observedGeneration\",\n \"type\": \"number\"\n },\n {\n \"name\": \"updatedNumberScheduled\",\n \"baseName\": \"updatedNumberScheduled\",\n \"type\": \"number\"\n }\n];\n//# sourceMappingURL=v1DaemonSetStatus.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1DaemonSetUpdateStrategy = void 0;\n/**\n* DaemonSetUpdateStrategy is a struct used to control the update strategy for a DaemonSet.\n*/\nclass V1DaemonSetUpdateStrategy {\n static getAttributeTypeMap() {\n return V1DaemonSetUpdateStrategy.attributeTypeMap;\n }\n}\nexports.V1DaemonSetUpdateStrategy = V1DaemonSetUpdateStrategy;\nV1DaemonSetUpdateStrategy.discriminator = undefined;\nV1DaemonSetUpdateStrategy.attributeTypeMap = [\n {\n \"name\": \"rollingUpdate\",\n \"baseName\": \"rollingUpdate\",\n \"type\": \"V1RollingUpdateDaemonSet\"\n },\n {\n \"name\": \"type\",\n \"baseName\": \"type\",\n \"type\": \"string\"\n }\n];\n//# sourceMappingURL=v1DaemonSetUpdateStrategy.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1DeleteOptions = void 0;\n/**\n* DeleteOptions may be provided when deleting an API object.\n*/\nclass V1DeleteOptions {\n static getAttributeTypeMap() {\n return V1DeleteOptions.attributeTypeMap;\n }\n}\nexports.V1DeleteOptions = V1DeleteOptions;\nV1DeleteOptions.discriminator = undefined;\nV1DeleteOptions.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"dryRun\",\n \"baseName\": \"dryRun\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"gracePeriodSeconds\",\n \"baseName\": \"gracePeriodSeconds\",\n \"type\": \"number\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"orphanDependents\",\n \"baseName\": \"orphanDependents\",\n \"type\": \"boolean\"\n },\n {\n \"name\": \"preconditions\",\n \"baseName\": \"preconditions\",\n \"type\": \"V1Preconditions\"\n },\n {\n \"name\": \"propagationPolicy\",\n \"baseName\": \"propagationPolicy\",\n \"type\": \"string\"\n }\n];\n//# sourceMappingURL=v1DeleteOptions.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1Deployment = void 0;\n/**\n* Deployment enables declarative updates for Pods and ReplicaSets.\n*/\nclass V1Deployment {\n static getAttributeTypeMap() {\n return V1Deployment.attributeTypeMap;\n }\n}\nexports.V1Deployment = V1Deployment;\nV1Deployment.discriminator = undefined;\nV1Deployment.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ObjectMeta\"\n },\n {\n \"name\": \"spec\",\n \"baseName\": \"spec\",\n \"type\": \"V1DeploymentSpec\"\n },\n {\n \"name\": \"status\",\n \"baseName\": \"status\",\n \"type\": \"V1DeploymentStatus\"\n }\n];\n//# sourceMappingURL=v1Deployment.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1DeploymentCondition = void 0;\n/**\n* DeploymentCondition describes the state of a deployment at a certain point.\n*/\nclass V1DeploymentCondition {\n static getAttributeTypeMap() {\n return V1DeploymentCondition.attributeTypeMap;\n }\n}\nexports.V1DeploymentCondition = V1DeploymentCondition;\nV1DeploymentCondition.discriminator = undefined;\nV1DeploymentCondition.attributeTypeMap = [\n {\n \"name\": \"lastTransitionTime\",\n \"baseName\": \"lastTransitionTime\",\n \"type\": \"Date\"\n },\n {\n \"name\": \"lastUpdateTime\",\n \"baseName\": \"lastUpdateTime\",\n \"type\": \"Date\"\n },\n {\n \"name\": \"message\",\n \"baseName\": \"message\",\n \"type\": \"string\"\n },\n {\n \"name\": \"reason\",\n \"baseName\": \"reason\",\n \"type\": \"string\"\n },\n {\n \"name\": \"status\",\n \"baseName\": \"status\",\n \"type\": \"string\"\n },\n {\n \"name\": \"type\",\n \"baseName\": \"type\",\n \"type\": \"string\"\n }\n];\n//# sourceMappingURL=v1DeploymentCondition.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1DeploymentList = void 0;\n/**\n* DeploymentList is a list of Deployments.\n*/\nclass V1DeploymentList {\n static getAttributeTypeMap() {\n return V1DeploymentList.attributeTypeMap;\n }\n}\nexports.V1DeploymentList = V1DeploymentList;\nV1DeploymentList.discriminator = undefined;\nV1DeploymentList.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"items\",\n \"baseName\": \"items\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ListMeta\"\n }\n];\n//# sourceMappingURL=v1DeploymentList.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1DeploymentSpec = void 0;\n/**\n* DeploymentSpec is the specification of the desired behavior of the Deployment.\n*/\nclass V1DeploymentSpec {\n static getAttributeTypeMap() {\n return V1DeploymentSpec.attributeTypeMap;\n }\n}\nexports.V1DeploymentSpec = V1DeploymentSpec;\nV1DeploymentSpec.discriminator = undefined;\nV1DeploymentSpec.attributeTypeMap = [\n {\n \"name\": \"minReadySeconds\",\n \"baseName\": \"minReadySeconds\",\n \"type\": \"number\"\n },\n {\n \"name\": \"paused\",\n \"baseName\": \"paused\",\n \"type\": \"boolean\"\n },\n {\n \"name\": \"progressDeadlineSeconds\",\n \"baseName\": \"progressDeadlineSeconds\",\n \"type\": \"number\"\n },\n {\n \"name\": \"replicas\",\n \"baseName\": \"replicas\",\n \"type\": \"number\"\n },\n {\n \"name\": \"revisionHistoryLimit\",\n \"baseName\": \"revisionHistoryLimit\",\n \"type\": \"number\"\n },\n {\n \"name\": \"selector\",\n \"baseName\": \"selector\",\n \"type\": \"V1LabelSelector\"\n },\n {\n \"name\": \"strategy\",\n \"baseName\": \"strategy\",\n \"type\": \"V1DeploymentStrategy\"\n },\n {\n \"name\": \"template\",\n \"baseName\": \"template\",\n \"type\": \"V1PodTemplateSpec\"\n }\n];\n//# sourceMappingURL=v1DeploymentSpec.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1DeploymentStatus = void 0;\n/**\n* DeploymentStatus is the most recently observed status of the Deployment.\n*/\nclass V1DeploymentStatus {\n static getAttributeTypeMap() {\n return V1DeploymentStatus.attributeTypeMap;\n }\n}\nexports.V1DeploymentStatus = V1DeploymentStatus;\nV1DeploymentStatus.discriminator = undefined;\nV1DeploymentStatus.attributeTypeMap = [\n {\n \"name\": \"availableReplicas\",\n \"baseName\": \"availableReplicas\",\n \"type\": \"number\"\n },\n {\n \"name\": \"collisionCount\",\n \"baseName\": \"collisionCount\",\n \"type\": \"number\"\n },\n {\n \"name\": \"conditions\",\n \"baseName\": \"conditions\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"observedGeneration\",\n \"baseName\": \"observedGeneration\",\n \"type\": \"number\"\n },\n {\n \"name\": \"readyReplicas\",\n \"baseName\": \"readyReplicas\",\n \"type\": \"number\"\n },\n {\n \"name\": \"replicas\",\n \"baseName\": \"replicas\",\n \"type\": \"number\"\n },\n {\n \"name\": \"unavailableReplicas\",\n \"baseName\": \"unavailableReplicas\",\n \"type\": \"number\"\n },\n {\n \"name\": \"updatedReplicas\",\n \"baseName\": \"updatedReplicas\",\n \"type\": \"number\"\n }\n];\n//# sourceMappingURL=v1DeploymentStatus.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1DeploymentStrategy = void 0;\n/**\n* DeploymentStrategy describes how to replace existing pods with new ones.\n*/\nclass V1DeploymentStrategy {\n static getAttributeTypeMap() {\n return V1DeploymentStrategy.attributeTypeMap;\n }\n}\nexports.V1DeploymentStrategy = V1DeploymentStrategy;\nV1DeploymentStrategy.discriminator = undefined;\nV1DeploymentStrategy.attributeTypeMap = [\n {\n \"name\": \"rollingUpdate\",\n \"baseName\": \"rollingUpdate\",\n \"type\": \"V1RollingUpdateDeployment\"\n },\n {\n \"name\": \"type\",\n \"baseName\": \"type\",\n \"type\": \"string\"\n }\n];\n//# sourceMappingURL=v1DeploymentStrategy.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1DownwardAPIProjection = void 0;\n/**\n* Represents downward API info for projecting into a projected volume. Note that this is identical to a downwardAPI volume source without the default mode.\n*/\nclass V1DownwardAPIProjection {\n static getAttributeTypeMap() {\n return V1DownwardAPIProjection.attributeTypeMap;\n }\n}\nexports.V1DownwardAPIProjection = V1DownwardAPIProjection;\nV1DownwardAPIProjection.discriminator = undefined;\nV1DownwardAPIProjection.attributeTypeMap = [\n {\n \"name\": \"items\",\n \"baseName\": \"items\",\n \"type\": \"Array\"\n }\n];\n//# sourceMappingURL=v1DownwardAPIProjection.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1DownwardAPIVolumeFile = void 0;\n/**\n* DownwardAPIVolumeFile represents information to create the file containing the pod field\n*/\nclass V1DownwardAPIVolumeFile {\n static getAttributeTypeMap() {\n return V1DownwardAPIVolumeFile.attributeTypeMap;\n }\n}\nexports.V1DownwardAPIVolumeFile = V1DownwardAPIVolumeFile;\nV1DownwardAPIVolumeFile.discriminator = undefined;\nV1DownwardAPIVolumeFile.attributeTypeMap = [\n {\n \"name\": \"fieldRef\",\n \"baseName\": \"fieldRef\",\n \"type\": \"V1ObjectFieldSelector\"\n },\n {\n \"name\": \"mode\",\n \"baseName\": \"mode\",\n \"type\": \"number\"\n },\n {\n \"name\": \"path\",\n \"baseName\": \"path\",\n \"type\": \"string\"\n },\n {\n \"name\": \"resourceFieldRef\",\n \"baseName\": \"resourceFieldRef\",\n \"type\": \"V1ResourceFieldSelector\"\n }\n];\n//# sourceMappingURL=v1DownwardAPIVolumeFile.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1DownwardAPIVolumeSource = void 0;\n/**\n* DownwardAPIVolumeSource represents a volume containing downward API info. Downward API volumes support ownership management and SELinux relabeling.\n*/\nclass V1DownwardAPIVolumeSource {\n static getAttributeTypeMap() {\n return V1DownwardAPIVolumeSource.attributeTypeMap;\n }\n}\nexports.V1DownwardAPIVolumeSource = V1DownwardAPIVolumeSource;\nV1DownwardAPIVolumeSource.discriminator = undefined;\nV1DownwardAPIVolumeSource.attributeTypeMap = [\n {\n \"name\": \"defaultMode\",\n \"baseName\": \"defaultMode\",\n \"type\": \"number\"\n },\n {\n \"name\": \"items\",\n \"baseName\": \"items\",\n \"type\": \"Array\"\n }\n];\n//# sourceMappingURL=v1DownwardAPIVolumeSource.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1EmptyDirVolumeSource = void 0;\n/**\n* Represents an empty directory for a pod. Empty directory volumes support ownership management and SELinux relabeling.\n*/\nclass V1EmptyDirVolumeSource {\n static getAttributeTypeMap() {\n return V1EmptyDirVolumeSource.attributeTypeMap;\n }\n}\nexports.V1EmptyDirVolumeSource = V1EmptyDirVolumeSource;\nV1EmptyDirVolumeSource.discriminator = undefined;\nV1EmptyDirVolumeSource.attributeTypeMap = [\n {\n \"name\": \"medium\",\n \"baseName\": \"medium\",\n \"type\": \"string\"\n },\n {\n \"name\": \"sizeLimit\",\n \"baseName\": \"sizeLimit\",\n \"type\": \"string\"\n }\n];\n//# sourceMappingURL=v1EmptyDirVolumeSource.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1Endpoint = void 0;\n/**\n* Endpoint represents a single logical \\\"backend\\\" implementing a service.\n*/\nclass V1Endpoint {\n static getAttributeTypeMap() {\n return V1Endpoint.attributeTypeMap;\n }\n}\nexports.V1Endpoint = V1Endpoint;\nV1Endpoint.discriminator = undefined;\nV1Endpoint.attributeTypeMap = [\n {\n \"name\": \"addresses\",\n \"baseName\": \"addresses\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"conditions\",\n \"baseName\": \"conditions\",\n \"type\": \"V1EndpointConditions\"\n },\n {\n \"name\": \"deprecatedTopology\",\n \"baseName\": \"deprecatedTopology\",\n \"type\": \"{ [key: string]: string; }\"\n },\n {\n \"name\": \"hints\",\n \"baseName\": \"hints\",\n \"type\": \"V1EndpointHints\"\n },\n {\n \"name\": \"hostname\",\n \"baseName\": \"hostname\",\n \"type\": \"string\"\n },\n {\n \"name\": \"nodeName\",\n \"baseName\": \"nodeName\",\n \"type\": \"string\"\n },\n {\n \"name\": \"targetRef\",\n \"baseName\": \"targetRef\",\n \"type\": \"V1ObjectReference\"\n },\n {\n \"name\": \"zone\",\n \"baseName\": \"zone\",\n \"type\": \"string\"\n }\n];\n//# sourceMappingURL=v1Endpoint.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1EndpointAddress = void 0;\n/**\n* EndpointAddress is a tuple that describes single IP address.\n*/\nclass V1EndpointAddress {\n static getAttributeTypeMap() {\n return V1EndpointAddress.attributeTypeMap;\n }\n}\nexports.V1EndpointAddress = V1EndpointAddress;\nV1EndpointAddress.discriminator = undefined;\nV1EndpointAddress.attributeTypeMap = [\n {\n \"name\": \"hostname\",\n \"baseName\": \"hostname\",\n \"type\": \"string\"\n },\n {\n \"name\": \"ip\",\n \"baseName\": \"ip\",\n \"type\": \"string\"\n },\n {\n \"name\": \"nodeName\",\n \"baseName\": \"nodeName\",\n \"type\": \"string\"\n },\n {\n \"name\": \"targetRef\",\n \"baseName\": \"targetRef\",\n \"type\": \"V1ObjectReference\"\n }\n];\n//# sourceMappingURL=v1EndpointAddress.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1EndpointConditions = void 0;\n/**\n* EndpointConditions represents the current condition of an endpoint.\n*/\nclass V1EndpointConditions {\n static getAttributeTypeMap() {\n return V1EndpointConditions.attributeTypeMap;\n }\n}\nexports.V1EndpointConditions = V1EndpointConditions;\nV1EndpointConditions.discriminator = undefined;\nV1EndpointConditions.attributeTypeMap = [\n {\n \"name\": \"ready\",\n \"baseName\": \"ready\",\n \"type\": \"boolean\"\n },\n {\n \"name\": \"serving\",\n \"baseName\": \"serving\",\n \"type\": \"boolean\"\n },\n {\n \"name\": \"terminating\",\n \"baseName\": \"terminating\",\n \"type\": \"boolean\"\n }\n];\n//# sourceMappingURL=v1EndpointConditions.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1EndpointHints = void 0;\n/**\n* EndpointHints provides hints describing how an endpoint should be consumed.\n*/\nclass V1EndpointHints {\n static getAttributeTypeMap() {\n return V1EndpointHints.attributeTypeMap;\n }\n}\nexports.V1EndpointHints = V1EndpointHints;\nV1EndpointHints.discriminator = undefined;\nV1EndpointHints.attributeTypeMap = [\n {\n \"name\": \"forZones\",\n \"baseName\": \"forZones\",\n \"type\": \"Array\"\n }\n];\n//# sourceMappingURL=v1EndpointHints.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1EndpointSlice = void 0;\n/**\n* 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.\n*/\nclass V1EndpointSlice {\n static getAttributeTypeMap() {\n return V1EndpointSlice.attributeTypeMap;\n }\n}\nexports.V1EndpointSlice = V1EndpointSlice;\nV1EndpointSlice.discriminator = undefined;\nV1EndpointSlice.attributeTypeMap = [\n {\n \"name\": \"addressType\",\n \"baseName\": \"addressType\",\n \"type\": \"string\"\n },\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"endpoints\",\n \"baseName\": \"endpoints\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ObjectMeta\"\n },\n {\n \"name\": \"ports\",\n \"baseName\": \"ports\",\n \"type\": \"Array\"\n }\n];\n//# sourceMappingURL=v1EndpointSlice.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1EndpointSliceList = void 0;\n/**\n* EndpointSliceList represents a list of endpoint slices\n*/\nclass V1EndpointSliceList {\n static getAttributeTypeMap() {\n return V1EndpointSliceList.attributeTypeMap;\n }\n}\nexports.V1EndpointSliceList = V1EndpointSliceList;\nV1EndpointSliceList.discriminator = undefined;\nV1EndpointSliceList.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"items\",\n \"baseName\": \"items\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ListMeta\"\n }\n];\n//# sourceMappingURL=v1EndpointSliceList.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1EndpointSubset = void 0;\n/**\n* 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 ]\n*/\nclass V1EndpointSubset {\n static getAttributeTypeMap() {\n return V1EndpointSubset.attributeTypeMap;\n }\n}\nexports.V1EndpointSubset = V1EndpointSubset;\nV1EndpointSubset.discriminator = undefined;\nV1EndpointSubset.attributeTypeMap = [\n {\n \"name\": \"addresses\",\n \"baseName\": \"addresses\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"notReadyAddresses\",\n \"baseName\": \"notReadyAddresses\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"ports\",\n \"baseName\": \"ports\",\n \"type\": \"Array\"\n }\n];\n//# sourceMappingURL=v1EndpointSubset.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1Endpoints = void 0;\n/**\n* 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}] }, ]\n*/\nclass V1Endpoints {\n static getAttributeTypeMap() {\n return V1Endpoints.attributeTypeMap;\n }\n}\nexports.V1Endpoints = V1Endpoints;\nV1Endpoints.discriminator = undefined;\nV1Endpoints.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ObjectMeta\"\n },\n {\n \"name\": \"subsets\",\n \"baseName\": \"subsets\",\n \"type\": \"Array\"\n }\n];\n//# sourceMappingURL=v1Endpoints.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1EndpointsList = void 0;\n/**\n* EndpointsList is a list of endpoints.\n*/\nclass V1EndpointsList {\n static getAttributeTypeMap() {\n return V1EndpointsList.attributeTypeMap;\n }\n}\nexports.V1EndpointsList = V1EndpointsList;\nV1EndpointsList.discriminator = undefined;\nV1EndpointsList.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"items\",\n \"baseName\": \"items\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ListMeta\"\n }\n];\n//# sourceMappingURL=v1EndpointsList.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1EnvFromSource = void 0;\n/**\n* EnvFromSource represents the source of a set of ConfigMaps\n*/\nclass V1EnvFromSource {\n static getAttributeTypeMap() {\n return V1EnvFromSource.attributeTypeMap;\n }\n}\nexports.V1EnvFromSource = V1EnvFromSource;\nV1EnvFromSource.discriminator = undefined;\nV1EnvFromSource.attributeTypeMap = [\n {\n \"name\": \"configMapRef\",\n \"baseName\": \"configMapRef\",\n \"type\": \"V1ConfigMapEnvSource\"\n },\n {\n \"name\": \"prefix\",\n \"baseName\": \"prefix\",\n \"type\": \"string\"\n },\n {\n \"name\": \"secretRef\",\n \"baseName\": \"secretRef\",\n \"type\": \"V1SecretEnvSource\"\n }\n];\n//# sourceMappingURL=v1EnvFromSource.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1EnvVar = void 0;\n/**\n* EnvVar represents an environment variable present in a Container.\n*/\nclass V1EnvVar {\n static getAttributeTypeMap() {\n return V1EnvVar.attributeTypeMap;\n }\n}\nexports.V1EnvVar = V1EnvVar;\nV1EnvVar.discriminator = undefined;\nV1EnvVar.attributeTypeMap = [\n {\n \"name\": \"name\",\n \"baseName\": \"name\",\n \"type\": \"string\"\n },\n {\n \"name\": \"value\",\n \"baseName\": \"value\",\n \"type\": \"string\"\n },\n {\n \"name\": \"valueFrom\",\n \"baseName\": \"valueFrom\",\n \"type\": \"V1EnvVarSource\"\n }\n];\n//# sourceMappingURL=v1EnvVar.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1EnvVarSource = void 0;\n/**\n* EnvVarSource represents a source for the value of an EnvVar.\n*/\nclass V1EnvVarSource {\n static getAttributeTypeMap() {\n return V1EnvVarSource.attributeTypeMap;\n }\n}\nexports.V1EnvVarSource = V1EnvVarSource;\nV1EnvVarSource.discriminator = undefined;\nV1EnvVarSource.attributeTypeMap = [\n {\n \"name\": \"configMapKeyRef\",\n \"baseName\": \"configMapKeyRef\",\n \"type\": \"V1ConfigMapKeySelector\"\n },\n {\n \"name\": \"fieldRef\",\n \"baseName\": \"fieldRef\",\n \"type\": \"V1ObjectFieldSelector\"\n },\n {\n \"name\": \"resourceFieldRef\",\n \"baseName\": \"resourceFieldRef\",\n \"type\": \"V1ResourceFieldSelector\"\n },\n {\n \"name\": \"secretKeyRef\",\n \"baseName\": \"secretKeyRef\",\n \"type\": \"V1SecretKeySelector\"\n }\n];\n//# sourceMappingURL=v1EnvVarSource.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1EphemeralContainer = void 0;\n/**\n* 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.\n*/\nclass V1EphemeralContainer {\n static getAttributeTypeMap() {\n return V1EphemeralContainer.attributeTypeMap;\n }\n}\nexports.V1EphemeralContainer = V1EphemeralContainer;\nV1EphemeralContainer.discriminator = undefined;\nV1EphemeralContainer.attributeTypeMap = [\n {\n \"name\": \"args\",\n \"baseName\": \"args\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"command\",\n \"baseName\": \"command\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"env\",\n \"baseName\": \"env\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"envFrom\",\n \"baseName\": \"envFrom\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"image\",\n \"baseName\": \"image\",\n \"type\": \"string\"\n },\n {\n \"name\": \"imagePullPolicy\",\n \"baseName\": \"imagePullPolicy\",\n \"type\": \"string\"\n },\n {\n \"name\": \"lifecycle\",\n \"baseName\": \"lifecycle\",\n \"type\": \"V1Lifecycle\"\n },\n {\n \"name\": \"livenessProbe\",\n \"baseName\": \"livenessProbe\",\n \"type\": \"V1Probe\"\n },\n {\n \"name\": \"name\",\n \"baseName\": \"name\",\n \"type\": \"string\"\n },\n {\n \"name\": \"ports\",\n \"baseName\": \"ports\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"readinessProbe\",\n \"baseName\": \"readinessProbe\",\n \"type\": \"V1Probe\"\n },\n {\n \"name\": \"resources\",\n \"baseName\": \"resources\",\n \"type\": \"V1ResourceRequirements\"\n },\n {\n \"name\": \"securityContext\",\n \"baseName\": \"securityContext\",\n \"type\": \"V1SecurityContext\"\n },\n {\n \"name\": \"startupProbe\",\n \"baseName\": \"startupProbe\",\n \"type\": \"V1Probe\"\n },\n {\n \"name\": \"stdin\",\n \"baseName\": \"stdin\",\n \"type\": \"boolean\"\n },\n {\n \"name\": \"stdinOnce\",\n \"baseName\": \"stdinOnce\",\n \"type\": \"boolean\"\n },\n {\n \"name\": \"targetContainerName\",\n \"baseName\": \"targetContainerName\",\n \"type\": \"string\"\n },\n {\n \"name\": \"terminationMessagePath\",\n \"baseName\": \"terminationMessagePath\",\n \"type\": \"string\"\n },\n {\n \"name\": \"terminationMessagePolicy\",\n \"baseName\": \"terminationMessagePolicy\",\n \"type\": \"string\"\n },\n {\n \"name\": \"tty\",\n \"baseName\": \"tty\",\n \"type\": \"boolean\"\n },\n {\n \"name\": \"volumeDevices\",\n \"baseName\": \"volumeDevices\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"volumeMounts\",\n \"baseName\": \"volumeMounts\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"workingDir\",\n \"baseName\": \"workingDir\",\n \"type\": \"string\"\n }\n];\n//# sourceMappingURL=v1EphemeralContainer.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1EphemeralVolumeSource = void 0;\n/**\n* Represents an ephemeral volume that is handled by a normal storage driver.\n*/\nclass V1EphemeralVolumeSource {\n static getAttributeTypeMap() {\n return V1EphemeralVolumeSource.attributeTypeMap;\n }\n}\nexports.V1EphemeralVolumeSource = V1EphemeralVolumeSource;\nV1EphemeralVolumeSource.discriminator = undefined;\nV1EphemeralVolumeSource.attributeTypeMap = [\n {\n \"name\": \"volumeClaimTemplate\",\n \"baseName\": \"volumeClaimTemplate\",\n \"type\": \"V1PersistentVolumeClaimTemplate\"\n }\n];\n//# sourceMappingURL=v1EphemeralVolumeSource.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1EventSource = void 0;\n/**\n* EventSource contains information for an event.\n*/\nclass V1EventSource {\n static getAttributeTypeMap() {\n return V1EventSource.attributeTypeMap;\n }\n}\nexports.V1EventSource = V1EventSource;\nV1EventSource.discriminator = undefined;\nV1EventSource.attributeTypeMap = [\n {\n \"name\": \"component\",\n \"baseName\": \"component\",\n \"type\": \"string\"\n },\n {\n \"name\": \"host\",\n \"baseName\": \"host\",\n \"type\": \"string\"\n }\n];\n//# sourceMappingURL=v1EventSource.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1Eviction = void 0;\n/**\n* 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.\n*/\nclass V1Eviction {\n static getAttributeTypeMap() {\n return V1Eviction.attributeTypeMap;\n }\n}\nexports.V1Eviction = V1Eviction;\nV1Eviction.discriminator = undefined;\nV1Eviction.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"deleteOptions\",\n \"baseName\": \"deleteOptions\",\n \"type\": \"V1DeleteOptions\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ObjectMeta\"\n }\n];\n//# sourceMappingURL=v1Eviction.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1ExecAction = void 0;\n/**\n* ExecAction describes a \\\"run in container\\\" action.\n*/\nclass V1ExecAction {\n static getAttributeTypeMap() {\n return V1ExecAction.attributeTypeMap;\n }\n}\nexports.V1ExecAction = V1ExecAction;\nV1ExecAction.discriminator = undefined;\nV1ExecAction.attributeTypeMap = [\n {\n \"name\": \"command\",\n \"baseName\": \"command\",\n \"type\": \"Array\"\n }\n];\n//# sourceMappingURL=v1ExecAction.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1ExternalDocumentation = void 0;\n/**\n* ExternalDocumentation allows referencing an external resource for extended documentation.\n*/\nclass V1ExternalDocumentation {\n static getAttributeTypeMap() {\n return V1ExternalDocumentation.attributeTypeMap;\n }\n}\nexports.V1ExternalDocumentation = V1ExternalDocumentation;\nV1ExternalDocumentation.discriminator = undefined;\nV1ExternalDocumentation.attributeTypeMap = [\n {\n \"name\": \"description\",\n \"baseName\": \"description\",\n \"type\": \"string\"\n },\n {\n \"name\": \"url\",\n \"baseName\": \"url\",\n \"type\": \"string\"\n }\n];\n//# sourceMappingURL=v1ExternalDocumentation.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1FCVolumeSource = void 0;\n/**\n* 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.\n*/\nclass V1FCVolumeSource {\n static getAttributeTypeMap() {\n return V1FCVolumeSource.attributeTypeMap;\n }\n}\nexports.V1FCVolumeSource = V1FCVolumeSource;\nV1FCVolumeSource.discriminator = undefined;\nV1FCVolumeSource.attributeTypeMap = [\n {\n \"name\": \"fsType\",\n \"baseName\": \"fsType\",\n \"type\": \"string\"\n },\n {\n \"name\": \"lun\",\n \"baseName\": \"lun\",\n \"type\": \"number\"\n },\n {\n \"name\": \"readOnly\",\n \"baseName\": \"readOnly\",\n \"type\": \"boolean\"\n },\n {\n \"name\": \"targetWWNs\",\n \"baseName\": \"targetWWNs\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"wwids\",\n \"baseName\": \"wwids\",\n \"type\": \"Array\"\n }\n];\n//# sourceMappingURL=v1FCVolumeSource.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1FlexPersistentVolumeSource = void 0;\n/**\n* FlexPersistentVolumeSource represents a generic persistent volume resource that is provisioned/attached using an exec based plugin.\n*/\nclass V1FlexPersistentVolumeSource {\n static getAttributeTypeMap() {\n return V1FlexPersistentVolumeSource.attributeTypeMap;\n }\n}\nexports.V1FlexPersistentVolumeSource = V1FlexPersistentVolumeSource;\nV1FlexPersistentVolumeSource.discriminator = undefined;\nV1FlexPersistentVolumeSource.attributeTypeMap = [\n {\n \"name\": \"driver\",\n \"baseName\": \"driver\",\n \"type\": \"string\"\n },\n {\n \"name\": \"fsType\",\n \"baseName\": \"fsType\",\n \"type\": \"string\"\n },\n {\n \"name\": \"options\",\n \"baseName\": \"options\",\n \"type\": \"{ [key: string]: string; }\"\n },\n {\n \"name\": \"readOnly\",\n \"baseName\": \"readOnly\",\n \"type\": \"boolean\"\n },\n {\n \"name\": \"secretRef\",\n \"baseName\": \"secretRef\",\n \"type\": \"V1SecretReference\"\n }\n];\n//# sourceMappingURL=v1FlexPersistentVolumeSource.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1FlexVolumeSource = void 0;\n/**\n* FlexVolume represents a generic volume resource that is provisioned/attached using an exec based plugin.\n*/\nclass V1FlexVolumeSource {\n static getAttributeTypeMap() {\n return V1FlexVolumeSource.attributeTypeMap;\n }\n}\nexports.V1FlexVolumeSource = V1FlexVolumeSource;\nV1FlexVolumeSource.discriminator = undefined;\nV1FlexVolumeSource.attributeTypeMap = [\n {\n \"name\": \"driver\",\n \"baseName\": \"driver\",\n \"type\": \"string\"\n },\n {\n \"name\": \"fsType\",\n \"baseName\": \"fsType\",\n \"type\": \"string\"\n },\n {\n \"name\": \"options\",\n \"baseName\": \"options\",\n \"type\": \"{ [key: string]: string; }\"\n },\n {\n \"name\": \"readOnly\",\n \"baseName\": \"readOnly\",\n \"type\": \"boolean\"\n },\n {\n \"name\": \"secretRef\",\n \"baseName\": \"secretRef\",\n \"type\": \"V1LocalObjectReference\"\n }\n];\n//# sourceMappingURL=v1FlexVolumeSource.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1FlockerVolumeSource = void 0;\n/**\n* 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.\n*/\nclass V1FlockerVolumeSource {\n static getAttributeTypeMap() {\n return V1FlockerVolumeSource.attributeTypeMap;\n }\n}\nexports.V1FlockerVolumeSource = V1FlockerVolumeSource;\nV1FlockerVolumeSource.discriminator = undefined;\nV1FlockerVolumeSource.attributeTypeMap = [\n {\n \"name\": \"datasetName\",\n \"baseName\": \"datasetName\",\n \"type\": \"string\"\n },\n {\n \"name\": \"datasetUUID\",\n \"baseName\": \"datasetUUID\",\n \"type\": \"string\"\n }\n];\n//# sourceMappingURL=v1FlockerVolumeSource.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1ForZone = void 0;\n/**\n* ForZone provides information about which zones should consume this endpoint.\n*/\nclass V1ForZone {\n static getAttributeTypeMap() {\n return V1ForZone.attributeTypeMap;\n }\n}\nexports.V1ForZone = V1ForZone;\nV1ForZone.discriminator = undefined;\nV1ForZone.attributeTypeMap = [\n {\n \"name\": \"name\",\n \"baseName\": \"name\",\n \"type\": \"string\"\n }\n];\n//# sourceMappingURL=v1ForZone.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1GCEPersistentDiskVolumeSource = void 0;\n/**\n* 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.\n*/\nclass V1GCEPersistentDiskVolumeSource {\n static getAttributeTypeMap() {\n return V1GCEPersistentDiskVolumeSource.attributeTypeMap;\n }\n}\nexports.V1GCEPersistentDiskVolumeSource = V1GCEPersistentDiskVolumeSource;\nV1GCEPersistentDiskVolumeSource.discriminator = undefined;\nV1GCEPersistentDiskVolumeSource.attributeTypeMap = [\n {\n \"name\": \"fsType\",\n \"baseName\": \"fsType\",\n \"type\": \"string\"\n },\n {\n \"name\": \"partition\",\n \"baseName\": \"partition\",\n \"type\": \"number\"\n },\n {\n \"name\": \"pdName\",\n \"baseName\": \"pdName\",\n \"type\": \"string\"\n },\n {\n \"name\": \"readOnly\",\n \"baseName\": \"readOnly\",\n \"type\": \"boolean\"\n }\n];\n//# sourceMappingURL=v1GCEPersistentDiskVolumeSource.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1GitRepoVolumeSource = void 0;\n/**\n* 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.\n*/\nclass V1GitRepoVolumeSource {\n static getAttributeTypeMap() {\n return V1GitRepoVolumeSource.attributeTypeMap;\n }\n}\nexports.V1GitRepoVolumeSource = V1GitRepoVolumeSource;\nV1GitRepoVolumeSource.discriminator = undefined;\nV1GitRepoVolumeSource.attributeTypeMap = [\n {\n \"name\": \"directory\",\n \"baseName\": \"directory\",\n \"type\": \"string\"\n },\n {\n \"name\": \"repository\",\n \"baseName\": \"repository\",\n \"type\": \"string\"\n },\n {\n \"name\": \"revision\",\n \"baseName\": \"revision\",\n \"type\": \"string\"\n }\n];\n//# sourceMappingURL=v1GitRepoVolumeSource.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1GlusterfsPersistentVolumeSource = void 0;\n/**\n* Represents a Glusterfs mount that lasts the lifetime of a pod. Glusterfs volumes do not support ownership management or SELinux relabeling.\n*/\nclass V1GlusterfsPersistentVolumeSource {\n static getAttributeTypeMap() {\n return V1GlusterfsPersistentVolumeSource.attributeTypeMap;\n }\n}\nexports.V1GlusterfsPersistentVolumeSource = V1GlusterfsPersistentVolumeSource;\nV1GlusterfsPersistentVolumeSource.discriminator = undefined;\nV1GlusterfsPersistentVolumeSource.attributeTypeMap = [\n {\n \"name\": \"endpoints\",\n \"baseName\": \"endpoints\",\n \"type\": \"string\"\n },\n {\n \"name\": \"endpointsNamespace\",\n \"baseName\": \"endpointsNamespace\",\n \"type\": \"string\"\n },\n {\n \"name\": \"path\",\n \"baseName\": \"path\",\n \"type\": \"string\"\n },\n {\n \"name\": \"readOnly\",\n \"baseName\": \"readOnly\",\n \"type\": \"boolean\"\n }\n];\n//# sourceMappingURL=v1GlusterfsPersistentVolumeSource.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1GlusterfsVolumeSource = void 0;\n/**\n* Represents a Glusterfs mount that lasts the lifetime of a pod. Glusterfs volumes do not support ownership management or SELinux relabeling.\n*/\nclass V1GlusterfsVolumeSource {\n static getAttributeTypeMap() {\n return V1GlusterfsVolumeSource.attributeTypeMap;\n }\n}\nexports.V1GlusterfsVolumeSource = V1GlusterfsVolumeSource;\nV1GlusterfsVolumeSource.discriminator = undefined;\nV1GlusterfsVolumeSource.attributeTypeMap = [\n {\n \"name\": \"endpoints\",\n \"baseName\": \"endpoints\",\n \"type\": \"string\"\n },\n {\n \"name\": \"path\",\n \"baseName\": \"path\",\n \"type\": \"string\"\n },\n {\n \"name\": \"readOnly\",\n \"baseName\": \"readOnly\",\n \"type\": \"boolean\"\n }\n];\n//# sourceMappingURL=v1GlusterfsVolumeSource.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1GroupVersionForDiscovery = void 0;\n/**\n* GroupVersion contains the \\\"group/version\\\" and \\\"version\\\" string of a version. It is made a struct to keep extensibility.\n*/\nclass V1GroupVersionForDiscovery {\n static getAttributeTypeMap() {\n return V1GroupVersionForDiscovery.attributeTypeMap;\n }\n}\nexports.V1GroupVersionForDiscovery = V1GroupVersionForDiscovery;\nV1GroupVersionForDiscovery.discriminator = undefined;\nV1GroupVersionForDiscovery.attributeTypeMap = [\n {\n \"name\": \"groupVersion\",\n \"baseName\": \"groupVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"version\",\n \"baseName\": \"version\",\n \"type\": \"string\"\n }\n];\n//# sourceMappingURL=v1GroupVersionForDiscovery.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1HTTPGetAction = void 0;\n/**\n* HTTPGetAction describes an action based on HTTP Get requests.\n*/\nclass V1HTTPGetAction {\n static getAttributeTypeMap() {\n return V1HTTPGetAction.attributeTypeMap;\n }\n}\nexports.V1HTTPGetAction = V1HTTPGetAction;\nV1HTTPGetAction.discriminator = undefined;\nV1HTTPGetAction.attributeTypeMap = [\n {\n \"name\": \"host\",\n \"baseName\": \"host\",\n \"type\": \"string\"\n },\n {\n \"name\": \"httpHeaders\",\n \"baseName\": \"httpHeaders\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"path\",\n \"baseName\": \"path\",\n \"type\": \"string\"\n },\n {\n \"name\": \"port\",\n \"baseName\": \"port\",\n \"type\": \"IntOrString\"\n },\n {\n \"name\": \"scheme\",\n \"baseName\": \"scheme\",\n \"type\": \"string\"\n }\n];\n//# sourceMappingURL=v1HTTPGetAction.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1HTTPHeader = void 0;\n/**\n* HTTPHeader describes a custom header to be used in HTTP probes\n*/\nclass V1HTTPHeader {\n static getAttributeTypeMap() {\n return V1HTTPHeader.attributeTypeMap;\n }\n}\nexports.V1HTTPHeader = V1HTTPHeader;\nV1HTTPHeader.discriminator = undefined;\nV1HTTPHeader.attributeTypeMap = [\n {\n \"name\": \"name\",\n \"baseName\": \"name\",\n \"type\": \"string\"\n },\n {\n \"name\": \"value\",\n \"baseName\": \"value\",\n \"type\": \"string\"\n }\n];\n//# sourceMappingURL=v1HTTPHeader.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1HTTPIngressPath = void 0;\n/**\n* HTTPIngressPath associates a path with a backend. Incoming urls matching the path are forwarded to the backend.\n*/\nclass V1HTTPIngressPath {\n static getAttributeTypeMap() {\n return V1HTTPIngressPath.attributeTypeMap;\n }\n}\nexports.V1HTTPIngressPath = V1HTTPIngressPath;\nV1HTTPIngressPath.discriminator = undefined;\nV1HTTPIngressPath.attributeTypeMap = [\n {\n \"name\": \"backend\",\n \"baseName\": \"backend\",\n \"type\": \"V1IngressBackend\"\n },\n {\n \"name\": \"path\",\n \"baseName\": \"path\",\n \"type\": \"string\"\n },\n {\n \"name\": \"pathType\",\n \"baseName\": \"pathType\",\n \"type\": \"string\"\n }\n];\n//# sourceMappingURL=v1HTTPIngressPath.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1HTTPIngressRuleValue = void 0;\n/**\n* 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 \\'#\\'.\n*/\nclass V1HTTPIngressRuleValue {\n static getAttributeTypeMap() {\n return V1HTTPIngressRuleValue.attributeTypeMap;\n }\n}\nexports.V1HTTPIngressRuleValue = V1HTTPIngressRuleValue;\nV1HTTPIngressRuleValue.discriminator = undefined;\nV1HTTPIngressRuleValue.attributeTypeMap = [\n {\n \"name\": \"paths\",\n \"baseName\": \"paths\",\n \"type\": \"Array\"\n }\n];\n//# sourceMappingURL=v1HTTPIngressRuleValue.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1Handler = void 0;\n/**\n* Handler defines a specific action that should be taken\n*/\nclass V1Handler {\n static getAttributeTypeMap() {\n return V1Handler.attributeTypeMap;\n }\n}\nexports.V1Handler = V1Handler;\nV1Handler.discriminator = undefined;\nV1Handler.attributeTypeMap = [\n {\n \"name\": \"exec\",\n \"baseName\": \"exec\",\n \"type\": \"V1ExecAction\"\n },\n {\n \"name\": \"httpGet\",\n \"baseName\": \"httpGet\",\n \"type\": \"V1HTTPGetAction\"\n },\n {\n \"name\": \"tcpSocket\",\n \"baseName\": \"tcpSocket\",\n \"type\": \"V1TCPSocketAction\"\n }\n];\n//# sourceMappingURL=v1Handler.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1HorizontalPodAutoscaler = void 0;\n/**\n* configuration of a horizontal pod autoscaler.\n*/\nclass V1HorizontalPodAutoscaler {\n static getAttributeTypeMap() {\n return V1HorizontalPodAutoscaler.attributeTypeMap;\n }\n}\nexports.V1HorizontalPodAutoscaler = V1HorizontalPodAutoscaler;\nV1HorizontalPodAutoscaler.discriminator = undefined;\nV1HorizontalPodAutoscaler.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ObjectMeta\"\n },\n {\n \"name\": \"spec\",\n \"baseName\": \"spec\",\n \"type\": \"V1HorizontalPodAutoscalerSpec\"\n },\n {\n \"name\": \"status\",\n \"baseName\": \"status\",\n \"type\": \"V1HorizontalPodAutoscalerStatus\"\n }\n];\n//# sourceMappingURL=v1HorizontalPodAutoscaler.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1HorizontalPodAutoscalerList = void 0;\n/**\n* list of horizontal pod autoscaler objects.\n*/\nclass V1HorizontalPodAutoscalerList {\n static getAttributeTypeMap() {\n return V1HorizontalPodAutoscalerList.attributeTypeMap;\n }\n}\nexports.V1HorizontalPodAutoscalerList = V1HorizontalPodAutoscalerList;\nV1HorizontalPodAutoscalerList.discriminator = undefined;\nV1HorizontalPodAutoscalerList.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"items\",\n \"baseName\": \"items\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ListMeta\"\n }\n];\n//# sourceMappingURL=v1HorizontalPodAutoscalerList.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1HorizontalPodAutoscalerSpec = void 0;\n/**\n* specification of a horizontal pod autoscaler.\n*/\nclass V1HorizontalPodAutoscalerSpec {\n static getAttributeTypeMap() {\n return V1HorizontalPodAutoscalerSpec.attributeTypeMap;\n }\n}\nexports.V1HorizontalPodAutoscalerSpec = V1HorizontalPodAutoscalerSpec;\nV1HorizontalPodAutoscalerSpec.discriminator = undefined;\nV1HorizontalPodAutoscalerSpec.attributeTypeMap = [\n {\n \"name\": \"maxReplicas\",\n \"baseName\": \"maxReplicas\",\n \"type\": \"number\"\n },\n {\n \"name\": \"minReplicas\",\n \"baseName\": \"minReplicas\",\n \"type\": \"number\"\n },\n {\n \"name\": \"scaleTargetRef\",\n \"baseName\": \"scaleTargetRef\",\n \"type\": \"V1CrossVersionObjectReference\"\n },\n {\n \"name\": \"targetCPUUtilizationPercentage\",\n \"baseName\": \"targetCPUUtilizationPercentage\",\n \"type\": \"number\"\n }\n];\n//# sourceMappingURL=v1HorizontalPodAutoscalerSpec.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1HorizontalPodAutoscalerStatus = void 0;\n/**\n* current status of a horizontal pod autoscaler\n*/\nclass V1HorizontalPodAutoscalerStatus {\n static getAttributeTypeMap() {\n return V1HorizontalPodAutoscalerStatus.attributeTypeMap;\n }\n}\nexports.V1HorizontalPodAutoscalerStatus = V1HorizontalPodAutoscalerStatus;\nV1HorizontalPodAutoscalerStatus.discriminator = undefined;\nV1HorizontalPodAutoscalerStatus.attributeTypeMap = [\n {\n \"name\": \"currentCPUUtilizationPercentage\",\n \"baseName\": \"currentCPUUtilizationPercentage\",\n \"type\": \"number\"\n },\n {\n \"name\": \"currentReplicas\",\n \"baseName\": \"currentReplicas\",\n \"type\": \"number\"\n },\n {\n \"name\": \"desiredReplicas\",\n \"baseName\": \"desiredReplicas\",\n \"type\": \"number\"\n },\n {\n \"name\": \"lastScaleTime\",\n \"baseName\": \"lastScaleTime\",\n \"type\": \"Date\"\n },\n {\n \"name\": \"observedGeneration\",\n \"baseName\": \"observedGeneration\",\n \"type\": \"number\"\n }\n];\n//# sourceMappingURL=v1HorizontalPodAutoscalerStatus.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1HostAlias = void 0;\n/**\n* HostAlias holds the mapping between IP and hostnames that will be injected as an entry in the pod\\'s hosts file.\n*/\nclass V1HostAlias {\n static getAttributeTypeMap() {\n return V1HostAlias.attributeTypeMap;\n }\n}\nexports.V1HostAlias = V1HostAlias;\nV1HostAlias.discriminator = undefined;\nV1HostAlias.attributeTypeMap = [\n {\n \"name\": \"hostnames\",\n \"baseName\": \"hostnames\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"ip\",\n \"baseName\": \"ip\",\n \"type\": \"string\"\n }\n];\n//# sourceMappingURL=v1HostAlias.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1HostPathVolumeSource = void 0;\n/**\n* Represents a host path mapped into a pod. Host path volumes do not support ownership management or SELinux relabeling.\n*/\nclass V1HostPathVolumeSource {\n static getAttributeTypeMap() {\n return V1HostPathVolumeSource.attributeTypeMap;\n }\n}\nexports.V1HostPathVolumeSource = V1HostPathVolumeSource;\nV1HostPathVolumeSource.discriminator = undefined;\nV1HostPathVolumeSource.attributeTypeMap = [\n {\n \"name\": \"path\",\n \"baseName\": \"path\",\n \"type\": \"string\"\n },\n {\n \"name\": \"type\",\n \"baseName\": \"type\",\n \"type\": \"string\"\n }\n];\n//# sourceMappingURL=v1HostPathVolumeSource.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1IPBlock = void 0;\n/**\n* 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.\n*/\nclass V1IPBlock {\n static getAttributeTypeMap() {\n return V1IPBlock.attributeTypeMap;\n }\n}\nexports.V1IPBlock = V1IPBlock;\nV1IPBlock.discriminator = undefined;\nV1IPBlock.attributeTypeMap = [\n {\n \"name\": \"cidr\",\n \"baseName\": \"cidr\",\n \"type\": \"string\"\n },\n {\n \"name\": \"except\",\n \"baseName\": \"except\",\n \"type\": \"Array\"\n }\n];\n//# sourceMappingURL=v1IPBlock.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1ISCSIPersistentVolumeSource = void 0;\n/**\n* ISCSIPersistentVolumeSource represents an ISCSI disk. ISCSI volumes can only be mounted as read/write once. ISCSI volumes support ownership management and SELinux relabeling.\n*/\nclass V1ISCSIPersistentVolumeSource {\n static getAttributeTypeMap() {\n return V1ISCSIPersistentVolumeSource.attributeTypeMap;\n }\n}\nexports.V1ISCSIPersistentVolumeSource = V1ISCSIPersistentVolumeSource;\nV1ISCSIPersistentVolumeSource.discriminator = undefined;\nV1ISCSIPersistentVolumeSource.attributeTypeMap = [\n {\n \"name\": \"chapAuthDiscovery\",\n \"baseName\": \"chapAuthDiscovery\",\n \"type\": \"boolean\"\n },\n {\n \"name\": \"chapAuthSession\",\n \"baseName\": \"chapAuthSession\",\n \"type\": \"boolean\"\n },\n {\n \"name\": \"fsType\",\n \"baseName\": \"fsType\",\n \"type\": \"string\"\n },\n {\n \"name\": \"initiatorName\",\n \"baseName\": \"initiatorName\",\n \"type\": \"string\"\n },\n {\n \"name\": \"iqn\",\n \"baseName\": \"iqn\",\n \"type\": \"string\"\n },\n {\n \"name\": \"iscsiInterface\",\n \"baseName\": \"iscsiInterface\",\n \"type\": \"string\"\n },\n {\n \"name\": \"lun\",\n \"baseName\": \"lun\",\n \"type\": \"number\"\n },\n {\n \"name\": \"portals\",\n \"baseName\": \"portals\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"readOnly\",\n \"baseName\": \"readOnly\",\n \"type\": \"boolean\"\n },\n {\n \"name\": \"secretRef\",\n \"baseName\": \"secretRef\",\n \"type\": \"V1SecretReference\"\n },\n {\n \"name\": \"targetPortal\",\n \"baseName\": \"targetPortal\",\n \"type\": \"string\"\n }\n];\n//# sourceMappingURL=v1ISCSIPersistentVolumeSource.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1ISCSIVolumeSource = void 0;\n/**\n* Represents an ISCSI disk. ISCSI volumes can only be mounted as read/write once. ISCSI volumes support ownership management and SELinux relabeling.\n*/\nclass V1ISCSIVolumeSource {\n static getAttributeTypeMap() {\n return V1ISCSIVolumeSource.attributeTypeMap;\n }\n}\nexports.V1ISCSIVolumeSource = V1ISCSIVolumeSource;\nV1ISCSIVolumeSource.discriminator = undefined;\nV1ISCSIVolumeSource.attributeTypeMap = [\n {\n \"name\": \"chapAuthDiscovery\",\n \"baseName\": \"chapAuthDiscovery\",\n \"type\": \"boolean\"\n },\n {\n \"name\": \"chapAuthSession\",\n \"baseName\": \"chapAuthSession\",\n \"type\": \"boolean\"\n },\n {\n \"name\": \"fsType\",\n \"baseName\": \"fsType\",\n \"type\": \"string\"\n },\n {\n \"name\": \"initiatorName\",\n \"baseName\": \"initiatorName\",\n \"type\": \"string\"\n },\n {\n \"name\": \"iqn\",\n \"baseName\": \"iqn\",\n \"type\": \"string\"\n },\n {\n \"name\": \"iscsiInterface\",\n \"baseName\": \"iscsiInterface\",\n \"type\": \"string\"\n },\n {\n \"name\": \"lun\",\n \"baseName\": \"lun\",\n \"type\": \"number\"\n },\n {\n \"name\": \"portals\",\n \"baseName\": \"portals\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"readOnly\",\n \"baseName\": \"readOnly\",\n \"type\": \"boolean\"\n },\n {\n \"name\": \"secretRef\",\n \"baseName\": \"secretRef\",\n \"type\": \"V1LocalObjectReference\"\n },\n {\n \"name\": \"targetPortal\",\n \"baseName\": \"targetPortal\",\n \"type\": \"string\"\n }\n];\n//# sourceMappingURL=v1ISCSIVolumeSource.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1Ingress = void 0;\n/**\n* 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.\n*/\nclass V1Ingress {\n static getAttributeTypeMap() {\n return V1Ingress.attributeTypeMap;\n }\n}\nexports.V1Ingress = V1Ingress;\nV1Ingress.discriminator = undefined;\nV1Ingress.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ObjectMeta\"\n },\n {\n \"name\": \"spec\",\n \"baseName\": \"spec\",\n \"type\": \"V1IngressSpec\"\n },\n {\n \"name\": \"status\",\n \"baseName\": \"status\",\n \"type\": \"V1IngressStatus\"\n }\n];\n//# sourceMappingURL=v1Ingress.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1IngressBackend = void 0;\n/**\n* IngressBackend describes all endpoints for a given service and port.\n*/\nclass V1IngressBackend {\n static getAttributeTypeMap() {\n return V1IngressBackend.attributeTypeMap;\n }\n}\nexports.V1IngressBackend = V1IngressBackend;\nV1IngressBackend.discriminator = undefined;\nV1IngressBackend.attributeTypeMap = [\n {\n \"name\": \"resource\",\n \"baseName\": \"resource\",\n \"type\": \"V1TypedLocalObjectReference\"\n },\n {\n \"name\": \"service\",\n \"baseName\": \"service\",\n \"type\": \"V1IngressServiceBackend\"\n }\n];\n//# sourceMappingURL=v1IngressBackend.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1IngressClass = void 0;\n/**\n* 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.\n*/\nclass V1IngressClass {\n static getAttributeTypeMap() {\n return V1IngressClass.attributeTypeMap;\n }\n}\nexports.V1IngressClass = V1IngressClass;\nV1IngressClass.discriminator = undefined;\nV1IngressClass.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ObjectMeta\"\n },\n {\n \"name\": \"spec\",\n \"baseName\": \"spec\",\n \"type\": \"V1IngressClassSpec\"\n }\n];\n//# sourceMappingURL=v1IngressClass.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1IngressClassList = void 0;\n/**\n* IngressClassList is a collection of IngressClasses.\n*/\nclass V1IngressClassList {\n static getAttributeTypeMap() {\n return V1IngressClassList.attributeTypeMap;\n }\n}\nexports.V1IngressClassList = V1IngressClassList;\nV1IngressClassList.discriminator = undefined;\nV1IngressClassList.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"items\",\n \"baseName\": \"items\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ListMeta\"\n }\n];\n//# sourceMappingURL=v1IngressClassList.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1IngressClassParametersReference = void 0;\n/**\n* IngressClassParametersReference identifies an API object. This can be used to specify a cluster or namespace-scoped resource.\n*/\nclass V1IngressClassParametersReference {\n static getAttributeTypeMap() {\n return V1IngressClassParametersReference.attributeTypeMap;\n }\n}\nexports.V1IngressClassParametersReference = V1IngressClassParametersReference;\nV1IngressClassParametersReference.discriminator = undefined;\nV1IngressClassParametersReference.attributeTypeMap = [\n {\n \"name\": \"apiGroup\",\n \"baseName\": \"apiGroup\",\n \"type\": \"string\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"name\",\n \"baseName\": \"name\",\n \"type\": \"string\"\n },\n {\n \"name\": \"namespace\",\n \"baseName\": \"namespace\",\n \"type\": \"string\"\n },\n {\n \"name\": \"scope\",\n \"baseName\": \"scope\",\n \"type\": \"string\"\n }\n];\n//# sourceMappingURL=v1IngressClassParametersReference.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1IngressClassSpec = void 0;\n/**\n* IngressClassSpec provides information about the class of an Ingress.\n*/\nclass V1IngressClassSpec {\n static getAttributeTypeMap() {\n return V1IngressClassSpec.attributeTypeMap;\n }\n}\nexports.V1IngressClassSpec = V1IngressClassSpec;\nV1IngressClassSpec.discriminator = undefined;\nV1IngressClassSpec.attributeTypeMap = [\n {\n \"name\": \"controller\",\n \"baseName\": \"controller\",\n \"type\": \"string\"\n },\n {\n \"name\": \"parameters\",\n \"baseName\": \"parameters\",\n \"type\": \"V1IngressClassParametersReference\"\n }\n];\n//# sourceMappingURL=v1IngressClassSpec.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1IngressList = void 0;\n/**\n* IngressList is a collection of Ingress.\n*/\nclass V1IngressList {\n static getAttributeTypeMap() {\n return V1IngressList.attributeTypeMap;\n }\n}\nexports.V1IngressList = V1IngressList;\nV1IngressList.discriminator = undefined;\nV1IngressList.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"items\",\n \"baseName\": \"items\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ListMeta\"\n }\n];\n//# sourceMappingURL=v1IngressList.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1IngressRule = void 0;\n/**\n* 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.\n*/\nclass V1IngressRule {\n static getAttributeTypeMap() {\n return V1IngressRule.attributeTypeMap;\n }\n}\nexports.V1IngressRule = V1IngressRule;\nV1IngressRule.discriminator = undefined;\nV1IngressRule.attributeTypeMap = [\n {\n \"name\": \"host\",\n \"baseName\": \"host\",\n \"type\": \"string\"\n },\n {\n \"name\": \"http\",\n \"baseName\": \"http\",\n \"type\": \"V1HTTPIngressRuleValue\"\n }\n];\n//# sourceMappingURL=v1IngressRule.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1IngressServiceBackend = void 0;\n/**\n* IngressServiceBackend references a Kubernetes Service as a Backend.\n*/\nclass V1IngressServiceBackend {\n static getAttributeTypeMap() {\n return V1IngressServiceBackend.attributeTypeMap;\n }\n}\nexports.V1IngressServiceBackend = V1IngressServiceBackend;\nV1IngressServiceBackend.discriminator = undefined;\nV1IngressServiceBackend.attributeTypeMap = [\n {\n \"name\": \"name\",\n \"baseName\": \"name\",\n \"type\": \"string\"\n },\n {\n \"name\": \"port\",\n \"baseName\": \"port\",\n \"type\": \"V1ServiceBackendPort\"\n }\n];\n//# sourceMappingURL=v1IngressServiceBackend.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1IngressSpec = void 0;\n/**\n* IngressSpec describes the Ingress the user wishes to exist.\n*/\nclass V1IngressSpec {\n static getAttributeTypeMap() {\n return V1IngressSpec.attributeTypeMap;\n }\n}\nexports.V1IngressSpec = V1IngressSpec;\nV1IngressSpec.discriminator = undefined;\nV1IngressSpec.attributeTypeMap = [\n {\n \"name\": \"defaultBackend\",\n \"baseName\": \"defaultBackend\",\n \"type\": \"V1IngressBackend\"\n },\n {\n \"name\": \"ingressClassName\",\n \"baseName\": \"ingressClassName\",\n \"type\": \"string\"\n },\n {\n \"name\": \"rules\",\n \"baseName\": \"rules\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"tls\",\n \"baseName\": \"tls\",\n \"type\": \"Array\"\n }\n];\n//# sourceMappingURL=v1IngressSpec.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1IngressStatus = void 0;\n/**\n* IngressStatus describe the current state of the Ingress.\n*/\nclass V1IngressStatus {\n static getAttributeTypeMap() {\n return V1IngressStatus.attributeTypeMap;\n }\n}\nexports.V1IngressStatus = V1IngressStatus;\nV1IngressStatus.discriminator = undefined;\nV1IngressStatus.attributeTypeMap = [\n {\n \"name\": \"loadBalancer\",\n \"baseName\": \"loadBalancer\",\n \"type\": \"V1LoadBalancerStatus\"\n }\n];\n//# sourceMappingURL=v1IngressStatus.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1IngressTLS = void 0;\n/**\n* IngressTLS describes the transport layer security associated with an Ingress.\n*/\nclass V1IngressTLS {\n static getAttributeTypeMap() {\n return V1IngressTLS.attributeTypeMap;\n }\n}\nexports.V1IngressTLS = V1IngressTLS;\nV1IngressTLS.discriminator = undefined;\nV1IngressTLS.attributeTypeMap = [\n {\n \"name\": \"hosts\",\n \"baseName\": \"hosts\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"secretName\",\n \"baseName\": \"secretName\",\n \"type\": \"string\"\n }\n];\n//# sourceMappingURL=v1IngressTLS.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1JSONSchemaProps = void 0;\n/**\n* JSONSchemaProps is a JSON-Schema following Specification Draft 4 (http://json-schema.org/).\n*/\nclass V1JSONSchemaProps {\n static getAttributeTypeMap() {\n return V1JSONSchemaProps.attributeTypeMap;\n }\n}\nexports.V1JSONSchemaProps = V1JSONSchemaProps;\nV1JSONSchemaProps.discriminator = undefined;\nV1JSONSchemaProps.attributeTypeMap = [\n {\n \"name\": \"$ref\",\n \"baseName\": \"$ref\",\n \"type\": \"string\"\n },\n {\n \"name\": \"$schema\",\n \"baseName\": \"$schema\",\n \"type\": \"string\"\n },\n {\n \"name\": \"additionalItems\",\n \"baseName\": \"additionalItems\",\n \"type\": \"object\"\n },\n {\n \"name\": \"additionalProperties\",\n \"baseName\": \"additionalProperties\",\n \"type\": \"object\"\n },\n {\n \"name\": \"allOf\",\n \"baseName\": \"allOf\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"anyOf\",\n \"baseName\": \"anyOf\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"_default\",\n \"baseName\": \"default\",\n \"type\": \"object\"\n },\n {\n \"name\": \"definitions\",\n \"baseName\": \"definitions\",\n \"type\": \"{ [key: string]: V1JSONSchemaProps; }\"\n },\n {\n \"name\": \"dependencies\",\n \"baseName\": \"dependencies\",\n \"type\": \"{ [key: string]: object; }\"\n },\n {\n \"name\": \"description\",\n \"baseName\": \"description\",\n \"type\": \"string\"\n },\n {\n \"name\": \"_enum\",\n \"baseName\": \"enum\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"example\",\n \"baseName\": \"example\",\n \"type\": \"object\"\n },\n {\n \"name\": \"exclusiveMaximum\",\n \"baseName\": \"exclusiveMaximum\",\n \"type\": \"boolean\"\n },\n {\n \"name\": \"exclusiveMinimum\",\n \"baseName\": \"exclusiveMinimum\",\n \"type\": \"boolean\"\n },\n {\n \"name\": \"externalDocs\",\n \"baseName\": \"externalDocs\",\n \"type\": \"V1ExternalDocumentation\"\n },\n {\n \"name\": \"format\",\n \"baseName\": \"format\",\n \"type\": \"string\"\n },\n {\n \"name\": \"id\",\n \"baseName\": \"id\",\n \"type\": \"string\"\n },\n {\n \"name\": \"items\",\n \"baseName\": \"items\",\n \"type\": \"object\"\n },\n {\n \"name\": \"maxItems\",\n \"baseName\": \"maxItems\",\n \"type\": \"number\"\n },\n {\n \"name\": \"maxLength\",\n \"baseName\": \"maxLength\",\n \"type\": \"number\"\n },\n {\n \"name\": \"maxProperties\",\n \"baseName\": \"maxProperties\",\n \"type\": \"number\"\n },\n {\n \"name\": \"maximum\",\n \"baseName\": \"maximum\",\n \"type\": \"number\"\n },\n {\n \"name\": \"minItems\",\n \"baseName\": \"minItems\",\n \"type\": \"number\"\n },\n {\n \"name\": \"minLength\",\n \"baseName\": \"minLength\",\n \"type\": \"number\"\n },\n {\n \"name\": \"minProperties\",\n \"baseName\": \"minProperties\",\n \"type\": \"number\"\n },\n {\n \"name\": \"minimum\",\n \"baseName\": \"minimum\",\n \"type\": \"number\"\n },\n {\n \"name\": \"multipleOf\",\n \"baseName\": \"multipleOf\",\n \"type\": \"number\"\n },\n {\n \"name\": \"not\",\n \"baseName\": \"not\",\n \"type\": \"V1JSONSchemaProps\"\n },\n {\n \"name\": \"nullable\",\n \"baseName\": \"nullable\",\n \"type\": \"boolean\"\n },\n {\n \"name\": \"oneOf\",\n \"baseName\": \"oneOf\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"pattern\",\n \"baseName\": \"pattern\",\n \"type\": \"string\"\n },\n {\n \"name\": \"patternProperties\",\n \"baseName\": \"patternProperties\",\n \"type\": \"{ [key: string]: V1JSONSchemaProps; }\"\n },\n {\n \"name\": \"properties\",\n \"baseName\": \"properties\",\n \"type\": \"{ [key: string]: V1JSONSchemaProps; }\"\n },\n {\n \"name\": \"required\",\n \"baseName\": \"required\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"title\",\n \"baseName\": \"title\",\n \"type\": \"string\"\n },\n {\n \"name\": \"type\",\n \"baseName\": \"type\",\n \"type\": \"string\"\n },\n {\n \"name\": \"uniqueItems\",\n \"baseName\": \"uniqueItems\",\n \"type\": \"boolean\"\n },\n {\n \"name\": \"x_kubernetes_embedded_resource\",\n \"baseName\": \"x-kubernetes-embedded-resource\",\n \"type\": \"boolean\"\n },\n {\n \"name\": \"x_kubernetes_int_or_string\",\n \"baseName\": \"x-kubernetes-int-or-string\",\n \"type\": \"boolean\"\n },\n {\n \"name\": \"x_kubernetes_list_map_keys\",\n \"baseName\": \"x-kubernetes-list-map-keys\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"x_kubernetes_list_type\",\n \"baseName\": \"x-kubernetes-list-type\",\n \"type\": \"string\"\n },\n {\n \"name\": \"x_kubernetes_map_type\",\n \"baseName\": \"x-kubernetes-map-type\",\n \"type\": \"string\"\n },\n {\n \"name\": \"x_kubernetes_preserve_unknown_fields\",\n \"baseName\": \"x-kubernetes-preserve-unknown-fields\",\n \"type\": \"boolean\"\n }\n];\n//# sourceMappingURL=v1JSONSchemaProps.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1Job = void 0;\n/**\n* Job represents the configuration of a single job.\n*/\nclass V1Job {\n static getAttributeTypeMap() {\n return V1Job.attributeTypeMap;\n }\n}\nexports.V1Job = V1Job;\nV1Job.discriminator = undefined;\nV1Job.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ObjectMeta\"\n },\n {\n \"name\": \"spec\",\n \"baseName\": \"spec\",\n \"type\": \"V1JobSpec\"\n },\n {\n \"name\": \"status\",\n \"baseName\": \"status\",\n \"type\": \"V1JobStatus\"\n }\n];\n//# sourceMappingURL=v1Job.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1JobCondition = void 0;\n/**\n* JobCondition describes current state of a job.\n*/\nclass V1JobCondition {\n static getAttributeTypeMap() {\n return V1JobCondition.attributeTypeMap;\n }\n}\nexports.V1JobCondition = V1JobCondition;\nV1JobCondition.discriminator = undefined;\nV1JobCondition.attributeTypeMap = [\n {\n \"name\": \"lastProbeTime\",\n \"baseName\": \"lastProbeTime\",\n \"type\": \"Date\"\n },\n {\n \"name\": \"lastTransitionTime\",\n \"baseName\": \"lastTransitionTime\",\n \"type\": \"Date\"\n },\n {\n \"name\": \"message\",\n \"baseName\": \"message\",\n \"type\": \"string\"\n },\n {\n \"name\": \"reason\",\n \"baseName\": \"reason\",\n \"type\": \"string\"\n },\n {\n \"name\": \"status\",\n \"baseName\": \"status\",\n \"type\": \"string\"\n },\n {\n \"name\": \"type\",\n \"baseName\": \"type\",\n \"type\": \"string\"\n }\n];\n//# sourceMappingURL=v1JobCondition.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1JobList = void 0;\n/**\n* JobList is a collection of jobs.\n*/\nclass V1JobList {\n static getAttributeTypeMap() {\n return V1JobList.attributeTypeMap;\n }\n}\nexports.V1JobList = V1JobList;\nV1JobList.discriminator = undefined;\nV1JobList.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"items\",\n \"baseName\": \"items\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ListMeta\"\n }\n];\n//# sourceMappingURL=v1JobList.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1JobSpec = void 0;\n/**\n* JobSpec describes how the job execution will look like.\n*/\nclass V1JobSpec {\n static getAttributeTypeMap() {\n return V1JobSpec.attributeTypeMap;\n }\n}\nexports.V1JobSpec = V1JobSpec;\nV1JobSpec.discriminator = undefined;\nV1JobSpec.attributeTypeMap = [\n {\n \"name\": \"activeDeadlineSeconds\",\n \"baseName\": \"activeDeadlineSeconds\",\n \"type\": \"number\"\n },\n {\n \"name\": \"backoffLimit\",\n \"baseName\": \"backoffLimit\",\n \"type\": \"number\"\n },\n {\n \"name\": \"completionMode\",\n \"baseName\": \"completionMode\",\n \"type\": \"string\"\n },\n {\n \"name\": \"completions\",\n \"baseName\": \"completions\",\n \"type\": \"number\"\n },\n {\n \"name\": \"manualSelector\",\n \"baseName\": \"manualSelector\",\n \"type\": \"boolean\"\n },\n {\n \"name\": \"parallelism\",\n \"baseName\": \"parallelism\",\n \"type\": \"number\"\n },\n {\n \"name\": \"selector\",\n \"baseName\": \"selector\",\n \"type\": \"V1LabelSelector\"\n },\n {\n \"name\": \"suspend\",\n \"baseName\": \"suspend\",\n \"type\": \"boolean\"\n },\n {\n \"name\": \"template\",\n \"baseName\": \"template\",\n \"type\": \"V1PodTemplateSpec\"\n },\n {\n \"name\": \"ttlSecondsAfterFinished\",\n \"baseName\": \"ttlSecondsAfterFinished\",\n \"type\": \"number\"\n }\n];\n//# sourceMappingURL=v1JobSpec.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1JobStatus = void 0;\n/**\n* JobStatus represents the current state of a Job.\n*/\nclass V1JobStatus {\n static getAttributeTypeMap() {\n return V1JobStatus.attributeTypeMap;\n }\n}\nexports.V1JobStatus = V1JobStatus;\nV1JobStatus.discriminator = undefined;\nV1JobStatus.attributeTypeMap = [\n {\n \"name\": \"active\",\n \"baseName\": \"active\",\n \"type\": \"number\"\n },\n {\n \"name\": \"completedIndexes\",\n \"baseName\": \"completedIndexes\",\n \"type\": \"string\"\n },\n {\n \"name\": \"completionTime\",\n \"baseName\": \"completionTime\",\n \"type\": \"Date\"\n },\n {\n \"name\": \"conditions\",\n \"baseName\": \"conditions\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"failed\",\n \"baseName\": \"failed\",\n \"type\": \"number\"\n },\n {\n \"name\": \"startTime\",\n \"baseName\": \"startTime\",\n \"type\": \"Date\"\n },\n {\n \"name\": \"succeeded\",\n \"baseName\": \"succeeded\",\n \"type\": \"number\"\n },\n {\n \"name\": \"uncountedTerminatedPods\",\n \"baseName\": \"uncountedTerminatedPods\",\n \"type\": \"V1UncountedTerminatedPods\"\n }\n];\n//# sourceMappingURL=v1JobStatus.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1JobTemplateSpec = void 0;\n/**\n* JobTemplateSpec describes the data a Job should have when created from a template\n*/\nclass V1JobTemplateSpec {\n static getAttributeTypeMap() {\n return V1JobTemplateSpec.attributeTypeMap;\n }\n}\nexports.V1JobTemplateSpec = V1JobTemplateSpec;\nV1JobTemplateSpec.discriminator = undefined;\nV1JobTemplateSpec.attributeTypeMap = [\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ObjectMeta\"\n },\n {\n \"name\": \"spec\",\n \"baseName\": \"spec\",\n \"type\": \"V1JobSpec\"\n }\n];\n//# sourceMappingURL=v1JobTemplateSpec.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1KeyToPath = void 0;\n/**\n* Maps a string key to a path within a volume.\n*/\nclass V1KeyToPath {\n static getAttributeTypeMap() {\n return V1KeyToPath.attributeTypeMap;\n }\n}\nexports.V1KeyToPath = V1KeyToPath;\nV1KeyToPath.discriminator = undefined;\nV1KeyToPath.attributeTypeMap = [\n {\n \"name\": \"key\",\n \"baseName\": \"key\",\n \"type\": \"string\"\n },\n {\n \"name\": \"mode\",\n \"baseName\": \"mode\",\n \"type\": \"number\"\n },\n {\n \"name\": \"path\",\n \"baseName\": \"path\",\n \"type\": \"string\"\n }\n];\n//# sourceMappingURL=v1KeyToPath.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1LabelSelector = void 0;\n/**\n* A label selector is a label query over a set of resources. The result of matchLabels and matchExpressions are ANDed. An empty label selector matches all objects. A null label selector matches no objects.\n*/\nclass V1LabelSelector {\n static getAttributeTypeMap() {\n return V1LabelSelector.attributeTypeMap;\n }\n}\nexports.V1LabelSelector = V1LabelSelector;\nV1LabelSelector.discriminator = undefined;\nV1LabelSelector.attributeTypeMap = [\n {\n \"name\": \"matchExpressions\",\n \"baseName\": \"matchExpressions\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"matchLabels\",\n \"baseName\": \"matchLabels\",\n \"type\": \"{ [key: string]: string; }\"\n }\n];\n//# sourceMappingURL=v1LabelSelector.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1LabelSelectorRequirement = void 0;\n/**\n* A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values.\n*/\nclass V1LabelSelectorRequirement {\n static getAttributeTypeMap() {\n return V1LabelSelectorRequirement.attributeTypeMap;\n }\n}\nexports.V1LabelSelectorRequirement = V1LabelSelectorRequirement;\nV1LabelSelectorRequirement.discriminator = undefined;\nV1LabelSelectorRequirement.attributeTypeMap = [\n {\n \"name\": \"key\",\n \"baseName\": \"key\",\n \"type\": \"string\"\n },\n {\n \"name\": \"operator\",\n \"baseName\": \"operator\",\n \"type\": \"string\"\n },\n {\n \"name\": \"values\",\n \"baseName\": \"values\",\n \"type\": \"Array\"\n }\n];\n//# sourceMappingURL=v1LabelSelectorRequirement.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1Lease = void 0;\n/**\n* Lease defines a lease concept.\n*/\nclass V1Lease {\n static getAttributeTypeMap() {\n return V1Lease.attributeTypeMap;\n }\n}\nexports.V1Lease = V1Lease;\nV1Lease.discriminator = undefined;\nV1Lease.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ObjectMeta\"\n },\n {\n \"name\": \"spec\",\n \"baseName\": \"spec\",\n \"type\": \"V1LeaseSpec\"\n }\n];\n//# sourceMappingURL=v1Lease.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1LeaseList = void 0;\n/**\n* LeaseList is a list of Lease objects.\n*/\nclass V1LeaseList {\n static getAttributeTypeMap() {\n return V1LeaseList.attributeTypeMap;\n }\n}\nexports.V1LeaseList = V1LeaseList;\nV1LeaseList.discriminator = undefined;\nV1LeaseList.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"items\",\n \"baseName\": \"items\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ListMeta\"\n }\n];\n//# sourceMappingURL=v1LeaseList.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1LeaseSpec = void 0;\n/**\n* LeaseSpec is a specification of a Lease.\n*/\nclass V1LeaseSpec {\n static getAttributeTypeMap() {\n return V1LeaseSpec.attributeTypeMap;\n }\n}\nexports.V1LeaseSpec = V1LeaseSpec;\nV1LeaseSpec.discriminator = undefined;\nV1LeaseSpec.attributeTypeMap = [\n {\n \"name\": \"acquireTime\",\n \"baseName\": \"acquireTime\",\n \"type\": \"Date\"\n },\n {\n \"name\": \"holderIdentity\",\n \"baseName\": \"holderIdentity\",\n \"type\": \"string\"\n },\n {\n \"name\": \"leaseDurationSeconds\",\n \"baseName\": \"leaseDurationSeconds\",\n \"type\": \"number\"\n },\n {\n \"name\": \"leaseTransitions\",\n \"baseName\": \"leaseTransitions\",\n \"type\": \"number\"\n },\n {\n \"name\": \"renewTime\",\n \"baseName\": \"renewTime\",\n \"type\": \"Date\"\n }\n];\n//# sourceMappingURL=v1LeaseSpec.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1Lifecycle = void 0;\n/**\n* Lifecycle describes actions that the management system should take in response to container lifecycle events. For the PostStart and PreStop lifecycle handlers, management of the container blocks until the action is complete, unless the container process fails, in which case the handler is aborted.\n*/\nclass V1Lifecycle {\n static getAttributeTypeMap() {\n return V1Lifecycle.attributeTypeMap;\n }\n}\nexports.V1Lifecycle = V1Lifecycle;\nV1Lifecycle.discriminator = undefined;\nV1Lifecycle.attributeTypeMap = [\n {\n \"name\": \"postStart\",\n \"baseName\": \"postStart\",\n \"type\": \"V1Handler\"\n },\n {\n \"name\": \"preStop\",\n \"baseName\": \"preStop\",\n \"type\": \"V1Handler\"\n }\n];\n//# sourceMappingURL=v1Lifecycle.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1LimitRange = void 0;\n/**\n* LimitRange sets resource usage limits for each kind of resource in a Namespace.\n*/\nclass V1LimitRange {\n static getAttributeTypeMap() {\n return V1LimitRange.attributeTypeMap;\n }\n}\nexports.V1LimitRange = V1LimitRange;\nV1LimitRange.discriminator = undefined;\nV1LimitRange.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ObjectMeta\"\n },\n {\n \"name\": \"spec\",\n \"baseName\": \"spec\",\n \"type\": \"V1LimitRangeSpec\"\n }\n];\n//# sourceMappingURL=v1LimitRange.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1LimitRangeItem = void 0;\n/**\n* LimitRangeItem defines a min/max usage limit for any resource that matches on kind.\n*/\nclass V1LimitRangeItem {\n static getAttributeTypeMap() {\n return V1LimitRangeItem.attributeTypeMap;\n }\n}\nexports.V1LimitRangeItem = V1LimitRangeItem;\nV1LimitRangeItem.discriminator = undefined;\nV1LimitRangeItem.attributeTypeMap = [\n {\n \"name\": \"_default\",\n \"baseName\": \"default\",\n \"type\": \"{ [key: string]: string; }\"\n },\n {\n \"name\": \"defaultRequest\",\n \"baseName\": \"defaultRequest\",\n \"type\": \"{ [key: string]: string; }\"\n },\n {\n \"name\": \"max\",\n \"baseName\": \"max\",\n \"type\": \"{ [key: string]: string; }\"\n },\n {\n \"name\": \"maxLimitRequestRatio\",\n \"baseName\": \"maxLimitRequestRatio\",\n \"type\": \"{ [key: string]: string; }\"\n },\n {\n \"name\": \"min\",\n \"baseName\": \"min\",\n \"type\": \"{ [key: string]: string; }\"\n },\n {\n \"name\": \"type\",\n \"baseName\": \"type\",\n \"type\": \"string\"\n }\n];\n//# sourceMappingURL=v1LimitRangeItem.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1LimitRangeList = void 0;\n/**\n* LimitRangeList is a list of LimitRange items.\n*/\nclass V1LimitRangeList {\n static getAttributeTypeMap() {\n return V1LimitRangeList.attributeTypeMap;\n }\n}\nexports.V1LimitRangeList = V1LimitRangeList;\nV1LimitRangeList.discriminator = undefined;\nV1LimitRangeList.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"items\",\n \"baseName\": \"items\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ListMeta\"\n }\n];\n//# sourceMappingURL=v1LimitRangeList.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1LimitRangeSpec = void 0;\n/**\n* LimitRangeSpec defines a min/max usage limit for resources that match on kind.\n*/\nclass V1LimitRangeSpec {\n static getAttributeTypeMap() {\n return V1LimitRangeSpec.attributeTypeMap;\n }\n}\nexports.V1LimitRangeSpec = V1LimitRangeSpec;\nV1LimitRangeSpec.discriminator = undefined;\nV1LimitRangeSpec.attributeTypeMap = [\n {\n \"name\": \"limits\",\n \"baseName\": \"limits\",\n \"type\": \"Array\"\n }\n];\n//# sourceMappingURL=v1LimitRangeSpec.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1ListMeta = void 0;\n/**\n* ListMeta describes metadata that synthetic resources must have, including lists and various status objects. A resource may have only one of {ObjectMeta, ListMeta}.\n*/\nclass V1ListMeta {\n static getAttributeTypeMap() {\n return V1ListMeta.attributeTypeMap;\n }\n}\nexports.V1ListMeta = V1ListMeta;\nV1ListMeta.discriminator = undefined;\nV1ListMeta.attributeTypeMap = [\n {\n \"name\": \"_continue\",\n \"baseName\": \"continue\",\n \"type\": \"string\"\n },\n {\n \"name\": \"remainingItemCount\",\n \"baseName\": \"remainingItemCount\",\n \"type\": \"number\"\n },\n {\n \"name\": \"resourceVersion\",\n \"baseName\": \"resourceVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"selfLink\",\n \"baseName\": \"selfLink\",\n \"type\": \"string\"\n }\n];\n//# sourceMappingURL=v1ListMeta.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1LoadBalancerIngress = void 0;\n/**\n* LoadBalancerIngress represents the status of a load-balancer ingress point: traffic intended for the service should be sent to an ingress point.\n*/\nclass V1LoadBalancerIngress {\n static getAttributeTypeMap() {\n return V1LoadBalancerIngress.attributeTypeMap;\n }\n}\nexports.V1LoadBalancerIngress = V1LoadBalancerIngress;\nV1LoadBalancerIngress.discriminator = undefined;\nV1LoadBalancerIngress.attributeTypeMap = [\n {\n \"name\": \"hostname\",\n \"baseName\": \"hostname\",\n \"type\": \"string\"\n },\n {\n \"name\": \"ip\",\n \"baseName\": \"ip\",\n \"type\": \"string\"\n },\n {\n \"name\": \"ports\",\n \"baseName\": \"ports\",\n \"type\": \"Array\"\n }\n];\n//# sourceMappingURL=v1LoadBalancerIngress.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1LoadBalancerStatus = void 0;\n/**\n* LoadBalancerStatus represents the status of a load-balancer.\n*/\nclass V1LoadBalancerStatus {\n static getAttributeTypeMap() {\n return V1LoadBalancerStatus.attributeTypeMap;\n }\n}\nexports.V1LoadBalancerStatus = V1LoadBalancerStatus;\nV1LoadBalancerStatus.discriminator = undefined;\nV1LoadBalancerStatus.attributeTypeMap = [\n {\n \"name\": \"ingress\",\n \"baseName\": \"ingress\",\n \"type\": \"Array\"\n }\n];\n//# sourceMappingURL=v1LoadBalancerStatus.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1LocalObjectReference = void 0;\n/**\n* LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace.\n*/\nclass V1LocalObjectReference {\n static getAttributeTypeMap() {\n return V1LocalObjectReference.attributeTypeMap;\n }\n}\nexports.V1LocalObjectReference = V1LocalObjectReference;\nV1LocalObjectReference.discriminator = undefined;\nV1LocalObjectReference.attributeTypeMap = [\n {\n \"name\": \"name\",\n \"baseName\": \"name\",\n \"type\": \"string\"\n }\n];\n//# sourceMappingURL=v1LocalObjectReference.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1LocalSubjectAccessReview = void 0;\n/**\n* LocalSubjectAccessReview checks whether or not a user or group can perform an action in a given namespace. Having a namespace scoped resource makes it much easier to grant namespace scoped policy that includes permissions checking.\n*/\nclass V1LocalSubjectAccessReview {\n static getAttributeTypeMap() {\n return V1LocalSubjectAccessReview.attributeTypeMap;\n }\n}\nexports.V1LocalSubjectAccessReview = V1LocalSubjectAccessReview;\nV1LocalSubjectAccessReview.discriminator = undefined;\nV1LocalSubjectAccessReview.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ObjectMeta\"\n },\n {\n \"name\": \"spec\",\n \"baseName\": \"spec\",\n \"type\": \"V1SubjectAccessReviewSpec\"\n },\n {\n \"name\": \"status\",\n \"baseName\": \"status\",\n \"type\": \"V1SubjectAccessReviewStatus\"\n }\n];\n//# sourceMappingURL=v1LocalSubjectAccessReview.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1LocalVolumeSource = void 0;\n/**\n* Local represents directly-attached storage with node affinity (Beta feature)\n*/\nclass V1LocalVolumeSource {\n static getAttributeTypeMap() {\n return V1LocalVolumeSource.attributeTypeMap;\n }\n}\nexports.V1LocalVolumeSource = V1LocalVolumeSource;\nV1LocalVolumeSource.discriminator = undefined;\nV1LocalVolumeSource.attributeTypeMap = [\n {\n \"name\": \"fsType\",\n \"baseName\": \"fsType\",\n \"type\": \"string\"\n },\n {\n \"name\": \"path\",\n \"baseName\": \"path\",\n \"type\": \"string\"\n }\n];\n//# sourceMappingURL=v1LocalVolumeSource.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1ManagedFieldsEntry = void 0;\n/**\n* ManagedFieldsEntry is a workflow-id, a FieldSet and the group version of the resource that the fieldset applies to.\n*/\nclass V1ManagedFieldsEntry {\n static getAttributeTypeMap() {\n return V1ManagedFieldsEntry.attributeTypeMap;\n }\n}\nexports.V1ManagedFieldsEntry = V1ManagedFieldsEntry;\nV1ManagedFieldsEntry.discriminator = undefined;\nV1ManagedFieldsEntry.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"fieldsType\",\n \"baseName\": \"fieldsType\",\n \"type\": \"string\"\n },\n {\n \"name\": \"fieldsV1\",\n \"baseName\": \"fieldsV1\",\n \"type\": \"object\"\n },\n {\n \"name\": \"manager\",\n \"baseName\": \"manager\",\n \"type\": \"string\"\n },\n {\n \"name\": \"operation\",\n \"baseName\": \"operation\",\n \"type\": \"string\"\n },\n {\n \"name\": \"subresource\",\n \"baseName\": \"subresource\",\n \"type\": \"string\"\n },\n {\n \"name\": \"time\",\n \"baseName\": \"time\",\n \"type\": \"Date\"\n }\n];\n//# sourceMappingURL=v1ManagedFieldsEntry.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1MutatingWebhook = void 0;\n/**\n* MutatingWebhook describes an admission webhook and the resources and operations it applies to.\n*/\nclass V1MutatingWebhook {\n static getAttributeTypeMap() {\n return V1MutatingWebhook.attributeTypeMap;\n }\n}\nexports.V1MutatingWebhook = V1MutatingWebhook;\nV1MutatingWebhook.discriminator = undefined;\nV1MutatingWebhook.attributeTypeMap = [\n {\n \"name\": \"admissionReviewVersions\",\n \"baseName\": \"admissionReviewVersions\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"clientConfig\",\n \"baseName\": \"clientConfig\",\n \"type\": \"AdmissionregistrationV1WebhookClientConfig\"\n },\n {\n \"name\": \"failurePolicy\",\n \"baseName\": \"failurePolicy\",\n \"type\": \"string\"\n },\n {\n \"name\": \"matchPolicy\",\n \"baseName\": \"matchPolicy\",\n \"type\": \"string\"\n },\n {\n \"name\": \"name\",\n \"baseName\": \"name\",\n \"type\": \"string\"\n },\n {\n \"name\": \"namespaceSelector\",\n \"baseName\": \"namespaceSelector\",\n \"type\": \"V1LabelSelector\"\n },\n {\n \"name\": \"objectSelector\",\n \"baseName\": \"objectSelector\",\n \"type\": \"V1LabelSelector\"\n },\n {\n \"name\": \"reinvocationPolicy\",\n \"baseName\": \"reinvocationPolicy\",\n \"type\": \"string\"\n },\n {\n \"name\": \"rules\",\n \"baseName\": \"rules\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"sideEffects\",\n \"baseName\": \"sideEffects\",\n \"type\": \"string\"\n },\n {\n \"name\": \"timeoutSeconds\",\n \"baseName\": \"timeoutSeconds\",\n \"type\": \"number\"\n }\n];\n//# sourceMappingURL=v1MutatingWebhook.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1MutatingWebhookConfiguration = void 0;\n/**\n* MutatingWebhookConfiguration describes the configuration of and admission webhook that accept or reject and may change the object.\n*/\nclass V1MutatingWebhookConfiguration {\n static getAttributeTypeMap() {\n return V1MutatingWebhookConfiguration.attributeTypeMap;\n }\n}\nexports.V1MutatingWebhookConfiguration = V1MutatingWebhookConfiguration;\nV1MutatingWebhookConfiguration.discriminator = undefined;\nV1MutatingWebhookConfiguration.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ObjectMeta\"\n },\n {\n \"name\": \"webhooks\",\n \"baseName\": \"webhooks\",\n \"type\": \"Array\"\n }\n];\n//# sourceMappingURL=v1MutatingWebhookConfiguration.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1MutatingWebhookConfigurationList = void 0;\n/**\n* MutatingWebhookConfigurationList is a list of MutatingWebhookConfiguration.\n*/\nclass V1MutatingWebhookConfigurationList {\n static getAttributeTypeMap() {\n return V1MutatingWebhookConfigurationList.attributeTypeMap;\n }\n}\nexports.V1MutatingWebhookConfigurationList = V1MutatingWebhookConfigurationList;\nV1MutatingWebhookConfigurationList.discriminator = undefined;\nV1MutatingWebhookConfigurationList.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"items\",\n \"baseName\": \"items\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ListMeta\"\n }\n];\n//# sourceMappingURL=v1MutatingWebhookConfigurationList.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1NFSVolumeSource = void 0;\n/**\n* Represents an NFS mount that lasts the lifetime of a pod. NFS volumes do not support ownership management or SELinux relabeling.\n*/\nclass V1NFSVolumeSource {\n static getAttributeTypeMap() {\n return V1NFSVolumeSource.attributeTypeMap;\n }\n}\nexports.V1NFSVolumeSource = V1NFSVolumeSource;\nV1NFSVolumeSource.discriminator = undefined;\nV1NFSVolumeSource.attributeTypeMap = [\n {\n \"name\": \"path\",\n \"baseName\": \"path\",\n \"type\": \"string\"\n },\n {\n \"name\": \"readOnly\",\n \"baseName\": \"readOnly\",\n \"type\": \"boolean\"\n },\n {\n \"name\": \"server\",\n \"baseName\": \"server\",\n \"type\": \"string\"\n }\n];\n//# sourceMappingURL=v1NFSVolumeSource.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1Namespace = void 0;\n/**\n* Namespace provides a scope for Names. Use of multiple namespaces is optional.\n*/\nclass V1Namespace {\n static getAttributeTypeMap() {\n return V1Namespace.attributeTypeMap;\n }\n}\nexports.V1Namespace = V1Namespace;\nV1Namespace.discriminator = undefined;\nV1Namespace.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ObjectMeta\"\n },\n {\n \"name\": \"spec\",\n \"baseName\": \"spec\",\n \"type\": \"V1NamespaceSpec\"\n },\n {\n \"name\": \"status\",\n \"baseName\": \"status\",\n \"type\": \"V1NamespaceStatus\"\n }\n];\n//# sourceMappingURL=v1Namespace.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1NamespaceCondition = void 0;\n/**\n* NamespaceCondition contains details about state of namespace.\n*/\nclass V1NamespaceCondition {\n static getAttributeTypeMap() {\n return V1NamespaceCondition.attributeTypeMap;\n }\n}\nexports.V1NamespaceCondition = V1NamespaceCondition;\nV1NamespaceCondition.discriminator = undefined;\nV1NamespaceCondition.attributeTypeMap = [\n {\n \"name\": \"lastTransitionTime\",\n \"baseName\": \"lastTransitionTime\",\n \"type\": \"Date\"\n },\n {\n \"name\": \"message\",\n \"baseName\": \"message\",\n \"type\": \"string\"\n },\n {\n \"name\": \"reason\",\n \"baseName\": \"reason\",\n \"type\": \"string\"\n },\n {\n \"name\": \"status\",\n \"baseName\": \"status\",\n \"type\": \"string\"\n },\n {\n \"name\": \"type\",\n \"baseName\": \"type\",\n \"type\": \"string\"\n }\n];\n//# sourceMappingURL=v1NamespaceCondition.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1NamespaceList = void 0;\n/**\n* NamespaceList is a list of Namespaces.\n*/\nclass V1NamespaceList {\n static getAttributeTypeMap() {\n return V1NamespaceList.attributeTypeMap;\n }\n}\nexports.V1NamespaceList = V1NamespaceList;\nV1NamespaceList.discriminator = undefined;\nV1NamespaceList.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"items\",\n \"baseName\": \"items\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ListMeta\"\n }\n];\n//# sourceMappingURL=v1NamespaceList.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1NamespaceSpec = void 0;\n/**\n* NamespaceSpec describes the attributes on a Namespace.\n*/\nclass V1NamespaceSpec {\n static getAttributeTypeMap() {\n return V1NamespaceSpec.attributeTypeMap;\n }\n}\nexports.V1NamespaceSpec = V1NamespaceSpec;\nV1NamespaceSpec.discriminator = undefined;\nV1NamespaceSpec.attributeTypeMap = [\n {\n \"name\": \"finalizers\",\n \"baseName\": \"finalizers\",\n \"type\": \"Array\"\n }\n];\n//# sourceMappingURL=v1NamespaceSpec.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1NamespaceStatus = void 0;\n/**\n* NamespaceStatus is information about the current status of a Namespace.\n*/\nclass V1NamespaceStatus {\n static getAttributeTypeMap() {\n return V1NamespaceStatus.attributeTypeMap;\n }\n}\nexports.V1NamespaceStatus = V1NamespaceStatus;\nV1NamespaceStatus.discriminator = undefined;\nV1NamespaceStatus.attributeTypeMap = [\n {\n \"name\": \"conditions\",\n \"baseName\": \"conditions\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"phase\",\n \"baseName\": \"phase\",\n \"type\": \"string\"\n }\n];\n//# sourceMappingURL=v1NamespaceStatus.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1NetworkPolicy = void 0;\n/**\n* NetworkPolicy describes what network traffic is allowed for a set of Pods\n*/\nclass V1NetworkPolicy {\n static getAttributeTypeMap() {\n return V1NetworkPolicy.attributeTypeMap;\n }\n}\nexports.V1NetworkPolicy = V1NetworkPolicy;\nV1NetworkPolicy.discriminator = undefined;\nV1NetworkPolicy.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ObjectMeta\"\n },\n {\n \"name\": \"spec\",\n \"baseName\": \"spec\",\n \"type\": \"V1NetworkPolicySpec\"\n }\n];\n//# sourceMappingURL=v1NetworkPolicy.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1NetworkPolicyEgressRule = void 0;\n/**\n* NetworkPolicyEgressRule describes a particular set of traffic that is allowed out of pods matched by a NetworkPolicySpec\\'s podSelector. The traffic must match both ports and to. This type is beta-level in 1.8\n*/\nclass V1NetworkPolicyEgressRule {\n static getAttributeTypeMap() {\n return V1NetworkPolicyEgressRule.attributeTypeMap;\n }\n}\nexports.V1NetworkPolicyEgressRule = V1NetworkPolicyEgressRule;\nV1NetworkPolicyEgressRule.discriminator = undefined;\nV1NetworkPolicyEgressRule.attributeTypeMap = [\n {\n \"name\": \"ports\",\n \"baseName\": \"ports\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"to\",\n \"baseName\": \"to\",\n \"type\": \"Array\"\n }\n];\n//# sourceMappingURL=v1NetworkPolicyEgressRule.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1NetworkPolicyIngressRule = void 0;\n/**\n* NetworkPolicyIngressRule describes a particular set of traffic that is allowed to the pods matched by a NetworkPolicySpec\\'s podSelector. The traffic must match both ports and from.\n*/\nclass V1NetworkPolicyIngressRule {\n static getAttributeTypeMap() {\n return V1NetworkPolicyIngressRule.attributeTypeMap;\n }\n}\nexports.V1NetworkPolicyIngressRule = V1NetworkPolicyIngressRule;\nV1NetworkPolicyIngressRule.discriminator = undefined;\nV1NetworkPolicyIngressRule.attributeTypeMap = [\n {\n \"name\": \"from\",\n \"baseName\": \"from\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"ports\",\n \"baseName\": \"ports\",\n \"type\": \"Array\"\n }\n];\n//# sourceMappingURL=v1NetworkPolicyIngressRule.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1NetworkPolicyList = void 0;\n/**\n* NetworkPolicyList is a list of NetworkPolicy objects.\n*/\nclass V1NetworkPolicyList {\n static getAttributeTypeMap() {\n return V1NetworkPolicyList.attributeTypeMap;\n }\n}\nexports.V1NetworkPolicyList = V1NetworkPolicyList;\nV1NetworkPolicyList.discriminator = undefined;\nV1NetworkPolicyList.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"items\",\n \"baseName\": \"items\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ListMeta\"\n }\n];\n//# sourceMappingURL=v1NetworkPolicyList.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1NetworkPolicyPeer = void 0;\n/**\n* NetworkPolicyPeer describes a peer to allow traffic to/from. Only certain combinations of fields are allowed\n*/\nclass V1NetworkPolicyPeer {\n static getAttributeTypeMap() {\n return V1NetworkPolicyPeer.attributeTypeMap;\n }\n}\nexports.V1NetworkPolicyPeer = V1NetworkPolicyPeer;\nV1NetworkPolicyPeer.discriminator = undefined;\nV1NetworkPolicyPeer.attributeTypeMap = [\n {\n \"name\": \"ipBlock\",\n \"baseName\": \"ipBlock\",\n \"type\": \"V1IPBlock\"\n },\n {\n \"name\": \"namespaceSelector\",\n \"baseName\": \"namespaceSelector\",\n \"type\": \"V1LabelSelector\"\n },\n {\n \"name\": \"podSelector\",\n \"baseName\": \"podSelector\",\n \"type\": \"V1LabelSelector\"\n }\n];\n//# sourceMappingURL=v1NetworkPolicyPeer.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1NetworkPolicyPort = void 0;\n/**\n* NetworkPolicyPort describes a port to allow traffic on\n*/\nclass V1NetworkPolicyPort {\n static getAttributeTypeMap() {\n return V1NetworkPolicyPort.attributeTypeMap;\n }\n}\nexports.V1NetworkPolicyPort = V1NetworkPolicyPort;\nV1NetworkPolicyPort.discriminator = undefined;\nV1NetworkPolicyPort.attributeTypeMap = [\n {\n \"name\": \"endPort\",\n \"baseName\": \"endPort\",\n \"type\": \"number\"\n },\n {\n \"name\": \"port\",\n \"baseName\": \"port\",\n \"type\": \"IntOrString\"\n },\n {\n \"name\": \"protocol\",\n \"baseName\": \"protocol\",\n \"type\": \"string\"\n }\n];\n//# sourceMappingURL=v1NetworkPolicyPort.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1NetworkPolicySpec = void 0;\n/**\n* NetworkPolicySpec provides the specification of a NetworkPolicy\n*/\nclass V1NetworkPolicySpec {\n static getAttributeTypeMap() {\n return V1NetworkPolicySpec.attributeTypeMap;\n }\n}\nexports.V1NetworkPolicySpec = V1NetworkPolicySpec;\nV1NetworkPolicySpec.discriminator = undefined;\nV1NetworkPolicySpec.attributeTypeMap = [\n {\n \"name\": \"egress\",\n \"baseName\": \"egress\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"ingress\",\n \"baseName\": \"ingress\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"podSelector\",\n \"baseName\": \"podSelector\",\n \"type\": \"V1LabelSelector\"\n },\n {\n \"name\": \"policyTypes\",\n \"baseName\": \"policyTypes\",\n \"type\": \"Array\"\n }\n];\n//# sourceMappingURL=v1NetworkPolicySpec.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1Node = void 0;\n/**\n* Node is a worker node in Kubernetes. Each node will have a unique identifier in the cache (i.e. in etcd).\n*/\nclass V1Node {\n static getAttributeTypeMap() {\n return V1Node.attributeTypeMap;\n }\n}\nexports.V1Node = V1Node;\nV1Node.discriminator = undefined;\nV1Node.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ObjectMeta\"\n },\n {\n \"name\": \"spec\",\n \"baseName\": \"spec\",\n \"type\": \"V1NodeSpec\"\n },\n {\n \"name\": \"status\",\n \"baseName\": \"status\",\n \"type\": \"V1NodeStatus\"\n }\n];\n//# sourceMappingURL=v1Node.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1NodeAddress = void 0;\n/**\n* NodeAddress contains information for the node\\'s address.\n*/\nclass V1NodeAddress {\n static getAttributeTypeMap() {\n return V1NodeAddress.attributeTypeMap;\n }\n}\nexports.V1NodeAddress = V1NodeAddress;\nV1NodeAddress.discriminator = undefined;\nV1NodeAddress.attributeTypeMap = [\n {\n \"name\": \"address\",\n \"baseName\": \"address\",\n \"type\": \"string\"\n },\n {\n \"name\": \"type\",\n \"baseName\": \"type\",\n \"type\": \"string\"\n }\n];\n//# sourceMappingURL=v1NodeAddress.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1NodeAffinity = void 0;\n/**\n* Node affinity is a group of node affinity scheduling rules.\n*/\nclass V1NodeAffinity {\n static getAttributeTypeMap() {\n return V1NodeAffinity.attributeTypeMap;\n }\n}\nexports.V1NodeAffinity = V1NodeAffinity;\nV1NodeAffinity.discriminator = undefined;\nV1NodeAffinity.attributeTypeMap = [\n {\n \"name\": \"preferredDuringSchedulingIgnoredDuringExecution\",\n \"baseName\": \"preferredDuringSchedulingIgnoredDuringExecution\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"requiredDuringSchedulingIgnoredDuringExecution\",\n \"baseName\": \"requiredDuringSchedulingIgnoredDuringExecution\",\n \"type\": \"V1NodeSelector\"\n }\n];\n//# sourceMappingURL=v1NodeAffinity.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1NodeCondition = void 0;\n/**\n* NodeCondition contains condition information for a node.\n*/\nclass V1NodeCondition {\n static getAttributeTypeMap() {\n return V1NodeCondition.attributeTypeMap;\n }\n}\nexports.V1NodeCondition = V1NodeCondition;\nV1NodeCondition.discriminator = undefined;\nV1NodeCondition.attributeTypeMap = [\n {\n \"name\": \"lastHeartbeatTime\",\n \"baseName\": \"lastHeartbeatTime\",\n \"type\": \"Date\"\n },\n {\n \"name\": \"lastTransitionTime\",\n \"baseName\": \"lastTransitionTime\",\n \"type\": \"Date\"\n },\n {\n \"name\": \"message\",\n \"baseName\": \"message\",\n \"type\": \"string\"\n },\n {\n \"name\": \"reason\",\n \"baseName\": \"reason\",\n \"type\": \"string\"\n },\n {\n \"name\": \"status\",\n \"baseName\": \"status\",\n \"type\": \"string\"\n },\n {\n \"name\": \"type\",\n \"baseName\": \"type\",\n \"type\": \"string\"\n }\n];\n//# sourceMappingURL=v1NodeCondition.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1NodeConfigSource = void 0;\n/**\n* NodeConfigSource specifies a source of node configuration. Exactly one subfield (excluding metadata) must be non-nil. This API is deprecated since 1.22\n*/\nclass V1NodeConfigSource {\n static getAttributeTypeMap() {\n return V1NodeConfigSource.attributeTypeMap;\n }\n}\nexports.V1NodeConfigSource = V1NodeConfigSource;\nV1NodeConfigSource.discriminator = undefined;\nV1NodeConfigSource.attributeTypeMap = [\n {\n \"name\": \"configMap\",\n \"baseName\": \"configMap\",\n \"type\": \"V1ConfigMapNodeConfigSource\"\n }\n];\n//# sourceMappingURL=v1NodeConfigSource.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1NodeConfigStatus = void 0;\n/**\n* NodeConfigStatus describes the status of the config assigned by Node.Spec.ConfigSource.\n*/\nclass V1NodeConfigStatus {\n static getAttributeTypeMap() {\n return V1NodeConfigStatus.attributeTypeMap;\n }\n}\nexports.V1NodeConfigStatus = V1NodeConfigStatus;\nV1NodeConfigStatus.discriminator = undefined;\nV1NodeConfigStatus.attributeTypeMap = [\n {\n \"name\": \"active\",\n \"baseName\": \"active\",\n \"type\": \"V1NodeConfigSource\"\n },\n {\n \"name\": \"assigned\",\n \"baseName\": \"assigned\",\n \"type\": \"V1NodeConfigSource\"\n },\n {\n \"name\": \"error\",\n \"baseName\": \"error\",\n \"type\": \"string\"\n },\n {\n \"name\": \"lastKnownGood\",\n \"baseName\": \"lastKnownGood\",\n \"type\": \"V1NodeConfigSource\"\n }\n];\n//# sourceMappingURL=v1NodeConfigStatus.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1NodeDaemonEndpoints = void 0;\n/**\n* NodeDaemonEndpoints lists ports opened by daemons running on the Node.\n*/\nclass V1NodeDaemonEndpoints {\n static getAttributeTypeMap() {\n return V1NodeDaemonEndpoints.attributeTypeMap;\n }\n}\nexports.V1NodeDaemonEndpoints = V1NodeDaemonEndpoints;\nV1NodeDaemonEndpoints.discriminator = undefined;\nV1NodeDaemonEndpoints.attributeTypeMap = [\n {\n \"name\": \"kubeletEndpoint\",\n \"baseName\": \"kubeletEndpoint\",\n \"type\": \"V1DaemonEndpoint\"\n }\n];\n//# sourceMappingURL=v1NodeDaemonEndpoints.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1NodeList = void 0;\n/**\n* NodeList is the whole list of all Nodes which have been registered with master.\n*/\nclass V1NodeList {\n static getAttributeTypeMap() {\n return V1NodeList.attributeTypeMap;\n }\n}\nexports.V1NodeList = V1NodeList;\nV1NodeList.discriminator = undefined;\nV1NodeList.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"items\",\n \"baseName\": \"items\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ListMeta\"\n }\n];\n//# sourceMappingURL=v1NodeList.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1NodeSelector = void 0;\n/**\n* A node selector represents the union of the results of one or more label queries over a set of nodes; that is, it represents the OR of the selectors represented by the node selector terms.\n*/\nclass V1NodeSelector {\n static getAttributeTypeMap() {\n return V1NodeSelector.attributeTypeMap;\n }\n}\nexports.V1NodeSelector = V1NodeSelector;\nV1NodeSelector.discriminator = undefined;\nV1NodeSelector.attributeTypeMap = [\n {\n \"name\": \"nodeSelectorTerms\",\n \"baseName\": \"nodeSelectorTerms\",\n \"type\": \"Array\"\n }\n];\n//# sourceMappingURL=v1NodeSelector.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1NodeSelectorRequirement = void 0;\n/**\n* A node selector requirement is a selector that contains values, a key, and an operator that relates the key and values.\n*/\nclass V1NodeSelectorRequirement {\n static getAttributeTypeMap() {\n return V1NodeSelectorRequirement.attributeTypeMap;\n }\n}\nexports.V1NodeSelectorRequirement = V1NodeSelectorRequirement;\nV1NodeSelectorRequirement.discriminator = undefined;\nV1NodeSelectorRequirement.attributeTypeMap = [\n {\n \"name\": \"key\",\n \"baseName\": \"key\",\n \"type\": \"string\"\n },\n {\n \"name\": \"operator\",\n \"baseName\": \"operator\",\n \"type\": \"string\"\n },\n {\n \"name\": \"values\",\n \"baseName\": \"values\",\n \"type\": \"Array\"\n }\n];\n//# sourceMappingURL=v1NodeSelectorRequirement.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1NodeSelectorTerm = void 0;\n/**\n* A null or empty node selector term matches no objects. The requirements of them are ANDed. The TopologySelectorTerm type implements a subset of the NodeSelectorTerm.\n*/\nclass V1NodeSelectorTerm {\n static getAttributeTypeMap() {\n return V1NodeSelectorTerm.attributeTypeMap;\n }\n}\nexports.V1NodeSelectorTerm = V1NodeSelectorTerm;\nV1NodeSelectorTerm.discriminator = undefined;\nV1NodeSelectorTerm.attributeTypeMap = [\n {\n \"name\": \"matchExpressions\",\n \"baseName\": \"matchExpressions\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"matchFields\",\n \"baseName\": \"matchFields\",\n \"type\": \"Array\"\n }\n];\n//# sourceMappingURL=v1NodeSelectorTerm.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1NodeSpec = void 0;\n/**\n* NodeSpec describes the attributes that a node is created with.\n*/\nclass V1NodeSpec {\n static getAttributeTypeMap() {\n return V1NodeSpec.attributeTypeMap;\n }\n}\nexports.V1NodeSpec = V1NodeSpec;\nV1NodeSpec.discriminator = undefined;\nV1NodeSpec.attributeTypeMap = [\n {\n \"name\": \"configSource\",\n \"baseName\": \"configSource\",\n \"type\": \"V1NodeConfigSource\"\n },\n {\n \"name\": \"externalID\",\n \"baseName\": \"externalID\",\n \"type\": \"string\"\n },\n {\n \"name\": \"podCIDR\",\n \"baseName\": \"podCIDR\",\n \"type\": \"string\"\n },\n {\n \"name\": \"podCIDRs\",\n \"baseName\": \"podCIDRs\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"providerID\",\n \"baseName\": \"providerID\",\n \"type\": \"string\"\n },\n {\n \"name\": \"taints\",\n \"baseName\": \"taints\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"unschedulable\",\n \"baseName\": \"unschedulable\",\n \"type\": \"boolean\"\n }\n];\n//# sourceMappingURL=v1NodeSpec.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1NodeStatus = void 0;\n/**\n* NodeStatus is information about the current status of a node.\n*/\nclass V1NodeStatus {\n static getAttributeTypeMap() {\n return V1NodeStatus.attributeTypeMap;\n }\n}\nexports.V1NodeStatus = V1NodeStatus;\nV1NodeStatus.discriminator = undefined;\nV1NodeStatus.attributeTypeMap = [\n {\n \"name\": \"addresses\",\n \"baseName\": \"addresses\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"allocatable\",\n \"baseName\": \"allocatable\",\n \"type\": \"{ [key: string]: string; }\"\n },\n {\n \"name\": \"capacity\",\n \"baseName\": \"capacity\",\n \"type\": \"{ [key: string]: string; }\"\n },\n {\n \"name\": \"conditions\",\n \"baseName\": \"conditions\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"config\",\n \"baseName\": \"config\",\n \"type\": \"V1NodeConfigStatus\"\n },\n {\n \"name\": \"daemonEndpoints\",\n \"baseName\": \"daemonEndpoints\",\n \"type\": \"V1NodeDaemonEndpoints\"\n },\n {\n \"name\": \"images\",\n \"baseName\": \"images\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"nodeInfo\",\n \"baseName\": \"nodeInfo\",\n \"type\": \"V1NodeSystemInfo\"\n },\n {\n \"name\": \"phase\",\n \"baseName\": \"phase\",\n \"type\": \"string\"\n },\n {\n \"name\": \"volumesAttached\",\n \"baseName\": \"volumesAttached\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"volumesInUse\",\n \"baseName\": \"volumesInUse\",\n \"type\": \"Array\"\n }\n];\n//# sourceMappingURL=v1NodeStatus.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1NodeSystemInfo = void 0;\n/**\n* NodeSystemInfo is a set of ids/uuids to uniquely identify the node.\n*/\nclass V1NodeSystemInfo {\n static getAttributeTypeMap() {\n return V1NodeSystemInfo.attributeTypeMap;\n }\n}\nexports.V1NodeSystemInfo = V1NodeSystemInfo;\nV1NodeSystemInfo.discriminator = undefined;\nV1NodeSystemInfo.attributeTypeMap = [\n {\n \"name\": \"architecture\",\n \"baseName\": \"architecture\",\n \"type\": \"string\"\n },\n {\n \"name\": \"bootID\",\n \"baseName\": \"bootID\",\n \"type\": \"string\"\n },\n {\n \"name\": \"containerRuntimeVersion\",\n \"baseName\": \"containerRuntimeVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"kernelVersion\",\n \"baseName\": \"kernelVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"kubeProxyVersion\",\n \"baseName\": \"kubeProxyVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"kubeletVersion\",\n \"baseName\": \"kubeletVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"machineID\",\n \"baseName\": \"machineID\",\n \"type\": \"string\"\n },\n {\n \"name\": \"operatingSystem\",\n \"baseName\": \"operatingSystem\",\n \"type\": \"string\"\n },\n {\n \"name\": \"osImage\",\n \"baseName\": \"osImage\",\n \"type\": \"string\"\n },\n {\n \"name\": \"systemUUID\",\n \"baseName\": \"systemUUID\",\n \"type\": \"string\"\n }\n];\n//# sourceMappingURL=v1NodeSystemInfo.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1NonResourceAttributes = void 0;\n/**\n* NonResourceAttributes includes the authorization attributes available for non-resource requests to the Authorizer interface\n*/\nclass V1NonResourceAttributes {\n static getAttributeTypeMap() {\n return V1NonResourceAttributes.attributeTypeMap;\n }\n}\nexports.V1NonResourceAttributes = V1NonResourceAttributes;\nV1NonResourceAttributes.discriminator = undefined;\nV1NonResourceAttributes.attributeTypeMap = [\n {\n \"name\": \"path\",\n \"baseName\": \"path\",\n \"type\": \"string\"\n },\n {\n \"name\": \"verb\",\n \"baseName\": \"verb\",\n \"type\": \"string\"\n }\n];\n//# sourceMappingURL=v1NonResourceAttributes.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1NonResourceRule = void 0;\n/**\n* NonResourceRule holds information that describes a rule for the non-resource\n*/\nclass V1NonResourceRule {\n static getAttributeTypeMap() {\n return V1NonResourceRule.attributeTypeMap;\n }\n}\nexports.V1NonResourceRule = V1NonResourceRule;\nV1NonResourceRule.discriminator = undefined;\nV1NonResourceRule.attributeTypeMap = [\n {\n \"name\": \"nonResourceURLs\",\n \"baseName\": \"nonResourceURLs\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"verbs\",\n \"baseName\": \"verbs\",\n \"type\": \"Array\"\n }\n];\n//# sourceMappingURL=v1NonResourceRule.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1ObjectFieldSelector = void 0;\n/**\n* ObjectFieldSelector selects an APIVersioned field of an object.\n*/\nclass V1ObjectFieldSelector {\n static getAttributeTypeMap() {\n return V1ObjectFieldSelector.attributeTypeMap;\n }\n}\nexports.V1ObjectFieldSelector = V1ObjectFieldSelector;\nV1ObjectFieldSelector.discriminator = undefined;\nV1ObjectFieldSelector.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"fieldPath\",\n \"baseName\": \"fieldPath\",\n \"type\": \"string\"\n }\n];\n//# sourceMappingURL=v1ObjectFieldSelector.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1ObjectMeta = void 0;\n/**\n* ObjectMeta is metadata that all persisted resources must have, which includes all objects users must create.\n*/\nclass V1ObjectMeta {\n static getAttributeTypeMap() {\n return V1ObjectMeta.attributeTypeMap;\n }\n}\nexports.V1ObjectMeta = V1ObjectMeta;\nV1ObjectMeta.discriminator = undefined;\nV1ObjectMeta.attributeTypeMap = [\n {\n \"name\": \"annotations\",\n \"baseName\": \"annotations\",\n \"type\": \"{ [key: string]: string; }\"\n },\n {\n \"name\": \"clusterName\",\n \"baseName\": \"clusterName\",\n \"type\": \"string\"\n },\n {\n \"name\": \"creationTimestamp\",\n \"baseName\": \"creationTimestamp\",\n \"type\": \"Date\"\n },\n {\n \"name\": \"deletionGracePeriodSeconds\",\n \"baseName\": \"deletionGracePeriodSeconds\",\n \"type\": \"number\"\n },\n {\n \"name\": \"deletionTimestamp\",\n \"baseName\": \"deletionTimestamp\",\n \"type\": \"Date\"\n },\n {\n \"name\": \"finalizers\",\n \"baseName\": \"finalizers\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"generateName\",\n \"baseName\": \"generateName\",\n \"type\": \"string\"\n },\n {\n \"name\": \"generation\",\n \"baseName\": \"generation\",\n \"type\": \"number\"\n },\n {\n \"name\": \"labels\",\n \"baseName\": \"labels\",\n \"type\": \"{ [key: string]: string; }\"\n },\n {\n \"name\": \"managedFields\",\n \"baseName\": \"managedFields\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"name\",\n \"baseName\": \"name\",\n \"type\": \"string\"\n },\n {\n \"name\": \"namespace\",\n \"baseName\": \"namespace\",\n \"type\": \"string\"\n },\n {\n \"name\": \"ownerReferences\",\n \"baseName\": \"ownerReferences\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"resourceVersion\",\n \"baseName\": \"resourceVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"selfLink\",\n \"baseName\": \"selfLink\",\n \"type\": \"string\"\n },\n {\n \"name\": \"uid\",\n \"baseName\": \"uid\",\n \"type\": \"string\"\n }\n];\n//# sourceMappingURL=v1ObjectMeta.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1ObjectReference = void 0;\n/**\n* ObjectReference contains enough information to let you inspect or modify the referred object.\n*/\nclass V1ObjectReference {\n static getAttributeTypeMap() {\n return V1ObjectReference.attributeTypeMap;\n }\n}\nexports.V1ObjectReference = V1ObjectReference;\nV1ObjectReference.discriminator = undefined;\nV1ObjectReference.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"fieldPath\",\n \"baseName\": \"fieldPath\",\n \"type\": \"string\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"name\",\n \"baseName\": \"name\",\n \"type\": \"string\"\n },\n {\n \"name\": \"namespace\",\n \"baseName\": \"namespace\",\n \"type\": \"string\"\n },\n {\n \"name\": \"resourceVersion\",\n \"baseName\": \"resourceVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"uid\",\n \"baseName\": \"uid\",\n \"type\": \"string\"\n }\n];\n//# sourceMappingURL=v1ObjectReference.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1Overhead = void 0;\n/**\n* Overhead structure represents the resource overhead associated with running a pod.\n*/\nclass V1Overhead {\n static getAttributeTypeMap() {\n return V1Overhead.attributeTypeMap;\n }\n}\nexports.V1Overhead = V1Overhead;\nV1Overhead.discriminator = undefined;\nV1Overhead.attributeTypeMap = [\n {\n \"name\": \"podFixed\",\n \"baseName\": \"podFixed\",\n \"type\": \"{ [key: string]: string; }\"\n }\n];\n//# sourceMappingURL=v1Overhead.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1OwnerReference = void 0;\n/**\n* OwnerReference contains enough information to let you identify an owning object. An owning object must be in the same namespace as the dependent, or be cluster-scoped, so there is no namespace field.\n*/\nclass V1OwnerReference {\n static getAttributeTypeMap() {\n return V1OwnerReference.attributeTypeMap;\n }\n}\nexports.V1OwnerReference = V1OwnerReference;\nV1OwnerReference.discriminator = undefined;\nV1OwnerReference.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"blockOwnerDeletion\",\n \"baseName\": \"blockOwnerDeletion\",\n \"type\": \"boolean\"\n },\n {\n \"name\": \"controller\",\n \"baseName\": \"controller\",\n \"type\": \"boolean\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"name\",\n \"baseName\": \"name\",\n \"type\": \"string\"\n },\n {\n \"name\": \"uid\",\n \"baseName\": \"uid\",\n \"type\": \"string\"\n }\n];\n//# sourceMappingURL=v1OwnerReference.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1PersistentVolume = void 0;\n/**\n* PersistentVolume (PV) is a storage resource provisioned by an administrator. It is analogous to a node. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes\n*/\nclass V1PersistentVolume {\n static getAttributeTypeMap() {\n return V1PersistentVolume.attributeTypeMap;\n }\n}\nexports.V1PersistentVolume = V1PersistentVolume;\nV1PersistentVolume.discriminator = undefined;\nV1PersistentVolume.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ObjectMeta\"\n },\n {\n \"name\": \"spec\",\n \"baseName\": \"spec\",\n \"type\": \"V1PersistentVolumeSpec\"\n },\n {\n \"name\": \"status\",\n \"baseName\": \"status\",\n \"type\": \"V1PersistentVolumeStatus\"\n }\n];\n//# sourceMappingURL=v1PersistentVolume.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1PersistentVolumeClaim = void 0;\n/**\n* PersistentVolumeClaim is a user\\'s request for and claim to a persistent volume\n*/\nclass V1PersistentVolumeClaim {\n static getAttributeTypeMap() {\n return V1PersistentVolumeClaim.attributeTypeMap;\n }\n}\nexports.V1PersistentVolumeClaim = V1PersistentVolumeClaim;\nV1PersistentVolumeClaim.discriminator = undefined;\nV1PersistentVolumeClaim.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ObjectMeta\"\n },\n {\n \"name\": \"spec\",\n \"baseName\": \"spec\",\n \"type\": \"V1PersistentVolumeClaimSpec\"\n },\n {\n \"name\": \"status\",\n \"baseName\": \"status\",\n \"type\": \"V1PersistentVolumeClaimStatus\"\n }\n];\n//# sourceMappingURL=v1PersistentVolumeClaim.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1PersistentVolumeClaimCondition = void 0;\n/**\n* PersistentVolumeClaimCondition contails details about state of pvc\n*/\nclass V1PersistentVolumeClaimCondition {\n static getAttributeTypeMap() {\n return V1PersistentVolumeClaimCondition.attributeTypeMap;\n }\n}\nexports.V1PersistentVolumeClaimCondition = V1PersistentVolumeClaimCondition;\nV1PersistentVolumeClaimCondition.discriminator = undefined;\nV1PersistentVolumeClaimCondition.attributeTypeMap = [\n {\n \"name\": \"lastProbeTime\",\n \"baseName\": \"lastProbeTime\",\n \"type\": \"Date\"\n },\n {\n \"name\": \"lastTransitionTime\",\n \"baseName\": \"lastTransitionTime\",\n \"type\": \"Date\"\n },\n {\n \"name\": \"message\",\n \"baseName\": \"message\",\n \"type\": \"string\"\n },\n {\n \"name\": \"reason\",\n \"baseName\": \"reason\",\n \"type\": \"string\"\n },\n {\n \"name\": \"status\",\n \"baseName\": \"status\",\n \"type\": \"string\"\n },\n {\n \"name\": \"type\",\n \"baseName\": \"type\",\n \"type\": \"string\"\n }\n];\n//# sourceMappingURL=v1PersistentVolumeClaimCondition.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1PersistentVolumeClaimList = void 0;\n/**\n* PersistentVolumeClaimList is a list of PersistentVolumeClaim items.\n*/\nclass V1PersistentVolumeClaimList {\n static getAttributeTypeMap() {\n return V1PersistentVolumeClaimList.attributeTypeMap;\n }\n}\nexports.V1PersistentVolumeClaimList = V1PersistentVolumeClaimList;\nV1PersistentVolumeClaimList.discriminator = undefined;\nV1PersistentVolumeClaimList.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"items\",\n \"baseName\": \"items\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ListMeta\"\n }\n];\n//# sourceMappingURL=v1PersistentVolumeClaimList.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1PersistentVolumeClaimSpec = void 0;\n/**\n* PersistentVolumeClaimSpec describes the common attributes of storage devices and allows a Source for provider-specific attributes\n*/\nclass V1PersistentVolumeClaimSpec {\n static getAttributeTypeMap() {\n return V1PersistentVolumeClaimSpec.attributeTypeMap;\n }\n}\nexports.V1PersistentVolumeClaimSpec = V1PersistentVolumeClaimSpec;\nV1PersistentVolumeClaimSpec.discriminator = undefined;\nV1PersistentVolumeClaimSpec.attributeTypeMap = [\n {\n \"name\": \"accessModes\",\n \"baseName\": \"accessModes\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"dataSource\",\n \"baseName\": \"dataSource\",\n \"type\": \"V1TypedLocalObjectReference\"\n },\n {\n \"name\": \"dataSourceRef\",\n \"baseName\": \"dataSourceRef\",\n \"type\": \"V1TypedLocalObjectReference\"\n },\n {\n \"name\": \"resources\",\n \"baseName\": \"resources\",\n \"type\": \"V1ResourceRequirements\"\n },\n {\n \"name\": \"selector\",\n \"baseName\": \"selector\",\n \"type\": \"V1LabelSelector\"\n },\n {\n \"name\": \"storageClassName\",\n \"baseName\": \"storageClassName\",\n \"type\": \"string\"\n },\n {\n \"name\": \"volumeMode\",\n \"baseName\": \"volumeMode\",\n \"type\": \"string\"\n },\n {\n \"name\": \"volumeName\",\n \"baseName\": \"volumeName\",\n \"type\": \"string\"\n }\n];\n//# sourceMappingURL=v1PersistentVolumeClaimSpec.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1PersistentVolumeClaimStatus = void 0;\n/**\n* PersistentVolumeClaimStatus is the current status of a persistent volume claim.\n*/\nclass V1PersistentVolumeClaimStatus {\n static getAttributeTypeMap() {\n return V1PersistentVolumeClaimStatus.attributeTypeMap;\n }\n}\nexports.V1PersistentVolumeClaimStatus = V1PersistentVolumeClaimStatus;\nV1PersistentVolumeClaimStatus.discriminator = undefined;\nV1PersistentVolumeClaimStatus.attributeTypeMap = [\n {\n \"name\": \"accessModes\",\n \"baseName\": \"accessModes\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"capacity\",\n \"baseName\": \"capacity\",\n \"type\": \"{ [key: string]: string; }\"\n },\n {\n \"name\": \"conditions\",\n \"baseName\": \"conditions\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"phase\",\n \"baseName\": \"phase\",\n \"type\": \"string\"\n }\n];\n//# sourceMappingURL=v1PersistentVolumeClaimStatus.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1PersistentVolumeClaimTemplate = void 0;\n/**\n* PersistentVolumeClaimTemplate is used to produce PersistentVolumeClaim objects as part of an EphemeralVolumeSource.\n*/\nclass V1PersistentVolumeClaimTemplate {\n static getAttributeTypeMap() {\n return V1PersistentVolumeClaimTemplate.attributeTypeMap;\n }\n}\nexports.V1PersistentVolumeClaimTemplate = V1PersistentVolumeClaimTemplate;\nV1PersistentVolumeClaimTemplate.discriminator = undefined;\nV1PersistentVolumeClaimTemplate.attributeTypeMap = [\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ObjectMeta\"\n },\n {\n \"name\": \"spec\",\n \"baseName\": \"spec\",\n \"type\": \"V1PersistentVolumeClaimSpec\"\n }\n];\n//# sourceMappingURL=v1PersistentVolumeClaimTemplate.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1PersistentVolumeClaimVolumeSource = void 0;\n/**\n* PersistentVolumeClaimVolumeSource references the user\\'s PVC in the same namespace. This volume finds the bound PV and mounts that volume for the pod. A PersistentVolumeClaimVolumeSource is, essentially, a wrapper around another type of volume that is owned by someone else (the system).\n*/\nclass V1PersistentVolumeClaimVolumeSource {\n static getAttributeTypeMap() {\n return V1PersistentVolumeClaimVolumeSource.attributeTypeMap;\n }\n}\nexports.V1PersistentVolumeClaimVolumeSource = V1PersistentVolumeClaimVolumeSource;\nV1PersistentVolumeClaimVolumeSource.discriminator = undefined;\nV1PersistentVolumeClaimVolumeSource.attributeTypeMap = [\n {\n \"name\": \"claimName\",\n \"baseName\": \"claimName\",\n \"type\": \"string\"\n },\n {\n \"name\": \"readOnly\",\n \"baseName\": \"readOnly\",\n \"type\": \"boolean\"\n }\n];\n//# sourceMappingURL=v1PersistentVolumeClaimVolumeSource.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1PersistentVolumeList = void 0;\n/**\n* PersistentVolumeList is a list of PersistentVolume items.\n*/\nclass V1PersistentVolumeList {\n static getAttributeTypeMap() {\n return V1PersistentVolumeList.attributeTypeMap;\n }\n}\nexports.V1PersistentVolumeList = V1PersistentVolumeList;\nV1PersistentVolumeList.discriminator = undefined;\nV1PersistentVolumeList.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"items\",\n \"baseName\": \"items\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ListMeta\"\n }\n];\n//# sourceMappingURL=v1PersistentVolumeList.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1PersistentVolumeSpec = void 0;\n/**\n* PersistentVolumeSpec is the specification of a persistent volume.\n*/\nclass V1PersistentVolumeSpec {\n static getAttributeTypeMap() {\n return V1PersistentVolumeSpec.attributeTypeMap;\n }\n}\nexports.V1PersistentVolumeSpec = V1PersistentVolumeSpec;\nV1PersistentVolumeSpec.discriminator = undefined;\nV1PersistentVolumeSpec.attributeTypeMap = [\n {\n \"name\": \"accessModes\",\n \"baseName\": \"accessModes\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"awsElasticBlockStore\",\n \"baseName\": \"awsElasticBlockStore\",\n \"type\": \"V1AWSElasticBlockStoreVolumeSource\"\n },\n {\n \"name\": \"azureDisk\",\n \"baseName\": \"azureDisk\",\n \"type\": \"V1AzureDiskVolumeSource\"\n },\n {\n \"name\": \"azureFile\",\n \"baseName\": \"azureFile\",\n \"type\": \"V1AzureFilePersistentVolumeSource\"\n },\n {\n \"name\": \"capacity\",\n \"baseName\": \"capacity\",\n \"type\": \"{ [key: string]: string; }\"\n },\n {\n \"name\": \"cephfs\",\n \"baseName\": \"cephfs\",\n \"type\": \"V1CephFSPersistentVolumeSource\"\n },\n {\n \"name\": \"cinder\",\n \"baseName\": \"cinder\",\n \"type\": \"V1CinderPersistentVolumeSource\"\n },\n {\n \"name\": \"claimRef\",\n \"baseName\": \"claimRef\",\n \"type\": \"V1ObjectReference\"\n },\n {\n \"name\": \"csi\",\n \"baseName\": \"csi\",\n \"type\": \"V1CSIPersistentVolumeSource\"\n },\n {\n \"name\": \"fc\",\n \"baseName\": \"fc\",\n \"type\": \"V1FCVolumeSource\"\n },\n {\n \"name\": \"flexVolume\",\n \"baseName\": \"flexVolume\",\n \"type\": \"V1FlexPersistentVolumeSource\"\n },\n {\n \"name\": \"flocker\",\n \"baseName\": \"flocker\",\n \"type\": \"V1FlockerVolumeSource\"\n },\n {\n \"name\": \"gcePersistentDisk\",\n \"baseName\": \"gcePersistentDisk\",\n \"type\": \"V1GCEPersistentDiskVolumeSource\"\n },\n {\n \"name\": \"glusterfs\",\n \"baseName\": \"glusterfs\",\n \"type\": \"V1GlusterfsPersistentVolumeSource\"\n },\n {\n \"name\": \"hostPath\",\n \"baseName\": \"hostPath\",\n \"type\": \"V1HostPathVolumeSource\"\n },\n {\n \"name\": \"iscsi\",\n \"baseName\": \"iscsi\",\n \"type\": \"V1ISCSIPersistentVolumeSource\"\n },\n {\n \"name\": \"local\",\n \"baseName\": \"local\",\n \"type\": \"V1LocalVolumeSource\"\n },\n {\n \"name\": \"mountOptions\",\n \"baseName\": \"mountOptions\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"nfs\",\n \"baseName\": \"nfs\",\n \"type\": \"V1NFSVolumeSource\"\n },\n {\n \"name\": \"nodeAffinity\",\n \"baseName\": \"nodeAffinity\",\n \"type\": \"V1VolumeNodeAffinity\"\n },\n {\n \"name\": \"persistentVolumeReclaimPolicy\",\n \"baseName\": \"persistentVolumeReclaimPolicy\",\n \"type\": \"string\"\n },\n {\n \"name\": \"photonPersistentDisk\",\n \"baseName\": \"photonPersistentDisk\",\n \"type\": \"V1PhotonPersistentDiskVolumeSource\"\n },\n {\n \"name\": \"portworxVolume\",\n \"baseName\": \"portworxVolume\",\n \"type\": \"V1PortworxVolumeSource\"\n },\n {\n \"name\": \"quobyte\",\n \"baseName\": \"quobyte\",\n \"type\": \"V1QuobyteVolumeSource\"\n },\n {\n \"name\": \"rbd\",\n \"baseName\": \"rbd\",\n \"type\": \"V1RBDPersistentVolumeSource\"\n },\n {\n \"name\": \"scaleIO\",\n \"baseName\": \"scaleIO\",\n \"type\": \"V1ScaleIOPersistentVolumeSource\"\n },\n {\n \"name\": \"storageClassName\",\n \"baseName\": \"storageClassName\",\n \"type\": \"string\"\n },\n {\n \"name\": \"storageos\",\n \"baseName\": \"storageos\",\n \"type\": \"V1StorageOSPersistentVolumeSource\"\n },\n {\n \"name\": \"volumeMode\",\n \"baseName\": \"volumeMode\",\n \"type\": \"string\"\n },\n {\n \"name\": \"vsphereVolume\",\n \"baseName\": \"vsphereVolume\",\n \"type\": \"V1VsphereVirtualDiskVolumeSource\"\n }\n];\n//# sourceMappingURL=v1PersistentVolumeSpec.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1PersistentVolumeStatus = void 0;\n/**\n* PersistentVolumeStatus is the current status of a persistent volume.\n*/\nclass V1PersistentVolumeStatus {\n static getAttributeTypeMap() {\n return V1PersistentVolumeStatus.attributeTypeMap;\n }\n}\nexports.V1PersistentVolumeStatus = V1PersistentVolumeStatus;\nV1PersistentVolumeStatus.discriminator = undefined;\nV1PersistentVolumeStatus.attributeTypeMap = [\n {\n \"name\": \"message\",\n \"baseName\": \"message\",\n \"type\": \"string\"\n },\n {\n \"name\": \"phase\",\n \"baseName\": \"phase\",\n \"type\": \"string\"\n },\n {\n \"name\": \"reason\",\n \"baseName\": \"reason\",\n \"type\": \"string\"\n }\n];\n//# sourceMappingURL=v1PersistentVolumeStatus.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1PhotonPersistentDiskVolumeSource = void 0;\n/**\n* Represents a Photon Controller persistent disk resource.\n*/\nclass V1PhotonPersistentDiskVolumeSource {\n static getAttributeTypeMap() {\n return V1PhotonPersistentDiskVolumeSource.attributeTypeMap;\n }\n}\nexports.V1PhotonPersistentDiskVolumeSource = V1PhotonPersistentDiskVolumeSource;\nV1PhotonPersistentDiskVolumeSource.discriminator = undefined;\nV1PhotonPersistentDiskVolumeSource.attributeTypeMap = [\n {\n \"name\": \"fsType\",\n \"baseName\": \"fsType\",\n \"type\": \"string\"\n },\n {\n \"name\": \"pdID\",\n \"baseName\": \"pdID\",\n \"type\": \"string\"\n }\n];\n//# sourceMappingURL=v1PhotonPersistentDiskVolumeSource.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1Pod = void 0;\n/**\n* Pod is a collection of containers that can run on a host. This resource is created by clients and scheduled onto hosts.\n*/\nclass V1Pod {\n static getAttributeTypeMap() {\n return V1Pod.attributeTypeMap;\n }\n}\nexports.V1Pod = V1Pod;\nV1Pod.discriminator = undefined;\nV1Pod.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ObjectMeta\"\n },\n {\n \"name\": \"spec\",\n \"baseName\": \"spec\",\n \"type\": \"V1PodSpec\"\n },\n {\n \"name\": \"status\",\n \"baseName\": \"status\",\n \"type\": \"V1PodStatus\"\n }\n];\n//# sourceMappingURL=v1Pod.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1PodAffinity = void 0;\n/**\n* Pod affinity is a group of inter pod affinity scheduling rules.\n*/\nclass V1PodAffinity {\n static getAttributeTypeMap() {\n return V1PodAffinity.attributeTypeMap;\n }\n}\nexports.V1PodAffinity = V1PodAffinity;\nV1PodAffinity.discriminator = undefined;\nV1PodAffinity.attributeTypeMap = [\n {\n \"name\": \"preferredDuringSchedulingIgnoredDuringExecution\",\n \"baseName\": \"preferredDuringSchedulingIgnoredDuringExecution\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"requiredDuringSchedulingIgnoredDuringExecution\",\n \"baseName\": \"requiredDuringSchedulingIgnoredDuringExecution\",\n \"type\": \"Array\"\n }\n];\n//# sourceMappingURL=v1PodAffinity.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1PodAffinityTerm = void 0;\n/**\n* Defines a set of pods (namely those matching the labelSelector relative to the given namespace(s)) that this pod should be co-located (affinity) or not co-located (anti-affinity) with, where co-located is defined as running on a node whose value of the label with key matches that of any node on which a pod of the set of pods is running\n*/\nclass V1PodAffinityTerm {\n static getAttributeTypeMap() {\n return V1PodAffinityTerm.attributeTypeMap;\n }\n}\nexports.V1PodAffinityTerm = V1PodAffinityTerm;\nV1PodAffinityTerm.discriminator = undefined;\nV1PodAffinityTerm.attributeTypeMap = [\n {\n \"name\": \"labelSelector\",\n \"baseName\": \"labelSelector\",\n \"type\": \"V1LabelSelector\"\n },\n {\n \"name\": \"namespaceSelector\",\n \"baseName\": \"namespaceSelector\",\n \"type\": \"V1LabelSelector\"\n },\n {\n \"name\": \"namespaces\",\n \"baseName\": \"namespaces\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"topologyKey\",\n \"baseName\": \"topologyKey\",\n \"type\": \"string\"\n }\n];\n//# sourceMappingURL=v1PodAffinityTerm.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1PodAntiAffinity = void 0;\n/**\n* Pod anti affinity is a group of inter pod anti affinity scheduling rules.\n*/\nclass V1PodAntiAffinity {\n static getAttributeTypeMap() {\n return V1PodAntiAffinity.attributeTypeMap;\n }\n}\nexports.V1PodAntiAffinity = V1PodAntiAffinity;\nV1PodAntiAffinity.discriminator = undefined;\nV1PodAntiAffinity.attributeTypeMap = [\n {\n \"name\": \"preferredDuringSchedulingIgnoredDuringExecution\",\n \"baseName\": \"preferredDuringSchedulingIgnoredDuringExecution\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"requiredDuringSchedulingIgnoredDuringExecution\",\n \"baseName\": \"requiredDuringSchedulingIgnoredDuringExecution\",\n \"type\": \"Array\"\n }\n];\n//# sourceMappingURL=v1PodAntiAffinity.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1PodCondition = void 0;\n/**\n* PodCondition contains details for the current condition of this pod.\n*/\nclass V1PodCondition {\n static getAttributeTypeMap() {\n return V1PodCondition.attributeTypeMap;\n }\n}\nexports.V1PodCondition = V1PodCondition;\nV1PodCondition.discriminator = undefined;\nV1PodCondition.attributeTypeMap = [\n {\n \"name\": \"lastProbeTime\",\n \"baseName\": \"lastProbeTime\",\n \"type\": \"Date\"\n },\n {\n \"name\": \"lastTransitionTime\",\n \"baseName\": \"lastTransitionTime\",\n \"type\": \"Date\"\n },\n {\n \"name\": \"message\",\n \"baseName\": \"message\",\n \"type\": \"string\"\n },\n {\n \"name\": \"reason\",\n \"baseName\": \"reason\",\n \"type\": \"string\"\n },\n {\n \"name\": \"status\",\n \"baseName\": \"status\",\n \"type\": \"string\"\n },\n {\n \"name\": \"type\",\n \"baseName\": \"type\",\n \"type\": \"string\"\n }\n];\n//# sourceMappingURL=v1PodCondition.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1PodDNSConfig = void 0;\n/**\n* PodDNSConfig defines the DNS parameters of a pod in addition to those generated from DNSPolicy.\n*/\nclass V1PodDNSConfig {\n static getAttributeTypeMap() {\n return V1PodDNSConfig.attributeTypeMap;\n }\n}\nexports.V1PodDNSConfig = V1PodDNSConfig;\nV1PodDNSConfig.discriminator = undefined;\nV1PodDNSConfig.attributeTypeMap = [\n {\n \"name\": \"nameservers\",\n \"baseName\": \"nameservers\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"options\",\n \"baseName\": \"options\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"searches\",\n \"baseName\": \"searches\",\n \"type\": \"Array\"\n }\n];\n//# sourceMappingURL=v1PodDNSConfig.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1PodDNSConfigOption = void 0;\n/**\n* PodDNSConfigOption defines DNS resolver options of a pod.\n*/\nclass V1PodDNSConfigOption {\n static getAttributeTypeMap() {\n return V1PodDNSConfigOption.attributeTypeMap;\n }\n}\nexports.V1PodDNSConfigOption = V1PodDNSConfigOption;\nV1PodDNSConfigOption.discriminator = undefined;\nV1PodDNSConfigOption.attributeTypeMap = [\n {\n \"name\": \"name\",\n \"baseName\": \"name\",\n \"type\": \"string\"\n },\n {\n \"name\": \"value\",\n \"baseName\": \"value\",\n \"type\": \"string\"\n }\n];\n//# sourceMappingURL=v1PodDNSConfigOption.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1PodDisruptionBudget = void 0;\n/**\n* PodDisruptionBudget is an object to define the max disruption that can be caused to a collection of pods\n*/\nclass V1PodDisruptionBudget {\n static getAttributeTypeMap() {\n return V1PodDisruptionBudget.attributeTypeMap;\n }\n}\nexports.V1PodDisruptionBudget = V1PodDisruptionBudget;\nV1PodDisruptionBudget.discriminator = undefined;\nV1PodDisruptionBudget.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ObjectMeta\"\n },\n {\n \"name\": \"spec\",\n \"baseName\": \"spec\",\n \"type\": \"V1PodDisruptionBudgetSpec\"\n },\n {\n \"name\": \"status\",\n \"baseName\": \"status\",\n \"type\": \"V1PodDisruptionBudgetStatus\"\n }\n];\n//# sourceMappingURL=v1PodDisruptionBudget.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1PodDisruptionBudgetList = void 0;\n/**\n* PodDisruptionBudgetList is a collection of PodDisruptionBudgets.\n*/\nclass V1PodDisruptionBudgetList {\n static getAttributeTypeMap() {\n return V1PodDisruptionBudgetList.attributeTypeMap;\n }\n}\nexports.V1PodDisruptionBudgetList = V1PodDisruptionBudgetList;\nV1PodDisruptionBudgetList.discriminator = undefined;\nV1PodDisruptionBudgetList.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"items\",\n \"baseName\": \"items\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ListMeta\"\n }\n];\n//# sourceMappingURL=v1PodDisruptionBudgetList.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1PodDisruptionBudgetSpec = void 0;\n/**\n* PodDisruptionBudgetSpec is a description of a PodDisruptionBudget.\n*/\nclass V1PodDisruptionBudgetSpec {\n static getAttributeTypeMap() {\n return V1PodDisruptionBudgetSpec.attributeTypeMap;\n }\n}\nexports.V1PodDisruptionBudgetSpec = V1PodDisruptionBudgetSpec;\nV1PodDisruptionBudgetSpec.discriminator = undefined;\nV1PodDisruptionBudgetSpec.attributeTypeMap = [\n {\n \"name\": \"maxUnavailable\",\n \"baseName\": \"maxUnavailable\",\n \"type\": \"IntOrString\"\n },\n {\n \"name\": \"minAvailable\",\n \"baseName\": \"minAvailable\",\n \"type\": \"IntOrString\"\n },\n {\n \"name\": \"selector\",\n \"baseName\": \"selector\",\n \"type\": \"V1LabelSelector\"\n }\n];\n//# sourceMappingURL=v1PodDisruptionBudgetSpec.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1PodDisruptionBudgetStatus = void 0;\n/**\n* PodDisruptionBudgetStatus represents information about the status of a PodDisruptionBudget. Status may trail the actual state of a system.\n*/\nclass V1PodDisruptionBudgetStatus {\n static getAttributeTypeMap() {\n return V1PodDisruptionBudgetStatus.attributeTypeMap;\n }\n}\nexports.V1PodDisruptionBudgetStatus = V1PodDisruptionBudgetStatus;\nV1PodDisruptionBudgetStatus.discriminator = undefined;\nV1PodDisruptionBudgetStatus.attributeTypeMap = [\n {\n \"name\": \"conditions\",\n \"baseName\": \"conditions\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"currentHealthy\",\n \"baseName\": \"currentHealthy\",\n \"type\": \"number\"\n },\n {\n \"name\": \"desiredHealthy\",\n \"baseName\": \"desiredHealthy\",\n \"type\": \"number\"\n },\n {\n \"name\": \"disruptedPods\",\n \"baseName\": \"disruptedPods\",\n \"type\": \"{ [key: string]: Date; }\"\n },\n {\n \"name\": \"disruptionsAllowed\",\n \"baseName\": \"disruptionsAllowed\",\n \"type\": \"number\"\n },\n {\n \"name\": \"expectedPods\",\n \"baseName\": \"expectedPods\",\n \"type\": \"number\"\n },\n {\n \"name\": \"observedGeneration\",\n \"baseName\": \"observedGeneration\",\n \"type\": \"number\"\n }\n];\n//# sourceMappingURL=v1PodDisruptionBudgetStatus.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1PodIP = void 0;\n/**\n* IP address information for entries in the (plural) PodIPs field. Each entry includes: IP: An IP address allocated to the pod. Routable at least within the cluster.\n*/\nclass V1PodIP {\n static getAttributeTypeMap() {\n return V1PodIP.attributeTypeMap;\n }\n}\nexports.V1PodIP = V1PodIP;\nV1PodIP.discriminator = undefined;\nV1PodIP.attributeTypeMap = [\n {\n \"name\": \"ip\",\n \"baseName\": \"ip\",\n \"type\": \"string\"\n }\n];\n//# sourceMappingURL=v1PodIP.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1PodList = void 0;\n/**\n* PodList is a list of Pods.\n*/\nclass V1PodList {\n static getAttributeTypeMap() {\n return V1PodList.attributeTypeMap;\n }\n}\nexports.V1PodList = V1PodList;\nV1PodList.discriminator = undefined;\nV1PodList.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"items\",\n \"baseName\": \"items\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ListMeta\"\n }\n];\n//# sourceMappingURL=v1PodList.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1PodReadinessGate = void 0;\n/**\n* PodReadinessGate contains the reference to a pod condition\n*/\nclass V1PodReadinessGate {\n static getAttributeTypeMap() {\n return V1PodReadinessGate.attributeTypeMap;\n }\n}\nexports.V1PodReadinessGate = V1PodReadinessGate;\nV1PodReadinessGate.discriminator = undefined;\nV1PodReadinessGate.attributeTypeMap = [\n {\n \"name\": \"conditionType\",\n \"baseName\": \"conditionType\",\n \"type\": \"string\"\n }\n];\n//# sourceMappingURL=v1PodReadinessGate.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1PodSecurityContext = void 0;\n/**\n* PodSecurityContext holds pod-level security attributes and common container settings. Some fields are also present in container.securityContext. Field values of container.securityContext take precedence over field values of PodSecurityContext.\n*/\nclass V1PodSecurityContext {\n static getAttributeTypeMap() {\n return V1PodSecurityContext.attributeTypeMap;\n }\n}\nexports.V1PodSecurityContext = V1PodSecurityContext;\nV1PodSecurityContext.discriminator = undefined;\nV1PodSecurityContext.attributeTypeMap = [\n {\n \"name\": \"fsGroup\",\n \"baseName\": \"fsGroup\",\n \"type\": \"number\"\n },\n {\n \"name\": \"fsGroupChangePolicy\",\n \"baseName\": \"fsGroupChangePolicy\",\n \"type\": \"string\"\n },\n {\n \"name\": \"runAsGroup\",\n \"baseName\": \"runAsGroup\",\n \"type\": \"number\"\n },\n {\n \"name\": \"runAsNonRoot\",\n \"baseName\": \"runAsNonRoot\",\n \"type\": \"boolean\"\n },\n {\n \"name\": \"runAsUser\",\n \"baseName\": \"runAsUser\",\n \"type\": \"number\"\n },\n {\n \"name\": \"seLinuxOptions\",\n \"baseName\": \"seLinuxOptions\",\n \"type\": \"V1SELinuxOptions\"\n },\n {\n \"name\": \"seccompProfile\",\n \"baseName\": \"seccompProfile\",\n \"type\": \"V1SeccompProfile\"\n },\n {\n \"name\": \"supplementalGroups\",\n \"baseName\": \"supplementalGroups\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"sysctls\",\n \"baseName\": \"sysctls\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"windowsOptions\",\n \"baseName\": \"windowsOptions\",\n \"type\": \"V1WindowsSecurityContextOptions\"\n }\n];\n//# sourceMappingURL=v1PodSecurityContext.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1PodSpec = void 0;\n/**\n* PodSpec is a description of a pod.\n*/\nclass V1PodSpec {\n static getAttributeTypeMap() {\n return V1PodSpec.attributeTypeMap;\n }\n}\nexports.V1PodSpec = V1PodSpec;\nV1PodSpec.discriminator = undefined;\nV1PodSpec.attributeTypeMap = [\n {\n \"name\": \"activeDeadlineSeconds\",\n \"baseName\": \"activeDeadlineSeconds\",\n \"type\": \"number\"\n },\n {\n \"name\": \"affinity\",\n \"baseName\": \"affinity\",\n \"type\": \"V1Affinity\"\n },\n {\n \"name\": \"automountServiceAccountToken\",\n \"baseName\": \"automountServiceAccountToken\",\n \"type\": \"boolean\"\n },\n {\n \"name\": \"containers\",\n \"baseName\": \"containers\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"dnsConfig\",\n \"baseName\": \"dnsConfig\",\n \"type\": \"V1PodDNSConfig\"\n },\n {\n \"name\": \"dnsPolicy\",\n \"baseName\": \"dnsPolicy\",\n \"type\": \"string\"\n },\n {\n \"name\": \"enableServiceLinks\",\n \"baseName\": \"enableServiceLinks\",\n \"type\": \"boolean\"\n },\n {\n \"name\": \"ephemeralContainers\",\n \"baseName\": \"ephemeralContainers\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"hostAliases\",\n \"baseName\": \"hostAliases\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"hostIPC\",\n \"baseName\": \"hostIPC\",\n \"type\": \"boolean\"\n },\n {\n \"name\": \"hostNetwork\",\n \"baseName\": \"hostNetwork\",\n \"type\": \"boolean\"\n },\n {\n \"name\": \"hostPID\",\n \"baseName\": \"hostPID\",\n \"type\": \"boolean\"\n },\n {\n \"name\": \"hostname\",\n \"baseName\": \"hostname\",\n \"type\": \"string\"\n },\n {\n \"name\": \"imagePullSecrets\",\n \"baseName\": \"imagePullSecrets\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"initContainers\",\n \"baseName\": \"initContainers\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"nodeName\",\n \"baseName\": \"nodeName\",\n \"type\": \"string\"\n },\n {\n \"name\": \"nodeSelector\",\n \"baseName\": \"nodeSelector\",\n \"type\": \"{ [key: string]: string; }\"\n },\n {\n \"name\": \"overhead\",\n \"baseName\": \"overhead\",\n \"type\": \"{ [key: string]: string; }\"\n },\n {\n \"name\": \"preemptionPolicy\",\n \"baseName\": \"preemptionPolicy\",\n \"type\": \"string\"\n },\n {\n \"name\": \"priority\",\n \"baseName\": \"priority\",\n \"type\": \"number\"\n },\n {\n \"name\": \"priorityClassName\",\n \"baseName\": \"priorityClassName\",\n \"type\": \"string\"\n },\n {\n \"name\": \"readinessGates\",\n \"baseName\": \"readinessGates\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"restartPolicy\",\n \"baseName\": \"restartPolicy\",\n \"type\": \"string\"\n },\n {\n \"name\": \"runtimeClassName\",\n \"baseName\": \"runtimeClassName\",\n \"type\": \"string\"\n },\n {\n \"name\": \"schedulerName\",\n \"baseName\": \"schedulerName\",\n \"type\": \"string\"\n },\n {\n \"name\": \"securityContext\",\n \"baseName\": \"securityContext\",\n \"type\": \"V1PodSecurityContext\"\n },\n {\n \"name\": \"serviceAccount\",\n \"baseName\": \"serviceAccount\",\n \"type\": \"string\"\n },\n {\n \"name\": \"serviceAccountName\",\n \"baseName\": \"serviceAccountName\",\n \"type\": \"string\"\n },\n {\n \"name\": \"setHostnameAsFQDN\",\n \"baseName\": \"setHostnameAsFQDN\",\n \"type\": \"boolean\"\n },\n {\n \"name\": \"shareProcessNamespace\",\n \"baseName\": \"shareProcessNamespace\",\n \"type\": \"boolean\"\n },\n {\n \"name\": \"subdomain\",\n \"baseName\": \"subdomain\",\n \"type\": \"string\"\n },\n {\n \"name\": \"terminationGracePeriodSeconds\",\n \"baseName\": \"terminationGracePeriodSeconds\",\n \"type\": \"number\"\n },\n {\n \"name\": \"tolerations\",\n \"baseName\": \"tolerations\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"topologySpreadConstraints\",\n \"baseName\": \"topologySpreadConstraints\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"volumes\",\n \"baseName\": \"volumes\",\n \"type\": \"Array\"\n }\n];\n//# sourceMappingURL=v1PodSpec.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1PodStatus = void 0;\n/**\n* PodStatus represents information about the status of a pod. Status may trail the actual state of a system, especially if the node that hosts the pod cannot contact the control plane.\n*/\nclass V1PodStatus {\n static getAttributeTypeMap() {\n return V1PodStatus.attributeTypeMap;\n }\n}\nexports.V1PodStatus = V1PodStatus;\nV1PodStatus.discriminator = undefined;\nV1PodStatus.attributeTypeMap = [\n {\n \"name\": \"conditions\",\n \"baseName\": \"conditions\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"containerStatuses\",\n \"baseName\": \"containerStatuses\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"ephemeralContainerStatuses\",\n \"baseName\": \"ephemeralContainerStatuses\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"hostIP\",\n \"baseName\": \"hostIP\",\n \"type\": \"string\"\n },\n {\n \"name\": \"initContainerStatuses\",\n \"baseName\": \"initContainerStatuses\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"message\",\n \"baseName\": \"message\",\n \"type\": \"string\"\n },\n {\n \"name\": \"nominatedNodeName\",\n \"baseName\": \"nominatedNodeName\",\n \"type\": \"string\"\n },\n {\n \"name\": \"phase\",\n \"baseName\": \"phase\",\n \"type\": \"string\"\n },\n {\n \"name\": \"podIP\",\n \"baseName\": \"podIP\",\n \"type\": \"string\"\n },\n {\n \"name\": \"podIPs\",\n \"baseName\": \"podIPs\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"qosClass\",\n \"baseName\": \"qosClass\",\n \"type\": \"string\"\n },\n {\n \"name\": \"reason\",\n \"baseName\": \"reason\",\n \"type\": \"string\"\n },\n {\n \"name\": \"startTime\",\n \"baseName\": \"startTime\",\n \"type\": \"Date\"\n }\n];\n//# sourceMappingURL=v1PodStatus.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1PodTemplate = void 0;\n/**\n* PodTemplate describes a template for creating copies of a predefined pod.\n*/\nclass V1PodTemplate {\n static getAttributeTypeMap() {\n return V1PodTemplate.attributeTypeMap;\n }\n}\nexports.V1PodTemplate = V1PodTemplate;\nV1PodTemplate.discriminator = undefined;\nV1PodTemplate.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ObjectMeta\"\n },\n {\n \"name\": \"template\",\n \"baseName\": \"template\",\n \"type\": \"V1PodTemplateSpec\"\n }\n];\n//# sourceMappingURL=v1PodTemplate.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1PodTemplateList = void 0;\n/**\n* PodTemplateList is a list of PodTemplates.\n*/\nclass V1PodTemplateList {\n static getAttributeTypeMap() {\n return V1PodTemplateList.attributeTypeMap;\n }\n}\nexports.V1PodTemplateList = V1PodTemplateList;\nV1PodTemplateList.discriminator = undefined;\nV1PodTemplateList.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"items\",\n \"baseName\": \"items\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ListMeta\"\n }\n];\n//# sourceMappingURL=v1PodTemplateList.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1PodTemplateSpec = void 0;\n/**\n* PodTemplateSpec describes the data a pod should have when created from a template\n*/\nclass V1PodTemplateSpec {\n static getAttributeTypeMap() {\n return V1PodTemplateSpec.attributeTypeMap;\n }\n}\nexports.V1PodTemplateSpec = V1PodTemplateSpec;\nV1PodTemplateSpec.discriminator = undefined;\nV1PodTemplateSpec.attributeTypeMap = [\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ObjectMeta\"\n },\n {\n \"name\": \"spec\",\n \"baseName\": \"spec\",\n \"type\": \"V1PodSpec\"\n }\n];\n//# sourceMappingURL=v1PodTemplateSpec.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1PolicyRule = void 0;\n/**\n* PolicyRule holds information that describes a policy rule, but does not contain information about who the rule applies to or which namespace the rule applies to.\n*/\nclass V1PolicyRule {\n static getAttributeTypeMap() {\n return V1PolicyRule.attributeTypeMap;\n }\n}\nexports.V1PolicyRule = V1PolicyRule;\nV1PolicyRule.discriminator = undefined;\nV1PolicyRule.attributeTypeMap = [\n {\n \"name\": \"apiGroups\",\n \"baseName\": \"apiGroups\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"nonResourceURLs\",\n \"baseName\": \"nonResourceURLs\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"resourceNames\",\n \"baseName\": \"resourceNames\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"resources\",\n \"baseName\": \"resources\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"verbs\",\n \"baseName\": \"verbs\",\n \"type\": \"Array\"\n }\n];\n//# sourceMappingURL=v1PolicyRule.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1PortStatus = void 0;\nclass V1PortStatus {\n static getAttributeTypeMap() {\n return V1PortStatus.attributeTypeMap;\n }\n}\nexports.V1PortStatus = V1PortStatus;\nV1PortStatus.discriminator = undefined;\nV1PortStatus.attributeTypeMap = [\n {\n \"name\": \"error\",\n \"baseName\": \"error\",\n \"type\": \"string\"\n },\n {\n \"name\": \"port\",\n \"baseName\": \"port\",\n \"type\": \"number\"\n },\n {\n \"name\": \"protocol\",\n \"baseName\": \"protocol\",\n \"type\": \"string\"\n }\n];\n//# sourceMappingURL=v1PortStatus.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1PortworxVolumeSource = void 0;\n/**\n* PortworxVolumeSource represents a Portworx volume resource.\n*/\nclass V1PortworxVolumeSource {\n static getAttributeTypeMap() {\n return V1PortworxVolumeSource.attributeTypeMap;\n }\n}\nexports.V1PortworxVolumeSource = V1PortworxVolumeSource;\nV1PortworxVolumeSource.discriminator = undefined;\nV1PortworxVolumeSource.attributeTypeMap = [\n {\n \"name\": \"fsType\",\n \"baseName\": \"fsType\",\n \"type\": \"string\"\n },\n {\n \"name\": \"readOnly\",\n \"baseName\": \"readOnly\",\n \"type\": \"boolean\"\n },\n {\n \"name\": \"volumeID\",\n \"baseName\": \"volumeID\",\n \"type\": \"string\"\n }\n];\n//# sourceMappingURL=v1PortworxVolumeSource.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1Preconditions = void 0;\n/**\n* Preconditions must be fulfilled before an operation (update, delete, etc.) is carried out.\n*/\nclass V1Preconditions {\n static getAttributeTypeMap() {\n return V1Preconditions.attributeTypeMap;\n }\n}\nexports.V1Preconditions = V1Preconditions;\nV1Preconditions.discriminator = undefined;\nV1Preconditions.attributeTypeMap = [\n {\n \"name\": \"resourceVersion\",\n \"baseName\": \"resourceVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"uid\",\n \"baseName\": \"uid\",\n \"type\": \"string\"\n }\n];\n//# sourceMappingURL=v1Preconditions.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1PreferredSchedulingTerm = void 0;\n/**\n* An empty preferred scheduling term matches all objects with implicit weight 0 (i.e. it\\'s a no-op). A null preferred scheduling term matches no objects (i.e. is also a no-op).\n*/\nclass V1PreferredSchedulingTerm {\n static getAttributeTypeMap() {\n return V1PreferredSchedulingTerm.attributeTypeMap;\n }\n}\nexports.V1PreferredSchedulingTerm = V1PreferredSchedulingTerm;\nV1PreferredSchedulingTerm.discriminator = undefined;\nV1PreferredSchedulingTerm.attributeTypeMap = [\n {\n \"name\": \"preference\",\n \"baseName\": \"preference\",\n \"type\": \"V1NodeSelectorTerm\"\n },\n {\n \"name\": \"weight\",\n \"baseName\": \"weight\",\n \"type\": \"number\"\n }\n];\n//# sourceMappingURL=v1PreferredSchedulingTerm.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1PriorityClass = void 0;\n/**\n* PriorityClass defines mapping from a priority class name to the priority integer value. The value can be any valid integer.\n*/\nclass V1PriorityClass {\n static getAttributeTypeMap() {\n return V1PriorityClass.attributeTypeMap;\n }\n}\nexports.V1PriorityClass = V1PriorityClass;\nV1PriorityClass.discriminator = undefined;\nV1PriorityClass.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"description\",\n \"baseName\": \"description\",\n \"type\": \"string\"\n },\n {\n \"name\": \"globalDefault\",\n \"baseName\": \"globalDefault\",\n \"type\": \"boolean\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ObjectMeta\"\n },\n {\n \"name\": \"preemptionPolicy\",\n \"baseName\": \"preemptionPolicy\",\n \"type\": \"string\"\n },\n {\n \"name\": \"value\",\n \"baseName\": \"value\",\n \"type\": \"number\"\n }\n];\n//# sourceMappingURL=v1PriorityClass.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1PriorityClassList = void 0;\n/**\n* PriorityClassList is a collection of priority classes.\n*/\nclass V1PriorityClassList {\n static getAttributeTypeMap() {\n return V1PriorityClassList.attributeTypeMap;\n }\n}\nexports.V1PriorityClassList = V1PriorityClassList;\nV1PriorityClassList.discriminator = undefined;\nV1PriorityClassList.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"items\",\n \"baseName\": \"items\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ListMeta\"\n }\n];\n//# sourceMappingURL=v1PriorityClassList.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1Probe = void 0;\n/**\n* Probe describes a health check to be performed against a container to determine whether it is alive or ready to receive traffic.\n*/\nclass V1Probe {\n static getAttributeTypeMap() {\n return V1Probe.attributeTypeMap;\n }\n}\nexports.V1Probe = V1Probe;\nV1Probe.discriminator = undefined;\nV1Probe.attributeTypeMap = [\n {\n \"name\": \"exec\",\n \"baseName\": \"exec\",\n \"type\": \"V1ExecAction\"\n },\n {\n \"name\": \"failureThreshold\",\n \"baseName\": \"failureThreshold\",\n \"type\": \"number\"\n },\n {\n \"name\": \"httpGet\",\n \"baseName\": \"httpGet\",\n \"type\": \"V1HTTPGetAction\"\n },\n {\n \"name\": \"initialDelaySeconds\",\n \"baseName\": \"initialDelaySeconds\",\n \"type\": \"number\"\n },\n {\n \"name\": \"periodSeconds\",\n \"baseName\": \"periodSeconds\",\n \"type\": \"number\"\n },\n {\n \"name\": \"successThreshold\",\n \"baseName\": \"successThreshold\",\n \"type\": \"number\"\n },\n {\n \"name\": \"tcpSocket\",\n \"baseName\": \"tcpSocket\",\n \"type\": \"V1TCPSocketAction\"\n },\n {\n \"name\": \"terminationGracePeriodSeconds\",\n \"baseName\": \"terminationGracePeriodSeconds\",\n \"type\": \"number\"\n },\n {\n \"name\": \"timeoutSeconds\",\n \"baseName\": \"timeoutSeconds\",\n \"type\": \"number\"\n }\n];\n//# sourceMappingURL=v1Probe.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1ProjectedVolumeSource = void 0;\n/**\n* Represents a projected volume source\n*/\nclass V1ProjectedVolumeSource {\n static getAttributeTypeMap() {\n return V1ProjectedVolumeSource.attributeTypeMap;\n }\n}\nexports.V1ProjectedVolumeSource = V1ProjectedVolumeSource;\nV1ProjectedVolumeSource.discriminator = undefined;\nV1ProjectedVolumeSource.attributeTypeMap = [\n {\n \"name\": \"defaultMode\",\n \"baseName\": \"defaultMode\",\n \"type\": \"number\"\n },\n {\n \"name\": \"sources\",\n \"baseName\": \"sources\",\n \"type\": \"Array\"\n }\n];\n//# sourceMappingURL=v1ProjectedVolumeSource.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1QuobyteVolumeSource = void 0;\n/**\n* Represents a Quobyte mount that lasts the lifetime of a pod. Quobyte volumes do not support ownership management or SELinux relabeling.\n*/\nclass V1QuobyteVolumeSource {\n static getAttributeTypeMap() {\n return V1QuobyteVolumeSource.attributeTypeMap;\n }\n}\nexports.V1QuobyteVolumeSource = V1QuobyteVolumeSource;\nV1QuobyteVolumeSource.discriminator = undefined;\nV1QuobyteVolumeSource.attributeTypeMap = [\n {\n \"name\": \"group\",\n \"baseName\": \"group\",\n \"type\": \"string\"\n },\n {\n \"name\": \"readOnly\",\n \"baseName\": \"readOnly\",\n \"type\": \"boolean\"\n },\n {\n \"name\": \"registry\",\n \"baseName\": \"registry\",\n \"type\": \"string\"\n },\n {\n \"name\": \"tenant\",\n \"baseName\": \"tenant\",\n \"type\": \"string\"\n },\n {\n \"name\": \"user\",\n \"baseName\": \"user\",\n \"type\": \"string\"\n },\n {\n \"name\": \"volume\",\n \"baseName\": \"volume\",\n \"type\": \"string\"\n }\n];\n//# sourceMappingURL=v1QuobyteVolumeSource.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1RBDPersistentVolumeSource = void 0;\n/**\n* Represents a Rados Block Device mount that lasts the lifetime of a pod. RBD volumes support ownership management and SELinux relabeling.\n*/\nclass V1RBDPersistentVolumeSource {\n static getAttributeTypeMap() {\n return V1RBDPersistentVolumeSource.attributeTypeMap;\n }\n}\nexports.V1RBDPersistentVolumeSource = V1RBDPersistentVolumeSource;\nV1RBDPersistentVolumeSource.discriminator = undefined;\nV1RBDPersistentVolumeSource.attributeTypeMap = [\n {\n \"name\": \"fsType\",\n \"baseName\": \"fsType\",\n \"type\": \"string\"\n },\n {\n \"name\": \"image\",\n \"baseName\": \"image\",\n \"type\": \"string\"\n },\n {\n \"name\": \"keyring\",\n \"baseName\": \"keyring\",\n \"type\": \"string\"\n },\n {\n \"name\": \"monitors\",\n \"baseName\": \"monitors\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"pool\",\n \"baseName\": \"pool\",\n \"type\": \"string\"\n },\n {\n \"name\": \"readOnly\",\n \"baseName\": \"readOnly\",\n \"type\": \"boolean\"\n },\n {\n \"name\": \"secretRef\",\n \"baseName\": \"secretRef\",\n \"type\": \"V1SecretReference\"\n },\n {\n \"name\": \"user\",\n \"baseName\": \"user\",\n \"type\": \"string\"\n }\n];\n//# sourceMappingURL=v1RBDPersistentVolumeSource.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1RBDVolumeSource = void 0;\n/**\n* Represents a Rados Block Device mount that lasts the lifetime of a pod. RBD volumes support ownership management and SELinux relabeling.\n*/\nclass V1RBDVolumeSource {\n static getAttributeTypeMap() {\n return V1RBDVolumeSource.attributeTypeMap;\n }\n}\nexports.V1RBDVolumeSource = V1RBDVolumeSource;\nV1RBDVolumeSource.discriminator = undefined;\nV1RBDVolumeSource.attributeTypeMap = [\n {\n \"name\": \"fsType\",\n \"baseName\": \"fsType\",\n \"type\": \"string\"\n },\n {\n \"name\": \"image\",\n \"baseName\": \"image\",\n \"type\": \"string\"\n },\n {\n \"name\": \"keyring\",\n \"baseName\": \"keyring\",\n \"type\": \"string\"\n },\n {\n \"name\": \"monitors\",\n \"baseName\": \"monitors\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"pool\",\n \"baseName\": \"pool\",\n \"type\": \"string\"\n },\n {\n \"name\": \"readOnly\",\n \"baseName\": \"readOnly\",\n \"type\": \"boolean\"\n },\n {\n \"name\": \"secretRef\",\n \"baseName\": \"secretRef\",\n \"type\": \"V1LocalObjectReference\"\n },\n {\n \"name\": \"user\",\n \"baseName\": \"user\",\n \"type\": \"string\"\n }\n];\n//# sourceMappingURL=v1RBDVolumeSource.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1ReplicaSet = void 0;\n/**\n* ReplicaSet ensures that a specified number of pod replicas are running at any given time.\n*/\nclass V1ReplicaSet {\n static getAttributeTypeMap() {\n return V1ReplicaSet.attributeTypeMap;\n }\n}\nexports.V1ReplicaSet = V1ReplicaSet;\nV1ReplicaSet.discriminator = undefined;\nV1ReplicaSet.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ObjectMeta\"\n },\n {\n \"name\": \"spec\",\n \"baseName\": \"spec\",\n \"type\": \"V1ReplicaSetSpec\"\n },\n {\n \"name\": \"status\",\n \"baseName\": \"status\",\n \"type\": \"V1ReplicaSetStatus\"\n }\n];\n//# sourceMappingURL=v1ReplicaSet.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1ReplicaSetCondition = void 0;\n/**\n* ReplicaSetCondition describes the state of a replica set at a certain point.\n*/\nclass V1ReplicaSetCondition {\n static getAttributeTypeMap() {\n return V1ReplicaSetCondition.attributeTypeMap;\n }\n}\nexports.V1ReplicaSetCondition = V1ReplicaSetCondition;\nV1ReplicaSetCondition.discriminator = undefined;\nV1ReplicaSetCondition.attributeTypeMap = [\n {\n \"name\": \"lastTransitionTime\",\n \"baseName\": \"lastTransitionTime\",\n \"type\": \"Date\"\n },\n {\n \"name\": \"message\",\n \"baseName\": \"message\",\n \"type\": \"string\"\n },\n {\n \"name\": \"reason\",\n \"baseName\": \"reason\",\n \"type\": \"string\"\n },\n {\n \"name\": \"status\",\n \"baseName\": \"status\",\n \"type\": \"string\"\n },\n {\n \"name\": \"type\",\n \"baseName\": \"type\",\n \"type\": \"string\"\n }\n];\n//# sourceMappingURL=v1ReplicaSetCondition.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1ReplicaSetList = void 0;\n/**\n* ReplicaSetList is a collection of ReplicaSets.\n*/\nclass V1ReplicaSetList {\n static getAttributeTypeMap() {\n return V1ReplicaSetList.attributeTypeMap;\n }\n}\nexports.V1ReplicaSetList = V1ReplicaSetList;\nV1ReplicaSetList.discriminator = undefined;\nV1ReplicaSetList.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"items\",\n \"baseName\": \"items\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ListMeta\"\n }\n];\n//# sourceMappingURL=v1ReplicaSetList.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1ReplicaSetSpec = void 0;\n/**\n* ReplicaSetSpec is the specification of a ReplicaSet.\n*/\nclass V1ReplicaSetSpec {\n static getAttributeTypeMap() {\n return V1ReplicaSetSpec.attributeTypeMap;\n }\n}\nexports.V1ReplicaSetSpec = V1ReplicaSetSpec;\nV1ReplicaSetSpec.discriminator = undefined;\nV1ReplicaSetSpec.attributeTypeMap = [\n {\n \"name\": \"minReadySeconds\",\n \"baseName\": \"minReadySeconds\",\n \"type\": \"number\"\n },\n {\n \"name\": \"replicas\",\n \"baseName\": \"replicas\",\n \"type\": \"number\"\n },\n {\n \"name\": \"selector\",\n \"baseName\": \"selector\",\n \"type\": \"V1LabelSelector\"\n },\n {\n \"name\": \"template\",\n \"baseName\": \"template\",\n \"type\": \"V1PodTemplateSpec\"\n }\n];\n//# sourceMappingURL=v1ReplicaSetSpec.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1ReplicaSetStatus = void 0;\n/**\n* ReplicaSetStatus represents the current status of a ReplicaSet.\n*/\nclass V1ReplicaSetStatus {\n static getAttributeTypeMap() {\n return V1ReplicaSetStatus.attributeTypeMap;\n }\n}\nexports.V1ReplicaSetStatus = V1ReplicaSetStatus;\nV1ReplicaSetStatus.discriminator = undefined;\nV1ReplicaSetStatus.attributeTypeMap = [\n {\n \"name\": \"availableReplicas\",\n \"baseName\": \"availableReplicas\",\n \"type\": \"number\"\n },\n {\n \"name\": \"conditions\",\n \"baseName\": \"conditions\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"fullyLabeledReplicas\",\n \"baseName\": \"fullyLabeledReplicas\",\n \"type\": \"number\"\n },\n {\n \"name\": \"observedGeneration\",\n \"baseName\": \"observedGeneration\",\n \"type\": \"number\"\n },\n {\n \"name\": \"readyReplicas\",\n \"baseName\": \"readyReplicas\",\n \"type\": \"number\"\n },\n {\n \"name\": \"replicas\",\n \"baseName\": \"replicas\",\n \"type\": \"number\"\n }\n];\n//# sourceMappingURL=v1ReplicaSetStatus.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1ReplicationController = void 0;\n/**\n* ReplicationController represents the configuration of a replication controller.\n*/\nclass V1ReplicationController {\n static getAttributeTypeMap() {\n return V1ReplicationController.attributeTypeMap;\n }\n}\nexports.V1ReplicationController = V1ReplicationController;\nV1ReplicationController.discriminator = undefined;\nV1ReplicationController.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ObjectMeta\"\n },\n {\n \"name\": \"spec\",\n \"baseName\": \"spec\",\n \"type\": \"V1ReplicationControllerSpec\"\n },\n {\n \"name\": \"status\",\n \"baseName\": \"status\",\n \"type\": \"V1ReplicationControllerStatus\"\n }\n];\n//# sourceMappingURL=v1ReplicationController.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1ReplicationControllerCondition = void 0;\n/**\n* ReplicationControllerCondition describes the state of a replication controller at a certain point.\n*/\nclass V1ReplicationControllerCondition {\n static getAttributeTypeMap() {\n return V1ReplicationControllerCondition.attributeTypeMap;\n }\n}\nexports.V1ReplicationControllerCondition = V1ReplicationControllerCondition;\nV1ReplicationControllerCondition.discriminator = undefined;\nV1ReplicationControllerCondition.attributeTypeMap = [\n {\n \"name\": \"lastTransitionTime\",\n \"baseName\": \"lastTransitionTime\",\n \"type\": \"Date\"\n },\n {\n \"name\": \"message\",\n \"baseName\": \"message\",\n \"type\": \"string\"\n },\n {\n \"name\": \"reason\",\n \"baseName\": \"reason\",\n \"type\": \"string\"\n },\n {\n \"name\": \"status\",\n \"baseName\": \"status\",\n \"type\": \"string\"\n },\n {\n \"name\": \"type\",\n \"baseName\": \"type\",\n \"type\": \"string\"\n }\n];\n//# sourceMappingURL=v1ReplicationControllerCondition.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1ReplicationControllerList = void 0;\n/**\n* ReplicationControllerList is a collection of replication controllers.\n*/\nclass V1ReplicationControllerList {\n static getAttributeTypeMap() {\n return V1ReplicationControllerList.attributeTypeMap;\n }\n}\nexports.V1ReplicationControllerList = V1ReplicationControllerList;\nV1ReplicationControllerList.discriminator = undefined;\nV1ReplicationControllerList.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"items\",\n \"baseName\": \"items\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ListMeta\"\n }\n];\n//# sourceMappingURL=v1ReplicationControllerList.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1ReplicationControllerSpec = void 0;\n/**\n* ReplicationControllerSpec is the specification of a replication controller.\n*/\nclass V1ReplicationControllerSpec {\n static getAttributeTypeMap() {\n return V1ReplicationControllerSpec.attributeTypeMap;\n }\n}\nexports.V1ReplicationControllerSpec = V1ReplicationControllerSpec;\nV1ReplicationControllerSpec.discriminator = undefined;\nV1ReplicationControllerSpec.attributeTypeMap = [\n {\n \"name\": \"minReadySeconds\",\n \"baseName\": \"minReadySeconds\",\n \"type\": \"number\"\n },\n {\n \"name\": \"replicas\",\n \"baseName\": \"replicas\",\n \"type\": \"number\"\n },\n {\n \"name\": \"selector\",\n \"baseName\": \"selector\",\n \"type\": \"{ [key: string]: string; }\"\n },\n {\n \"name\": \"template\",\n \"baseName\": \"template\",\n \"type\": \"V1PodTemplateSpec\"\n }\n];\n//# sourceMappingURL=v1ReplicationControllerSpec.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1ReplicationControllerStatus = void 0;\n/**\n* ReplicationControllerStatus represents the current status of a replication controller.\n*/\nclass V1ReplicationControllerStatus {\n static getAttributeTypeMap() {\n return V1ReplicationControllerStatus.attributeTypeMap;\n }\n}\nexports.V1ReplicationControllerStatus = V1ReplicationControllerStatus;\nV1ReplicationControllerStatus.discriminator = undefined;\nV1ReplicationControllerStatus.attributeTypeMap = [\n {\n \"name\": \"availableReplicas\",\n \"baseName\": \"availableReplicas\",\n \"type\": \"number\"\n },\n {\n \"name\": \"conditions\",\n \"baseName\": \"conditions\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"fullyLabeledReplicas\",\n \"baseName\": \"fullyLabeledReplicas\",\n \"type\": \"number\"\n },\n {\n \"name\": \"observedGeneration\",\n \"baseName\": \"observedGeneration\",\n \"type\": \"number\"\n },\n {\n \"name\": \"readyReplicas\",\n \"baseName\": \"readyReplicas\",\n \"type\": \"number\"\n },\n {\n \"name\": \"replicas\",\n \"baseName\": \"replicas\",\n \"type\": \"number\"\n }\n];\n//# sourceMappingURL=v1ReplicationControllerStatus.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1ResourceAttributes = void 0;\n/**\n* ResourceAttributes includes the authorization attributes available for resource requests to the Authorizer interface\n*/\nclass V1ResourceAttributes {\n static getAttributeTypeMap() {\n return V1ResourceAttributes.attributeTypeMap;\n }\n}\nexports.V1ResourceAttributes = V1ResourceAttributes;\nV1ResourceAttributes.discriminator = undefined;\nV1ResourceAttributes.attributeTypeMap = [\n {\n \"name\": \"group\",\n \"baseName\": \"group\",\n \"type\": \"string\"\n },\n {\n \"name\": \"name\",\n \"baseName\": \"name\",\n \"type\": \"string\"\n },\n {\n \"name\": \"namespace\",\n \"baseName\": \"namespace\",\n \"type\": \"string\"\n },\n {\n \"name\": \"resource\",\n \"baseName\": \"resource\",\n \"type\": \"string\"\n },\n {\n \"name\": \"subresource\",\n \"baseName\": \"subresource\",\n \"type\": \"string\"\n },\n {\n \"name\": \"verb\",\n \"baseName\": \"verb\",\n \"type\": \"string\"\n },\n {\n \"name\": \"version\",\n \"baseName\": \"version\",\n \"type\": \"string\"\n }\n];\n//# sourceMappingURL=v1ResourceAttributes.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1ResourceFieldSelector = void 0;\n/**\n* ResourceFieldSelector represents container resources (cpu, memory) and their output format\n*/\nclass V1ResourceFieldSelector {\n static getAttributeTypeMap() {\n return V1ResourceFieldSelector.attributeTypeMap;\n }\n}\nexports.V1ResourceFieldSelector = V1ResourceFieldSelector;\nV1ResourceFieldSelector.discriminator = undefined;\nV1ResourceFieldSelector.attributeTypeMap = [\n {\n \"name\": \"containerName\",\n \"baseName\": \"containerName\",\n \"type\": \"string\"\n },\n {\n \"name\": \"divisor\",\n \"baseName\": \"divisor\",\n \"type\": \"string\"\n },\n {\n \"name\": \"resource\",\n \"baseName\": \"resource\",\n \"type\": \"string\"\n }\n];\n//# sourceMappingURL=v1ResourceFieldSelector.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1ResourceQuota = void 0;\n/**\n* ResourceQuota sets aggregate quota restrictions enforced per namespace\n*/\nclass V1ResourceQuota {\n static getAttributeTypeMap() {\n return V1ResourceQuota.attributeTypeMap;\n }\n}\nexports.V1ResourceQuota = V1ResourceQuota;\nV1ResourceQuota.discriminator = undefined;\nV1ResourceQuota.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ObjectMeta\"\n },\n {\n \"name\": \"spec\",\n \"baseName\": \"spec\",\n \"type\": \"V1ResourceQuotaSpec\"\n },\n {\n \"name\": \"status\",\n \"baseName\": \"status\",\n \"type\": \"V1ResourceQuotaStatus\"\n }\n];\n//# sourceMappingURL=v1ResourceQuota.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1ResourceQuotaList = void 0;\n/**\n* ResourceQuotaList is a list of ResourceQuota items.\n*/\nclass V1ResourceQuotaList {\n static getAttributeTypeMap() {\n return V1ResourceQuotaList.attributeTypeMap;\n }\n}\nexports.V1ResourceQuotaList = V1ResourceQuotaList;\nV1ResourceQuotaList.discriminator = undefined;\nV1ResourceQuotaList.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"items\",\n \"baseName\": \"items\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ListMeta\"\n }\n];\n//# sourceMappingURL=v1ResourceQuotaList.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1ResourceQuotaSpec = void 0;\n/**\n* ResourceQuotaSpec defines the desired hard limits to enforce for Quota.\n*/\nclass V1ResourceQuotaSpec {\n static getAttributeTypeMap() {\n return V1ResourceQuotaSpec.attributeTypeMap;\n }\n}\nexports.V1ResourceQuotaSpec = V1ResourceQuotaSpec;\nV1ResourceQuotaSpec.discriminator = undefined;\nV1ResourceQuotaSpec.attributeTypeMap = [\n {\n \"name\": \"hard\",\n \"baseName\": \"hard\",\n \"type\": \"{ [key: string]: string; }\"\n },\n {\n \"name\": \"scopeSelector\",\n \"baseName\": \"scopeSelector\",\n \"type\": \"V1ScopeSelector\"\n },\n {\n \"name\": \"scopes\",\n \"baseName\": \"scopes\",\n \"type\": \"Array\"\n }\n];\n//# sourceMappingURL=v1ResourceQuotaSpec.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1ResourceQuotaStatus = void 0;\n/**\n* ResourceQuotaStatus defines the enforced hard limits and observed use.\n*/\nclass V1ResourceQuotaStatus {\n static getAttributeTypeMap() {\n return V1ResourceQuotaStatus.attributeTypeMap;\n }\n}\nexports.V1ResourceQuotaStatus = V1ResourceQuotaStatus;\nV1ResourceQuotaStatus.discriminator = undefined;\nV1ResourceQuotaStatus.attributeTypeMap = [\n {\n \"name\": \"hard\",\n \"baseName\": \"hard\",\n \"type\": \"{ [key: string]: string; }\"\n },\n {\n \"name\": \"used\",\n \"baseName\": \"used\",\n \"type\": \"{ [key: string]: string; }\"\n }\n];\n//# sourceMappingURL=v1ResourceQuotaStatus.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1ResourceRequirements = void 0;\n/**\n* ResourceRequirements describes the compute resource requirements.\n*/\nclass V1ResourceRequirements {\n static getAttributeTypeMap() {\n return V1ResourceRequirements.attributeTypeMap;\n }\n}\nexports.V1ResourceRequirements = V1ResourceRequirements;\nV1ResourceRequirements.discriminator = undefined;\nV1ResourceRequirements.attributeTypeMap = [\n {\n \"name\": \"limits\",\n \"baseName\": \"limits\",\n \"type\": \"{ [key: string]: string; }\"\n },\n {\n \"name\": \"requests\",\n \"baseName\": \"requests\",\n \"type\": \"{ [key: string]: string; }\"\n }\n];\n//# sourceMappingURL=v1ResourceRequirements.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1ResourceRule = void 0;\n/**\n* ResourceRule is the list of actions the subject is allowed to perform on resources. The list ordering isn\\'t significant, may contain duplicates, and possibly be incomplete.\n*/\nclass V1ResourceRule {\n static getAttributeTypeMap() {\n return V1ResourceRule.attributeTypeMap;\n }\n}\nexports.V1ResourceRule = V1ResourceRule;\nV1ResourceRule.discriminator = undefined;\nV1ResourceRule.attributeTypeMap = [\n {\n \"name\": \"apiGroups\",\n \"baseName\": \"apiGroups\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"resourceNames\",\n \"baseName\": \"resourceNames\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"resources\",\n \"baseName\": \"resources\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"verbs\",\n \"baseName\": \"verbs\",\n \"type\": \"Array\"\n }\n];\n//# sourceMappingURL=v1ResourceRule.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1Role = void 0;\n/**\n* Role is a namespaced, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding.\n*/\nclass V1Role {\n static getAttributeTypeMap() {\n return V1Role.attributeTypeMap;\n }\n}\nexports.V1Role = V1Role;\nV1Role.discriminator = undefined;\nV1Role.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ObjectMeta\"\n },\n {\n \"name\": \"rules\",\n \"baseName\": \"rules\",\n \"type\": \"Array\"\n }\n];\n//# sourceMappingURL=v1Role.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1RoleBinding = void 0;\n/**\n* RoleBinding references a role, but does not contain it. It can reference a Role in the same namespace or a ClusterRole in the global namespace. It adds who information via Subjects and namespace information by which namespace it exists in. RoleBindings in a given namespace only have effect in that namespace.\n*/\nclass V1RoleBinding {\n static getAttributeTypeMap() {\n return V1RoleBinding.attributeTypeMap;\n }\n}\nexports.V1RoleBinding = V1RoleBinding;\nV1RoleBinding.discriminator = undefined;\nV1RoleBinding.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ObjectMeta\"\n },\n {\n \"name\": \"roleRef\",\n \"baseName\": \"roleRef\",\n \"type\": \"V1RoleRef\"\n },\n {\n \"name\": \"subjects\",\n \"baseName\": \"subjects\",\n \"type\": \"Array\"\n }\n];\n//# sourceMappingURL=v1RoleBinding.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1RoleBindingList = void 0;\n/**\n* RoleBindingList is a collection of RoleBindings\n*/\nclass V1RoleBindingList {\n static getAttributeTypeMap() {\n return V1RoleBindingList.attributeTypeMap;\n }\n}\nexports.V1RoleBindingList = V1RoleBindingList;\nV1RoleBindingList.discriminator = undefined;\nV1RoleBindingList.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"items\",\n \"baseName\": \"items\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ListMeta\"\n }\n];\n//# sourceMappingURL=v1RoleBindingList.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1RoleList = void 0;\n/**\n* RoleList is a collection of Roles\n*/\nclass V1RoleList {\n static getAttributeTypeMap() {\n return V1RoleList.attributeTypeMap;\n }\n}\nexports.V1RoleList = V1RoleList;\nV1RoleList.discriminator = undefined;\nV1RoleList.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"items\",\n \"baseName\": \"items\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ListMeta\"\n }\n];\n//# sourceMappingURL=v1RoleList.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1RoleRef = void 0;\n/**\n* RoleRef contains information that points to the role being used\n*/\nclass V1RoleRef {\n static getAttributeTypeMap() {\n return V1RoleRef.attributeTypeMap;\n }\n}\nexports.V1RoleRef = V1RoleRef;\nV1RoleRef.discriminator = undefined;\nV1RoleRef.attributeTypeMap = [\n {\n \"name\": \"apiGroup\",\n \"baseName\": \"apiGroup\",\n \"type\": \"string\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"name\",\n \"baseName\": \"name\",\n \"type\": \"string\"\n }\n];\n//# sourceMappingURL=v1RoleRef.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1RollingUpdateDaemonSet = void 0;\n/**\n* Spec to control the desired behavior of daemon set rolling update.\n*/\nclass V1RollingUpdateDaemonSet {\n static getAttributeTypeMap() {\n return V1RollingUpdateDaemonSet.attributeTypeMap;\n }\n}\nexports.V1RollingUpdateDaemonSet = V1RollingUpdateDaemonSet;\nV1RollingUpdateDaemonSet.discriminator = undefined;\nV1RollingUpdateDaemonSet.attributeTypeMap = [\n {\n \"name\": \"maxSurge\",\n \"baseName\": \"maxSurge\",\n \"type\": \"IntOrString\"\n },\n {\n \"name\": \"maxUnavailable\",\n \"baseName\": \"maxUnavailable\",\n \"type\": \"IntOrString\"\n }\n];\n//# sourceMappingURL=v1RollingUpdateDaemonSet.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1RollingUpdateDeployment = void 0;\n/**\n* Spec to control the desired behavior of rolling update.\n*/\nclass V1RollingUpdateDeployment {\n static getAttributeTypeMap() {\n return V1RollingUpdateDeployment.attributeTypeMap;\n }\n}\nexports.V1RollingUpdateDeployment = V1RollingUpdateDeployment;\nV1RollingUpdateDeployment.discriminator = undefined;\nV1RollingUpdateDeployment.attributeTypeMap = [\n {\n \"name\": \"maxSurge\",\n \"baseName\": \"maxSurge\",\n \"type\": \"IntOrString\"\n },\n {\n \"name\": \"maxUnavailable\",\n \"baseName\": \"maxUnavailable\",\n \"type\": \"IntOrString\"\n }\n];\n//# sourceMappingURL=v1RollingUpdateDeployment.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1RollingUpdateStatefulSetStrategy = void 0;\n/**\n* RollingUpdateStatefulSetStrategy is used to communicate parameter for RollingUpdateStatefulSetStrategyType.\n*/\nclass V1RollingUpdateStatefulSetStrategy {\n static getAttributeTypeMap() {\n return V1RollingUpdateStatefulSetStrategy.attributeTypeMap;\n }\n}\nexports.V1RollingUpdateStatefulSetStrategy = V1RollingUpdateStatefulSetStrategy;\nV1RollingUpdateStatefulSetStrategy.discriminator = undefined;\nV1RollingUpdateStatefulSetStrategy.attributeTypeMap = [\n {\n \"name\": \"partition\",\n \"baseName\": \"partition\",\n \"type\": \"number\"\n }\n];\n//# sourceMappingURL=v1RollingUpdateStatefulSetStrategy.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1RuleWithOperations = void 0;\n/**\n* RuleWithOperations is a tuple of Operations and Resources. It is recommended to make sure that all the tuple expansions are valid.\n*/\nclass V1RuleWithOperations {\n static getAttributeTypeMap() {\n return V1RuleWithOperations.attributeTypeMap;\n }\n}\nexports.V1RuleWithOperations = V1RuleWithOperations;\nV1RuleWithOperations.discriminator = undefined;\nV1RuleWithOperations.attributeTypeMap = [\n {\n \"name\": \"apiGroups\",\n \"baseName\": \"apiGroups\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"apiVersions\",\n \"baseName\": \"apiVersions\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"operations\",\n \"baseName\": \"operations\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"resources\",\n \"baseName\": \"resources\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"scope\",\n \"baseName\": \"scope\",\n \"type\": \"string\"\n }\n];\n//# sourceMappingURL=v1RuleWithOperations.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1RuntimeClass = void 0;\n/**\n* RuntimeClass defines a class of container runtime supported in the cluster. The RuntimeClass is used to determine which container runtime is used to run all containers in a pod. RuntimeClasses are manually defined by a user or cluster provisioner, and referenced in the PodSpec. The Kubelet is responsible for resolving the RuntimeClassName reference before running the pod. For more details, see https://kubernetes.io/docs/concepts/containers/runtime-class/\n*/\nclass V1RuntimeClass {\n static getAttributeTypeMap() {\n return V1RuntimeClass.attributeTypeMap;\n }\n}\nexports.V1RuntimeClass = V1RuntimeClass;\nV1RuntimeClass.discriminator = undefined;\nV1RuntimeClass.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"handler\",\n \"baseName\": \"handler\",\n \"type\": \"string\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ObjectMeta\"\n },\n {\n \"name\": \"overhead\",\n \"baseName\": \"overhead\",\n \"type\": \"V1Overhead\"\n },\n {\n \"name\": \"scheduling\",\n \"baseName\": \"scheduling\",\n \"type\": \"V1Scheduling\"\n }\n];\n//# sourceMappingURL=v1RuntimeClass.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1RuntimeClassList = void 0;\n/**\n* RuntimeClassList is a list of RuntimeClass objects.\n*/\nclass V1RuntimeClassList {\n static getAttributeTypeMap() {\n return V1RuntimeClassList.attributeTypeMap;\n }\n}\nexports.V1RuntimeClassList = V1RuntimeClassList;\nV1RuntimeClassList.discriminator = undefined;\nV1RuntimeClassList.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"items\",\n \"baseName\": \"items\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ListMeta\"\n }\n];\n//# sourceMappingURL=v1RuntimeClassList.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1SELinuxOptions = void 0;\n/**\n* SELinuxOptions are the labels to be applied to the container\n*/\nclass V1SELinuxOptions {\n static getAttributeTypeMap() {\n return V1SELinuxOptions.attributeTypeMap;\n }\n}\nexports.V1SELinuxOptions = V1SELinuxOptions;\nV1SELinuxOptions.discriminator = undefined;\nV1SELinuxOptions.attributeTypeMap = [\n {\n \"name\": \"level\",\n \"baseName\": \"level\",\n \"type\": \"string\"\n },\n {\n \"name\": \"role\",\n \"baseName\": \"role\",\n \"type\": \"string\"\n },\n {\n \"name\": \"type\",\n \"baseName\": \"type\",\n \"type\": \"string\"\n },\n {\n \"name\": \"user\",\n \"baseName\": \"user\",\n \"type\": \"string\"\n }\n];\n//# sourceMappingURL=v1SELinuxOptions.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1Scale = void 0;\n/**\n* Scale represents a scaling request for a resource.\n*/\nclass V1Scale {\n static getAttributeTypeMap() {\n return V1Scale.attributeTypeMap;\n }\n}\nexports.V1Scale = V1Scale;\nV1Scale.discriminator = undefined;\nV1Scale.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ObjectMeta\"\n },\n {\n \"name\": \"spec\",\n \"baseName\": \"spec\",\n \"type\": \"V1ScaleSpec\"\n },\n {\n \"name\": \"status\",\n \"baseName\": \"status\",\n \"type\": \"V1ScaleStatus\"\n }\n];\n//# sourceMappingURL=v1Scale.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1ScaleIOPersistentVolumeSource = void 0;\n/**\n* ScaleIOPersistentVolumeSource represents a persistent ScaleIO volume\n*/\nclass V1ScaleIOPersistentVolumeSource {\n static getAttributeTypeMap() {\n return V1ScaleIOPersistentVolumeSource.attributeTypeMap;\n }\n}\nexports.V1ScaleIOPersistentVolumeSource = V1ScaleIOPersistentVolumeSource;\nV1ScaleIOPersistentVolumeSource.discriminator = undefined;\nV1ScaleIOPersistentVolumeSource.attributeTypeMap = [\n {\n \"name\": \"fsType\",\n \"baseName\": \"fsType\",\n \"type\": \"string\"\n },\n {\n \"name\": \"gateway\",\n \"baseName\": \"gateway\",\n \"type\": \"string\"\n },\n {\n \"name\": \"protectionDomain\",\n \"baseName\": \"protectionDomain\",\n \"type\": \"string\"\n },\n {\n \"name\": \"readOnly\",\n \"baseName\": \"readOnly\",\n \"type\": \"boolean\"\n },\n {\n \"name\": \"secretRef\",\n \"baseName\": \"secretRef\",\n \"type\": \"V1SecretReference\"\n },\n {\n \"name\": \"sslEnabled\",\n \"baseName\": \"sslEnabled\",\n \"type\": \"boolean\"\n },\n {\n \"name\": \"storageMode\",\n \"baseName\": \"storageMode\",\n \"type\": \"string\"\n },\n {\n \"name\": \"storagePool\",\n \"baseName\": \"storagePool\",\n \"type\": \"string\"\n },\n {\n \"name\": \"system\",\n \"baseName\": \"system\",\n \"type\": \"string\"\n },\n {\n \"name\": \"volumeName\",\n \"baseName\": \"volumeName\",\n \"type\": \"string\"\n }\n];\n//# sourceMappingURL=v1ScaleIOPersistentVolumeSource.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1ScaleIOVolumeSource = void 0;\n/**\n* ScaleIOVolumeSource represents a persistent ScaleIO volume\n*/\nclass V1ScaleIOVolumeSource {\n static getAttributeTypeMap() {\n return V1ScaleIOVolumeSource.attributeTypeMap;\n }\n}\nexports.V1ScaleIOVolumeSource = V1ScaleIOVolumeSource;\nV1ScaleIOVolumeSource.discriminator = undefined;\nV1ScaleIOVolumeSource.attributeTypeMap = [\n {\n \"name\": \"fsType\",\n \"baseName\": \"fsType\",\n \"type\": \"string\"\n },\n {\n \"name\": \"gateway\",\n \"baseName\": \"gateway\",\n \"type\": \"string\"\n },\n {\n \"name\": \"protectionDomain\",\n \"baseName\": \"protectionDomain\",\n \"type\": \"string\"\n },\n {\n \"name\": \"readOnly\",\n \"baseName\": \"readOnly\",\n \"type\": \"boolean\"\n },\n {\n \"name\": \"secretRef\",\n \"baseName\": \"secretRef\",\n \"type\": \"V1LocalObjectReference\"\n },\n {\n \"name\": \"sslEnabled\",\n \"baseName\": \"sslEnabled\",\n \"type\": \"boolean\"\n },\n {\n \"name\": \"storageMode\",\n \"baseName\": \"storageMode\",\n \"type\": \"string\"\n },\n {\n \"name\": \"storagePool\",\n \"baseName\": \"storagePool\",\n \"type\": \"string\"\n },\n {\n \"name\": \"system\",\n \"baseName\": \"system\",\n \"type\": \"string\"\n },\n {\n \"name\": \"volumeName\",\n \"baseName\": \"volumeName\",\n \"type\": \"string\"\n }\n];\n//# sourceMappingURL=v1ScaleIOVolumeSource.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1ScaleSpec = void 0;\n/**\n* ScaleSpec describes the attributes of a scale subresource.\n*/\nclass V1ScaleSpec {\n static getAttributeTypeMap() {\n return V1ScaleSpec.attributeTypeMap;\n }\n}\nexports.V1ScaleSpec = V1ScaleSpec;\nV1ScaleSpec.discriminator = undefined;\nV1ScaleSpec.attributeTypeMap = [\n {\n \"name\": \"replicas\",\n \"baseName\": \"replicas\",\n \"type\": \"number\"\n }\n];\n//# sourceMappingURL=v1ScaleSpec.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1ScaleStatus = void 0;\n/**\n* ScaleStatus represents the current status of a scale subresource.\n*/\nclass V1ScaleStatus {\n static getAttributeTypeMap() {\n return V1ScaleStatus.attributeTypeMap;\n }\n}\nexports.V1ScaleStatus = V1ScaleStatus;\nV1ScaleStatus.discriminator = undefined;\nV1ScaleStatus.attributeTypeMap = [\n {\n \"name\": \"replicas\",\n \"baseName\": \"replicas\",\n \"type\": \"number\"\n },\n {\n \"name\": \"selector\",\n \"baseName\": \"selector\",\n \"type\": \"string\"\n }\n];\n//# sourceMappingURL=v1ScaleStatus.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1Scheduling = void 0;\n/**\n* Scheduling specifies the scheduling constraints for nodes supporting a RuntimeClass.\n*/\nclass V1Scheduling {\n static getAttributeTypeMap() {\n return V1Scheduling.attributeTypeMap;\n }\n}\nexports.V1Scheduling = V1Scheduling;\nV1Scheduling.discriminator = undefined;\nV1Scheduling.attributeTypeMap = [\n {\n \"name\": \"nodeSelector\",\n \"baseName\": \"nodeSelector\",\n \"type\": \"{ [key: string]: string; }\"\n },\n {\n \"name\": \"tolerations\",\n \"baseName\": \"tolerations\",\n \"type\": \"Array\"\n }\n];\n//# sourceMappingURL=v1Scheduling.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1ScopeSelector = void 0;\n/**\n* A scope selector represents the AND of the selectors represented by the scoped-resource selector requirements.\n*/\nclass V1ScopeSelector {\n static getAttributeTypeMap() {\n return V1ScopeSelector.attributeTypeMap;\n }\n}\nexports.V1ScopeSelector = V1ScopeSelector;\nV1ScopeSelector.discriminator = undefined;\nV1ScopeSelector.attributeTypeMap = [\n {\n \"name\": \"matchExpressions\",\n \"baseName\": \"matchExpressions\",\n \"type\": \"Array\"\n }\n];\n//# sourceMappingURL=v1ScopeSelector.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1ScopedResourceSelectorRequirement = void 0;\n/**\n* A scoped-resource selector requirement is a selector that contains values, a scope name, and an operator that relates the scope name and values.\n*/\nclass V1ScopedResourceSelectorRequirement {\n static getAttributeTypeMap() {\n return V1ScopedResourceSelectorRequirement.attributeTypeMap;\n }\n}\nexports.V1ScopedResourceSelectorRequirement = V1ScopedResourceSelectorRequirement;\nV1ScopedResourceSelectorRequirement.discriminator = undefined;\nV1ScopedResourceSelectorRequirement.attributeTypeMap = [\n {\n \"name\": \"operator\",\n \"baseName\": \"operator\",\n \"type\": \"string\"\n },\n {\n \"name\": \"scopeName\",\n \"baseName\": \"scopeName\",\n \"type\": \"string\"\n },\n {\n \"name\": \"values\",\n \"baseName\": \"values\",\n \"type\": \"Array\"\n }\n];\n//# sourceMappingURL=v1ScopedResourceSelectorRequirement.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1SeccompProfile = void 0;\n/**\n* SeccompProfile defines a pod/container\\'s seccomp profile settings. Only one profile source may be set.\n*/\nclass V1SeccompProfile {\n static getAttributeTypeMap() {\n return V1SeccompProfile.attributeTypeMap;\n }\n}\nexports.V1SeccompProfile = V1SeccompProfile;\nV1SeccompProfile.discriminator = undefined;\nV1SeccompProfile.attributeTypeMap = [\n {\n \"name\": \"localhostProfile\",\n \"baseName\": \"localhostProfile\",\n \"type\": \"string\"\n },\n {\n \"name\": \"type\",\n \"baseName\": \"type\",\n \"type\": \"string\"\n }\n];\n//# sourceMappingURL=v1SeccompProfile.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1Secret = void 0;\n/**\n* Secret holds secret data of a certain type. The total bytes of the values in the Data field must be less than MaxSecretSize bytes.\n*/\nclass V1Secret {\n static getAttributeTypeMap() {\n return V1Secret.attributeTypeMap;\n }\n}\nexports.V1Secret = V1Secret;\nV1Secret.discriminator = undefined;\nV1Secret.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"data\",\n \"baseName\": \"data\",\n \"type\": \"{ [key: string]: string; }\"\n },\n {\n \"name\": \"immutable\",\n \"baseName\": \"immutable\",\n \"type\": \"boolean\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ObjectMeta\"\n },\n {\n \"name\": \"stringData\",\n \"baseName\": \"stringData\",\n \"type\": \"{ [key: string]: string; }\"\n },\n {\n \"name\": \"type\",\n \"baseName\": \"type\",\n \"type\": \"string\"\n }\n];\n//# sourceMappingURL=v1Secret.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1SecretEnvSource = void 0;\n/**\n* SecretEnvSource selects a Secret to populate the environment variables with. The contents of the target Secret\\'s Data field will represent the key-value pairs as environment variables.\n*/\nclass V1SecretEnvSource {\n static getAttributeTypeMap() {\n return V1SecretEnvSource.attributeTypeMap;\n }\n}\nexports.V1SecretEnvSource = V1SecretEnvSource;\nV1SecretEnvSource.discriminator = undefined;\nV1SecretEnvSource.attributeTypeMap = [\n {\n \"name\": \"name\",\n \"baseName\": \"name\",\n \"type\": \"string\"\n },\n {\n \"name\": \"optional\",\n \"baseName\": \"optional\",\n \"type\": \"boolean\"\n }\n];\n//# sourceMappingURL=v1SecretEnvSource.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1SecretKeySelector = void 0;\n/**\n* SecretKeySelector selects a key of a Secret.\n*/\nclass V1SecretKeySelector {\n static getAttributeTypeMap() {\n return V1SecretKeySelector.attributeTypeMap;\n }\n}\nexports.V1SecretKeySelector = V1SecretKeySelector;\nV1SecretKeySelector.discriminator = undefined;\nV1SecretKeySelector.attributeTypeMap = [\n {\n \"name\": \"key\",\n \"baseName\": \"key\",\n \"type\": \"string\"\n },\n {\n \"name\": \"name\",\n \"baseName\": \"name\",\n \"type\": \"string\"\n },\n {\n \"name\": \"optional\",\n \"baseName\": \"optional\",\n \"type\": \"boolean\"\n }\n];\n//# sourceMappingURL=v1SecretKeySelector.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1SecretList = void 0;\n/**\n* SecretList is a list of Secret.\n*/\nclass V1SecretList {\n static getAttributeTypeMap() {\n return V1SecretList.attributeTypeMap;\n }\n}\nexports.V1SecretList = V1SecretList;\nV1SecretList.discriminator = undefined;\nV1SecretList.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"items\",\n \"baseName\": \"items\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ListMeta\"\n }\n];\n//# sourceMappingURL=v1SecretList.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1SecretProjection = void 0;\n/**\n* Adapts a secret into a projected volume. The contents of the target Secret\\'s Data field will be presented in a projected volume as files using the keys in the Data field as the file names. Note that this is identical to a secret volume source without the default mode.\n*/\nclass V1SecretProjection {\n static getAttributeTypeMap() {\n return V1SecretProjection.attributeTypeMap;\n }\n}\nexports.V1SecretProjection = V1SecretProjection;\nV1SecretProjection.discriminator = undefined;\nV1SecretProjection.attributeTypeMap = [\n {\n \"name\": \"items\",\n \"baseName\": \"items\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"name\",\n \"baseName\": \"name\",\n \"type\": \"string\"\n },\n {\n \"name\": \"optional\",\n \"baseName\": \"optional\",\n \"type\": \"boolean\"\n }\n];\n//# sourceMappingURL=v1SecretProjection.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1SecretReference = void 0;\n/**\n* SecretReference represents a Secret Reference. It has enough information to retrieve secret in any namespace\n*/\nclass V1SecretReference {\n static getAttributeTypeMap() {\n return V1SecretReference.attributeTypeMap;\n }\n}\nexports.V1SecretReference = V1SecretReference;\nV1SecretReference.discriminator = undefined;\nV1SecretReference.attributeTypeMap = [\n {\n \"name\": \"name\",\n \"baseName\": \"name\",\n \"type\": \"string\"\n },\n {\n \"name\": \"namespace\",\n \"baseName\": \"namespace\",\n \"type\": \"string\"\n }\n];\n//# sourceMappingURL=v1SecretReference.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1SecretVolumeSource = void 0;\n/**\n* Adapts a Secret into a volume. The contents of the target Secret\\'s Data field will be presented in a volume as files using the keys in the Data field as the file names. Secret volumes support ownership management and SELinux relabeling.\n*/\nclass V1SecretVolumeSource {\n static getAttributeTypeMap() {\n return V1SecretVolumeSource.attributeTypeMap;\n }\n}\nexports.V1SecretVolumeSource = V1SecretVolumeSource;\nV1SecretVolumeSource.discriminator = undefined;\nV1SecretVolumeSource.attributeTypeMap = [\n {\n \"name\": \"defaultMode\",\n \"baseName\": \"defaultMode\",\n \"type\": \"number\"\n },\n {\n \"name\": \"items\",\n \"baseName\": \"items\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"optional\",\n \"baseName\": \"optional\",\n \"type\": \"boolean\"\n },\n {\n \"name\": \"secretName\",\n \"baseName\": \"secretName\",\n \"type\": \"string\"\n }\n];\n//# sourceMappingURL=v1SecretVolumeSource.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1SecurityContext = void 0;\n/**\n* SecurityContext holds security configuration that will be applied to a container. Some fields are present in both SecurityContext and PodSecurityContext. When both are set, the values in SecurityContext take precedence.\n*/\nclass V1SecurityContext {\n static getAttributeTypeMap() {\n return V1SecurityContext.attributeTypeMap;\n }\n}\nexports.V1SecurityContext = V1SecurityContext;\nV1SecurityContext.discriminator = undefined;\nV1SecurityContext.attributeTypeMap = [\n {\n \"name\": \"allowPrivilegeEscalation\",\n \"baseName\": \"allowPrivilegeEscalation\",\n \"type\": \"boolean\"\n },\n {\n \"name\": \"capabilities\",\n \"baseName\": \"capabilities\",\n \"type\": \"V1Capabilities\"\n },\n {\n \"name\": \"privileged\",\n \"baseName\": \"privileged\",\n \"type\": \"boolean\"\n },\n {\n \"name\": \"procMount\",\n \"baseName\": \"procMount\",\n \"type\": \"string\"\n },\n {\n \"name\": \"readOnlyRootFilesystem\",\n \"baseName\": \"readOnlyRootFilesystem\",\n \"type\": \"boolean\"\n },\n {\n \"name\": \"runAsGroup\",\n \"baseName\": \"runAsGroup\",\n \"type\": \"number\"\n },\n {\n \"name\": \"runAsNonRoot\",\n \"baseName\": \"runAsNonRoot\",\n \"type\": \"boolean\"\n },\n {\n \"name\": \"runAsUser\",\n \"baseName\": \"runAsUser\",\n \"type\": \"number\"\n },\n {\n \"name\": \"seLinuxOptions\",\n \"baseName\": \"seLinuxOptions\",\n \"type\": \"V1SELinuxOptions\"\n },\n {\n \"name\": \"seccompProfile\",\n \"baseName\": \"seccompProfile\",\n \"type\": \"V1SeccompProfile\"\n },\n {\n \"name\": \"windowsOptions\",\n \"baseName\": \"windowsOptions\",\n \"type\": \"V1WindowsSecurityContextOptions\"\n }\n];\n//# sourceMappingURL=v1SecurityContext.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1SelfSubjectAccessReview = void 0;\n/**\n* SelfSubjectAccessReview checks whether or the current user can perform an action. Not filling in a spec.namespace means \\\"in all namespaces\\\". Self is a special case, because users should always be able to check whether they can perform an action\n*/\nclass V1SelfSubjectAccessReview {\n static getAttributeTypeMap() {\n return V1SelfSubjectAccessReview.attributeTypeMap;\n }\n}\nexports.V1SelfSubjectAccessReview = V1SelfSubjectAccessReview;\nV1SelfSubjectAccessReview.discriminator = undefined;\nV1SelfSubjectAccessReview.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ObjectMeta\"\n },\n {\n \"name\": \"spec\",\n \"baseName\": \"spec\",\n \"type\": \"V1SelfSubjectAccessReviewSpec\"\n },\n {\n \"name\": \"status\",\n \"baseName\": \"status\",\n \"type\": \"V1SubjectAccessReviewStatus\"\n }\n];\n//# sourceMappingURL=v1SelfSubjectAccessReview.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1SelfSubjectAccessReviewSpec = void 0;\n/**\n* SelfSubjectAccessReviewSpec is a description of the access request. Exactly one of ResourceAuthorizationAttributes and NonResourceAuthorizationAttributes must be set\n*/\nclass V1SelfSubjectAccessReviewSpec {\n static getAttributeTypeMap() {\n return V1SelfSubjectAccessReviewSpec.attributeTypeMap;\n }\n}\nexports.V1SelfSubjectAccessReviewSpec = V1SelfSubjectAccessReviewSpec;\nV1SelfSubjectAccessReviewSpec.discriminator = undefined;\nV1SelfSubjectAccessReviewSpec.attributeTypeMap = [\n {\n \"name\": \"nonResourceAttributes\",\n \"baseName\": \"nonResourceAttributes\",\n \"type\": \"V1NonResourceAttributes\"\n },\n {\n \"name\": \"resourceAttributes\",\n \"baseName\": \"resourceAttributes\",\n \"type\": \"V1ResourceAttributes\"\n }\n];\n//# sourceMappingURL=v1SelfSubjectAccessReviewSpec.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1SelfSubjectRulesReview = void 0;\n/**\n* SelfSubjectRulesReview enumerates the set of actions the current user can perform within a namespace. The returned list of actions may be incomplete depending on the server\\'s authorization mode, and any errors experienced during the evaluation. SelfSubjectRulesReview should be used by UIs to show/hide actions, or to quickly let an end user reason about their permissions. It should NOT Be used by external systems to drive authorization decisions as this raises confused deputy, cache lifetime/revocation, and correctness concerns. SubjectAccessReview, and LocalAccessReview are the correct way to defer authorization decisions to the API server.\n*/\nclass V1SelfSubjectRulesReview {\n static getAttributeTypeMap() {\n return V1SelfSubjectRulesReview.attributeTypeMap;\n }\n}\nexports.V1SelfSubjectRulesReview = V1SelfSubjectRulesReview;\nV1SelfSubjectRulesReview.discriminator = undefined;\nV1SelfSubjectRulesReview.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ObjectMeta\"\n },\n {\n \"name\": \"spec\",\n \"baseName\": \"spec\",\n \"type\": \"V1SelfSubjectRulesReviewSpec\"\n },\n {\n \"name\": \"status\",\n \"baseName\": \"status\",\n \"type\": \"V1SubjectRulesReviewStatus\"\n }\n];\n//# sourceMappingURL=v1SelfSubjectRulesReview.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1SelfSubjectRulesReviewSpec = void 0;\n/**\n* SelfSubjectRulesReviewSpec defines the specification for SelfSubjectRulesReview.\n*/\nclass V1SelfSubjectRulesReviewSpec {\n static getAttributeTypeMap() {\n return V1SelfSubjectRulesReviewSpec.attributeTypeMap;\n }\n}\nexports.V1SelfSubjectRulesReviewSpec = V1SelfSubjectRulesReviewSpec;\nV1SelfSubjectRulesReviewSpec.discriminator = undefined;\nV1SelfSubjectRulesReviewSpec.attributeTypeMap = [\n {\n \"name\": \"namespace\",\n \"baseName\": \"namespace\",\n \"type\": \"string\"\n }\n];\n//# sourceMappingURL=v1SelfSubjectRulesReviewSpec.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1ServerAddressByClientCIDR = void 0;\n/**\n* ServerAddressByClientCIDR helps the client to determine the server address that they should use, depending on the clientCIDR that they match.\n*/\nclass V1ServerAddressByClientCIDR {\n static getAttributeTypeMap() {\n return V1ServerAddressByClientCIDR.attributeTypeMap;\n }\n}\nexports.V1ServerAddressByClientCIDR = V1ServerAddressByClientCIDR;\nV1ServerAddressByClientCIDR.discriminator = undefined;\nV1ServerAddressByClientCIDR.attributeTypeMap = [\n {\n \"name\": \"clientCIDR\",\n \"baseName\": \"clientCIDR\",\n \"type\": \"string\"\n },\n {\n \"name\": \"serverAddress\",\n \"baseName\": \"serverAddress\",\n \"type\": \"string\"\n }\n];\n//# sourceMappingURL=v1ServerAddressByClientCIDR.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1Service = void 0;\n/**\n* Service is a named abstraction of software service (for example, mysql) consisting of local port (for example 3306) that the proxy listens on, and the selector that determines which pods will answer requests sent through the proxy.\n*/\nclass V1Service {\n static getAttributeTypeMap() {\n return V1Service.attributeTypeMap;\n }\n}\nexports.V1Service = V1Service;\nV1Service.discriminator = undefined;\nV1Service.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ObjectMeta\"\n },\n {\n \"name\": \"spec\",\n \"baseName\": \"spec\",\n \"type\": \"V1ServiceSpec\"\n },\n {\n \"name\": \"status\",\n \"baseName\": \"status\",\n \"type\": \"V1ServiceStatus\"\n }\n];\n//# sourceMappingURL=v1Service.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1ServiceAccount = void 0;\n/**\n* ServiceAccount binds together: * a name, understood by users, and perhaps by peripheral systems, for an identity * a principal that can be authenticated and authorized * a set of secrets\n*/\nclass V1ServiceAccount {\n static getAttributeTypeMap() {\n return V1ServiceAccount.attributeTypeMap;\n }\n}\nexports.V1ServiceAccount = V1ServiceAccount;\nV1ServiceAccount.discriminator = undefined;\nV1ServiceAccount.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"automountServiceAccountToken\",\n \"baseName\": \"automountServiceAccountToken\",\n \"type\": \"boolean\"\n },\n {\n \"name\": \"imagePullSecrets\",\n \"baseName\": \"imagePullSecrets\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ObjectMeta\"\n },\n {\n \"name\": \"secrets\",\n \"baseName\": \"secrets\",\n \"type\": \"Array\"\n }\n];\n//# sourceMappingURL=v1ServiceAccount.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1ServiceAccountList = void 0;\n/**\n* ServiceAccountList is a list of ServiceAccount objects\n*/\nclass V1ServiceAccountList {\n static getAttributeTypeMap() {\n return V1ServiceAccountList.attributeTypeMap;\n }\n}\nexports.V1ServiceAccountList = V1ServiceAccountList;\nV1ServiceAccountList.discriminator = undefined;\nV1ServiceAccountList.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"items\",\n \"baseName\": \"items\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ListMeta\"\n }\n];\n//# sourceMappingURL=v1ServiceAccountList.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1ServiceAccountTokenProjection = void 0;\n/**\n* ServiceAccountTokenProjection represents a projected service account token volume. This projection can be used to insert a service account token into the pods runtime filesystem for use against APIs (Kubernetes API Server or otherwise).\n*/\nclass V1ServiceAccountTokenProjection {\n static getAttributeTypeMap() {\n return V1ServiceAccountTokenProjection.attributeTypeMap;\n }\n}\nexports.V1ServiceAccountTokenProjection = V1ServiceAccountTokenProjection;\nV1ServiceAccountTokenProjection.discriminator = undefined;\nV1ServiceAccountTokenProjection.attributeTypeMap = [\n {\n \"name\": \"audience\",\n \"baseName\": \"audience\",\n \"type\": \"string\"\n },\n {\n \"name\": \"expirationSeconds\",\n \"baseName\": \"expirationSeconds\",\n \"type\": \"number\"\n },\n {\n \"name\": \"path\",\n \"baseName\": \"path\",\n \"type\": \"string\"\n }\n];\n//# sourceMappingURL=v1ServiceAccountTokenProjection.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1ServiceBackendPort = void 0;\n/**\n* ServiceBackendPort is the service port being referenced.\n*/\nclass V1ServiceBackendPort {\n static getAttributeTypeMap() {\n return V1ServiceBackendPort.attributeTypeMap;\n }\n}\nexports.V1ServiceBackendPort = V1ServiceBackendPort;\nV1ServiceBackendPort.discriminator = undefined;\nV1ServiceBackendPort.attributeTypeMap = [\n {\n \"name\": \"name\",\n \"baseName\": \"name\",\n \"type\": \"string\"\n },\n {\n \"name\": \"number\",\n \"baseName\": \"number\",\n \"type\": \"number\"\n }\n];\n//# sourceMappingURL=v1ServiceBackendPort.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1ServiceList = void 0;\n/**\n* ServiceList holds a list of services.\n*/\nclass V1ServiceList {\n static getAttributeTypeMap() {\n return V1ServiceList.attributeTypeMap;\n }\n}\nexports.V1ServiceList = V1ServiceList;\nV1ServiceList.discriminator = undefined;\nV1ServiceList.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"items\",\n \"baseName\": \"items\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ListMeta\"\n }\n];\n//# sourceMappingURL=v1ServiceList.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1ServicePort = void 0;\n/**\n* ServicePort contains information on service\\'s port.\n*/\nclass V1ServicePort {\n static getAttributeTypeMap() {\n return V1ServicePort.attributeTypeMap;\n }\n}\nexports.V1ServicePort = V1ServicePort;\nV1ServicePort.discriminator = undefined;\nV1ServicePort.attributeTypeMap = [\n {\n \"name\": \"appProtocol\",\n \"baseName\": \"appProtocol\",\n \"type\": \"string\"\n },\n {\n \"name\": \"name\",\n \"baseName\": \"name\",\n \"type\": \"string\"\n },\n {\n \"name\": \"nodePort\",\n \"baseName\": \"nodePort\",\n \"type\": \"number\"\n },\n {\n \"name\": \"port\",\n \"baseName\": \"port\",\n \"type\": \"number\"\n },\n {\n \"name\": \"protocol\",\n \"baseName\": \"protocol\",\n \"type\": \"string\"\n },\n {\n \"name\": \"targetPort\",\n \"baseName\": \"targetPort\",\n \"type\": \"IntOrString\"\n }\n];\n//# sourceMappingURL=v1ServicePort.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1ServiceSpec = void 0;\n/**\n* ServiceSpec describes the attributes that a user creates on a service.\n*/\nclass V1ServiceSpec {\n static getAttributeTypeMap() {\n return V1ServiceSpec.attributeTypeMap;\n }\n}\nexports.V1ServiceSpec = V1ServiceSpec;\nV1ServiceSpec.discriminator = undefined;\nV1ServiceSpec.attributeTypeMap = [\n {\n \"name\": \"allocateLoadBalancerNodePorts\",\n \"baseName\": \"allocateLoadBalancerNodePorts\",\n \"type\": \"boolean\"\n },\n {\n \"name\": \"clusterIP\",\n \"baseName\": \"clusterIP\",\n \"type\": \"string\"\n },\n {\n \"name\": \"clusterIPs\",\n \"baseName\": \"clusterIPs\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"externalIPs\",\n \"baseName\": \"externalIPs\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"externalName\",\n \"baseName\": \"externalName\",\n \"type\": \"string\"\n },\n {\n \"name\": \"externalTrafficPolicy\",\n \"baseName\": \"externalTrafficPolicy\",\n \"type\": \"string\"\n },\n {\n \"name\": \"healthCheckNodePort\",\n \"baseName\": \"healthCheckNodePort\",\n \"type\": \"number\"\n },\n {\n \"name\": \"internalTrafficPolicy\",\n \"baseName\": \"internalTrafficPolicy\",\n \"type\": \"string\"\n },\n {\n \"name\": \"ipFamilies\",\n \"baseName\": \"ipFamilies\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"ipFamilyPolicy\",\n \"baseName\": \"ipFamilyPolicy\",\n \"type\": \"string\"\n },\n {\n \"name\": \"loadBalancerClass\",\n \"baseName\": \"loadBalancerClass\",\n \"type\": \"string\"\n },\n {\n \"name\": \"loadBalancerIP\",\n \"baseName\": \"loadBalancerIP\",\n \"type\": \"string\"\n },\n {\n \"name\": \"loadBalancerSourceRanges\",\n \"baseName\": \"loadBalancerSourceRanges\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"ports\",\n \"baseName\": \"ports\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"publishNotReadyAddresses\",\n \"baseName\": \"publishNotReadyAddresses\",\n \"type\": \"boolean\"\n },\n {\n \"name\": \"selector\",\n \"baseName\": \"selector\",\n \"type\": \"{ [key: string]: string; }\"\n },\n {\n \"name\": \"sessionAffinity\",\n \"baseName\": \"sessionAffinity\",\n \"type\": \"string\"\n },\n {\n \"name\": \"sessionAffinityConfig\",\n \"baseName\": \"sessionAffinityConfig\",\n \"type\": \"V1SessionAffinityConfig\"\n },\n {\n \"name\": \"type\",\n \"baseName\": \"type\",\n \"type\": \"string\"\n }\n];\n//# sourceMappingURL=v1ServiceSpec.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1ServiceStatus = void 0;\n/**\n* ServiceStatus represents the current status of a service.\n*/\nclass V1ServiceStatus {\n static getAttributeTypeMap() {\n return V1ServiceStatus.attributeTypeMap;\n }\n}\nexports.V1ServiceStatus = V1ServiceStatus;\nV1ServiceStatus.discriminator = undefined;\nV1ServiceStatus.attributeTypeMap = [\n {\n \"name\": \"conditions\",\n \"baseName\": \"conditions\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"loadBalancer\",\n \"baseName\": \"loadBalancer\",\n \"type\": \"V1LoadBalancerStatus\"\n }\n];\n//# sourceMappingURL=v1ServiceStatus.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1SessionAffinityConfig = void 0;\n/**\n* SessionAffinityConfig represents the configurations of session affinity.\n*/\nclass V1SessionAffinityConfig {\n static getAttributeTypeMap() {\n return V1SessionAffinityConfig.attributeTypeMap;\n }\n}\nexports.V1SessionAffinityConfig = V1SessionAffinityConfig;\nV1SessionAffinityConfig.discriminator = undefined;\nV1SessionAffinityConfig.attributeTypeMap = [\n {\n \"name\": \"clientIP\",\n \"baseName\": \"clientIP\",\n \"type\": \"V1ClientIPConfig\"\n }\n];\n//# sourceMappingURL=v1SessionAffinityConfig.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1StatefulSet = void 0;\n/**\n* StatefulSet represents a set of pods with consistent identities. Identities are defined as: - Network: A single stable DNS and hostname. - Storage: As many VolumeClaims as requested. The StatefulSet guarantees that a given network identity will always map to the same storage identity.\n*/\nclass V1StatefulSet {\n static getAttributeTypeMap() {\n return V1StatefulSet.attributeTypeMap;\n }\n}\nexports.V1StatefulSet = V1StatefulSet;\nV1StatefulSet.discriminator = undefined;\nV1StatefulSet.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ObjectMeta\"\n },\n {\n \"name\": \"spec\",\n \"baseName\": \"spec\",\n \"type\": \"V1StatefulSetSpec\"\n },\n {\n \"name\": \"status\",\n \"baseName\": \"status\",\n \"type\": \"V1StatefulSetStatus\"\n }\n];\n//# sourceMappingURL=v1StatefulSet.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1StatefulSetCondition = void 0;\n/**\n* StatefulSetCondition describes the state of a statefulset at a certain point.\n*/\nclass V1StatefulSetCondition {\n static getAttributeTypeMap() {\n return V1StatefulSetCondition.attributeTypeMap;\n }\n}\nexports.V1StatefulSetCondition = V1StatefulSetCondition;\nV1StatefulSetCondition.discriminator = undefined;\nV1StatefulSetCondition.attributeTypeMap = [\n {\n \"name\": \"lastTransitionTime\",\n \"baseName\": \"lastTransitionTime\",\n \"type\": \"Date\"\n },\n {\n \"name\": \"message\",\n \"baseName\": \"message\",\n \"type\": \"string\"\n },\n {\n \"name\": \"reason\",\n \"baseName\": \"reason\",\n \"type\": \"string\"\n },\n {\n \"name\": \"status\",\n \"baseName\": \"status\",\n \"type\": \"string\"\n },\n {\n \"name\": \"type\",\n \"baseName\": \"type\",\n \"type\": \"string\"\n }\n];\n//# sourceMappingURL=v1StatefulSetCondition.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1StatefulSetList = void 0;\n/**\n* StatefulSetList is a collection of StatefulSets.\n*/\nclass V1StatefulSetList {\n static getAttributeTypeMap() {\n return V1StatefulSetList.attributeTypeMap;\n }\n}\nexports.V1StatefulSetList = V1StatefulSetList;\nV1StatefulSetList.discriminator = undefined;\nV1StatefulSetList.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"items\",\n \"baseName\": \"items\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ListMeta\"\n }\n];\n//# sourceMappingURL=v1StatefulSetList.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1StatefulSetSpec = void 0;\n/**\n* A StatefulSetSpec is the specification of a StatefulSet.\n*/\nclass V1StatefulSetSpec {\n static getAttributeTypeMap() {\n return V1StatefulSetSpec.attributeTypeMap;\n }\n}\nexports.V1StatefulSetSpec = V1StatefulSetSpec;\nV1StatefulSetSpec.discriminator = undefined;\nV1StatefulSetSpec.attributeTypeMap = [\n {\n \"name\": \"minReadySeconds\",\n \"baseName\": \"minReadySeconds\",\n \"type\": \"number\"\n },\n {\n \"name\": \"podManagementPolicy\",\n \"baseName\": \"podManagementPolicy\",\n \"type\": \"string\"\n },\n {\n \"name\": \"replicas\",\n \"baseName\": \"replicas\",\n \"type\": \"number\"\n },\n {\n \"name\": \"revisionHistoryLimit\",\n \"baseName\": \"revisionHistoryLimit\",\n \"type\": \"number\"\n },\n {\n \"name\": \"selector\",\n \"baseName\": \"selector\",\n \"type\": \"V1LabelSelector\"\n },\n {\n \"name\": \"serviceName\",\n \"baseName\": \"serviceName\",\n \"type\": \"string\"\n },\n {\n \"name\": \"template\",\n \"baseName\": \"template\",\n \"type\": \"V1PodTemplateSpec\"\n },\n {\n \"name\": \"updateStrategy\",\n \"baseName\": \"updateStrategy\",\n \"type\": \"V1StatefulSetUpdateStrategy\"\n },\n {\n \"name\": \"volumeClaimTemplates\",\n \"baseName\": \"volumeClaimTemplates\",\n \"type\": \"Array\"\n }\n];\n//# sourceMappingURL=v1StatefulSetSpec.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1StatefulSetStatus = void 0;\n/**\n* StatefulSetStatus represents the current state of a StatefulSet.\n*/\nclass V1StatefulSetStatus {\n static getAttributeTypeMap() {\n return V1StatefulSetStatus.attributeTypeMap;\n }\n}\nexports.V1StatefulSetStatus = V1StatefulSetStatus;\nV1StatefulSetStatus.discriminator = undefined;\nV1StatefulSetStatus.attributeTypeMap = [\n {\n \"name\": \"availableReplicas\",\n \"baseName\": \"availableReplicas\",\n \"type\": \"number\"\n },\n {\n \"name\": \"collisionCount\",\n \"baseName\": \"collisionCount\",\n \"type\": \"number\"\n },\n {\n \"name\": \"conditions\",\n \"baseName\": \"conditions\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"currentReplicas\",\n \"baseName\": \"currentReplicas\",\n \"type\": \"number\"\n },\n {\n \"name\": \"currentRevision\",\n \"baseName\": \"currentRevision\",\n \"type\": \"string\"\n },\n {\n \"name\": \"observedGeneration\",\n \"baseName\": \"observedGeneration\",\n \"type\": \"number\"\n },\n {\n \"name\": \"readyReplicas\",\n \"baseName\": \"readyReplicas\",\n \"type\": \"number\"\n },\n {\n \"name\": \"replicas\",\n \"baseName\": \"replicas\",\n \"type\": \"number\"\n },\n {\n \"name\": \"updateRevision\",\n \"baseName\": \"updateRevision\",\n \"type\": \"string\"\n },\n {\n \"name\": \"updatedReplicas\",\n \"baseName\": \"updatedReplicas\",\n \"type\": \"number\"\n }\n];\n//# sourceMappingURL=v1StatefulSetStatus.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1StatefulSetUpdateStrategy = void 0;\n/**\n* StatefulSetUpdateStrategy indicates the strategy that the StatefulSet controller will use to perform updates. It includes any additional parameters necessary to perform the update for the indicated strategy.\n*/\nclass V1StatefulSetUpdateStrategy {\n static getAttributeTypeMap() {\n return V1StatefulSetUpdateStrategy.attributeTypeMap;\n }\n}\nexports.V1StatefulSetUpdateStrategy = V1StatefulSetUpdateStrategy;\nV1StatefulSetUpdateStrategy.discriminator = undefined;\nV1StatefulSetUpdateStrategy.attributeTypeMap = [\n {\n \"name\": \"rollingUpdate\",\n \"baseName\": \"rollingUpdate\",\n \"type\": \"V1RollingUpdateStatefulSetStrategy\"\n },\n {\n \"name\": \"type\",\n \"baseName\": \"type\",\n \"type\": \"string\"\n }\n];\n//# sourceMappingURL=v1StatefulSetUpdateStrategy.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1Status = void 0;\n/**\n* Status is a return value for calls that don\\'t return other objects.\n*/\nclass V1Status {\n static getAttributeTypeMap() {\n return V1Status.attributeTypeMap;\n }\n}\nexports.V1Status = V1Status;\nV1Status.discriminator = undefined;\nV1Status.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"code\",\n \"baseName\": \"code\",\n \"type\": \"number\"\n },\n {\n \"name\": \"details\",\n \"baseName\": \"details\",\n \"type\": \"V1StatusDetails\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"message\",\n \"baseName\": \"message\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ListMeta\"\n },\n {\n \"name\": \"reason\",\n \"baseName\": \"reason\",\n \"type\": \"string\"\n },\n {\n \"name\": \"status\",\n \"baseName\": \"status\",\n \"type\": \"string\"\n }\n];\n//# sourceMappingURL=v1Status.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1StatusCause = void 0;\n/**\n* StatusCause provides more information about an api.Status failure, including cases when multiple errors are encountered.\n*/\nclass V1StatusCause {\n static getAttributeTypeMap() {\n return V1StatusCause.attributeTypeMap;\n }\n}\nexports.V1StatusCause = V1StatusCause;\nV1StatusCause.discriminator = undefined;\nV1StatusCause.attributeTypeMap = [\n {\n \"name\": \"field\",\n \"baseName\": \"field\",\n \"type\": \"string\"\n },\n {\n \"name\": \"message\",\n \"baseName\": \"message\",\n \"type\": \"string\"\n },\n {\n \"name\": \"reason\",\n \"baseName\": \"reason\",\n \"type\": \"string\"\n }\n];\n//# sourceMappingURL=v1StatusCause.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1StatusDetails = void 0;\n/**\n* StatusDetails is a set of additional properties that MAY be set by the server to provide additional information about a response. The Reason field of a Status object defines what attributes will be set. Clients must ignore fields that do not match the defined type of each attribute, and should assume that any attribute may be empty, invalid, or under defined.\n*/\nclass V1StatusDetails {\n static getAttributeTypeMap() {\n return V1StatusDetails.attributeTypeMap;\n }\n}\nexports.V1StatusDetails = V1StatusDetails;\nV1StatusDetails.discriminator = undefined;\nV1StatusDetails.attributeTypeMap = [\n {\n \"name\": \"causes\",\n \"baseName\": \"causes\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"group\",\n \"baseName\": \"group\",\n \"type\": \"string\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"name\",\n \"baseName\": \"name\",\n \"type\": \"string\"\n },\n {\n \"name\": \"retryAfterSeconds\",\n \"baseName\": \"retryAfterSeconds\",\n \"type\": \"number\"\n },\n {\n \"name\": \"uid\",\n \"baseName\": \"uid\",\n \"type\": \"string\"\n }\n];\n//# sourceMappingURL=v1StatusDetails.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1StorageClass = void 0;\n/**\n* StorageClass describes the parameters for a class of storage for which PersistentVolumes can be dynamically provisioned. StorageClasses are non-namespaced; the name of the storage class according to etcd is in ObjectMeta.Name.\n*/\nclass V1StorageClass {\n static getAttributeTypeMap() {\n return V1StorageClass.attributeTypeMap;\n }\n}\nexports.V1StorageClass = V1StorageClass;\nV1StorageClass.discriminator = undefined;\nV1StorageClass.attributeTypeMap = [\n {\n \"name\": \"allowVolumeExpansion\",\n \"baseName\": \"allowVolumeExpansion\",\n \"type\": \"boolean\"\n },\n {\n \"name\": \"allowedTopologies\",\n \"baseName\": \"allowedTopologies\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ObjectMeta\"\n },\n {\n \"name\": \"mountOptions\",\n \"baseName\": \"mountOptions\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"parameters\",\n \"baseName\": \"parameters\",\n \"type\": \"{ [key: string]: string; }\"\n },\n {\n \"name\": \"provisioner\",\n \"baseName\": \"provisioner\",\n \"type\": \"string\"\n },\n {\n \"name\": \"reclaimPolicy\",\n \"baseName\": \"reclaimPolicy\",\n \"type\": \"string\"\n },\n {\n \"name\": \"volumeBindingMode\",\n \"baseName\": \"volumeBindingMode\",\n \"type\": \"string\"\n }\n];\n//# sourceMappingURL=v1StorageClass.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1StorageClassList = void 0;\n/**\n* StorageClassList is a collection of storage classes.\n*/\nclass V1StorageClassList {\n static getAttributeTypeMap() {\n return V1StorageClassList.attributeTypeMap;\n }\n}\nexports.V1StorageClassList = V1StorageClassList;\nV1StorageClassList.discriminator = undefined;\nV1StorageClassList.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"items\",\n \"baseName\": \"items\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ListMeta\"\n }\n];\n//# sourceMappingURL=v1StorageClassList.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1StorageOSPersistentVolumeSource = void 0;\n/**\n* Represents a StorageOS persistent volume resource.\n*/\nclass V1StorageOSPersistentVolumeSource {\n static getAttributeTypeMap() {\n return V1StorageOSPersistentVolumeSource.attributeTypeMap;\n }\n}\nexports.V1StorageOSPersistentVolumeSource = V1StorageOSPersistentVolumeSource;\nV1StorageOSPersistentVolumeSource.discriminator = undefined;\nV1StorageOSPersistentVolumeSource.attributeTypeMap = [\n {\n \"name\": \"fsType\",\n \"baseName\": \"fsType\",\n \"type\": \"string\"\n },\n {\n \"name\": \"readOnly\",\n \"baseName\": \"readOnly\",\n \"type\": \"boolean\"\n },\n {\n \"name\": \"secretRef\",\n \"baseName\": \"secretRef\",\n \"type\": \"V1ObjectReference\"\n },\n {\n \"name\": \"volumeName\",\n \"baseName\": \"volumeName\",\n \"type\": \"string\"\n },\n {\n \"name\": \"volumeNamespace\",\n \"baseName\": \"volumeNamespace\",\n \"type\": \"string\"\n }\n];\n//# sourceMappingURL=v1StorageOSPersistentVolumeSource.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1StorageOSVolumeSource = void 0;\n/**\n* Represents a StorageOS persistent volume resource.\n*/\nclass V1StorageOSVolumeSource {\n static getAttributeTypeMap() {\n return V1StorageOSVolumeSource.attributeTypeMap;\n }\n}\nexports.V1StorageOSVolumeSource = V1StorageOSVolumeSource;\nV1StorageOSVolumeSource.discriminator = undefined;\nV1StorageOSVolumeSource.attributeTypeMap = [\n {\n \"name\": \"fsType\",\n \"baseName\": \"fsType\",\n \"type\": \"string\"\n },\n {\n \"name\": \"readOnly\",\n \"baseName\": \"readOnly\",\n \"type\": \"boolean\"\n },\n {\n \"name\": \"secretRef\",\n \"baseName\": \"secretRef\",\n \"type\": \"V1LocalObjectReference\"\n },\n {\n \"name\": \"volumeName\",\n \"baseName\": \"volumeName\",\n \"type\": \"string\"\n },\n {\n \"name\": \"volumeNamespace\",\n \"baseName\": \"volumeNamespace\",\n \"type\": \"string\"\n }\n];\n//# sourceMappingURL=v1StorageOSVolumeSource.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1Subject = void 0;\n/**\n* Subject contains a reference to the object or user identities a role binding applies to. This can either hold a direct API object reference, or a value for non-objects such as user and group names.\n*/\nclass V1Subject {\n static getAttributeTypeMap() {\n return V1Subject.attributeTypeMap;\n }\n}\nexports.V1Subject = V1Subject;\nV1Subject.discriminator = undefined;\nV1Subject.attributeTypeMap = [\n {\n \"name\": \"apiGroup\",\n \"baseName\": \"apiGroup\",\n \"type\": \"string\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"name\",\n \"baseName\": \"name\",\n \"type\": \"string\"\n },\n {\n \"name\": \"namespace\",\n \"baseName\": \"namespace\",\n \"type\": \"string\"\n }\n];\n//# sourceMappingURL=v1Subject.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1SubjectAccessReview = void 0;\n/**\n* SubjectAccessReview checks whether or not a user or group can perform an action.\n*/\nclass V1SubjectAccessReview {\n static getAttributeTypeMap() {\n return V1SubjectAccessReview.attributeTypeMap;\n }\n}\nexports.V1SubjectAccessReview = V1SubjectAccessReview;\nV1SubjectAccessReview.discriminator = undefined;\nV1SubjectAccessReview.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ObjectMeta\"\n },\n {\n \"name\": \"spec\",\n \"baseName\": \"spec\",\n \"type\": \"V1SubjectAccessReviewSpec\"\n },\n {\n \"name\": \"status\",\n \"baseName\": \"status\",\n \"type\": \"V1SubjectAccessReviewStatus\"\n }\n];\n//# sourceMappingURL=v1SubjectAccessReview.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1SubjectAccessReviewSpec = void 0;\n/**\n* SubjectAccessReviewSpec is a description of the access request. Exactly one of ResourceAuthorizationAttributes and NonResourceAuthorizationAttributes must be set\n*/\nclass V1SubjectAccessReviewSpec {\n static getAttributeTypeMap() {\n return V1SubjectAccessReviewSpec.attributeTypeMap;\n }\n}\nexports.V1SubjectAccessReviewSpec = V1SubjectAccessReviewSpec;\nV1SubjectAccessReviewSpec.discriminator = undefined;\nV1SubjectAccessReviewSpec.attributeTypeMap = [\n {\n \"name\": \"extra\",\n \"baseName\": \"extra\",\n \"type\": \"{ [key: string]: Array; }\"\n },\n {\n \"name\": \"groups\",\n \"baseName\": \"groups\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"nonResourceAttributes\",\n \"baseName\": \"nonResourceAttributes\",\n \"type\": \"V1NonResourceAttributes\"\n },\n {\n \"name\": \"resourceAttributes\",\n \"baseName\": \"resourceAttributes\",\n \"type\": \"V1ResourceAttributes\"\n },\n {\n \"name\": \"uid\",\n \"baseName\": \"uid\",\n \"type\": \"string\"\n },\n {\n \"name\": \"user\",\n \"baseName\": \"user\",\n \"type\": \"string\"\n }\n];\n//# sourceMappingURL=v1SubjectAccessReviewSpec.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1SubjectAccessReviewStatus = void 0;\n/**\n* SubjectAccessReviewStatus\n*/\nclass V1SubjectAccessReviewStatus {\n static getAttributeTypeMap() {\n return V1SubjectAccessReviewStatus.attributeTypeMap;\n }\n}\nexports.V1SubjectAccessReviewStatus = V1SubjectAccessReviewStatus;\nV1SubjectAccessReviewStatus.discriminator = undefined;\nV1SubjectAccessReviewStatus.attributeTypeMap = [\n {\n \"name\": \"allowed\",\n \"baseName\": \"allowed\",\n \"type\": \"boolean\"\n },\n {\n \"name\": \"denied\",\n \"baseName\": \"denied\",\n \"type\": \"boolean\"\n },\n {\n \"name\": \"evaluationError\",\n \"baseName\": \"evaluationError\",\n \"type\": \"string\"\n },\n {\n \"name\": \"reason\",\n \"baseName\": \"reason\",\n \"type\": \"string\"\n }\n];\n//# sourceMappingURL=v1SubjectAccessReviewStatus.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1SubjectRulesReviewStatus = void 0;\n/**\n* SubjectRulesReviewStatus contains the result of a rules check. This check can be incomplete depending on the set of authorizers the server is configured with and any errors experienced during evaluation. Because authorization rules are additive, if a rule appears in a list it\\'s safe to assume the subject has that permission, even if that list is incomplete.\n*/\nclass V1SubjectRulesReviewStatus {\n static getAttributeTypeMap() {\n return V1SubjectRulesReviewStatus.attributeTypeMap;\n }\n}\nexports.V1SubjectRulesReviewStatus = V1SubjectRulesReviewStatus;\nV1SubjectRulesReviewStatus.discriminator = undefined;\nV1SubjectRulesReviewStatus.attributeTypeMap = [\n {\n \"name\": \"evaluationError\",\n \"baseName\": \"evaluationError\",\n \"type\": \"string\"\n },\n {\n \"name\": \"incomplete\",\n \"baseName\": \"incomplete\",\n \"type\": \"boolean\"\n },\n {\n \"name\": \"nonResourceRules\",\n \"baseName\": \"nonResourceRules\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"resourceRules\",\n \"baseName\": \"resourceRules\",\n \"type\": \"Array\"\n }\n];\n//# sourceMappingURL=v1SubjectRulesReviewStatus.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1Sysctl = void 0;\n/**\n* Sysctl defines a kernel parameter to be set\n*/\nclass V1Sysctl {\n static getAttributeTypeMap() {\n return V1Sysctl.attributeTypeMap;\n }\n}\nexports.V1Sysctl = V1Sysctl;\nV1Sysctl.discriminator = undefined;\nV1Sysctl.attributeTypeMap = [\n {\n \"name\": \"name\",\n \"baseName\": \"name\",\n \"type\": \"string\"\n },\n {\n \"name\": \"value\",\n \"baseName\": \"value\",\n \"type\": \"string\"\n }\n];\n//# sourceMappingURL=v1Sysctl.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1TCPSocketAction = void 0;\n/**\n* TCPSocketAction describes an action based on opening a socket\n*/\nclass V1TCPSocketAction {\n static getAttributeTypeMap() {\n return V1TCPSocketAction.attributeTypeMap;\n }\n}\nexports.V1TCPSocketAction = V1TCPSocketAction;\nV1TCPSocketAction.discriminator = undefined;\nV1TCPSocketAction.attributeTypeMap = [\n {\n \"name\": \"host\",\n \"baseName\": \"host\",\n \"type\": \"string\"\n },\n {\n \"name\": \"port\",\n \"baseName\": \"port\",\n \"type\": \"IntOrString\"\n }\n];\n//# sourceMappingURL=v1TCPSocketAction.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1Taint = void 0;\n/**\n* The node this Taint is attached to has the \\\"effect\\\" on any pod that does not tolerate the Taint.\n*/\nclass V1Taint {\n static getAttributeTypeMap() {\n return V1Taint.attributeTypeMap;\n }\n}\nexports.V1Taint = V1Taint;\nV1Taint.discriminator = undefined;\nV1Taint.attributeTypeMap = [\n {\n \"name\": \"effect\",\n \"baseName\": \"effect\",\n \"type\": \"string\"\n },\n {\n \"name\": \"key\",\n \"baseName\": \"key\",\n \"type\": \"string\"\n },\n {\n \"name\": \"timeAdded\",\n \"baseName\": \"timeAdded\",\n \"type\": \"Date\"\n },\n {\n \"name\": \"value\",\n \"baseName\": \"value\",\n \"type\": \"string\"\n }\n];\n//# sourceMappingURL=v1Taint.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1TokenRequestSpec = void 0;\n/**\n* TokenRequestSpec contains client provided parameters of a token request.\n*/\nclass V1TokenRequestSpec {\n static getAttributeTypeMap() {\n return V1TokenRequestSpec.attributeTypeMap;\n }\n}\nexports.V1TokenRequestSpec = V1TokenRequestSpec;\nV1TokenRequestSpec.discriminator = undefined;\nV1TokenRequestSpec.attributeTypeMap = [\n {\n \"name\": \"audiences\",\n \"baseName\": \"audiences\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"boundObjectRef\",\n \"baseName\": \"boundObjectRef\",\n \"type\": \"V1BoundObjectReference\"\n },\n {\n \"name\": \"expirationSeconds\",\n \"baseName\": \"expirationSeconds\",\n \"type\": \"number\"\n }\n];\n//# sourceMappingURL=v1TokenRequestSpec.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1TokenRequestStatus = void 0;\n/**\n* TokenRequestStatus is the result of a token request.\n*/\nclass V1TokenRequestStatus {\n static getAttributeTypeMap() {\n return V1TokenRequestStatus.attributeTypeMap;\n }\n}\nexports.V1TokenRequestStatus = V1TokenRequestStatus;\nV1TokenRequestStatus.discriminator = undefined;\nV1TokenRequestStatus.attributeTypeMap = [\n {\n \"name\": \"expirationTimestamp\",\n \"baseName\": \"expirationTimestamp\",\n \"type\": \"Date\"\n },\n {\n \"name\": \"token\",\n \"baseName\": \"token\",\n \"type\": \"string\"\n }\n];\n//# sourceMappingURL=v1TokenRequestStatus.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1TokenReview = void 0;\n/**\n* TokenReview attempts to authenticate a token to a known user. Note: TokenReview requests may be cached by the webhook token authenticator plugin in the kube-apiserver.\n*/\nclass V1TokenReview {\n static getAttributeTypeMap() {\n return V1TokenReview.attributeTypeMap;\n }\n}\nexports.V1TokenReview = V1TokenReview;\nV1TokenReview.discriminator = undefined;\nV1TokenReview.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ObjectMeta\"\n },\n {\n \"name\": \"spec\",\n \"baseName\": \"spec\",\n \"type\": \"V1TokenReviewSpec\"\n },\n {\n \"name\": \"status\",\n \"baseName\": \"status\",\n \"type\": \"V1TokenReviewStatus\"\n }\n];\n//# sourceMappingURL=v1TokenReview.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1TokenReviewSpec = void 0;\n/**\n* TokenReviewSpec is a description of the token authentication request.\n*/\nclass V1TokenReviewSpec {\n static getAttributeTypeMap() {\n return V1TokenReviewSpec.attributeTypeMap;\n }\n}\nexports.V1TokenReviewSpec = V1TokenReviewSpec;\nV1TokenReviewSpec.discriminator = undefined;\nV1TokenReviewSpec.attributeTypeMap = [\n {\n \"name\": \"audiences\",\n \"baseName\": \"audiences\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"token\",\n \"baseName\": \"token\",\n \"type\": \"string\"\n }\n];\n//# sourceMappingURL=v1TokenReviewSpec.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1TokenReviewStatus = void 0;\n/**\n* TokenReviewStatus is the result of the token authentication request.\n*/\nclass V1TokenReviewStatus {\n static getAttributeTypeMap() {\n return V1TokenReviewStatus.attributeTypeMap;\n }\n}\nexports.V1TokenReviewStatus = V1TokenReviewStatus;\nV1TokenReviewStatus.discriminator = undefined;\nV1TokenReviewStatus.attributeTypeMap = [\n {\n \"name\": \"audiences\",\n \"baseName\": \"audiences\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"authenticated\",\n \"baseName\": \"authenticated\",\n \"type\": \"boolean\"\n },\n {\n \"name\": \"error\",\n \"baseName\": \"error\",\n \"type\": \"string\"\n },\n {\n \"name\": \"user\",\n \"baseName\": \"user\",\n \"type\": \"V1UserInfo\"\n }\n];\n//# sourceMappingURL=v1TokenReviewStatus.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1Toleration = void 0;\n/**\n* The pod this Toleration is attached to tolerates any taint that matches the triple using the matching operator .\n*/\nclass V1Toleration {\n static getAttributeTypeMap() {\n return V1Toleration.attributeTypeMap;\n }\n}\nexports.V1Toleration = V1Toleration;\nV1Toleration.discriminator = undefined;\nV1Toleration.attributeTypeMap = [\n {\n \"name\": \"effect\",\n \"baseName\": \"effect\",\n \"type\": \"string\"\n },\n {\n \"name\": \"key\",\n \"baseName\": \"key\",\n \"type\": \"string\"\n },\n {\n \"name\": \"operator\",\n \"baseName\": \"operator\",\n \"type\": \"string\"\n },\n {\n \"name\": \"tolerationSeconds\",\n \"baseName\": \"tolerationSeconds\",\n \"type\": \"number\"\n },\n {\n \"name\": \"value\",\n \"baseName\": \"value\",\n \"type\": \"string\"\n }\n];\n//# sourceMappingURL=v1Toleration.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1TopologySelectorLabelRequirement = void 0;\n/**\n* A topology selector requirement is a selector that matches given label. This is an alpha feature and may change in the future.\n*/\nclass V1TopologySelectorLabelRequirement {\n static getAttributeTypeMap() {\n return V1TopologySelectorLabelRequirement.attributeTypeMap;\n }\n}\nexports.V1TopologySelectorLabelRequirement = V1TopologySelectorLabelRequirement;\nV1TopologySelectorLabelRequirement.discriminator = undefined;\nV1TopologySelectorLabelRequirement.attributeTypeMap = [\n {\n \"name\": \"key\",\n \"baseName\": \"key\",\n \"type\": \"string\"\n },\n {\n \"name\": \"values\",\n \"baseName\": \"values\",\n \"type\": \"Array\"\n }\n];\n//# sourceMappingURL=v1TopologySelectorLabelRequirement.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1TopologySelectorTerm = void 0;\n/**\n* A topology selector term represents the result of label queries. A null or empty topology selector term matches no objects. The requirements of them are ANDed. It provides a subset of functionality as NodeSelectorTerm. This is an alpha feature and may change in the future.\n*/\nclass V1TopologySelectorTerm {\n static getAttributeTypeMap() {\n return V1TopologySelectorTerm.attributeTypeMap;\n }\n}\nexports.V1TopologySelectorTerm = V1TopologySelectorTerm;\nV1TopologySelectorTerm.discriminator = undefined;\nV1TopologySelectorTerm.attributeTypeMap = [\n {\n \"name\": \"matchLabelExpressions\",\n \"baseName\": \"matchLabelExpressions\",\n \"type\": \"Array\"\n }\n];\n//# sourceMappingURL=v1TopologySelectorTerm.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1TopologySpreadConstraint = void 0;\n/**\n* TopologySpreadConstraint specifies how to spread matching pods among the given topology.\n*/\nclass V1TopologySpreadConstraint {\n static getAttributeTypeMap() {\n return V1TopologySpreadConstraint.attributeTypeMap;\n }\n}\nexports.V1TopologySpreadConstraint = V1TopologySpreadConstraint;\nV1TopologySpreadConstraint.discriminator = undefined;\nV1TopologySpreadConstraint.attributeTypeMap = [\n {\n \"name\": \"labelSelector\",\n \"baseName\": \"labelSelector\",\n \"type\": \"V1LabelSelector\"\n },\n {\n \"name\": \"maxSkew\",\n \"baseName\": \"maxSkew\",\n \"type\": \"number\"\n },\n {\n \"name\": \"topologyKey\",\n \"baseName\": \"topologyKey\",\n \"type\": \"string\"\n },\n {\n \"name\": \"whenUnsatisfiable\",\n \"baseName\": \"whenUnsatisfiable\",\n \"type\": \"string\"\n }\n];\n//# sourceMappingURL=v1TopologySpreadConstraint.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1TypedLocalObjectReference = void 0;\n/**\n* TypedLocalObjectReference contains enough information to let you locate the typed referenced object inside the same namespace.\n*/\nclass V1TypedLocalObjectReference {\n static getAttributeTypeMap() {\n return V1TypedLocalObjectReference.attributeTypeMap;\n }\n}\nexports.V1TypedLocalObjectReference = V1TypedLocalObjectReference;\nV1TypedLocalObjectReference.discriminator = undefined;\nV1TypedLocalObjectReference.attributeTypeMap = [\n {\n \"name\": \"apiGroup\",\n \"baseName\": \"apiGroup\",\n \"type\": \"string\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"name\",\n \"baseName\": \"name\",\n \"type\": \"string\"\n }\n];\n//# sourceMappingURL=v1TypedLocalObjectReference.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1UncountedTerminatedPods = void 0;\n/**\n* UncountedTerminatedPods holds UIDs of Pods that have terminated but haven\\'t been accounted in Job status counters.\n*/\nclass V1UncountedTerminatedPods {\n static getAttributeTypeMap() {\n return V1UncountedTerminatedPods.attributeTypeMap;\n }\n}\nexports.V1UncountedTerminatedPods = V1UncountedTerminatedPods;\nV1UncountedTerminatedPods.discriminator = undefined;\nV1UncountedTerminatedPods.attributeTypeMap = [\n {\n \"name\": \"failed\",\n \"baseName\": \"failed\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"succeeded\",\n \"baseName\": \"succeeded\",\n \"type\": \"Array\"\n }\n];\n//# sourceMappingURL=v1UncountedTerminatedPods.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1UserInfo = void 0;\n/**\n* UserInfo holds the information about the user needed to implement the user.Info interface.\n*/\nclass V1UserInfo {\n static getAttributeTypeMap() {\n return V1UserInfo.attributeTypeMap;\n }\n}\nexports.V1UserInfo = V1UserInfo;\nV1UserInfo.discriminator = undefined;\nV1UserInfo.attributeTypeMap = [\n {\n \"name\": \"extra\",\n \"baseName\": \"extra\",\n \"type\": \"{ [key: string]: Array; }\"\n },\n {\n \"name\": \"groups\",\n \"baseName\": \"groups\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"uid\",\n \"baseName\": \"uid\",\n \"type\": \"string\"\n },\n {\n \"name\": \"username\",\n \"baseName\": \"username\",\n \"type\": \"string\"\n }\n];\n//# sourceMappingURL=v1UserInfo.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1ValidatingWebhook = void 0;\n/**\n* ValidatingWebhook describes an admission webhook and the resources and operations it applies to.\n*/\nclass V1ValidatingWebhook {\n static getAttributeTypeMap() {\n return V1ValidatingWebhook.attributeTypeMap;\n }\n}\nexports.V1ValidatingWebhook = V1ValidatingWebhook;\nV1ValidatingWebhook.discriminator = undefined;\nV1ValidatingWebhook.attributeTypeMap = [\n {\n \"name\": \"admissionReviewVersions\",\n \"baseName\": \"admissionReviewVersions\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"clientConfig\",\n \"baseName\": \"clientConfig\",\n \"type\": \"AdmissionregistrationV1WebhookClientConfig\"\n },\n {\n \"name\": \"failurePolicy\",\n \"baseName\": \"failurePolicy\",\n \"type\": \"string\"\n },\n {\n \"name\": \"matchPolicy\",\n \"baseName\": \"matchPolicy\",\n \"type\": \"string\"\n },\n {\n \"name\": \"name\",\n \"baseName\": \"name\",\n \"type\": \"string\"\n },\n {\n \"name\": \"namespaceSelector\",\n \"baseName\": \"namespaceSelector\",\n \"type\": \"V1LabelSelector\"\n },\n {\n \"name\": \"objectSelector\",\n \"baseName\": \"objectSelector\",\n \"type\": \"V1LabelSelector\"\n },\n {\n \"name\": \"rules\",\n \"baseName\": \"rules\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"sideEffects\",\n \"baseName\": \"sideEffects\",\n \"type\": \"string\"\n },\n {\n \"name\": \"timeoutSeconds\",\n \"baseName\": \"timeoutSeconds\",\n \"type\": \"number\"\n }\n];\n//# sourceMappingURL=v1ValidatingWebhook.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1ValidatingWebhookConfiguration = void 0;\n/**\n* ValidatingWebhookConfiguration describes the configuration of and admission webhook that accept or reject and object without changing it.\n*/\nclass V1ValidatingWebhookConfiguration {\n static getAttributeTypeMap() {\n return V1ValidatingWebhookConfiguration.attributeTypeMap;\n }\n}\nexports.V1ValidatingWebhookConfiguration = V1ValidatingWebhookConfiguration;\nV1ValidatingWebhookConfiguration.discriminator = undefined;\nV1ValidatingWebhookConfiguration.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ObjectMeta\"\n },\n {\n \"name\": \"webhooks\",\n \"baseName\": \"webhooks\",\n \"type\": \"Array\"\n }\n];\n//# sourceMappingURL=v1ValidatingWebhookConfiguration.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1ValidatingWebhookConfigurationList = void 0;\n/**\n* ValidatingWebhookConfigurationList is a list of ValidatingWebhookConfiguration.\n*/\nclass V1ValidatingWebhookConfigurationList {\n static getAttributeTypeMap() {\n return V1ValidatingWebhookConfigurationList.attributeTypeMap;\n }\n}\nexports.V1ValidatingWebhookConfigurationList = V1ValidatingWebhookConfigurationList;\nV1ValidatingWebhookConfigurationList.discriminator = undefined;\nV1ValidatingWebhookConfigurationList.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"items\",\n \"baseName\": \"items\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ListMeta\"\n }\n];\n//# sourceMappingURL=v1ValidatingWebhookConfigurationList.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1Volume = void 0;\n/**\n* Volume represents a named volume in a pod that may be accessed by any container in the pod.\n*/\nclass V1Volume {\n static getAttributeTypeMap() {\n return V1Volume.attributeTypeMap;\n }\n}\nexports.V1Volume = V1Volume;\nV1Volume.discriminator = undefined;\nV1Volume.attributeTypeMap = [\n {\n \"name\": \"awsElasticBlockStore\",\n \"baseName\": \"awsElasticBlockStore\",\n \"type\": \"V1AWSElasticBlockStoreVolumeSource\"\n },\n {\n \"name\": \"azureDisk\",\n \"baseName\": \"azureDisk\",\n \"type\": \"V1AzureDiskVolumeSource\"\n },\n {\n \"name\": \"azureFile\",\n \"baseName\": \"azureFile\",\n \"type\": \"V1AzureFileVolumeSource\"\n },\n {\n \"name\": \"cephfs\",\n \"baseName\": \"cephfs\",\n \"type\": \"V1CephFSVolumeSource\"\n },\n {\n \"name\": \"cinder\",\n \"baseName\": \"cinder\",\n \"type\": \"V1CinderVolumeSource\"\n },\n {\n \"name\": \"configMap\",\n \"baseName\": \"configMap\",\n \"type\": \"V1ConfigMapVolumeSource\"\n },\n {\n \"name\": \"csi\",\n \"baseName\": \"csi\",\n \"type\": \"V1CSIVolumeSource\"\n },\n {\n \"name\": \"downwardAPI\",\n \"baseName\": \"downwardAPI\",\n \"type\": \"V1DownwardAPIVolumeSource\"\n },\n {\n \"name\": \"emptyDir\",\n \"baseName\": \"emptyDir\",\n \"type\": \"V1EmptyDirVolumeSource\"\n },\n {\n \"name\": \"ephemeral\",\n \"baseName\": \"ephemeral\",\n \"type\": \"V1EphemeralVolumeSource\"\n },\n {\n \"name\": \"fc\",\n \"baseName\": \"fc\",\n \"type\": \"V1FCVolumeSource\"\n },\n {\n \"name\": \"flexVolume\",\n \"baseName\": \"flexVolume\",\n \"type\": \"V1FlexVolumeSource\"\n },\n {\n \"name\": \"flocker\",\n \"baseName\": \"flocker\",\n \"type\": \"V1FlockerVolumeSource\"\n },\n {\n \"name\": \"gcePersistentDisk\",\n \"baseName\": \"gcePersistentDisk\",\n \"type\": \"V1GCEPersistentDiskVolumeSource\"\n },\n {\n \"name\": \"gitRepo\",\n \"baseName\": \"gitRepo\",\n \"type\": \"V1GitRepoVolumeSource\"\n },\n {\n \"name\": \"glusterfs\",\n \"baseName\": \"glusterfs\",\n \"type\": \"V1GlusterfsVolumeSource\"\n },\n {\n \"name\": \"hostPath\",\n \"baseName\": \"hostPath\",\n \"type\": \"V1HostPathVolumeSource\"\n },\n {\n \"name\": \"iscsi\",\n \"baseName\": \"iscsi\",\n \"type\": \"V1ISCSIVolumeSource\"\n },\n {\n \"name\": \"name\",\n \"baseName\": \"name\",\n \"type\": \"string\"\n },\n {\n \"name\": \"nfs\",\n \"baseName\": \"nfs\",\n \"type\": \"V1NFSVolumeSource\"\n },\n {\n \"name\": \"persistentVolumeClaim\",\n \"baseName\": \"persistentVolumeClaim\",\n \"type\": \"V1PersistentVolumeClaimVolumeSource\"\n },\n {\n \"name\": \"photonPersistentDisk\",\n \"baseName\": \"photonPersistentDisk\",\n \"type\": \"V1PhotonPersistentDiskVolumeSource\"\n },\n {\n \"name\": \"portworxVolume\",\n \"baseName\": \"portworxVolume\",\n \"type\": \"V1PortworxVolumeSource\"\n },\n {\n \"name\": \"projected\",\n \"baseName\": \"projected\",\n \"type\": \"V1ProjectedVolumeSource\"\n },\n {\n \"name\": \"quobyte\",\n \"baseName\": \"quobyte\",\n \"type\": \"V1QuobyteVolumeSource\"\n },\n {\n \"name\": \"rbd\",\n \"baseName\": \"rbd\",\n \"type\": \"V1RBDVolumeSource\"\n },\n {\n \"name\": \"scaleIO\",\n \"baseName\": \"scaleIO\",\n \"type\": \"V1ScaleIOVolumeSource\"\n },\n {\n \"name\": \"secret\",\n \"baseName\": \"secret\",\n \"type\": \"V1SecretVolumeSource\"\n },\n {\n \"name\": \"storageos\",\n \"baseName\": \"storageos\",\n \"type\": \"V1StorageOSVolumeSource\"\n },\n {\n \"name\": \"vsphereVolume\",\n \"baseName\": \"vsphereVolume\",\n \"type\": \"V1VsphereVirtualDiskVolumeSource\"\n }\n];\n//# sourceMappingURL=v1Volume.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1VolumeAttachment = void 0;\n/**\n* VolumeAttachment captures the intent to attach or detach the specified volume to/from the specified node. VolumeAttachment objects are non-namespaced.\n*/\nclass V1VolumeAttachment {\n static getAttributeTypeMap() {\n return V1VolumeAttachment.attributeTypeMap;\n }\n}\nexports.V1VolumeAttachment = V1VolumeAttachment;\nV1VolumeAttachment.discriminator = undefined;\nV1VolumeAttachment.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ObjectMeta\"\n },\n {\n \"name\": \"spec\",\n \"baseName\": \"spec\",\n \"type\": \"V1VolumeAttachmentSpec\"\n },\n {\n \"name\": \"status\",\n \"baseName\": \"status\",\n \"type\": \"V1VolumeAttachmentStatus\"\n }\n];\n//# sourceMappingURL=v1VolumeAttachment.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1VolumeAttachmentList = void 0;\n/**\n* VolumeAttachmentList is a collection of VolumeAttachment objects.\n*/\nclass V1VolumeAttachmentList {\n static getAttributeTypeMap() {\n return V1VolumeAttachmentList.attributeTypeMap;\n }\n}\nexports.V1VolumeAttachmentList = V1VolumeAttachmentList;\nV1VolumeAttachmentList.discriminator = undefined;\nV1VolumeAttachmentList.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"items\",\n \"baseName\": \"items\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ListMeta\"\n }\n];\n//# sourceMappingURL=v1VolumeAttachmentList.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1VolumeAttachmentSource = void 0;\n/**\n* VolumeAttachmentSource represents a volume that should be attached. Right now only PersistenVolumes can be attached via external attacher, in future we may allow also inline volumes in pods. Exactly one member can be set.\n*/\nclass V1VolumeAttachmentSource {\n static getAttributeTypeMap() {\n return V1VolumeAttachmentSource.attributeTypeMap;\n }\n}\nexports.V1VolumeAttachmentSource = V1VolumeAttachmentSource;\nV1VolumeAttachmentSource.discriminator = undefined;\nV1VolumeAttachmentSource.attributeTypeMap = [\n {\n \"name\": \"inlineVolumeSpec\",\n \"baseName\": \"inlineVolumeSpec\",\n \"type\": \"V1PersistentVolumeSpec\"\n },\n {\n \"name\": \"persistentVolumeName\",\n \"baseName\": \"persistentVolumeName\",\n \"type\": \"string\"\n }\n];\n//# sourceMappingURL=v1VolumeAttachmentSource.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1VolumeAttachmentSpec = void 0;\n/**\n* VolumeAttachmentSpec is the specification of a VolumeAttachment request.\n*/\nclass V1VolumeAttachmentSpec {\n static getAttributeTypeMap() {\n return V1VolumeAttachmentSpec.attributeTypeMap;\n }\n}\nexports.V1VolumeAttachmentSpec = V1VolumeAttachmentSpec;\nV1VolumeAttachmentSpec.discriminator = undefined;\nV1VolumeAttachmentSpec.attributeTypeMap = [\n {\n \"name\": \"attacher\",\n \"baseName\": \"attacher\",\n \"type\": \"string\"\n },\n {\n \"name\": \"nodeName\",\n \"baseName\": \"nodeName\",\n \"type\": \"string\"\n },\n {\n \"name\": \"source\",\n \"baseName\": \"source\",\n \"type\": \"V1VolumeAttachmentSource\"\n }\n];\n//# sourceMappingURL=v1VolumeAttachmentSpec.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1VolumeAttachmentStatus = void 0;\n/**\n* VolumeAttachmentStatus is the status of a VolumeAttachment request.\n*/\nclass V1VolumeAttachmentStatus {\n static getAttributeTypeMap() {\n return V1VolumeAttachmentStatus.attributeTypeMap;\n }\n}\nexports.V1VolumeAttachmentStatus = V1VolumeAttachmentStatus;\nV1VolumeAttachmentStatus.discriminator = undefined;\nV1VolumeAttachmentStatus.attributeTypeMap = [\n {\n \"name\": \"attachError\",\n \"baseName\": \"attachError\",\n \"type\": \"V1VolumeError\"\n },\n {\n \"name\": \"attached\",\n \"baseName\": \"attached\",\n \"type\": \"boolean\"\n },\n {\n \"name\": \"attachmentMetadata\",\n \"baseName\": \"attachmentMetadata\",\n \"type\": \"{ [key: string]: string; }\"\n },\n {\n \"name\": \"detachError\",\n \"baseName\": \"detachError\",\n \"type\": \"V1VolumeError\"\n }\n];\n//# sourceMappingURL=v1VolumeAttachmentStatus.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1VolumeDevice = void 0;\n/**\n* volumeDevice describes a mapping of a raw block device within a container.\n*/\nclass V1VolumeDevice {\n static getAttributeTypeMap() {\n return V1VolumeDevice.attributeTypeMap;\n }\n}\nexports.V1VolumeDevice = V1VolumeDevice;\nV1VolumeDevice.discriminator = undefined;\nV1VolumeDevice.attributeTypeMap = [\n {\n \"name\": \"devicePath\",\n \"baseName\": \"devicePath\",\n \"type\": \"string\"\n },\n {\n \"name\": \"name\",\n \"baseName\": \"name\",\n \"type\": \"string\"\n }\n];\n//# sourceMappingURL=v1VolumeDevice.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1VolumeError = void 0;\n/**\n* VolumeError captures an error encountered during a volume operation.\n*/\nclass V1VolumeError {\n static getAttributeTypeMap() {\n return V1VolumeError.attributeTypeMap;\n }\n}\nexports.V1VolumeError = V1VolumeError;\nV1VolumeError.discriminator = undefined;\nV1VolumeError.attributeTypeMap = [\n {\n \"name\": \"message\",\n \"baseName\": \"message\",\n \"type\": \"string\"\n },\n {\n \"name\": \"time\",\n \"baseName\": \"time\",\n \"type\": \"Date\"\n }\n];\n//# sourceMappingURL=v1VolumeError.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1VolumeMount = void 0;\n/**\n* VolumeMount describes a mounting of a Volume within a container.\n*/\nclass V1VolumeMount {\n static getAttributeTypeMap() {\n return V1VolumeMount.attributeTypeMap;\n }\n}\nexports.V1VolumeMount = V1VolumeMount;\nV1VolumeMount.discriminator = undefined;\nV1VolumeMount.attributeTypeMap = [\n {\n \"name\": \"mountPath\",\n \"baseName\": \"mountPath\",\n \"type\": \"string\"\n },\n {\n \"name\": \"mountPropagation\",\n \"baseName\": \"mountPropagation\",\n \"type\": \"string\"\n },\n {\n \"name\": \"name\",\n \"baseName\": \"name\",\n \"type\": \"string\"\n },\n {\n \"name\": \"readOnly\",\n \"baseName\": \"readOnly\",\n \"type\": \"boolean\"\n },\n {\n \"name\": \"subPath\",\n \"baseName\": \"subPath\",\n \"type\": \"string\"\n },\n {\n \"name\": \"subPathExpr\",\n \"baseName\": \"subPathExpr\",\n \"type\": \"string\"\n }\n];\n//# sourceMappingURL=v1VolumeMount.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1VolumeNodeAffinity = void 0;\n/**\n* VolumeNodeAffinity defines constraints that limit what nodes this volume can be accessed from.\n*/\nclass V1VolumeNodeAffinity {\n static getAttributeTypeMap() {\n return V1VolumeNodeAffinity.attributeTypeMap;\n }\n}\nexports.V1VolumeNodeAffinity = V1VolumeNodeAffinity;\nV1VolumeNodeAffinity.discriminator = undefined;\nV1VolumeNodeAffinity.attributeTypeMap = [\n {\n \"name\": \"required\",\n \"baseName\": \"required\",\n \"type\": \"V1NodeSelector\"\n }\n];\n//# sourceMappingURL=v1VolumeNodeAffinity.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1VolumeNodeResources = void 0;\n/**\n* VolumeNodeResources is a set of resource limits for scheduling of volumes.\n*/\nclass V1VolumeNodeResources {\n static getAttributeTypeMap() {\n return V1VolumeNodeResources.attributeTypeMap;\n }\n}\nexports.V1VolumeNodeResources = V1VolumeNodeResources;\nV1VolumeNodeResources.discriminator = undefined;\nV1VolumeNodeResources.attributeTypeMap = [\n {\n \"name\": \"count\",\n \"baseName\": \"count\",\n \"type\": \"number\"\n }\n];\n//# sourceMappingURL=v1VolumeNodeResources.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1VolumeProjection = void 0;\n/**\n* Projection that may be projected along with other supported volume types\n*/\nclass V1VolumeProjection {\n static getAttributeTypeMap() {\n return V1VolumeProjection.attributeTypeMap;\n }\n}\nexports.V1VolumeProjection = V1VolumeProjection;\nV1VolumeProjection.discriminator = undefined;\nV1VolumeProjection.attributeTypeMap = [\n {\n \"name\": \"configMap\",\n \"baseName\": \"configMap\",\n \"type\": \"V1ConfigMapProjection\"\n },\n {\n \"name\": \"downwardAPI\",\n \"baseName\": \"downwardAPI\",\n \"type\": \"V1DownwardAPIProjection\"\n },\n {\n \"name\": \"secret\",\n \"baseName\": \"secret\",\n \"type\": \"V1SecretProjection\"\n },\n {\n \"name\": \"serviceAccountToken\",\n \"baseName\": \"serviceAccountToken\",\n \"type\": \"V1ServiceAccountTokenProjection\"\n }\n];\n//# sourceMappingURL=v1VolumeProjection.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1VsphereVirtualDiskVolumeSource = void 0;\n/**\n* Represents a vSphere volume resource.\n*/\nclass V1VsphereVirtualDiskVolumeSource {\n static getAttributeTypeMap() {\n return V1VsphereVirtualDiskVolumeSource.attributeTypeMap;\n }\n}\nexports.V1VsphereVirtualDiskVolumeSource = V1VsphereVirtualDiskVolumeSource;\nV1VsphereVirtualDiskVolumeSource.discriminator = undefined;\nV1VsphereVirtualDiskVolumeSource.attributeTypeMap = [\n {\n \"name\": \"fsType\",\n \"baseName\": \"fsType\",\n \"type\": \"string\"\n },\n {\n \"name\": \"storagePolicyID\",\n \"baseName\": \"storagePolicyID\",\n \"type\": \"string\"\n },\n {\n \"name\": \"storagePolicyName\",\n \"baseName\": \"storagePolicyName\",\n \"type\": \"string\"\n },\n {\n \"name\": \"volumePath\",\n \"baseName\": \"volumePath\",\n \"type\": \"string\"\n }\n];\n//# sourceMappingURL=v1VsphereVirtualDiskVolumeSource.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1WatchEvent = void 0;\n/**\n* Event represents a single event to a watched resource.\n*/\nclass V1WatchEvent {\n static getAttributeTypeMap() {\n return V1WatchEvent.attributeTypeMap;\n }\n}\nexports.V1WatchEvent = V1WatchEvent;\nV1WatchEvent.discriminator = undefined;\nV1WatchEvent.attributeTypeMap = [\n {\n \"name\": \"object\",\n \"baseName\": \"object\",\n \"type\": \"object\"\n },\n {\n \"name\": \"type\",\n \"baseName\": \"type\",\n \"type\": \"string\"\n }\n];\n//# sourceMappingURL=v1WatchEvent.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1WebhookConversion = void 0;\n/**\n* WebhookConversion describes how to call a conversion webhook\n*/\nclass V1WebhookConversion {\n static getAttributeTypeMap() {\n return V1WebhookConversion.attributeTypeMap;\n }\n}\nexports.V1WebhookConversion = V1WebhookConversion;\nV1WebhookConversion.discriminator = undefined;\nV1WebhookConversion.attributeTypeMap = [\n {\n \"name\": \"clientConfig\",\n \"baseName\": \"clientConfig\",\n \"type\": \"ApiextensionsV1WebhookClientConfig\"\n },\n {\n \"name\": \"conversionReviewVersions\",\n \"baseName\": \"conversionReviewVersions\",\n \"type\": \"Array\"\n }\n];\n//# sourceMappingURL=v1WebhookConversion.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1WeightedPodAffinityTerm = void 0;\n/**\n* The weights of all of the matched WeightedPodAffinityTerm fields are added per-node to find the most preferred node(s)\n*/\nclass V1WeightedPodAffinityTerm {\n static getAttributeTypeMap() {\n return V1WeightedPodAffinityTerm.attributeTypeMap;\n }\n}\nexports.V1WeightedPodAffinityTerm = V1WeightedPodAffinityTerm;\nV1WeightedPodAffinityTerm.discriminator = undefined;\nV1WeightedPodAffinityTerm.attributeTypeMap = [\n {\n \"name\": \"podAffinityTerm\",\n \"baseName\": \"podAffinityTerm\",\n \"type\": \"V1PodAffinityTerm\"\n },\n {\n \"name\": \"weight\",\n \"baseName\": \"weight\",\n \"type\": \"number\"\n }\n];\n//# sourceMappingURL=v1WeightedPodAffinityTerm.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1WindowsSecurityContextOptions = void 0;\n/**\n* WindowsSecurityContextOptions contain Windows-specific options and credentials.\n*/\nclass V1WindowsSecurityContextOptions {\n static getAttributeTypeMap() {\n return V1WindowsSecurityContextOptions.attributeTypeMap;\n }\n}\nexports.V1WindowsSecurityContextOptions = V1WindowsSecurityContextOptions;\nV1WindowsSecurityContextOptions.discriminator = undefined;\nV1WindowsSecurityContextOptions.attributeTypeMap = [\n {\n \"name\": \"gmsaCredentialSpec\",\n \"baseName\": \"gmsaCredentialSpec\",\n \"type\": \"string\"\n },\n {\n \"name\": \"gmsaCredentialSpecName\",\n \"baseName\": \"gmsaCredentialSpecName\",\n \"type\": \"string\"\n },\n {\n \"name\": \"hostProcess\",\n \"baseName\": \"hostProcess\",\n \"type\": \"boolean\"\n },\n {\n \"name\": \"runAsUserName\",\n \"baseName\": \"runAsUserName\",\n \"type\": \"string\"\n }\n];\n//# sourceMappingURL=v1WindowsSecurityContextOptions.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1alpha1AggregationRule = void 0;\n/**\n* AggregationRule describes how to locate ClusterRoles to aggregate into the ClusterRole\n*/\nclass V1alpha1AggregationRule {\n static getAttributeTypeMap() {\n return V1alpha1AggregationRule.attributeTypeMap;\n }\n}\nexports.V1alpha1AggregationRule = V1alpha1AggregationRule;\nV1alpha1AggregationRule.discriminator = undefined;\nV1alpha1AggregationRule.attributeTypeMap = [\n {\n \"name\": \"clusterRoleSelectors\",\n \"baseName\": \"clusterRoleSelectors\",\n \"type\": \"Array\"\n }\n];\n//# sourceMappingURL=v1alpha1AggregationRule.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1alpha1CSIStorageCapacity = void 0;\n/**\n* CSIStorageCapacity stores the result of one CSI GetCapacity call. For a given StorageClass, this describes the available capacity in a particular topology segment. This can be used when considering where to instantiate new PersistentVolumes. For example this can express things like: - StorageClass \\\"standard\\\" has \\\"1234 GiB\\\" available in \\\"topology.kubernetes.io/zone=us-east1\\\" - StorageClass \\\"localssd\\\" has \\\"10 GiB\\\" available in \\\"kubernetes.io/hostname=knode-abc123\\\" The following three cases all imply that no capacity is available for a certain combination: - no object exists with suitable topology and storage class name - such an object exists, but the capacity is unset - such an object exists, but the capacity is zero The producer of these objects can decide which approach is more suitable. They are consumed by the kube-scheduler if the CSIStorageCapacity beta feature gate is enabled there and a CSI driver opts into capacity-aware scheduling with CSIDriver.StorageCapacity.\n*/\nclass V1alpha1CSIStorageCapacity {\n static getAttributeTypeMap() {\n return V1alpha1CSIStorageCapacity.attributeTypeMap;\n }\n}\nexports.V1alpha1CSIStorageCapacity = V1alpha1CSIStorageCapacity;\nV1alpha1CSIStorageCapacity.discriminator = undefined;\nV1alpha1CSIStorageCapacity.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"capacity\",\n \"baseName\": \"capacity\",\n \"type\": \"string\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"maximumVolumeSize\",\n \"baseName\": \"maximumVolumeSize\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ObjectMeta\"\n },\n {\n \"name\": \"nodeTopology\",\n \"baseName\": \"nodeTopology\",\n \"type\": \"V1LabelSelector\"\n },\n {\n \"name\": \"storageClassName\",\n \"baseName\": \"storageClassName\",\n \"type\": \"string\"\n }\n];\n//# sourceMappingURL=v1alpha1CSIStorageCapacity.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1alpha1CSIStorageCapacityList = void 0;\n/**\n* CSIStorageCapacityList is a collection of CSIStorageCapacity objects.\n*/\nclass V1alpha1CSIStorageCapacityList {\n static getAttributeTypeMap() {\n return V1alpha1CSIStorageCapacityList.attributeTypeMap;\n }\n}\nexports.V1alpha1CSIStorageCapacityList = V1alpha1CSIStorageCapacityList;\nV1alpha1CSIStorageCapacityList.discriminator = undefined;\nV1alpha1CSIStorageCapacityList.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"items\",\n \"baseName\": \"items\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ListMeta\"\n }\n];\n//# sourceMappingURL=v1alpha1CSIStorageCapacityList.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1alpha1ClusterRole = void 0;\n/**\n* ClusterRole is a cluster level, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding or ClusterRoleBinding. Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 ClusterRole, and will no longer be served in v1.22.\n*/\nclass V1alpha1ClusterRole {\n static getAttributeTypeMap() {\n return V1alpha1ClusterRole.attributeTypeMap;\n }\n}\nexports.V1alpha1ClusterRole = V1alpha1ClusterRole;\nV1alpha1ClusterRole.discriminator = undefined;\nV1alpha1ClusterRole.attributeTypeMap = [\n {\n \"name\": \"aggregationRule\",\n \"baseName\": \"aggregationRule\",\n \"type\": \"V1alpha1AggregationRule\"\n },\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ObjectMeta\"\n },\n {\n \"name\": \"rules\",\n \"baseName\": \"rules\",\n \"type\": \"Array\"\n }\n];\n//# sourceMappingURL=v1alpha1ClusterRole.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1alpha1ClusterRoleBinding = void 0;\n/**\n* ClusterRoleBinding references a ClusterRole, but not contain it. It can reference a ClusterRole in the global namespace, and adds who information via Subject. Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 ClusterRoleBinding, and will no longer be served in v1.22.\n*/\nclass V1alpha1ClusterRoleBinding {\n static getAttributeTypeMap() {\n return V1alpha1ClusterRoleBinding.attributeTypeMap;\n }\n}\nexports.V1alpha1ClusterRoleBinding = V1alpha1ClusterRoleBinding;\nV1alpha1ClusterRoleBinding.discriminator = undefined;\nV1alpha1ClusterRoleBinding.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ObjectMeta\"\n },\n {\n \"name\": \"roleRef\",\n \"baseName\": \"roleRef\",\n \"type\": \"V1alpha1RoleRef\"\n },\n {\n \"name\": \"subjects\",\n \"baseName\": \"subjects\",\n \"type\": \"Array\"\n }\n];\n//# sourceMappingURL=v1alpha1ClusterRoleBinding.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1alpha1ClusterRoleBindingList = void 0;\n/**\n* ClusterRoleBindingList is a collection of ClusterRoleBindings. Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 ClusterRoleBindings, and will no longer be served in v1.22.\n*/\nclass V1alpha1ClusterRoleBindingList {\n static getAttributeTypeMap() {\n return V1alpha1ClusterRoleBindingList.attributeTypeMap;\n }\n}\nexports.V1alpha1ClusterRoleBindingList = V1alpha1ClusterRoleBindingList;\nV1alpha1ClusterRoleBindingList.discriminator = undefined;\nV1alpha1ClusterRoleBindingList.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"items\",\n \"baseName\": \"items\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ListMeta\"\n }\n];\n//# sourceMappingURL=v1alpha1ClusterRoleBindingList.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1alpha1ClusterRoleList = void 0;\n/**\n* ClusterRoleList is a collection of ClusterRoles. Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 ClusterRoles, and will no longer be served in v1.22.\n*/\nclass V1alpha1ClusterRoleList {\n static getAttributeTypeMap() {\n return V1alpha1ClusterRoleList.attributeTypeMap;\n }\n}\nexports.V1alpha1ClusterRoleList = V1alpha1ClusterRoleList;\nV1alpha1ClusterRoleList.discriminator = undefined;\nV1alpha1ClusterRoleList.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"items\",\n \"baseName\": \"items\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ListMeta\"\n }\n];\n//# sourceMappingURL=v1alpha1ClusterRoleList.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1alpha1Overhead = void 0;\n/**\n* Overhead structure represents the resource overhead associated with running a pod.\n*/\nclass V1alpha1Overhead {\n static getAttributeTypeMap() {\n return V1alpha1Overhead.attributeTypeMap;\n }\n}\nexports.V1alpha1Overhead = V1alpha1Overhead;\nV1alpha1Overhead.discriminator = undefined;\nV1alpha1Overhead.attributeTypeMap = [\n {\n \"name\": \"podFixed\",\n \"baseName\": \"podFixed\",\n \"type\": \"{ [key: string]: string; }\"\n }\n];\n//# sourceMappingURL=v1alpha1Overhead.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1alpha1PolicyRule = void 0;\n/**\n* PolicyRule holds information that describes a policy rule, but does not contain information about who the rule applies to or which namespace the rule applies to.\n*/\nclass V1alpha1PolicyRule {\n static getAttributeTypeMap() {\n return V1alpha1PolicyRule.attributeTypeMap;\n }\n}\nexports.V1alpha1PolicyRule = V1alpha1PolicyRule;\nV1alpha1PolicyRule.discriminator = undefined;\nV1alpha1PolicyRule.attributeTypeMap = [\n {\n \"name\": \"apiGroups\",\n \"baseName\": \"apiGroups\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"nonResourceURLs\",\n \"baseName\": \"nonResourceURLs\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"resourceNames\",\n \"baseName\": \"resourceNames\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"resources\",\n \"baseName\": \"resources\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"verbs\",\n \"baseName\": \"verbs\",\n \"type\": \"Array\"\n }\n];\n//# sourceMappingURL=v1alpha1PolicyRule.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1alpha1PriorityClass = void 0;\n/**\n* DEPRECATED - This group version of PriorityClass is deprecated by scheduling.k8s.io/v1/PriorityClass. PriorityClass defines mapping from a priority class name to the priority integer value. The value can be any valid integer.\n*/\nclass V1alpha1PriorityClass {\n static getAttributeTypeMap() {\n return V1alpha1PriorityClass.attributeTypeMap;\n }\n}\nexports.V1alpha1PriorityClass = V1alpha1PriorityClass;\nV1alpha1PriorityClass.discriminator = undefined;\nV1alpha1PriorityClass.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"description\",\n \"baseName\": \"description\",\n \"type\": \"string\"\n },\n {\n \"name\": \"globalDefault\",\n \"baseName\": \"globalDefault\",\n \"type\": \"boolean\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ObjectMeta\"\n },\n {\n \"name\": \"preemptionPolicy\",\n \"baseName\": \"preemptionPolicy\",\n \"type\": \"string\"\n },\n {\n \"name\": \"value\",\n \"baseName\": \"value\",\n \"type\": \"number\"\n }\n];\n//# sourceMappingURL=v1alpha1PriorityClass.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1alpha1PriorityClassList = void 0;\n/**\n* PriorityClassList is a collection of priority classes.\n*/\nclass V1alpha1PriorityClassList {\n static getAttributeTypeMap() {\n return V1alpha1PriorityClassList.attributeTypeMap;\n }\n}\nexports.V1alpha1PriorityClassList = V1alpha1PriorityClassList;\nV1alpha1PriorityClassList.discriminator = undefined;\nV1alpha1PriorityClassList.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"items\",\n \"baseName\": \"items\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ListMeta\"\n }\n];\n//# sourceMappingURL=v1alpha1PriorityClassList.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1alpha1Role = void 0;\n/**\n* Role is a namespaced, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding. Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 Role, and will no longer be served in v1.22.\n*/\nclass V1alpha1Role {\n static getAttributeTypeMap() {\n return V1alpha1Role.attributeTypeMap;\n }\n}\nexports.V1alpha1Role = V1alpha1Role;\nV1alpha1Role.discriminator = undefined;\nV1alpha1Role.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ObjectMeta\"\n },\n {\n \"name\": \"rules\",\n \"baseName\": \"rules\",\n \"type\": \"Array\"\n }\n];\n//# sourceMappingURL=v1alpha1Role.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1alpha1RoleBinding = void 0;\n/**\n* RoleBinding references a role, but does not contain it. It can reference a Role in the same namespace or a ClusterRole in the global namespace. It adds who information via Subjects and namespace information by which namespace it exists in. RoleBindings in a given namespace only have effect in that namespace. Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 RoleBinding, and will no longer be served in v1.22.\n*/\nclass V1alpha1RoleBinding {\n static getAttributeTypeMap() {\n return V1alpha1RoleBinding.attributeTypeMap;\n }\n}\nexports.V1alpha1RoleBinding = V1alpha1RoleBinding;\nV1alpha1RoleBinding.discriminator = undefined;\nV1alpha1RoleBinding.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ObjectMeta\"\n },\n {\n \"name\": \"roleRef\",\n \"baseName\": \"roleRef\",\n \"type\": \"V1alpha1RoleRef\"\n },\n {\n \"name\": \"subjects\",\n \"baseName\": \"subjects\",\n \"type\": \"Array\"\n }\n];\n//# sourceMappingURL=v1alpha1RoleBinding.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1alpha1RoleBindingList = void 0;\n/**\n* RoleBindingList is a collection of RoleBindings Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 RoleBindingList, and will no longer be served in v1.22.\n*/\nclass V1alpha1RoleBindingList {\n static getAttributeTypeMap() {\n return V1alpha1RoleBindingList.attributeTypeMap;\n }\n}\nexports.V1alpha1RoleBindingList = V1alpha1RoleBindingList;\nV1alpha1RoleBindingList.discriminator = undefined;\nV1alpha1RoleBindingList.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"items\",\n \"baseName\": \"items\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ListMeta\"\n }\n];\n//# sourceMappingURL=v1alpha1RoleBindingList.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1alpha1RoleList = void 0;\n/**\n* RoleList is a collection of Roles. Deprecated in v1.17 in favor of rbac.authorization.k8s.io/v1 RoleList, and will no longer be served in v1.22.\n*/\nclass V1alpha1RoleList {\n static getAttributeTypeMap() {\n return V1alpha1RoleList.attributeTypeMap;\n }\n}\nexports.V1alpha1RoleList = V1alpha1RoleList;\nV1alpha1RoleList.discriminator = undefined;\nV1alpha1RoleList.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"items\",\n \"baseName\": \"items\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ListMeta\"\n }\n];\n//# sourceMappingURL=v1alpha1RoleList.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1alpha1RoleRef = void 0;\n/**\n* RoleRef contains information that points to the role being used\n*/\nclass V1alpha1RoleRef {\n static getAttributeTypeMap() {\n return V1alpha1RoleRef.attributeTypeMap;\n }\n}\nexports.V1alpha1RoleRef = V1alpha1RoleRef;\nV1alpha1RoleRef.discriminator = undefined;\nV1alpha1RoleRef.attributeTypeMap = [\n {\n \"name\": \"apiGroup\",\n \"baseName\": \"apiGroup\",\n \"type\": \"string\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"name\",\n \"baseName\": \"name\",\n \"type\": \"string\"\n }\n];\n//# sourceMappingURL=v1alpha1RoleRef.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1alpha1RuntimeClass = void 0;\n/**\n* RuntimeClass defines a class of container runtime supported in the cluster. The RuntimeClass is used to determine which container runtime is used to run all containers in a pod. RuntimeClasses are (currently) manually defined by a user or cluster provisioner, and referenced in the PodSpec. The Kubelet is responsible for resolving the RuntimeClassName reference before running the pod. For more details, see https://git.k8s.io/enhancements/keps/sig-node/585-runtime-class\n*/\nclass V1alpha1RuntimeClass {\n static getAttributeTypeMap() {\n return V1alpha1RuntimeClass.attributeTypeMap;\n }\n}\nexports.V1alpha1RuntimeClass = V1alpha1RuntimeClass;\nV1alpha1RuntimeClass.discriminator = undefined;\nV1alpha1RuntimeClass.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ObjectMeta\"\n },\n {\n \"name\": \"spec\",\n \"baseName\": \"spec\",\n \"type\": \"V1alpha1RuntimeClassSpec\"\n }\n];\n//# sourceMappingURL=v1alpha1RuntimeClass.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1alpha1RuntimeClassList = void 0;\n/**\n* RuntimeClassList is a list of RuntimeClass objects.\n*/\nclass V1alpha1RuntimeClassList {\n static getAttributeTypeMap() {\n return V1alpha1RuntimeClassList.attributeTypeMap;\n }\n}\nexports.V1alpha1RuntimeClassList = V1alpha1RuntimeClassList;\nV1alpha1RuntimeClassList.discriminator = undefined;\nV1alpha1RuntimeClassList.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"items\",\n \"baseName\": \"items\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ListMeta\"\n }\n];\n//# sourceMappingURL=v1alpha1RuntimeClassList.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1alpha1RuntimeClassSpec = void 0;\n/**\n* RuntimeClassSpec is a specification of a RuntimeClass. It contains parameters that are required to describe the RuntimeClass to the Container Runtime Interface (CRI) implementation, as well as any other components that need to understand how the pod will be run. The RuntimeClassSpec is immutable.\n*/\nclass V1alpha1RuntimeClassSpec {\n static getAttributeTypeMap() {\n return V1alpha1RuntimeClassSpec.attributeTypeMap;\n }\n}\nexports.V1alpha1RuntimeClassSpec = V1alpha1RuntimeClassSpec;\nV1alpha1RuntimeClassSpec.discriminator = undefined;\nV1alpha1RuntimeClassSpec.attributeTypeMap = [\n {\n \"name\": \"overhead\",\n \"baseName\": \"overhead\",\n \"type\": \"V1alpha1Overhead\"\n },\n {\n \"name\": \"runtimeHandler\",\n \"baseName\": \"runtimeHandler\",\n \"type\": \"string\"\n },\n {\n \"name\": \"scheduling\",\n \"baseName\": \"scheduling\",\n \"type\": \"V1alpha1Scheduling\"\n }\n];\n//# sourceMappingURL=v1alpha1RuntimeClassSpec.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1alpha1Scheduling = void 0;\n/**\n* Scheduling specifies the scheduling constraints for nodes supporting a RuntimeClass.\n*/\nclass V1alpha1Scheduling {\n static getAttributeTypeMap() {\n return V1alpha1Scheduling.attributeTypeMap;\n }\n}\nexports.V1alpha1Scheduling = V1alpha1Scheduling;\nV1alpha1Scheduling.discriminator = undefined;\nV1alpha1Scheduling.attributeTypeMap = [\n {\n \"name\": \"nodeSelector\",\n \"baseName\": \"nodeSelector\",\n \"type\": \"{ [key: string]: string; }\"\n },\n {\n \"name\": \"tolerations\",\n \"baseName\": \"tolerations\",\n \"type\": \"Array\"\n }\n];\n//# sourceMappingURL=v1alpha1Scheduling.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1alpha1ServerStorageVersion = void 0;\n/**\n* An API server instance reports the version it can decode and the version it encodes objects to when persisting objects in the backend.\n*/\nclass V1alpha1ServerStorageVersion {\n static getAttributeTypeMap() {\n return V1alpha1ServerStorageVersion.attributeTypeMap;\n }\n}\nexports.V1alpha1ServerStorageVersion = V1alpha1ServerStorageVersion;\nV1alpha1ServerStorageVersion.discriminator = undefined;\nV1alpha1ServerStorageVersion.attributeTypeMap = [\n {\n \"name\": \"apiServerID\",\n \"baseName\": \"apiServerID\",\n \"type\": \"string\"\n },\n {\n \"name\": \"decodableVersions\",\n \"baseName\": \"decodableVersions\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"encodingVersion\",\n \"baseName\": \"encodingVersion\",\n \"type\": \"string\"\n }\n];\n//# sourceMappingURL=v1alpha1ServerStorageVersion.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1alpha1StorageVersion = void 0;\n/**\n* Storage version of a specific resource.\n*/\nclass V1alpha1StorageVersion {\n static getAttributeTypeMap() {\n return V1alpha1StorageVersion.attributeTypeMap;\n }\n}\nexports.V1alpha1StorageVersion = V1alpha1StorageVersion;\nV1alpha1StorageVersion.discriminator = undefined;\nV1alpha1StorageVersion.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ObjectMeta\"\n },\n {\n \"name\": \"spec\",\n \"baseName\": \"spec\",\n \"type\": \"object\"\n },\n {\n \"name\": \"status\",\n \"baseName\": \"status\",\n \"type\": \"V1alpha1StorageVersionStatus\"\n }\n];\n//# sourceMappingURL=v1alpha1StorageVersion.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1alpha1StorageVersionCondition = void 0;\n/**\n* Describes the state of the storageVersion at a certain point.\n*/\nclass V1alpha1StorageVersionCondition {\n static getAttributeTypeMap() {\n return V1alpha1StorageVersionCondition.attributeTypeMap;\n }\n}\nexports.V1alpha1StorageVersionCondition = V1alpha1StorageVersionCondition;\nV1alpha1StorageVersionCondition.discriminator = undefined;\nV1alpha1StorageVersionCondition.attributeTypeMap = [\n {\n \"name\": \"lastTransitionTime\",\n \"baseName\": \"lastTransitionTime\",\n \"type\": \"Date\"\n },\n {\n \"name\": \"message\",\n \"baseName\": \"message\",\n \"type\": \"string\"\n },\n {\n \"name\": \"observedGeneration\",\n \"baseName\": \"observedGeneration\",\n \"type\": \"number\"\n },\n {\n \"name\": \"reason\",\n \"baseName\": \"reason\",\n \"type\": \"string\"\n },\n {\n \"name\": \"status\",\n \"baseName\": \"status\",\n \"type\": \"string\"\n },\n {\n \"name\": \"type\",\n \"baseName\": \"type\",\n \"type\": \"string\"\n }\n];\n//# sourceMappingURL=v1alpha1StorageVersionCondition.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1alpha1StorageVersionList = void 0;\n/**\n* A list of StorageVersions.\n*/\nclass V1alpha1StorageVersionList {\n static getAttributeTypeMap() {\n return V1alpha1StorageVersionList.attributeTypeMap;\n }\n}\nexports.V1alpha1StorageVersionList = V1alpha1StorageVersionList;\nV1alpha1StorageVersionList.discriminator = undefined;\nV1alpha1StorageVersionList.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"items\",\n \"baseName\": \"items\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ListMeta\"\n }\n];\n//# sourceMappingURL=v1alpha1StorageVersionList.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1alpha1StorageVersionStatus = void 0;\n/**\n* API server instances report the versions they can decode and the version they encode objects to when persisting objects in the backend.\n*/\nclass V1alpha1StorageVersionStatus {\n static getAttributeTypeMap() {\n return V1alpha1StorageVersionStatus.attributeTypeMap;\n }\n}\nexports.V1alpha1StorageVersionStatus = V1alpha1StorageVersionStatus;\nV1alpha1StorageVersionStatus.discriminator = undefined;\nV1alpha1StorageVersionStatus.attributeTypeMap = [\n {\n \"name\": \"commonEncodingVersion\",\n \"baseName\": \"commonEncodingVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"conditions\",\n \"baseName\": \"conditions\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"storageVersions\",\n \"baseName\": \"storageVersions\",\n \"type\": \"Array\"\n }\n];\n//# sourceMappingURL=v1alpha1StorageVersionStatus.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1alpha1Subject = void 0;\n/**\n* Subject contains a reference to the object or user identities a role binding applies to. This can either hold a direct API object reference, or a value for non-objects such as user and group names.\n*/\nclass V1alpha1Subject {\n static getAttributeTypeMap() {\n return V1alpha1Subject.attributeTypeMap;\n }\n}\nexports.V1alpha1Subject = V1alpha1Subject;\nV1alpha1Subject.discriminator = undefined;\nV1alpha1Subject.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"name\",\n \"baseName\": \"name\",\n \"type\": \"string\"\n },\n {\n \"name\": \"namespace\",\n \"baseName\": \"namespace\",\n \"type\": \"string\"\n }\n];\n//# sourceMappingURL=v1alpha1Subject.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1alpha1VolumeAttachment = void 0;\n/**\n* VolumeAttachment captures the intent to attach or detach the specified volume to/from the specified node. VolumeAttachment objects are non-namespaced.\n*/\nclass V1alpha1VolumeAttachment {\n static getAttributeTypeMap() {\n return V1alpha1VolumeAttachment.attributeTypeMap;\n }\n}\nexports.V1alpha1VolumeAttachment = V1alpha1VolumeAttachment;\nV1alpha1VolumeAttachment.discriminator = undefined;\nV1alpha1VolumeAttachment.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ObjectMeta\"\n },\n {\n \"name\": \"spec\",\n \"baseName\": \"spec\",\n \"type\": \"V1alpha1VolumeAttachmentSpec\"\n },\n {\n \"name\": \"status\",\n \"baseName\": \"status\",\n \"type\": \"V1alpha1VolumeAttachmentStatus\"\n }\n];\n//# sourceMappingURL=v1alpha1VolumeAttachment.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1alpha1VolumeAttachmentList = void 0;\n/**\n* VolumeAttachmentList is a collection of VolumeAttachment objects.\n*/\nclass V1alpha1VolumeAttachmentList {\n static getAttributeTypeMap() {\n return V1alpha1VolumeAttachmentList.attributeTypeMap;\n }\n}\nexports.V1alpha1VolumeAttachmentList = V1alpha1VolumeAttachmentList;\nV1alpha1VolumeAttachmentList.discriminator = undefined;\nV1alpha1VolumeAttachmentList.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"items\",\n \"baseName\": \"items\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ListMeta\"\n }\n];\n//# sourceMappingURL=v1alpha1VolumeAttachmentList.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1alpha1VolumeAttachmentSource = void 0;\n/**\n* VolumeAttachmentSource represents a volume that should be attached. Right now only PersistenVolumes can be attached via external attacher, in future we may allow also inline volumes in pods. Exactly one member can be set.\n*/\nclass V1alpha1VolumeAttachmentSource {\n static getAttributeTypeMap() {\n return V1alpha1VolumeAttachmentSource.attributeTypeMap;\n }\n}\nexports.V1alpha1VolumeAttachmentSource = V1alpha1VolumeAttachmentSource;\nV1alpha1VolumeAttachmentSource.discriminator = undefined;\nV1alpha1VolumeAttachmentSource.attributeTypeMap = [\n {\n \"name\": \"inlineVolumeSpec\",\n \"baseName\": \"inlineVolumeSpec\",\n \"type\": \"V1PersistentVolumeSpec\"\n },\n {\n \"name\": \"persistentVolumeName\",\n \"baseName\": \"persistentVolumeName\",\n \"type\": \"string\"\n }\n];\n//# sourceMappingURL=v1alpha1VolumeAttachmentSource.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1alpha1VolumeAttachmentSpec = void 0;\n/**\n* VolumeAttachmentSpec is the specification of a VolumeAttachment request.\n*/\nclass V1alpha1VolumeAttachmentSpec {\n static getAttributeTypeMap() {\n return V1alpha1VolumeAttachmentSpec.attributeTypeMap;\n }\n}\nexports.V1alpha1VolumeAttachmentSpec = V1alpha1VolumeAttachmentSpec;\nV1alpha1VolumeAttachmentSpec.discriminator = undefined;\nV1alpha1VolumeAttachmentSpec.attributeTypeMap = [\n {\n \"name\": \"attacher\",\n \"baseName\": \"attacher\",\n \"type\": \"string\"\n },\n {\n \"name\": \"nodeName\",\n \"baseName\": \"nodeName\",\n \"type\": \"string\"\n },\n {\n \"name\": \"source\",\n \"baseName\": \"source\",\n \"type\": \"V1alpha1VolumeAttachmentSource\"\n }\n];\n//# sourceMappingURL=v1alpha1VolumeAttachmentSpec.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1alpha1VolumeAttachmentStatus = void 0;\n/**\n* VolumeAttachmentStatus is the status of a VolumeAttachment request.\n*/\nclass V1alpha1VolumeAttachmentStatus {\n static getAttributeTypeMap() {\n return V1alpha1VolumeAttachmentStatus.attributeTypeMap;\n }\n}\nexports.V1alpha1VolumeAttachmentStatus = V1alpha1VolumeAttachmentStatus;\nV1alpha1VolumeAttachmentStatus.discriminator = undefined;\nV1alpha1VolumeAttachmentStatus.attributeTypeMap = [\n {\n \"name\": \"attachError\",\n \"baseName\": \"attachError\",\n \"type\": \"V1alpha1VolumeError\"\n },\n {\n \"name\": \"attached\",\n \"baseName\": \"attached\",\n \"type\": \"boolean\"\n },\n {\n \"name\": \"attachmentMetadata\",\n \"baseName\": \"attachmentMetadata\",\n \"type\": \"{ [key: string]: string; }\"\n },\n {\n \"name\": \"detachError\",\n \"baseName\": \"detachError\",\n \"type\": \"V1alpha1VolumeError\"\n }\n];\n//# sourceMappingURL=v1alpha1VolumeAttachmentStatus.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1alpha1VolumeError = void 0;\n/**\n* VolumeError captures an error encountered during a volume operation.\n*/\nclass V1alpha1VolumeError {\n static getAttributeTypeMap() {\n return V1alpha1VolumeError.attributeTypeMap;\n }\n}\nexports.V1alpha1VolumeError = V1alpha1VolumeError;\nV1alpha1VolumeError.discriminator = undefined;\nV1alpha1VolumeError.attributeTypeMap = [\n {\n \"name\": \"message\",\n \"baseName\": \"message\",\n \"type\": \"string\"\n },\n {\n \"name\": \"time\",\n \"baseName\": \"time\",\n \"type\": \"Date\"\n }\n];\n//# sourceMappingURL=v1alpha1VolumeError.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1beta1AllowedCSIDriver = void 0;\n/**\n* AllowedCSIDriver represents a single inline CSI Driver that is allowed to be used.\n*/\nclass V1beta1AllowedCSIDriver {\n static getAttributeTypeMap() {\n return V1beta1AllowedCSIDriver.attributeTypeMap;\n }\n}\nexports.V1beta1AllowedCSIDriver = V1beta1AllowedCSIDriver;\nV1beta1AllowedCSIDriver.discriminator = undefined;\nV1beta1AllowedCSIDriver.attributeTypeMap = [\n {\n \"name\": \"name\",\n \"baseName\": \"name\",\n \"type\": \"string\"\n }\n];\n//# sourceMappingURL=v1beta1AllowedCSIDriver.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1beta1AllowedFlexVolume = void 0;\n/**\n* AllowedFlexVolume represents a single Flexvolume that is allowed to be used.\n*/\nclass V1beta1AllowedFlexVolume {\n static getAttributeTypeMap() {\n return V1beta1AllowedFlexVolume.attributeTypeMap;\n }\n}\nexports.V1beta1AllowedFlexVolume = V1beta1AllowedFlexVolume;\nV1beta1AllowedFlexVolume.discriminator = undefined;\nV1beta1AllowedFlexVolume.attributeTypeMap = [\n {\n \"name\": \"driver\",\n \"baseName\": \"driver\",\n \"type\": \"string\"\n }\n];\n//# sourceMappingURL=v1beta1AllowedFlexVolume.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1beta1AllowedHostPath = void 0;\n/**\n* AllowedHostPath defines the host volume conditions that will be enabled by a policy for pods to use. It requires the path prefix to be defined.\n*/\nclass V1beta1AllowedHostPath {\n static getAttributeTypeMap() {\n return V1beta1AllowedHostPath.attributeTypeMap;\n }\n}\nexports.V1beta1AllowedHostPath = V1beta1AllowedHostPath;\nV1beta1AllowedHostPath.discriminator = undefined;\nV1beta1AllowedHostPath.attributeTypeMap = [\n {\n \"name\": \"pathPrefix\",\n \"baseName\": \"pathPrefix\",\n \"type\": \"string\"\n },\n {\n \"name\": \"readOnly\",\n \"baseName\": \"readOnly\",\n \"type\": \"boolean\"\n }\n];\n//# sourceMappingURL=v1beta1AllowedHostPath.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1beta1CSIStorageCapacity = void 0;\n/**\n* CSIStorageCapacity stores the result of one CSI GetCapacity call. For a given StorageClass, this describes the available capacity in a particular topology segment. This can be used when considering where to instantiate new PersistentVolumes. For example this can express things like: - StorageClass \\\"standard\\\" has \\\"1234 GiB\\\" available in \\\"topology.kubernetes.io/zone=us-east1\\\" - StorageClass \\\"localssd\\\" has \\\"10 GiB\\\" available in \\\"kubernetes.io/hostname=knode-abc123\\\" The following three cases all imply that no capacity is available for a certain combination: - no object exists with suitable topology and storage class name - such an object exists, but the capacity is unset - such an object exists, but the capacity is zero The producer of these objects can decide which approach is more suitable. They are consumed by the kube-scheduler if the CSIStorageCapacity beta feature gate is enabled there and a CSI driver opts into capacity-aware scheduling with CSIDriver.StorageCapacity.\n*/\nclass V1beta1CSIStorageCapacity {\n static getAttributeTypeMap() {\n return V1beta1CSIStorageCapacity.attributeTypeMap;\n }\n}\nexports.V1beta1CSIStorageCapacity = V1beta1CSIStorageCapacity;\nV1beta1CSIStorageCapacity.discriminator = undefined;\nV1beta1CSIStorageCapacity.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"capacity\",\n \"baseName\": \"capacity\",\n \"type\": \"string\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"maximumVolumeSize\",\n \"baseName\": \"maximumVolumeSize\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ObjectMeta\"\n },\n {\n \"name\": \"nodeTopology\",\n \"baseName\": \"nodeTopology\",\n \"type\": \"V1LabelSelector\"\n },\n {\n \"name\": \"storageClassName\",\n \"baseName\": \"storageClassName\",\n \"type\": \"string\"\n }\n];\n//# sourceMappingURL=v1beta1CSIStorageCapacity.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1beta1CSIStorageCapacityList = void 0;\n/**\n* CSIStorageCapacityList is a collection of CSIStorageCapacity objects.\n*/\nclass V1beta1CSIStorageCapacityList {\n static getAttributeTypeMap() {\n return V1beta1CSIStorageCapacityList.attributeTypeMap;\n }\n}\nexports.V1beta1CSIStorageCapacityList = V1beta1CSIStorageCapacityList;\nV1beta1CSIStorageCapacityList.discriminator = undefined;\nV1beta1CSIStorageCapacityList.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"items\",\n \"baseName\": \"items\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ListMeta\"\n }\n];\n//# sourceMappingURL=v1beta1CSIStorageCapacityList.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1beta1CronJob = void 0;\n/**\n* CronJob represents the configuration of a single cron job.\n*/\nclass V1beta1CronJob {\n static getAttributeTypeMap() {\n return V1beta1CronJob.attributeTypeMap;\n }\n}\nexports.V1beta1CronJob = V1beta1CronJob;\nV1beta1CronJob.discriminator = undefined;\nV1beta1CronJob.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ObjectMeta\"\n },\n {\n \"name\": \"spec\",\n \"baseName\": \"spec\",\n \"type\": \"V1beta1CronJobSpec\"\n },\n {\n \"name\": \"status\",\n \"baseName\": \"status\",\n \"type\": \"V1beta1CronJobStatus\"\n }\n];\n//# sourceMappingURL=v1beta1CronJob.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1beta1CronJobList = void 0;\n/**\n* CronJobList is a collection of cron jobs.\n*/\nclass V1beta1CronJobList {\n static getAttributeTypeMap() {\n return V1beta1CronJobList.attributeTypeMap;\n }\n}\nexports.V1beta1CronJobList = V1beta1CronJobList;\nV1beta1CronJobList.discriminator = undefined;\nV1beta1CronJobList.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"items\",\n \"baseName\": \"items\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ListMeta\"\n }\n];\n//# sourceMappingURL=v1beta1CronJobList.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1beta1CronJobSpec = void 0;\n/**\n* CronJobSpec describes how the job execution will look like and when it will actually run.\n*/\nclass V1beta1CronJobSpec {\n static getAttributeTypeMap() {\n return V1beta1CronJobSpec.attributeTypeMap;\n }\n}\nexports.V1beta1CronJobSpec = V1beta1CronJobSpec;\nV1beta1CronJobSpec.discriminator = undefined;\nV1beta1CronJobSpec.attributeTypeMap = [\n {\n \"name\": \"concurrencyPolicy\",\n \"baseName\": \"concurrencyPolicy\",\n \"type\": \"string\"\n },\n {\n \"name\": \"failedJobsHistoryLimit\",\n \"baseName\": \"failedJobsHistoryLimit\",\n \"type\": \"number\"\n },\n {\n \"name\": \"jobTemplate\",\n \"baseName\": \"jobTemplate\",\n \"type\": \"V1beta1JobTemplateSpec\"\n },\n {\n \"name\": \"schedule\",\n \"baseName\": \"schedule\",\n \"type\": \"string\"\n },\n {\n \"name\": \"startingDeadlineSeconds\",\n \"baseName\": \"startingDeadlineSeconds\",\n \"type\": \"number\"\n },\n {\n \"name\": \"successfulJobsHistoryLimit\",\n \"baseName\": \"successfulJobsHistoryLimit\",\n \"type\": \"number\"\n },\n {\n \"name\": \"suspend\",\n \"baseName\": \"suspend\",\n \"type\": \"boolean\"\n }\n];\n//# sourceMappingURL=v1beta1CronJobSpec.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1beta1CronJobStatus = void 0;\n/**\n* CronJobStatus represents the current state of a cron job.\n*/\nclass V1beta1CronJobStatus {\n static getAttributeTypeMap() {\n return V1beta1CronJobStatus.attributeTypeMap;\n }\n}\nexports.V1beta1CronJobStatus = V1beta1CronJobStatus;\nV1beta1CronJobStatus.discriminator = undefined;\nV1beta1CronJobStatus.attributeTypeMap = [\n {\n \"name\": \"active\",\n \"baseName\": \"active\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"lastScheduleTime\",\n \"baseName\": \"lastScheduleTime\",\n \"type\": \"Date\"\n },\n {\n \"name\": \"lastSuccessfulTime\",\n \"baseName\": \"lastSuccessfulTime\",\n \"type\": \"Date\"\n }\n];\n//# sourceMappingURL=v1beta1CronJobStatus.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1beta1Endpoint = void 0;\n/**\n* Endpoint represents a single logical \\\"backend\\\" implementing a service.\n*/\nclass V1beta1Endpoint {\n static getAttributeTypeMap() {\n return V1beta1Endpoint.attributeTypeMap;\n }\n}\nexports.V1beta1Endpoint = V1beta1Endpoint;\nV1beta1Endpoint.discriminator = undefined;\nV1beta1Endpoint.attributeTypeMap = [\n {\n \"name\": \"addresses\",\n \"baseName\": \"addresses\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"conditions\",\n \"baseName\": \"conditions\",\n \"type\": \"V1beta1EndpointConditions\"\n },\n {\n \"name\": \"hints\",\n \"baseName\": \"hints\",\n \"type\": \"V1beta1EndpointHints\"\n },\n {\n \"name\": \"hostname\",\n \"baseName\": \"hostname\",\n \"type\": \"string\"\n },\n {\n \"name\": \"nodeName\",\n \"baseName\": \"nodeName\",\n \"type\": \"string\"\n },\n {\n \"name\": \"targetRef\",\n \"baseName\": \"targetRef\",\n \"type\": \"V1ObjectReference\"\n },\n {\n \"name\": \"topology\",\n \"baseName\": \"topology\",\n \"type\": \"{ [key: string]: string; }\"\n }\n];\n//# sourceMappingURL=v1beta1Endpoint.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1beta1EndpointConditions = void 0;\n/**\n* EndpointConditions represents the current condition of an endpoint.\n*/\nclass V1beta1EndpointConditions {\n static getAttributeTypeMap() {\n return V1beta1EndpointConditions.attributeTypeMap;\n }\n}\nexports.V1beta1EndpointConditions = V1beta1EndpointConditions;\nV1beta1EndpointConditions.discriminator = undefined;\nV1beta1EndpointConditions.attributeTypeMap = [\n {\n \"name\": \"ready\",\n \"baseName\": \"ready\",\n \"type\": \"boolean\"\n },\n {\n \"name\": \"serving\",\n \"baseName\": \"serving\",\n \"type\": \"boolean\"\n },\n {\n \"name\": \"terminating\",\n \"baseName\": \"terminating\",\n \"type\": \"boolean\"\n }\n];\n//# sourceMappingURL=v1beta1EndpointConditions.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1beta1EndpointHints = void 0;\n/**\n* EndpointHints provides hints describing how an endpoint should be consumed.\n*/\nclass V1beta1EndpointHints {\n static getAttributeTypeMap() {\n return V1beta1EndpointHints.attributeTypeMap;\n }\n}\nexports.V1beta1EndpointHints = V1beta1EndpointHints;\nV1beta1EndpointHints.discriminator = undefined;\nV1beta1EndpointHints.attributeTypeMap = [\n {\n \"name\": \"forZones\",\n \"baseName\": \"forZones\",\n \"type\": \"Array\"\n }\n];\n//# sourceMappingURL=v1beta1EndpointHints.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1beta1EndpointPort = void 0;\n/**\n* EndpointPort represents a Port used by an EndpointSlice\n*/\nclass V1beta1EndpointPort {\n static getAttributeTypeMap() {\n return V1beta1EndpointPort.attributeTypeMap;\n }\n}\nexports.V1beta1EndpointPort = V1beta1EndpointPort;\nV1beta1EndpointPort.discriminator = undefined;\nV1beta1EndpointPort.attributeTypeMap = [\n {\n \"name\": \"appProtocol\",\n \"baseName\": \"appProtocol\",\n \"type\": \"string\"\n },\n {\n \"name\": \"name\",\n \"baseName\": \"name\",\n \"type\": \"string\"\n },\n {\n \"name\": \"port\",\n \"baseName\": \"port\",\n \"type\": \"number\"\n },\n {\n \"name\": \"protocol\",\n \"baseName\": \"protocol\",\n \"type\": \"string\"\n }\n];\n//# sourceMappingURL=v1beta1EndpointPort.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1beta1EndpointSlice = void 0;\n/**\n* 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.\n*/\nclass V1beta1EndpointSlice {\n static getAttributeTypeMap() {\n return V1beta1EndpointSlice.attributeTypeMap;\n }\n}\nexports.V1beta1EndpointSlice = V1beta1EndpointSlice;\nV1beta1EndpointSlice.discriminator = undefined;\nV1beta1EndpointSlice.attributeTypeMap = [\n {\n \"name\": \"addressType\",\n \"baseName\": \"addressType\",\n \"type\": \"string\"\n },\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"endpoints\",\n \"baseName\": \"endpoints\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ObjectMeta\"\n },\n {\n \"name\": \"ports\",\n \"baseName\": \"ports\",\n \"type\": \"Array\"\n }\n];\n//# sourceMappingURL=v1beta1EndpointSlice.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1beta1EndpointSliceList = void 0;\n/**\n* EndpointSliceList represents a list of endpoint slices\n*/\nclass V1beta1EndpointSliceList {\n static getAttributeTypeMap() {\n return V1beta1EndpointSliceList.attributeTypeMap;\n }\n}\nexports.V1beta1EndpointSliceList = V1beta1EndpointSliceList;\nV1beta1EndpointSliceList.discriminator = undefined;\nV1beta1EndpointSliceList.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"items\",\n \"baseName\": \"items\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ListMeta\"\n }\n];\n//# sourceMappingURL=v1beta1EndpointSliceList.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1beta1Event = void 0;\n/**\n* 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.\n*/\nclass V1beta1Event {\n static getAttributeTypeMap() {\n return V1beta1Event.attributeTypeMap;\n }\n}\nexports.V1beta1Event = V1beta1Event;\nV1beta1Event.discriminator = undefined;\nV1beta1Event.attributeTypeMap = [\n {\n \"name\": \"action\",\n \"baseName\": \"action\",\n \"type\": \"string\"\n },\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"deprecatedCount\",\n \"baseName\": \"deprecatedCount\",\n \"type\": \"number\"\n },\n {\n \"name\": \"deprecatedFirstTimestamp\",\n \"baseName\": \"deprecatedFirstTimestamp\",\n \"type\": \"Date\"\n },\n {\n \"name\": \"deprecatedLastTimestamp\",\n \"baseName\": \"deprecatedLastTimestamp\",\n \"type\": \"Date\"\n },\n {\n \"name\": \"deprecatedSource\",\n \"baseName\": \"deprecatedSource\",\n \"type\": \"V1EventSource\"\n },\n {\n \"name\": \"eventTime\",\n \"baseName\": \"eventTime\",\n \"type\": \"Date\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ObjectMeta\"\n },\n {\n \"name\": \"note\",\n \"baseName\": \"note\",\n \"type\": \"string\"\n },\n {\n \"name\": \"reason\",\n \"baseName\": \"reason\",\n \"type\": \"string\"\n },\n {\n \"name\": \"regarding\",\n \"baseName\": \"regarding\",\n \"type\": \"V1ObjectReference\"\n },\n {\n \"name\": \"related\",\n \"baseName\": \"related\",\n \"type\": \"V1ObjectReference\"\n },\n {\n \"name\": \"reportingController\",\n \"baseName\": \"reportingController\",\n \"type\": \"string\"\n },\n {\n \"name\": \"reportingInstance\",\n \"baseName\": \"reportingInstance\",\n \"type\": \"string\"\n },\n {\n \"name\": \"series\",\n \"baseName\": \"series\",\n \"type\": \"V1beta1EventSeries\"\n },\n {\n \"name\": \"type\",\n \"baseName\": \"type\",\n \"type\": \"string\"\n }\n];\n//# sourceMappingURL=v1beta1Event.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1beta1EventList = void 0;\n/**\n* EventList is a list of Event objects.\n*/\nclass V1beta1EventList {\n static getAttributeTypeMap() {\n return V1beta1EventList.attributeTypeMap;\n }\n}\nexports.V1beta1EventList = V1beta1EventList;\nV1beta1EventList.discriminator = undefined;\nV1beta1EventList.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"items\",\n \"baseName\": \"items\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ListMeta\"\n }\n];\n//# sourceMappingURL=v1beta1EventList.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1beta1EventSeries = void 0;\n/**\n* EventSeries contain information on series of events, i.e. thing that was/is happening continuously for some time.\n*/\nclass V1beta1EventSeries {\n static getAttributeTypeMap() {\n return V1beta1EventSeries.attributeTypeMap;\n }\n}\nexports.V1beta1EventSeries = V1beta1EventSeries;\nV1beta1EventSeries.discriminator = undefined;\nV1beta1EventSeries.attributeTypeMap = [\n {\n \"name\": \"count\",\n \"baseName\": \"count\",\n \"type\": \"number\"\n },\n {\n \"name\": \"lastObservedTime\",\n \"baseName\": \"lastObservedTime\",\n \"type\": \"Date\"\n }\n];\n//# sourceMappingURL=v1beta1EventSeries.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1beta1FSGroupStrategyOptions = void 0;\n/**\n* FSGroupStrategyOptions defines the strategy type and options used to create the strategy.\n*/\nclass V1beta1FSGroupStrategyOptions {\n static getAttributeTypeMap() {\n return V1beta1FSGroupStrategyOptions.attributeTypeMap;\n }\n}\nexports.V1beta1FSGroupStrategyOptions = V1beta1FSGroupStrategyOptions;\nV1beta1FSGroupStrategyOptions.discriminator = undefined;\nV1beta1FSGroupStrategyOptions.attributeTypeMap = [\n {\n \"name\": \"ranges\",\n \"baseName\": \"ranges\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"rule\",\n \"baseName\": \"rule\",\n \"type\": \"string\"\n }\n];\n//# sourceMappingURL=v1beta1FSGroupStrategyOptions.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1beta1FlowDistinguisherMethod = void 0;\n/**\n* FlowDistinguisherMethod specifies the method of a flow distinguisher.\n*/\nclass V1beta1FlowDistinguisherMethod {\n static getAttributeTypeMap() {\n return V1beta1FlowDistinguisherMethod.attributeTypeMap;\n }\n}\nexports.V1beta1FlowDistinguisherMethod = V1beta1FlowDistinguisherMethod;\nV1beta1FlowDistinguisherMethod.discriminator = undefined;\nV1beta1FlowDistinguisherMethod.attributeTypeMap = [\n {\n \"name\": \"type\",\n \"baseName\": \"type\",\n \"type\": \"string\"\n }\n];\n//# sourceMappingURL=v1beta1FlowDistinguisherMethod.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1beta1FlowSchema = void 0;\n/**\n* FlowSchema defines the schema of a group of flows. Note that a flow is made up of a set of inbound API requests with similar attributes and is identified by a pair of strings: the name of the FlowSchema and a \\\"flow distinguisher\\\".\n*/\nclass V1beta1FlowSchema {\n static getAttributeTypeMap() {\n return V1beta1FlowSchema.attributeTypeMap;\n }\n}\nexports.V1beta1FlowSchema = V1beta1FlowSchema;\nV1beta1FlowSchema.discriminator = undefined;\nV1beta1FlowSchema.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ObjectMeta\"\n },\n {\n \"name\": \"spec\",\n \"baseName\": \"spec\",\n \"type\": \"V1beta1FlowSchemaSpec\"\n },\n {\n \"name\": \"status\",\n \"baseName\": \"status\",\n \"type\": \"V1beta1FlowSchemaStatus\"\n }\n];\n//# sourceMappingURL=v1beta1FlowSchema.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1beta1FlowSchemaCondition = void 0;\n/**\n* FlowSchemaCondition describes conditions for a FlowSchema.\n*/\nclass V1beta1FlowSchemaCondition {\n static getAttributeTypeMap() {\n return V1beta1FlowSchemaCondition.attributeTypeMap;\n }\n}\nexports.V1beta1FlowSchemaCondition = V1beta1FlowSchemaCondition;\nV1beta1FlowSchemaCondition.discriminator = undefined;\nV1beta1FlowSchemaCondition.attributeTypeMap = [\n {\n \"name\": \"lastTransitionTime\",\n \"baseName\": \"lastTransitionTime\",\n \"type\": \"Date\"\n },\n {\n \"name\": \"message\",\n \"baseName\": \"message\",\n \"type\": \"string\"\n },\n {\n \"name\": \"reason\",\n \"baseName\": \"reason\",\n \"type\": \"string\"\n },\n {\n \"name\": \"status\",\n \"baseName\": \"status\",\n \"type\": \"string\"\n },\n {\n \"name\": \"type\",\n \"baseName\": \"type\",\n \"type\": \"string\"\n }\n];\n//# sourceMappingURL=v1beta1FlowSchemaCondition.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1beta1FlowSchemaList = void 0;\n/**\n* FlowSchemaList is a list of FlowSchema objects.\n*/\nclass V1beta1FlowSchemaList {\n static getAttributeTypeMap() {\n return V1beta1FlowSchemaList.attributeTypeMap;\n }\n}\nexports.V1beta1FlowSchemaList = V1beta1FlowSchemaList;\nV1beta1FlowSchemaList.discriminator = undefined;\nV1beta1FlowSchemaList.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"items\",\n \"baseName\": \"items\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ListMeta\"\n }\n];\n//# sourceMappingURL=v1beta1FlowSchemaList.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1beta1FlowSchemaSpec = void 0;\n/**\n* FlowSchemaSpec describes how the FlowSchema\\'s specification looks like.\n*/\nclass V1beta1FlowSchemaSpec {\n static getAttributeTypeMap() {\n return V1beta1FlowSchemaSpec.attributeTypeMap;\n }\n}\nexports.V1beta1FlowSchemaSpec = V1beta1FlowSchemaSpec;\nV1beta1FlowSchemaSpec.discriminator = undefined;\nV1beta1FlowSchemaSpec.attributeTypeMap = [\n {\n \"name\": \"distinguisherMethod\",\n \"baseName\": \"distinguisherMethod\",\n \"type\": \"V1beta1FlowDistinguisherMethod\"\n },\n {\n \"name\": \"matchingPrecedence\",\n \"baseName\": \"matchingPrecedence\",\n \"type\": \"number\"\n },\n {\n \"name\": \"priorityLevelConfiguration\",\n \"baseName\": \"priorityLevelConfiguration\",\n \"type\": \"V1beta1PriorityLevelConfigurationReference\"\n },\n {\n \"name\": \"rules\",\n \"baseName\": \"rules\",\n \"type\": \"Array\"\n }\n];\n//# sourceMappingURL=v1beta1FlowSchemaSpec.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1beta1FlowSchemaStatus = void 0;\n/**\n* FlowSchemaStatus represents the current state of a FlowSchema.\n*/\nclass V1beta1FlowSchemaStatus {\n static getAttributeTypeMap() {\n return V1beta1FlowSchemaStatus.attributeTypeMap;\n }\n}\nexports.V1beta1FlowSchemaStatus = V1beta1FlowSchemaStatus;\nV1beta1FlowSchemaStatus.discriminator = undefined;\nV1beta1FlowSchemaStatus.attributeTypeMap = [\n {\n \"name\": \"conditions\",\n \"baseName\": \"conditions\",\n \"type\": \"Array\"\n }\n];\n//# sourceMappingURL=v1beta1FlowSchemaStatus.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1beta1ForZone = void 0;\n/**\n* ForZone provides information about which zones should consume this endpoint.\n*/\nclass V1beta1ForZone {\n static getAttributeTypeMap() {\n return V1beta1ForZone.attributeTypeMap;\n }\n}\nexports.V1beta1ForZone = V1beta1ForZone;\nV1beta1ForZone.discriminator = undefined;\nV1beta1ForZone.attributeTypeMap = [\n {\n \"name\": \"name\",\n \"baseName\": \"name\",\n \"type\": \"string\"\n }\n];\n//# sourceMappingURL=v1beta1ForZone.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1beta1GroupSubject = void 0;\n/**\n* GroupSubject holds detailed information for group-kind subject.\n*/\nclass V1beta1GroupSubject {\n static getAttributeTypeMap() {\n return V1beta1GroupSubject.attributeTypeMap;\n }\n}\nexports.V1beta1GroupSubject = V1beta1GroupSubject;\nV1beta1GroupSubject.discriminator = undefined;\nV1beta1GroupSubject.attributeTypeMap = [\n {\n \"name\": \"name\",\n \"baseName\": \"name\",\n \"type\": \"string\"\n }\n];\n//# sourceMappingURL=v1beta1GroupSubject.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1beta1HostPortRange = void 0;\n/**\n* HostPortRange defines a range of host ports that will be enabled by a policy for pods to use. It requires both the start and end to be defined.\n*/\nclass V1beta1HostPortRange {\n static getAttributeTypeMap() {\n return V1beta1HostPortRange.attributeTypeMap;\n }\n}\nexports.V1beta1HostPortRange = V1beta1HostPortRange;\nV1beta1HostPortRange.discriminator = undefined;\nV1beta1HostPortRange.attributeTypeMap = [\n {\n \"name\": \"max\",\n \"baseName\": \"max\",\n \"type\": \"number\"\n },\n {\n \"name\": \"min\",\n \"baseName\": \"min\",\n \"type\": \"number\"\n }\n];\n//# sourceMappingURL=v1beta1HostPortRange.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1beta1IDRange = void 0;\n/**\n* IDRange provides a min/max of an allowed range of IDs.\n*/\nclass V1beta1IDRange {\n static getAttributeTypeMap() {\n return V1beta1IDRange.attributeTypeMap;\n }\n}\nexports.V1beta1IDRange = V1beta1IDRange;\nV1beta1IDRange.discriminator = undefined;\nV1beta1IDRange.attributeTypeMap = [\n {\n \"name\": \"max\",\n \"baseName\": \"max\",\n \"type\": \"number\"\n },\n {\n \"name\": \"min\",\n \"baseName\": \"min\",\n \"type\": \"number\"\n }\n];\n//# sourceMappingURL=v1beta1IDRange.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1beta1JobTemplateSpec = void 0;\n/**\n* JobTemplateSpec describes the data a Job should have when created from a template\n*/\nclass V1beta1JobTemplateSpec {\n static getAttributeTypeMap() {\n return V1beta1JobTemplateSpec.attributeTypeMap;\n }\n}\nexports.V1beta1JobTemplateSpec = V1beta1JobTemplateSpec;\nV1beta1JobTemplateSpec.discriminator = undefined;\nV1beta1JobTemplateSpec.attributeTypeMap = [\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ObjectMeta\"\n },\n {\n \"name\": \"spec\",\n \"baseName\": \"spec\",\n \"type\": \"V1JobSpec\"\n }\n];\n//# sourceMappingURL=v1beta1JobTemplateSpec.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1beta1LimitResponse = void 0;\n/**\n* LimitResponse defines how to handle requests that can not be executed right now.\n*/\nclass V1beta1LimitResponse {\n static getAttributeTypeMap() {\n return V1beta1LimitResponse.attributeTypeMap;\n }\n}\nexports.V1beta1LimitResponse = V1beta1LimitResponse;\nV1beta1LimitResponse.discriminator = undefined;\nV1beta1LimitResponse.attributeTypeMap = [\n {\n \"name\": \"queuing\",\n \"baseName\": \"queuing\",\n \"type\": \"V1beta1QueuingConfiguration\"\n },\n {\n \"name\": \"type\",\n \"baseName\": \"type\",\n \"type\": \"string\"\n }\n];\n//# sourceMappingURL=v1beta1LimitResponse.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1beta1LimitedPriorityLevelConfiguration = void 0;\n/**\n* LimitedPriorityLevelConfiguration specifies how to handle requests that are subject to limits. It addresses two issues: * How are requests for this priority level limited? * What should be done with requests that exceed the limit?\n*/\nclass V1beta1LimitedPriorityLevelConfiguration {\n static getAttributeTypeMap() {\n return V1beta1LimitedPriorityLevelConfiguration.attributeTypeMap;\n }\n}\nexports.V1beta1LimitedPriorityLevelConfiguration = V1beta1LimitedPriorityLevelConfiguration;\nV1beta1LimitedPriorityLevelConfiguration.discriminator = undefined;\nV1beta1LimitedPriorityLevelConfiguration.attributeTypeMap = [\n {\n \"name\": \"assuredConcurrencyShares\",\n \"baseName\": \"assuredConcurrencyShares\",\n \"type\": \"number\"\n },\n {\n \"name\": \"limitResponse\",\n \"baseName\": \"limitResponse\",\n \"type\": \"V1beta1LimitResponse\"\n }\n];\n//# sourceMappingURL=v1beta1LimitedPriorityLevelConfiguration.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1beta1NonResourcePolicyRule = void 0;\n/**\n* NonResourcePolicyRule is a predicate that matches non-resource requests according to their verb and the target non-resource URL. A NonResourcePolicyRule matches a request if and only if both (a) at least one member of verbs matches the request and (b) at least one member of nonResourceURLs matches the request.\n*/\nclass V1beta1NonResourcePolicyRule {\n static getAttributeTypeMap() {\n return V1beta1NonResourcePolicyRule.attributeTypeMap;\n }\n}\nexports.V1beta1NonResourcePolicyRule = V1beta1NonResourcePolicyRule;\nV1beta1NonResourcePolicyRule.discriminator = undefined;\nV1beta1NonResourcePolicyRule.attributeTypeMap = [\n {\n \"name\": \"nonResourceURLs\",\n \"baseName\": \"nonResourceURLs\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"verbs\",\n \"baseName\": \"verbs\",\n \"type\": \"Array\"\n }\n];\n//# sourceMappingURL=v1beta1NonResourcePolicyRule.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1beta1Overhead = void 0;\n/**\n* Overhead structure represents the resource overhead associated with running a pod.\n*/\nclass V1beta1Overhead {\n static getAttributeTypeMap() {\n return V1beta1Overhead.attributeTypeMap;\n }\n}\nexports.V1beta1Overhead = V1beta1Overhead;\nV1beta1Overhead.discriminator = undefined;\nV1beta1Overhead.attributeTypeMap = [\n {\n \"name\": \"podFixed\",\n \"baseName\": \"podFixed\",\n \"type\": \"{ [key: string]: string; }\"\n }\n];\n//# sourceMappingURL=v1beta1Overhead.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1beta1PodDisruptionBudget = void 0;\n/**\n* PodDisruptionBudget is an object to define the max disruption that can be caused to a collection of pods\n*/\nclass V1beta1PodDisruptionBudget {\n static getAttributeTypeMap() {\n return V1beta1PodDisruptionBudget.attributeTypeMap;\n }\n}\nexports.V1beta1PodDisruptionBudget = V1beta1PodDisruptionBudget;\nV1beta1PodDisruptionBudget.discriminator = undefined;\nV1beta1PodDisruptionBudget.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ObjectMeta\"\n },\n {\n \"name\": \"spec\",\n \"baseName\": \"spec\",\n \"type\": \"V1beta1PodDisruptionBudgetSpec\"\n },\n {\n \"name\": \"status\",\n \"baseName\": \"status\",\n \"type\": \"V1beta1PodDisruptionBudgetStatus\"\n }\n];\n//# sourceMappingURL=v1beta1PodDisruptionBudget.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1beta1PodDisruptionBudgetList = void 0;\n/**\n* PodDisruptionBudgetList is a collection of PodDisruptionBudgets.\n*/\nclass V1beta1PodDisruptionBudgetList {\n static getAttributeTypeMap() {\n return V1beta1PodDisruptionBudgetList.attributeTypeMap;\n }\n}\nexports.V1beta1PodDisruptionBudgetList = V1beta1PodDisruptionBudgetList;\nV1beta1PodDisruptionBudgetList.discriminator = undefined;\nV1beta1PodDisruptionBudgetList.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"items\",\n \"baseName\": \"items\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ListMeta\"\n }\n];\n//# sourceMappingURL=v1beta1PodDisruptionBudgetList.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1beta1PodDisruptionBudgetSpec = void 0;\n/**\n* PodDisruptionBudgetSpec is a description of a PodDisruptionBudget.\n*/\nclass V1beta1PodDisruptionBudgetSpec {\n static getAttributeTypeMap() {\n return V1beta1PodDisruptionBudgetSpec.attributeTypeMap;\n }\n}\nexports.V1beta1PodDisruptionBudgetSpec = V1beta1PodDisruptionBudgetSpec;\nV1beta1PodDisruptionBudgetSpec.discriminator = undefined;\nV1beta1PodDisruptionBudgetSpec.attributeTypeMap = [\n {\n \"name\": \"maxUnavailable\",\n \"baseName\": \"maxUnavailable\",\n \"type\": \"IntOrString\"\n },\n {\n \"name\": \"minAvailable\",\n \"baseName\": \"minAvailable\",\n \"type\": \"IntOrString\"\n },\n {\n \"name\": \"selector\",\n \"baseName\": \"selector\",\n \"type\": \"V1LabelSelector\"\n }\n];\n//# sourceMappingURL=v1beta1PodDisruptionBudgetSpec.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1beta1PodDisruptionBudgetStatus = void 0;\n/**\n* PodDisruptionBudgetStatus represents information about the status of a PodDisruptionBudget. Status may trail the actual state of a system.\n*/\nclass V1beta1PodDisruptionBudgetStatus {\n static getAttributeTypeMap() {\n return V1beta1PodDisruptionBudgetStatus.attributeTypeMap;\n }\n}\nexports.V1beta1PodDisruptionBudgetStatus = V1beta1PodDisruptionBudgetStatus;\nV1beta1PodDisruptionBudgetStatus.discriminator = undefined;\nV1beta1PodDisruptionBudgetStatus.attributeTypeMap = [\n {\n \"name\": \"conditions\",\n \"baseName\": \"conditions\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"currentHealthy\",\n \"baseName\": \"currentHealthy\",\n \"type\": \"number\"\n },\n {\n \"name\": \"desiredHealthy\",\n \"baseName\": \"desiredHealthy\",\n \"type\": \"number\"\n },\n {\n \"name\": \"disruptedPods\",\n \"baseName\": \"disruptedPods\",\n \"type\": \"{ [key: string]: Date; }\"\n },\n {\n \"name\": \"disruptionsAllowed\",\n \"baseName\": \"disruptionsAllowed\",\n \"type\": \"number\"\n },\n {\n \"name\": \"expectedPods\",\n \"baseName\": \"expectedPods\",\n \"type\": \"number\"\n },\n {\n \"name\": \"observedGeneration\",\n \"baseName\": \"observedGeneration\",\n \"type\": \"number\"\n }\n];\n//# sourceMappingURL=v1beta1PodDisruptionBudgetStatus.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1beta1PodSecurityPolicy = void 0;\n/**\n* PodSecurityPolicy governs the ability to make requests that affect the Security Context that will be applied to a pod and container. Deprecated in 1.21.\n*/\nclass V1beta1PodSecurityPolicy {\n static getAttributeTypeMap() {\n return V1beta1PodSecurityPolicy.attributeTypeMap;\n }\n}\nexports.V1beta1PodSecurityPolicy = V1beta1PodSecurityPolicy;\nV1beta1PodSecurityPolicy.discriminator = undefined;\nV1beta1PodSecurityPolicy.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ObjectMeta\"\n },\n {\n \"name\": \"spec\",\n \"baseName\": \"spec\",\n \"type\": \"V1beta1PodSecurityPolicySpec\"\n }\n];\n//# sourceMappingURL=v1beta1PodSecurityPolicy.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1beta1PodSecurityPolicyList = void 0;\n/**\n* PodSecurityPolicyList is a list of PodSecurityPolicy objects.\n*/\nclass V1beta1PodSecurityPolicyList {\n static getAttributeTypeMap() {\n return V1beta1PodSecurityPolicyList.attributeTypeMap;\n }\n}\nexports.V1beta1PodSecurityPolicyList = V1beta1PodSecurityPolicyList;\nV1beta1PodSecurityPolicyList.discriminator = undefined;\nV1beta1PodSecurityPolicyList.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"items\",\n \"baseName\": \"items\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ListMeta\"\n }\n];\n//# sourceMappingURL=v1beta1PodSecurityPolicyList.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1beta1PodSecurityPolicySpec = void 0;\n/**\n* PodSecurityPolicySpec defines the policy enforced.\n*/\nclass V1beta1PodSecurityPolicySpec {\n static getAttributeTypeMap() {\n return V1beta1PodSecurityPolicySpec.attributeTypeMap;\n }\n}\nexports.V1beta1PodSecurityPolicySpec = V1beta1PodSecurityPolicySpec;\nV1beta1PodSecurityPolicySpec.discriminator = undefined;\nV1beta1PodSecurityPolicySpec.attributeTypeMap = [\n {\n \"name\": \"allowPrivilegeEscalation\",\n \"baseName\": \"allowPrivilegeEscalation\",\n \"type\": \"boolean\"\n },\n {\n \"name\": \"allowedCSIDrivers\",\n \"baseName\": \"allowedCSIDrivers\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"allowedCapabilities\",\n \"baseName\": \"allowedCapabilities\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"allowedFlexVolumes\",\n \"baseName\": \"allowedFlexVolumes\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"allowedHostPaths\",\n \"baseName\": \"allowedHostPaths\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"allowedProcMountTypes\",\n \"baseName\": \"allowedProcMountTypes\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"allowedUnsafeSysctls\",\n \"baseName\": \"allowedUnsafeSysctls\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"defaultAddCapabilities\",\n \"baseName\": \"defaultAddCapabilities\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"defaultAllowPrivilegeEscalation\",\n \"baseName\": \"defaultAllowPrivilegeEscalation\",\n \"type\": \"boolean\"\n },\n {\n \"name\": \"forbiddenSysctls\",\n \"baseName\": \"forbiddenSysctls\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"fsGroup\",\n \"baseName\": \"fsGroup\",\n \"type\": \"V1beta1FSGroupStrategyOptions\"\n },\n {\n \"name\": \"hostIPC\",\n \"baseName\": \"hostIPC\",\n \"type\": \"boolean\"\n },\n {\n \"name\": \"hostNetwork\",\n \"baseName\": \"hostNetwork\",\n \"type\": \"boolean\"\n },\n {\n \"name\": \"hostPID\",\n \"baseName\": \"hostPID\",\n \"type\": \"boolean\"\n },\n {\n \"name\": \"hostPorts\",\n \"baseName\": \"hostPorts\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"privileged\",\n \"baseName\": \"privileged\",\n \"type\": \"boolean\"\n },\n {\n \"name\": \"readOnlyRootFilesystem\",\n \"baseName\": \"readOnlyRootFilesystem\",\n \"type\": \"boolean\"\n },\n {\n \"name\": \"requiredDropCapabilities\",\n \"baseName\": \"requiredDropCapabilities\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"runAsGroup\",\n \"baseName\": \"runAsGroup\",\n \"type\": \"V1beta1RunAsGroupStrategyOptions\"\n },\n {\n \"name\": \"runAsUser\",\n \"baseName\": \"runAsUser\",\n \"type\": \"V1beta1RunAsUserStrategyOptions\"\n },\n {\n \"name\": \"runtimeClass\",\n \"baseName\": \"runtimeClass\",\n \"type\": \"V1beta1RuntimeClassStrategyOptions\"\n },\n {\n \"name\": \"seLinux\",\n \"baseName\": \"seLinux\",\n \"type\": \"V1beta1SELinuxStrategyOptions\"\n },\n {\n \"name\": \"supplementalGroups\",\n \"baseName\": \"supplementalGroups\",\n \"type\": \"V1beta1SupplementalGroupsStrategyOptions\"\n },\n {\n \"name\": \"volumes\",\n \"baseName\": \"volumes\",\n \"type\": \"Array\"\n }\n];\n//# sourceMappingURL=v1beta1PodSecurityPolicySpec.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1beta1PolicyRulesWithSubjects = void 0;\n/**\n* PolicyRulesWithSubjects prescribes a test that applies to a request to an apiserver. The test considers the subject making the request, the verb being requested, and the resource to be acted upon. This PolicyRulesWithSubjects matches a request if and only if both (a) at least one member of subjects matches the request and (b) at least one member of resourceRules or nonResourceRules matches the request.\n*/\nclass V1beta1PolicyRulesWithSubjects {\n static getAttributeTypeMap() {\n return V1beta1PolicyRulesWithSubjects.attributeTypeMap;\n }\n}\nexports.V1beta1PolicyRulesWithSubjects = V1beta1PolicyRulesWithSubjects;\nV1beta1PolicyRulesWithSubjects.discriminator = undefined;\nV1beta1PolicyRulesWithSubjects.attributeTypeMap = [\n {\n \"name\": \"nonResourceRules\",\n \"baseName\": \"nonResourceRules\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"resourceRules\",\n \"baseName\": \"resourceRules\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"subjects\",\n \"baseName\": \"subjects\",\n \"type\": \"Array\"\n }\n];\n//# sourceMappingURL=v1beta1PolicyRulesWithSubjects.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1beta1PriorityLevelConfiguration = void 0;\n/**\n* PriorityLevelConfiguration represents the configuration of a priority level.\n*/\nclass V1beta1PriorityLevelConfiguration {\n static getAttributeTypeMap() {\n return V1beta1PriorityLevelConfiguration.attributeTypeMap;\n }\n}\nexports.V1beta1PriorityLevelConfiguration = V1beta1PriorityLevelConfiguration;\nV1beta1PriorityLevelConfiguration.discriminator = undefined;\nV1beta1PriorityLevelConfiguration.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ObjectMeta\"\n },\n {\n \"name\": \"spec\",\n \"baseName\": \"spec\",\n \"type\": \"V1beta1PriorityLevelConfigurationSpec\"\n },\n {\n \"name\": \"status\",\n \"baseName\": \"status\",\n \"type\": \"V1beta1PriorityLevelConfigurationStatus\"\n }\n];\n//# sourceMappingURL=v1beta1PriorityLevelConfiguration.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1beta1PriorityLevelConfigurationCondition = void 0;\n/**\n* PriorityLevelConfigurationCondition defines the condition of priority level.\n*/\nclass V1beta1PriorityLevelConfigurationCondition {\n static getAttributeTypeMap() {\n return V1beta1PriorityLevelConfigurationCondition.attributeTypeMap;\n }\n}\nexports.V1beta1PriorityLevelConfigurationCondition = V1beta1PriorityLevelConfigurationCondition;\nV1beta1PriorityLevelConfigurationCondition.discriminator = undefined;\nV1beta1PriorityLevelConfigurationCondition.attributeTypeMap = [\n {\n \"name\": \"lastTransitionTime\",\n \"baseName\": \"lastTransitionTime\",\n \"type\": \"Date\"\n },\n {\n \"name\": \"message\",\n \"baseName\": \"message\",\n \"type\": \"string\"\n },\n {\n \"name\": \"reason\",\n \"baseName\": \"reason\",\n \"type\": \"string\"\n },\n {\n \"name\": \"status\",\n \"baseName\": \"status\",\n \"type\": \"string\"\n },\n {\n \"name\": \"type\",\n \"baseName\": \"type\",\n \"type\": \"string\"\n }\n];\n//# sourceMappingURL=v1beta1PriorityLevelConfigurationCondition.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1beta1PriorityLevelConfigurationList = void 0;\n/**\n* PriorityLevelConfigurationList is a list of PriorityLevelConfiguration objects.\n*/\nclass V1beta1PriorityLevelConfigurationList {\n static getAttributeTypeMap() {\n return V1beta1PriorityLevelConfigurationList.attributeTypeMap;\n }\n}\nexports.V1beta1PriorityLevelConfigurationList = V1beta1PriorityLevelConfigurationList;\nV1beta1PriorityLevelConfigurationList.discriminator = undefined;\nV1beta1PriorityLevelConfigurationList.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"items\",\n \"baseName\": \"items\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ListMeta\"\n }\n];\n//# sourceMappingURL=v1beta1PriorityLevelConfigurationList.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1beta1PriorityLevelConfigurationReference = void 0;\n/**\n* PriorityLevelConfigurationReference contains information that points to the \\\"request-priority\\\" being used.\n*/\nclass V1beta1PriorityLevelConfigurationReference {\n static getAttributeTypeMap() {\n return V1beta1PriorityLevelConfigurationReference.attributeTypeMap;\n }\n}\nexports.V1beta1PriorityLevelConfigurationReference = V1beta1PriorityLevelConfigurationReference;\nV1beta1PriorityLevelConfigurationReference.discriminator = undefined;\nV1beta1PriorityLevelConfigurationReference.attributeTypeMap = [\n {\n \"name\": \"name\",\n \"baseName\": \"name\",\n \"type\": \"string\"\n }\n];\n//# sourceMappingURL=v1beta1PriorityLevelConfigurationReference.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1beta1PriorityLevelConfigurationSpec = void 0;\n/**\n* PriorityLevelConfigurationSpec specifies the configuration of a priority level.\n*/\nclass V1beta1PriorityLevelConfigurationSpec {\n static getAttributeTypeMap() {\n return V1beta1PriorityLevelConfigurationSpec.attributeTypeMap;\n }\n}\nexports.V1beta1PriorityLevelConfigurationSpec = V1beta1PriorityLevelConfigurationSpec;\nV1beta1PriorityLevelConfigurationSpec.discriminator = undefined;\nV1beta1PriorityLevelConfigurationSpec.attributeTypeMap = [\n {\n \"name\": \"limited\",\n \"baseName\": \"limited\",\n \"type\": \"V1beta1LimitedPriorityLevelConfiguration\"\n },\n {\n \"name\": \"type\",\n \"baseName\": \"type\",\n \"type\": \"string\"\n }\n];\n//# sourceMappingURL=v1beta1PriorityLevelConfigurationSpec.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1beta1PriorityLevelConfigurationStatus = void 0;\n/**\n* PriorityLevelConfigurationStatus represents the current state of a \\\"request-priority\\\".\n*/\nclass V1beta1PriorityLevelConfigurationStatus {\n static getAttributeTypeMap() {\n return V1beta1PriorityLevelConfigurationStatus.attributeTypeMap;\n }\n}\nexports.V1beta1PriorityLevelConfigurationStatus = V1beta1PriorityLevelConfigurationStatus;\nV1beta1PriorityLevelConfigurationStatus.discriminator = undefined;\nV1beta1PriorityLevelConfigurationStatus.attributeTypeMap = [\n {\n \"name\": \"conditions\",\n \"baseName\": \"conditions\",\n \"type\": \"Array\"\n }\n];\n//# sourceMappingURL=v1beta1PriorityLevelConfigurationStatus.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1beta1QueuingConfiguration = void 0;\n/**\n* QueuingConfiguration holds the configuration parameters for queuing\n*/\nclass V1beta1QueuingConfiguration {\n static getAttributeTypeMap() {\n return V1beta1QueuingConfiguration.attributeTypeMap;\n }\n}\nexports.V1beta1QueuingConfiguration = V1beta1QueuingConfiguration;\nV1beta1QueuingConfiguration.discriminator = undefined;\nV1beta1QueuingConfiguration.attributeTypeMap = [\n {\n \"name\": \"handSize\",\n \"baseName\": \"handSize\",\n \"type\": \"number\"\n },\n {\n \"name\": \"queueLengthLimit\",\n \"baseName\": \"queueLengthLimit\",\n \"type\": \"number\"\n },\n {\n \"name\": \"queues\",\n \"baseName\": \"queues\",\n \"type\": \"number\"\n }\n];\n//# sourceMappingURL=v1beta1QueuingConfiguration.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1beta1ResourcePolicyRule = void 0;\n/**\n* ResourcePolicyRule is a predicate that matches some resource requests, testing the request\\'s verb and the target resource. A ResourcePolicyRule matches a resource request if and only if: (a) at least one member of verbs matches the request, (b) at least one member of apiGroups matches the request, (c) at least one member of resources matches the request, and (d) least one member of namespaces matches the request.\n*/\nclass V1beta1ResourcePolicyRule {\n static getAttributeTypeMap() {\n return V1beta1ResourcePolicyRule.attributeTypeMap;\n }\n}\nexports.V1beta1ResourcePolicyRule = V1beta1ResourcePolicyRule;\nV1beta1ResourcePolicyRule.discriminator = undefined;\nV1beta1ResourcePolicyRule.attributeTypeMap = [\n {\n \"name\": \"apiGroups\",\n \"baseName\": \"apiGroups\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"clusterScope\",\n \"baseName\": \"clusterScope\",\n \"type\": \"boolean\"\n },\n {\n \"name\": \"namespaces\",\n \"baseName\": \"namespaces\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"resources\",\n \"baseName\": \"resources\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"verbs\",\n \"baseName\": \"verbs\",\n \"type\": \"Array\"\n }\n];\n//# sourceMappingURL=v1beta1ResourcePolicyRule.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1beta1RunAsGroupStrategyOptions = void 0;\n/**\n* RunAsGroupStrategyOptions defines the strategy type and any options used to create the strategy.\n*/\nclass V1beta1RunAsGroupStrategyOptions {\n static getAttributeTypeMap() {\n return V1beta1RunAsGroupStrategyOptions.attributeTypeMap;\n }\n}\nexports.V1beta1RunAsGroupStrategyOptions = V1beta1RunAsGroupStrategyOptions;\nV1beta1RunAsGroupStrategyOptions.discriminator = undefined;\nV1beta1RunAsGroupStrategyOptions.attributeTypeMap = [\n {\n \"name\": \"ranges\",\n \"baseName\": \"ranges\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"rule\",\n \"baseName\": \"rule\",\n \"type\": \"string\"\n }\n];\n//# sourceMappingURL=v1beta1RunAsGroupStrategyOptions.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1beta1RunAsUserStrategyOptions = void 0;\n/**\n* RunAsUserStrategyOptions defines the strategy type and any options used to create the strategy.\n*/\nclass V1beta1RunAsUserStrategyOptions {\n static getAttributeTypeMap() {\n return V1beta1RunAsUserStrategyOptions.attributeTypeMap;\n }\n}\nexports.V1beta1RunAsUserStrategyOptions = V1beta1RunAsUserStrategyOptions;\nV1beta1RunAsUserStrategyOptions.discriminator = undefined;\nV1beta1RunAsUserStrategyOptions.attributeTypeMap = [\n {\n \"name\": \"ranges\",\n \"baseName\": \"ranges\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"rule\",\n \"baseName\": \"rule\",\n \"type\": \"string\"\n }\n];\n//# sourceMappingURL=v1beta1RunAsUserStrategyOptions.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1beta1RuntimeClass = void 0;\n/**\n* RuntimeClass defines a class of container runtime supported in the cluster. The RuntimeClass is used to determine which container runtime is used to run all containers in a pod. RuntimeClasses are (currently) manually defined by a user or cluster provisioner, and referenced in the PodSpec. The Kubelet is responsible for resolving the RuntimeClassName reference before running the pod. For more details, see https://git.k8s.io/enhancements/keps/sig-node/585-runtime-class\n*/\nclass V1beta1RuntimeClass {\n static getAttributeTypeMap() {\n return V1beta1RuntimeClass.attributeTypeMap;\n }\n}\nexports.V1beta1RuntimeClass = V1beta1RuntimeClass;\nV1beta1RuntimeClass.discriminator = undefined;\nV1beta1RuntimeClass.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"handler\",\n \"baseName\": \"handler\",\n \"type\": \"string\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ObjectMeta\"\n },\n {\n \"name\": \"overhead\",\n \"baseName\": \"overhead\",\n \"type\": \"V1beta1Overhead\"\n },\n {\n \"name\": \"scheduling\",\n \"baseName\": \"scheduling\",\n \"type\": \"V1beta1Scheduling\"\n }\n];\n//# sourceMappingURL=v1beta1RuntimeClass.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1beta1RuntimeClassList = void 0;\n/**\n* RuntimeClassList is a list of RuntimeClass objects.\n*/\nclass V1beta1RuntimeClassList {\n static getAttributeTypeMap() {\n return V1beta1RuntimeClassList.attributeTypeMap;\n }\n}\nexports.V1beta1RuntimeClassList = V1beta1RuntimeClassList;\nV1beta1RuntimeClassList.discriminator = undefined;\nV1beta1RuntimeClassList.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"items\",\n \"baseName\": \"items\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ListMeta\"\n }\n];\n//# sourceMappingURL=v1beta1RuntimeClassList.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1beta1RuntimeClassStrategyOptions = void 0;\n/**\n* RuntimeClassStrategyOptions define the strategy that will dictate the allowable RuntimeClasses for a pod.\n*/\nclass V1beta1RuntimeClassStrategyOptions {\n static getAttributeTypeMap() {\n return V1beta1RuntimeClassStrategyOptions.attributeTypeMap;\n }\n}\nexports.V1beta1RuntimeClassStrategyOptions = V1beta1RuntimeClassStrategyOptions;\nV1beta1RuntimeClassStrategyOptions.discriminator = undefined;\nV1beta1RuntimeClassStrategyOptions.attributeTypeMap = [\n {\n \"name\": \"allowedRuntimeClassNames\",\n \"baseName\": \"allowedRuntimeClassNames\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"defaultRuntimeClassName\",\n \"baseName\": \"defaultRuntimeClassName\",\n \"type\": \"string\"\n }\n];\n//# sourceMappingURL=v1beta1RuntimeClassStrategyOptions.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1beta1SELinuxStrategyOptions = void 0;\n/**\n* SELinuxStrategyOptions defines the strategy type and any options used to create the strategy.\n*/\nclass V1beta1SELinuxStrategyOptions {\n static getAttributeTypeMap() {\n return V1beta1SELinuxStrategyOptions.attributeTypeMap;\n }\n}\nexports.V1beta1SELinuxStrategyOptions = V1beta1SELinuxStrategyOptions;\nV1beta1SELinuxStrategyOptions.discriminator = undefined;\nV1beta1SELinuxStrategyOptions.attributeTypeMap = [\n {\n \"name\": \"rule\",\n \"baseName\": \"rule\",\n \"type\": \"string\"\n },\n {\n \"name\": \"seLinuxOptions\",\n \"baseName\": \"seLinuxOptions\",\n \"type\": \"V1SELinuxOptions\"\n }\n];\n//# sourceMappingURL=v1beta1SELinuxStrategyOptions.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1beta1Scheduling = void 0;\n/**\n* Scheduling specifies the scheduling constraints for nodes supporting a RuntimeClass.\n*/\nclass V1beta1Scheduling {\n static getAttributeTypeMap() {\n return V1beta1Scheduling.attributeTypeMap;\n }\n}\nexports.V1beta1Scheduling = V1beta1Scheduling;\nV1beta1Scheduling.discriminator = undefined;\nV1beta1Scheduling.attributeTypeMap = [\n {\n \"name\": \"nodeSelector\",\n \"baseName\": \"nodeSelector\",\n \"type\": \"{ [key: string]: string; }\"\n },\n {\n \"name\": \"tolerations\",\n \"baseName\": \"tolerations\",\n \"type\": \"Array\"\n }\n];\n//# sourceMappingURL=v1beta1Scheduling.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1beta1ServiceAccountSubject = void 0;\n/**\n* ServiceAccountSubject holds detailed information for service-account-kind subject.\n*/\nclass V1beta1ServiceAccountSubject {\n static getAttributeTypeMap() {\n return V1beta1ServiceAccountSubject.attributeTypeMap;\n }\n}\nexports.V1beta1ServiceAccountSubject = V1beta1ServiceAccountSubject;\nV1beta1ServiceAccountSubject.discriminator = undefined;\nV1beta1ServiceAccountSubject.attributeTypeMap = [\n {\n \"name\": \"name\",\n \"baseName\": \"name\",\n \"type\": \"string\"\n },\n {\n \"name\": \"namespace\",\n \"baseName\": \"namespace\",\n \"type\": \"string\"\n }\n];\n//# sourceMappingURL=v1beta1ServiceAccountSubject.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1beta1Subject = void 0;\n/**\n* Subject matches the originator of a request, as identified by the request authentication system. There are three ways of matching an originator; by user, group, or service account.\n*/\nclass V1beta1Subject {\n static getAttributeTypeMap() {\n return V1beta1Subject.attributeTypeMap;\n }\n}\nexports.V1beta1Subject = V1beta1Subject;\nV1beta1Subject.discriminator = undefined;\nV1beta1Subject.attributeTypeMap = [\n {\n \"name\": \"group\",\n \"baseName\": \"group\",\n \"type\": \"V1beta1GroupSubject\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"serviceAccount\",\n \"baseName\": \"serviceAccount\",\n \"type\": \"V1beta1ServiceAccountSubject\"\n },\n {\n \"name\": \"user\",\n \"baseName\": \"user\",\n \"type\": \"V1beta1UserSubject\"\n }\n];\n//# sourceMappingURL=v1beta1Subject.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1beta1SupplementalGroupsStrategyOptions = void 0;\n/**\n* SupplementalGroupsStrategyOptions defines the strategy type and options used to create the strategy.\n*/\nclass V1beta1SupplementalGroupsStrategyOptions {\n static getAttributeTypeMap() {\n return V1beta1SupplementalGroupsStrategyOptions.attributeTypeMap;\n }\n}\nexports.V1beta1SupplementalGroupsStrategyOptions = V1beta1SupplementalGroupsStrategyOptions;\nV1beta1SupplementalGroupsStrategyOptions.discriminator = undefined;\nV1beta1SupplementalGroupsStrategyOptions.attributeTypeMap = [\n {\n \"name\": \"ranges\",\n \"baseName\": \"ranges\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"rule\",\n \"baseName\": \"rule\",\n \"type\": \"string\"\n }\n];\n//# sourceMappingURL=v1beta1SupplementalGroupsStrategyOptions.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V1beta1UserSubject = void 0;\n/**\n* UserSubject holds detailed information for user-kind subject.\n*/\nclass V1beta1UserSubject {\n static getAttributeTypeMap() {\n return V1beta1UserSubject.attributeTypeMap;\n }\n}\nexports.V1beta1UserSubject = V1beta1UserSubject;\nV1beta1UserSubject.discriminator = undefined;\nV1beta1UserSubject.attributeTypeMap = [\n {\n \"name\": \"name\",\n \"baseName\": \"name\",\n \"type\": \"string\"\n }\n];\n//# sourceMappingURL=v1beta1UserSubject.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V2beta1ContainerResourceMetricSource = void 0;\n/**\n* ContainerResourceMetricSource indicates how to scale on a resource metric known to Kubernetes, as specified in requests and limits, describing each pod in the current scale target (e.g. CPU or memory). The values will be averaged together before being compared to the target. Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \\\"pods\\\" source. Only one \\\"target\\\" type should be set.\n*/\nclass V2beta1ContainerResourceMetricSource {\n static getAttributeTypeMap() {\n return V2beta1ContainerResourceMetricSource.attributeTypeMap;\n }\n}\nexports.V2beta1ContainerResourceMetricSource = V2beta1ContainerResourceMetricSource;\nV2beta1ContainerResourceMetricSource.discriminator = undefined;\nV2beta1ContainerResourceMetricSource.attributeTypeMap = [\n {\n \"name\": \"container\",\n \"baseName\": \"container\",\n \"type\": \"string\"\n },\n {\n \"name\": \"name\",\n \"baseName\": \"name\",\n \"type\": \"string\"\n },\n {\n \"name\": \"targetAverageUtilization\",\n \"baseName\": \"targetAverageUtilization\",\n \"type\": \"number\"\n },\n {\n \"name\": \"targetAverageValue\",\n \"baseName\": \"targetAverageValue\",\n \"type\": \"string\"\n }\n];\n//# sourceMappingURL=v2beta1ContainerResourceMetricSource.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V2beta1ContainerResourceMetricStatus = void 0;\n/**\n* ContainerResourceMetricStatus indicates the current value of a resource metric known to Kubernetes, as specified in requests and limits, describing a single container in each pod in the current scale target (e.g. CPU or memory). Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \\\"pods\\\" source.\n*/\nclass V2beta1ContainerResourceMetricStatus {\n static getAttributeTypeMap() {\n return V2beta1ContainerResourceMetricStatus.attributeTypeMap;\n }\n}\nexports.V2beta1ContainerResourceMetricStatus = V2beta1ContainerResourceMetricStatus;\nV2beta1ContainerResourceMetricStatus.discriminator = undefined;\nV2beta1ContainerResourceMetricStatus.attributeTypeMap = [\n {\n \"name\": \"container\",\n \"baseName\": \"container\",\n \"type\": \"string\"\n },\n {\n \"name\": \"currentAverageUtilization\",\n \"baseName\": \"currentAverageUtilization\",\n \"type\": \"number\"\n },\n {\n \"name\": \"currentAverageValue\",\n \"baseName\": \"currentAverageValue\",\n \"type\": \"string\"\n },\n {\n \"name\": \"name\",\n \"baseName\": \"name\",\n \"type\": \"string\"\n }\n];\n//# sourceMappingURL=v2beta1ContainerResourceMetricStatus.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V2beta1CrossVersionObjectReference = void 0;\n/**\n* CrossVersionObjectReference contains enough information to let you identify the referred resource.\n*/\nclass V2beta1CrossVersionObjectReference {\n static getAttributeTypeMap() {\n return V2beta1CrossVersionObjectReference.attributeTypeMap;\n }\n}\nexports.V2beta1CrossVersionObjectReference = V2beta1CrossVersionObjectReference;\nV2beta1CrossVersionObjectReference.discriminator = undefined;\nV2beta1CrossVersionObjectReference.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"name\",\n \"baseName\": \"name\",\n \"type\": \"string\"\n }\n];\n//# sourceMappingURL=v2beta1CrossVersionObjectReference.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V2beta1ExternalMetricSource = void 0;\n/**\n* ExternalMetricSource indicates how to scale on a metric not associated with any Kubernetes object (for example length of queue in cloud messaging service, or QPS from loadbalancer running outside of cluster). Exactly one \\\"target\\\" type should be set.\n*/\nclass V2beta1ExternalMetricSource {\n static getAttributeTypeMap() {\n return V2beta1ExternalMetricSource.attributeTypeMap;\n }\n}\nexports.V2beta1ExternalMetricSource = V2beta1ExternalMetricSource;\nV2beta1ExternalMetricSource.discriminator = undefined;\nV2beta1ExternalMetricSource.attributeTypeMap = [\n {\n \"name\": \"metricName\",\n \"baseName\": \"metricName\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metricSelector\",\n \"baseName\": \"metricSelector\",\n \"type\": \"V1LabelSelector\"\n },\n {\n \"name\": \"targetAverageValue\",\n \"baseName\": \"targetAverageValue\",\n \"type\": \"string\"\n },\n {\n \"name\": \"targetValue\",\n \"baseName\": \"targetValue\",\n \"type\": \"string\"\n }\n];\n//# sourceMappingURL=v2beta1ExternalMetricSource.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V2beta1ExternalMetricStatus = void 0;\n/**\n* ExternalMetricStatus indicates the current value of a global metric not associated with any Kubernetes object.\n*/\nclass V2beta1ExternalMetricStatus {\n static getAttributeTypeMap() {\n return V2beta1ExternalMetricStatus.attributeTypeMap;\n }\n}\nexports.V2beta1ExternalMetricStatus = V2beta1ExternalMetricStatus;\nV2beta1ExternalMetricStatus.discriminator = undefined;\nV2beta1ExternalMetricStatus.attributeTypeMap = [\n {\n \"name\": \"currentAverageValue\",\n \"baseName\": \"currentAverageValue\",\n \"type\": \"string\"\n },\n {\n \"name\": \"currentValue\",\n \"baseName\": \"currentValue\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metricName\",\n \"baseName\": \"metricName\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metricSelector\",\n \"baseName\": \"metricSelector\",\n \"type\": \"V1LabelSelector\"\n }\n];\n//# sourceMappingURL=v2beta1ExternalMetricStatus.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V2beta1HorizontalPodAutoscaler = void 0;\n/**\n* HorizontalPodAutoscaler is the configuration for a horizontal pod autoscaler, which automatically manages the replica count of any resource implementing the scale subresource based on the metrics specified.\n*/\nclass V2beta1HorizontalPodAutoscaler {\n static getAttributeTypeMap() {\n return V2beta1HorizontalPodAutoscaler.attributeTypeMap;\n }\n}\nexports.V2beta1HorizontalPodAutoscaler = V2beta1HorizontalPodAutoscaler;\nV2beta1HorizontalPodAutoscaler.discriminator = undefined;\nV2beta1HorizontalPodAutoscaler.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ObjectMeta\"\n },\n {\n \"name\": \"spec\",\n \"baseName\": \"spec\",\n \"type\": \"V2beta1HorizontalPodAutoscalerSpec\"\n },\n {\n \"name\": \"status\",\n \"baseName\": \"status\",\n \"type\": \"V2beta1HorizontalPodAutoscalerStatus\"\n }\n];\n//# sourceMappingURL=v2beta1HorizontalPodAutoscaler.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V2beta1HorizontalPodAutoscalerCondition = void 0;\n/**\n* HorizontalPodAutoscalerCondition describes the state of a HorizontalPodAutoscaler at a certain point.\n*/\nclass V2beta1HorizontalPodAutoscalerCondition {\n static getAttributeTypeMap() {\n return V2beta1HorizontalPodAutoscalerCondition.attributeTypeMap;\n }\n}\nexports.V2beta1HorizontalPodAutoscalerCondition = V2beta1HorizontalPodAutoscalerCondition;\nV2beta1HorizontalPodAutoscalerCondition.discriminator = undefined;\nV2beta1HorizontalPodAutoscalerCondition.attributeTypeMap = [\n {\n \"name\": \"lastTransitionTime\",\n \"baseName\": \"lastTransitionTime\",\n \"type\": \"Date\"\n },\n {\n \"name\": \"message\",\n \"baseName\": \"message\",\n \"type\": \"string\"\n },\n {\n \"name\": \"reason\",\n \"baseName\": \"reason\",\n \"type\": \"string\"\n },\n {\n \"name\": \"status\",\n \"baseName\": \"status\",\n \"type\": \"string\"\n },\n {\n \"name\": \"type\",\n \"baseName\": \"type\",\n \"type\": \"string\"\n }\n];\n//# sourceMappingURL=v2beta1HorizontalPodAutoscalerCondition.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V2beta1HorizontalPodAutoscalerList = void 0;\n/**\n* HorizontalPodAutoscaler is a list of horizontal pod autoscaler objects.\n*/\nclass V2beta1HorizontalPodAutoscalerList {\n static getAttributeTypeMap() {\n return V2beta1HorizontalPodAutoscalerList.attributeTypeMap;\n }\n}\nexports.V2beta1HorizontalPodAutoscalerList = V2beta1HorizontalPodAutoscalerList;\nV2beta1HorizontalPodAutoscalerList.discriminator = undefined;\nV2beta1HorizontalPodAutoscalerList.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"items\",\n \"baseName\": \"items\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ListMeta\"\n }\n];\n//# sourceMappingURL=v2beta1HorizontalPodAutoscalerList.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V2beta1HorizontalPodAutoscalerSpec = void 0;\n/**\n* HorizontalPodAutoscalerSpec describes the desired functionality of the HorizontalPodAutoscaler.\n*/\nclass V2beta1HorizontalPodAutoscalerSpec {\n static getAttributeTypeMap() {\n return V2beta1HorizontalPodAutoscalerSpec.attributeTypeMap;\n }\n}\nexports.V2beta1HorizontalPodAutoscalerSpec = V2beta1HorizontalPodAutoscalerSpec;\nV2beta1HorizontalPodAutoscalerSpec.discriminator = undefined;\nV2beta1HorizontalPodAutoscalerSpec.attributeTypeMap = [\n {\n \"name\": \"maxReplicas\",\n \"baseName\": \"maxReplicas\",\n \"type\": \"number\"\n },\n {\n \"name\": \"metrics\",\n \"baseName\": \"metrics\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"minReplicas\",\n \"baseName\": \"minReplicas\",\n \"type\": \"number\"\n },\n {\n \"name\": \"scaleTargetRef\",\n \"baseName\": \"scaleTargetRef\",\n \"type\": \"V2beta1CrossVersionObjectReference\"\n }\n];\n//# sourceMappingURL=v2beta1HorizontalPodAutoscalerSpec.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V2beta1HorizontalPodAutoscalerStatus = void 0;\n/**\n* HorizontalPodAutoscalerStatus describes the current status of a horizontal pod autoscaler.\n*/\nclass V2beta1HorizontalPodAutoscalerStatus {\n static getAttributeTypeMap() {\n return V2beta1HorizontalPodAutoscalerStatus.attributeTypeMap;\n }\n}\nexports.V2beta1HorizontalPodAutoscalerStatus = V2beta1HorizontalPodAutoscalerStatus;\nV2beta1HorizontalPodAutoscalerStatus.discriminator = undefined;\nV2beta1HorizontalPodAutoscalerStatus.attributeTypeMap = [\n {\n \"name\": \"conditions\",\n \"baseName\": \"conditions\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"currentMetrics\",\n \"baseName\": \"currentMetrics\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"currentReplicas\",\n \"baseName\": \"currentReplicas\",\n \"type\": \"number\"\n },\n {\n \"name\": \"desiredReplicas\",\n \"baseName\": \"desiredReplicas\",\n \"type\": \"number\"\n },\n {\n \"name\": \"lastScaleTime\",\n \"baseName\": \"lastScaleTime\",\n \"type\": \"Date\"\n },\n {\n \"name\": \"observedGeneration\",\n \"baseName\": \"observedGeneration\",\n \"type\": \"number\"\n }\n];\n//# sourceMappingURL=v2beta1HorizontalPodAutoscalerStatus.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V2beta1MetricSpec = void 0;\n/**\n* MetricSpec specifies how to scale based on a single metric (only `type` and one other matching field should be set at once).\n*/\nclass V2beta1MetricSpec {\n static getAttributeTypeMap() {\n return V2beta1MetricSpec.attributeTypeMap;\n }\n}\nexports.V2beta1MetricSpec = V2beta1MetricSpec;\nV2beta1MetricSpec.discriminator = undefined;\nV2beta1MetricSpec.attributeTypeMap = [\n {\n \"name\": \"containerResource\",\n \"baseName\": \"containerResource\",\n \"type\": \"V2beta1ContainerResourceMetricSource\"\n },\n {\n \"name\": \"external\",\n \"baseName\": \"external\",\n \"type\": \"V2beta1ExternalMetricSource\"\n },\n {\n \"name\": \"object\",\n \"baseName\": \"object\",\n \"type\": \"V2beta1ObjectMetricSource\"\n },\n {\n \"name\": \"pods\",\n \"baseName\": \"pods\",\n \"type\": \"V2beta1PodsMetricSource\"\n },\n {\n \"name\": \"resource\",\n \"baseName\": \"resource\",\n \"type\": \"V2beta1ResourceMetricSource\"\n },\n {\n \"name\": \"type\",\n \"baseName\": \"type\",\n \"type\": \"string\"\n }\n];\n//# sourceMappingURL=v2beta1MetricSpec.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V2beta1MetricStatus = void 0;\n/**\n* MetricStatus describes the last-read state of a single metric.\n*/\nclass V2beta1MetricStatus {\n static getAttributeTypeMap() {\n return V2beta1MetricStatus.attributeTypeMap;\n }\n}\nexports.V2beta1MetricStatus = V2beta1MetricStatus;\nV2beta1MetricStatus.discriminator = undefined;\nV2beta1MetricStatus.attributeTypeMap = [\n {\n \"name\": \"containerResource\",\n \"baseName\": \"containerResource\",\n \"type\": \"V2beta1ContainerResourceMetricStatus\"\n },\n {\n \"name\": \"external\",\n \"baseName\": \"external\",\n \"type\": \"V2beta1ExternalMetricStatus\"\n },\n {\n \"name\": \"object\",\n \"baseName\": \"object\",\n \"type\": \"V2beta1ObjectMetricStatus\"\n },\n {\n \"name\": \"pods\",\n \"baseName\": \"pods\",\n \"type\": \"V2beta1PodsMetricStatus\"\n },\n {\n \"name\": \"resource\",\n \"baseName\": \"resource\",\n \"type\": \"V2beta1ResourceMetricStatus\"\n },\n {\n \"name\": \"type\",\n \"baseName\": \"type\",\n \"type\": \"string\"\n }\n];\n//# sourceMappingURL=v2beta1MetricStatus.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V2beta1ObjectMetricSource = void 0;\n/**\n* ObjectMetricSource indicates how to scale on a metric describing a kubernetes object (for example, hits-per-second on an Ingress object).\n*/\nclass V2beta1ObjectMetricSource {\n static getAttributeTypeMap() {\n return V2beta1ObjectMetricSource.attributeTypeMap;\n }\n}\nexports.V2beta1ObjectMetricSource = V2beta1ObjectMetricSource;\nV2beta1ObjectMetricSource.discriminator = undefined;\nV2beta1ObjectMetricSource.attributeTypeMap = [\n {\n \"name\": \"averageValue\",\n \"baseName\": \"averageValue\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metricName\",\n \"baseName\": \"metricName\",\n \"type\": \"string\"\n },\n {\n \"name\": \"selector\",\n \"baseName\": \"selector\",\n \"type\": \"V1LabelSelector\"\n },\n {\n \"name\": \"target\",\n \"baseName\": \"target\",\n \"type\": \"V2beta1CrossVersionObjectReference\"\n },\n {\n \"name\": \"targetValue\",\n \"baseName\": \"targetValue\",\n \"type\": \"string\"\n }\n];\n//# sourceMappingURL=v2beta1ObjectMetricSource.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V2beta1ObjectMetricStatus = void 0;\n/**\n* ObjectMetricStatus indicates the current value of a metric describing a kubernetes object (for example, hits-per-second on an Ingress object).\n*/\nclass V2beta1ObjectMetricStatus {\n static getAttributeTypeMap() {\n return V2beta1ObjectMetricStatus.attributeTypeMap;\n }\n}\nexports.V2beta1ObjectMetricStatus = V2beta1ObjectMetricStatus;\nV2beta1ObjectMetricStatus.discriminator = undefined;\nV2beta1ObjectMetricStatus.attributeTypeMap = [\n {\n \"name\": \"averageValue\",\n \"baseName\": \"averageValue\",\n \"type\": \"string\"\n },\n {\n \"name\": \"currentValue\",\n \"baseName\": \"currentValue\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metricName\",\n \"baseName\": \"metricName\",\n \"type\": \"string\"\n },\n {\n \"name\": \"selector\",\n \"baseName\": \"selector\",\n \"type\": \"V1LabelSelector\"\n },\n {\n \"name\": \"target\",\n \"baseName\": \"target\",\n \"type\": \"V2beta1CrossVersionObjectReference\"\n }\n];\n//# sourceMappingURL=v2beta1ObjectMetricStatus.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V2beta1PodsMetricSource = void 0;\n/**\n* PodsMetricSource indicates how to scale on a metric describing each pod in the current scale target (for example, transactions-processed-per-second). The values will be averaged together before being compared to the target value.\n*/\nclass V2beta1PodsMetricSource {\n static getAttributeTypeMap() {\n return V2beta1PodsMetricSource.attributeTypeMap;\n }\n}\nexports.V2beta1PodsMetricSource = V2beta1PodsMetricSource;\nV2beta1PodsMetricSource.discriminator = undefined;\nV2beta1PodsMetricSource.attributeTypeMap = [\n {\n \"name\": \"metricName\",\n \"baseName\": \"metricName\",\n \"type\": \"string\"\n },\n {\n \"name\": \"selector\",\n \"baseName\": \"selector\",\n \"type\": \"V1LabelSelector\"\n },\n {\n \"name\": \"targetAverageValue\",\n \"baseName\": \"targetAverageValue\",\n \"type\": \"string\"\n }\n];\n//# sourceMappingURL=v2beta1PodsMetricSource.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V2beta1PodsMetricStatus = void 0;\n/**\n* PodsMetricStatus indicates the current value of a metric describing each pod in the current scale target (for example, transactions-processed-per-second).\n*/\nclass V2beta1PodsMetricStatus {\n static getAttributeTypeMap() {\n return V2beta1PodsMetricStatus.attributeTypeMap;\n }\n}\nexports.V2beta1PodsMetricStatus = V2beta1PodsMetricStatus;\nV2beta1PodsMetricStatus.discriminator = undefined;\nV2beta1PodsMetricStatus.attributeTypeMap = [\n {\n \"name\": \"currentAverageValue\",\n \"baseName\": \"currentAverageValue\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metricName\",\n \"baseName\": \"metricName\",\n \"type\": \"string\"\n },\n {\n \"name\": \"selector\",\n \"baseName\": \"selector\",\n \"type\": \"V1LabelSelector\"\n }\n];\n//# sourceMappingURL=v2beta1PodsMetricStatus.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V2beta1ResourceMetricSource = void 0;\n/**\n* ResourceMetricSource indicates how to scale on a resource metric known to Kubernetes, as specified in requests and limits, describing each pod in the current scale target (e.g. CPU or memory). The values will be averaged together before being compared to the target. Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \\\"pods\\\" source. Only one \\\"target\\\" type should be set.\n*/\nclass V2beta1ResourceMetricSource {\n static getAttributeTypeMap() {\n return V2beta1ResourceMetricSource.attributeTypeMap;\n }\n}\nexports.V2beta1ResourceMetricSource = V2beta1ResourceMetricSource;\nV2beta1ResourceMetricSource.discriminator = undefined;\nV2beta1ResourceMetricSource.attributeTypeMap = [\n {\n \"name\": \"name\",\n \"baseName\": \"name\",\n \"type\": \"string\"\n },\n {\n \"name\": \"targetAverageUtilization\",\n \"baseName\": \"targetAverageUtilization\",\n \"type\": \"number\"\n },\n {\n \"name\": \"targetAverageValue\",\n \"baseName\": \"targetAverageValue\",\n \"type\": \"string\"\n }\n];\n//# sourceMappingURL=v2beta1ResourceMetricSource.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V2beta1ResourceMetricStatus = void 0;\n/**\n* ResourceMetricStatus indicates the current value of a resource metric known to Kubernetes, as specified in requests and limits, describing each pod in the current scale target (e.g. CPU or memory). Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \\\"pods\\\" source.\n*/\nclass V2beta1ResourceMetricStatus {\n static getAttributeTypeMap() {\n return V2beta1ResourceMetricStatus.attributeTypeMap;\n }\n}\nexports.V2beta1ResourceMetricStatus = V2beta1ResourceMetricStatus;\nV2beta1ResourceMetricStatus.discriminator = undefined;\nV2beta1ResourceMetricStatus.attributeTypeMap = [\n {\n \"name\": \"currentAverageUtilization\",\n \"baseName\": \"currentAverageUtilization\",\n \"type\": \"number\"\n },\n {\n \"name\": \"currentAverageValue\",\n \"baseName\": \"currentAverageValue\",\n \"type\": \"string\"\n },\n {\n \"name\": \"name\",\n \"baseName\": \"name\",\n \"type\": \"string\"\n }\n];\n//# sourceMappingURL=v2beta1ResourceMetricStatus.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V2beta2ContainerResourceMetricSource = void 0;\n/**\n* ContainerResourceMetricSource indicates how to scale on a resource metric known to Kubernetes, as specified in requests and limits, describing each pod in the current scale target (e.g. CPU or memory). The values will be averaged together before being compared to the target. Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \\\"pods\\\" source. Only one \\\"target\\\" type should be set.\n*/\nclass V2beta2ContainerResourceMetricSource {\n static getAttributeTypeMap() {\n return V2beta2ContainerResourceMetricSource.attributeTypeMap;\n }\n}\nexports.V2beta2ContainerResourceMetricSource = V2beta2ContainerResourceMetricSource;\nV2beta2ContainerResourceMetricSource.discriminator = undefined;\nV2beta2ContainerResourceMetricSource.attributeTypeMap = [\n {\n \"name\": \"container\",\n \"baseName\": \"container\",\n \"type\": \"string\"\n },\n {\n \"name\": \"name\",\n \"baseName\": \"name\",\n \"type\": \"string\"\n },\n {\n \"name\": \"target\",\n \"baseName\": \"target\",\n \"type\": \"V2beta2MetricTarget\"\n }\n];\n//# sourceMappingURL=v2beta2ContainerResourceMetricSource.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V2beta2ContainerResourceMetricStatus = void 0;\n/**\n* ContainerResourceMetricStatus indicates the current value of a resource metric known to Kubernetes, as specified in requests and limits, describing a single container in each pod in the current scale target (e.g. CPU or memory). Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \\\"pods\\\" source.\n*/\nclass V2beta2ContainerResourceMetricStatus {\n static getAttributeTypeMap() {\n return V2beta2ContainerResourceMetricStatus.attributeTypeMap;\n }\n}\nexports.V2beta2ContainerResourceMetricStatus = V2beta2ContainerResourceMetricStatus;\nV2beta2ContainerResourceMetricStatus.discriminator = undefined;\nV2beta2ContainerResourceMetricStatus.attributeTypeMap = [\n {\n \"name\": \"container\",\n \"baseName\": \"container\",\n \"type\": \"string\"\n },\n {\n \"name\": \"current\",\n \"baseName\": \"current\",\n \"type\": \"V2beta2MetricValueStatus\"\n },\n {\n \"name\": \"name\",\n \"baseName\": \"name\",\n \"type\": \"string\"\n }\n];\n//# sourceMappingURL=v2beta2ContainerResourceMetricStatus.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V2beta2CrossVersionObjectReference = void 0;\n/**\n* CrossVersionObjectReference contains enough information to let you identify the referred resource.\n*/\nclass V2beta2CrossVersionObjectReference {\n static getAttributeTypeMap() {\n return V2beta2CrossVersionObjectReference.attributeTypeMap;\n }\n}\nexports.V2beta2CrossVersionObjectReference = V2beta2CrossVersionObjectReference;\nV2beta2CrossVersionObjectReference.discriminator = undefined;\nV2beta2CrossVersionObjectReference.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"name\",\n \"baseName\": \"name\",\n \"type\": \"string\"\n }\n];\n//# sourceMappingURL=v2beta2CrossVersionObjectReference.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V2beta2ExternalMetricSource = void 0;\n/**\n* ExternalMetricSource indicates how to scale on a metric not associated with any Kubernetes object (for example length of queue in cloud messaging service, or QPS from loadbalancer running outside of cluster).\n*/\nclass V2beta2ExternalMetricSource {\n static getAttributeTypeMap() {\n return V2beta2ExternalMetricSource.attributeTypeMap;\n }\n}\nexports.V2beta2ExternalMetricSource = V2beta2ExternalMetricSource;\nV2beta2ExternalMetricSource.discriminator = undefined;\nV2beta2ExternalMetricSource.attributeTypeMap = [\n {\n \"name\": \"metric\",\n \"baseName\": \"metric\",\n \"type\": \"V2beta2MetricIdentifier\"\n },\n {\n \"name\": \"target\",\n \"baseName\": \"target\",\n \"type\": \"V2beta2MetricTarget\"\n }\n];\n//# sourceMappingURL=v2beta2ExternalMetricSource.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V2beta2ExternalMetricStatus = void 0;\n/**\n* ExternalMetricStatus indicates the current value of a global metric not associated with any Kubernetes object.\n*/\nclass V2beta2ExternalMetricStatus {\n static getAttributeTypeMap() {\n return V2beta2ExternalMetricStatus.attributeTypeMap;\n }\n}\nexports.V2beta2ExternalMetricStatus = V2beta2ExternalMetricStatus;\nV2beta2ExternalMetricStatus.discriminator = undefined;\nV2beta2ExternalMetricStatus.attributeTypeMap = [\n {\n \"name\": \"current\",\n \"baseName\": \"current\",\n \"type\": \"V2beta2MetricValueStatus\"\n },\n {\n \"name\": \"metric\",\n \"baseName\": \"metric\",\n \"type\": \"V2beta2MetricIdentifier\"\n }\n];\n//# sourceMappingURL=v2beta2ExternalMetricStatus.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V2beta2HPAScalingPolicy = void 0;\n/**\n* HPAScalingPolicy is a single policy which must hold true for a specified past interval.\n*/\nclass V2beta2HPAScalingPolicy {\n static getAttributeTypeMap() {\n return V2beta2HPAScalingPolicy.attributeTypeMap;\n }\n}\nexports.V2beta2HPAScalingPolicy = V2beta2HPAScalingPolicy;\nV2beta2HPAScalingPolicy.discriminator = undefined;\nV2beta2HPAScalingPolicy.attributeTypeMap = [\n {\n \"name\": \"periodSeconds\",\n \"baseName\": \"periodSeconds\",\n \"type\": \"number\"\n },\n {\n \"name\": \"type\",\n \"baseName\": \"type\",\n \"type\": \"string\"\n },\n {\n \"name\": \"value\",\n \"baseName\": \"value\",\n \"type\": \"number\"\n }\n];\n//# sourceMappingURL=v2beta2HPAScalingPolicy.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V2beta2HPAScalingRules = void 0;\n/**\n* HPAScalingRules configures the scaling behavior for one direction. These Rules are applied after calculating DesiredReplicas from metrics for the HPA. They can limit the scaling velocity by specifying scaling policies. They can prevent flapping by specifying the stabilization window, so that the number of replicas is not set instantly, instead, the safest value from the stabilization window is chosen.\n*/\nclass V2beta2HPAScalingRules {\n static getAttributeTypeMap() {\n return V2beta2HPAScalingRules.attributeTypeMap;\n }\n}\nexports.V2beta2HPAScalingRules = V2beta2HPAScalingRules;\nV2beta2HPAScalingRules.discriminator = undefined;\nV2beta2HPAScalingRules.attributeTypeMap = [\n {\n \"name\": \"policies\",\n \"baseName\": \"policies\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"selectPolicy\",\n \"baseName\": \"selectPolicy\",\n \"type\": \"string\"\n },\n {\n \"name\": \"stabilizationWindowSeconds\",\n \"baseName\": \"stabilizationWindowSeconds\",\n \"type\": \"number\"\n }\n];\n//# sourceMappingURL=v2beta2HPAScalingRules.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V2beta2HorizontalPodAutoscaler = void 0;\n/**\n* HorizontalPodAutoscaler is the configuration for a horizontal pod autoscaler, which automatically manages the replica count of any resource implementing the scale subresource based on the metrics specified.\n*/\nclass V2beta2HorizontalPodAutoscaler {\n static getAttributeTypeMap() {\n return V2beta2HorizontalPodAutoscaler.attributeTypeMap;\n }\n}\nexports.V2beta2HorizontalPodAutoscaler = V2beta2HorizontalPodAutoscaler;\nV2beta2HorizontalPodAutoscaler.discriminator = undefined;\nV2beta2HorizontalPodAutoscaler.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ObjectMeta\"\n },\n {\n \"name\": \"spec\",\n \"baseName\": \"spec\",\n \"type\": \"V2beta2HorizontalPodAutoscalerSpec\"\n },\n {\n \"name\": \"status\",\n \"baseName\": \"status\",\n \"type\": \"V2beta2HorizontalPodAutoscalerStatus\"\n }\n];\n//# sourceMappingURL=v2beta2HorizontalPodAutoscaler.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V2beta2HorizontalPodAutoscalerBehavior = void 0;\n/**\n* HorizontalPodAutoscalerBehavior configures the scaling behavior of the target in both Up and Down directions (scaleUp and scaleDown fields respectively).\n*/\nclass V2beta2HorizontalPodAutoscalerBehavior {\n static getAttributeTypeMap() {\n return V2beta2HorizontalPodAutoscalerBehavior.attributeTypeMap;\n }\n}\nexports.V2beta2HorizontalPodAutoscalerBehavior = V2beta2HorizontalPodAutoscalerBehavior;\nV2beta2HorizontalPodAutoscalerBehavior.discriminator = undefined;\nV2beta2HorizontalPodAutoscalerBehavior.attributeTypeMap = [\n {\n \"name\": \"scaleDown\",\n \"baseName\": \"scaleDown\",\n \"type\": \"V2beta2HPAScalingRules\"\n },\n {\n \"name\": \"scaleUp\",\n \"baseName\": \"scaleUp\",\n \"type\": \"V2beta2HPAScalingRules\"\n }\n];\n//# sourceMappingURL=v2beta2HorizontalPodAutoscalerBehavior.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V2beta2HorizontalPodAutoscalerCondition = void 0;\n/**\n* HorizontalPodAutoscalerCondition describes the state of a HorizontalPodAutoscaler at a certain point.\n*/\nclass V2beta2HorizontalPodAutoscalerCondition {\n static getAttributeTypeMap() {\n return V2beta2HorizontalPodAutoscalerCondition.attributeTypeMap;\n }\n}\nexports.V2beta2HorizontalPodAutoscalerCondition = V2beta2HorizontalPodAutoscalerCondition;\nV2beta2HorizontalPodAutoscalerCondition.discriminator = undefined;\nV2beta2HorizontalPodAutoscalerCondition.attributeTypeMap = [\n {\n \"name\": \"lastTransitionTime\",\n \"baseName\": \"lastTransitionTime\",\n \"type\": \"Date\"\n },\n {\n \"name\": \"message\",\n \"baseName\": \"message\",\n \"type\": \"string\"\n },\n {\n \"name\": \"reason\",\n \"baseName\": \"reason\",\n \"type\": \"string\"\n },\n {\n \"name\": \"status\",\n \"baseName\": \"status\",\n \"type\": \"string\"\n },\n {\n \"name\": \"type\",\n \"baseName\": \"type\",\n \"type\": \"string\"\n }\n];\n//# sourceMappingURL=v2beta2HorizontalPodAutoscalerCondition.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V2beta2HorizontalPodAutoscalerList = void 0;\n/**\n* HorizontalPodAutoscalerList is a list of horizontal pod autoscaler objects.\n*/\nclass V2beta2HorizontalPodAutoscalerList {\n static getAttributeTypeMap() {\n return V2beta2HorizontalPodAutoscalerList.attributeTypeMap;\n }\n}\nexports.V2beta2HorizontalPodAutoscalerList = V2beta2HorizontalPodAutoscalerList;\nV2beta2HorizontalPodAutoscalerList.discriminator = undefined;\nV2beta2HorizontalPodAutoscalerList.attributeTypeMap = [\n {\n \"name\": \"apiVersion\",\n \"baseName\": \"apiVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"items\",\n \"baseName\": \"items\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"kind\",\n \"baseName\": \"kind\",\n \"type\": \"string\"\n },\n {\n \"name\": \"metadata\",\n \"baseName\": \"metadata\",\n \"type\": \"V1ListMeta\"\n }\n];\n//# sourceMappingURL=v2beta2HorizontalPodAutoscalerList.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V2beta2HorizontalPodAutoscalerSpec = void 0;\n/**\n* HorizontalPodAutoscalerSpec describes the desired functionality of the HorizontalPodAutoscaler.\n*/\nclass V2beta2HorizontalPodAutoscalerSpec {\n static getAttributeTypeMap() {\n return V2beta2HorizontalPodAutoscalerSpec.attributeTypeMap;\n }\n}\nexports.V2beta2HorizontalPodAutoscalerSpec = V2beta2HorizontalPodAutoscalerSpec;\nV2beta2HorizontalPodAutoscalerSpec.discriminator = undefined;\nV2beta2HorizontalPodAutoscalerSpec.attributeTypeMap = [\n {\n \"name\": \"behavior\",\n \"baseName\": \"behavior\",\n \"type\": \"V2beta2HorizontalPodAutoscalerBehavior\"\n },\n {\n \"name\": \"maxReplicas\",\n \"baseName\": \"maxReplicas\",\n \"type\": \"number\"\n },\n {\n \"name\": \"metrics\",\n \"baseName\": \"metrics\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"minReplicas\",\n \"baseName\": \"minReplicas\",\n \"type\": \"number\"\n },\n {\n \"name\": \"scaleTargetRef\",\n \"baseName\": \"scaleTargetRef\",\n \"type\": \"V2beta2CrossVersionObjectReference\"\n }\n];\n//# sourceMappingURL=v2beta2HorizontalPodAutoscalerSpec.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V2beta2HorizontalPodAutoscalerStatus = void 0;\n/**\n* HorizontalPodAutoscalerStatus describes the current status of a horizontal pod autoscaler.\n*/\nclass V2beta2HorizontalPodAutoscalerStatus {\n static getAttributeTypeMap() {\n return V2beta2HorizontalPodAutoscalerStatus.attributeTypeMap;\n }\n}\nexports.V2beta2HorizontalPodAutoscalerStatus = V2beta2HorizontalPodAutoscalerStatus;\nV2beta2HorizontalPodAutoscalerStatus.discriminator = undefined;\nV2beta2HorizontalPodAutoscalerStatus.attributeTypeMap = [\n {\n \"name\": \"conditions\",\n \"baseName\": \"conditions\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"currentMetrics\",\n \"baseName\": \"currentMetrics\",\n \"type\": \"Array\"\n },\n {\n \"name\": \"currentReplicas\",\n \"baseName\": \"currentReplicas\",\n \"type\": \"number\"\n },\n {\n \"name\": \"desiredReplicas\",\n \"baseName\": \"desiredReplicas\",\n \"type\": \"number\"\n },\n {\n \"name\": \"lastScaleTime\",\n \"baseName\": \"lastScaleTime\",\n \"type\": \"Date\"\n },\n {\n \"name\": \"observedGeneration\",\n \"baseName\": \"observedGeneration\",\n \"type\": \"number\"\n }\n];\n//# sourceMappingURL=v2beta2HorizontalPodAutoscalerStatus.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V2beta2MetricIdentifier = void 0;\n/**\n* MetricIdentifier defines the name and optionally selector for a metric\n*/\nclass V2beta2MetricIdentifier {\n static getAttributeTypeMap() {\n return V2beta2MetricIdentifier.attributeTypeMap;\n }\n}\nexports.V2beta2MetricIdentifier = V2beta2MetricIdentifier;\nV2beta2MetricIdentifier.discriminator = undefined;\nV2beta2MetricIdentifier.attributeTypeMap = [\n {\n \"name\": \"name\",\n \"baseName\": \"name\",\n \"type\": \"string\"\n },\n {\n \"name\": \"selector\",\n \"baseName\": \"selector\",\n \"type\": \"V1LabelSelector\"\n }\n];\n//# sourceMappingURL=v2beta2MetricIdentifier.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V2beta2MetricSpec = void 0;\n/**\n* MetricSpec specifies how to scale based on a single metric (only `type` and one other matching field should be set at once).\n*/\nclass V2beta2MetricSpec {\n static getAttributeTypeMap() {\n return V2beta2MetricSpec.attributeTypeMap;\n }\n}\nexports.V2beta2MetricSpec = V2beta2MetricSpec;\nV2beta2MetricSpec.discriminator = undefined;\nV2beta2MetricSpec.attributeTypeMap = [\n {\n \"name\": \"containerResource\",\n \"baseName\": \"containerResource\",\n \"type\": \"V2beta2ContainerResourceMetricSource\"\n },\n {\n \"name\": \"external\",\n \"baseName\": \"external\",\n \"type\": \"V2beta2ExternalMetricSource\"\n },\n {\n \"name\": \"object\",\n \"baseName\": \"object\",\n \"type\": \"V2beta2ObjectMetricSource\"\n },\n {\n \"name\": \"pods\",\n \"baseName\": \"pods\",\n \"type\": \"V2beta2PodsMetricSource\"\n },\n {\n \"name\": \"resource\",\n \"baseName\": \"resource\",\n \"type\": \"V2beta2ResourceMetricSource\"\n },\n {\n \"name\": \"type\",\n \"baseName\": \"type\",\n \"type\": \"string\"\n }\n];\n//# sourceMappingURL=v2beta2MetricSpec.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V2beta2MetricStatus = void 0;\n/**\n* MetricStatus describes the last-read state of a single metric.\n*/\nclass V2beta2MetricStatus {\n static getAttributeTypeMap() {\n return V2beta2MetricStatus.attributeTypeMap;\n }\n}\nexports.V2beta2MetricStatus = V2beta2MetricStatus;\nV2beta2MetricStatus.discriminator = undefined;\nV2beta2MetricStatus.attributeTypeMap = [\n {\n \"name\": \"containerResource\",\n \"baseName\": \"containerResource\",\n \"type\": \"V2beta2ContainerResourceMetricStatus\"\n },\n {\n \"name\": \"external\",\n \"baseName\": \"external\",\n \"type\": \"V2beta2ExternalMetricStatus\"\n },\n {\n \"name\": \"object\",\n \"baseName\": \"object\",\n \"type\": \"V2beta2ObjectMetricStatus\"\n },\n {\n \"name\": \"pods\",\n \"baseName\": \"pods\",\n \"type\": \"V2beta2PodsMetricStatus\"\n },\n {\n \"name\": \"resource\",\n \"baseName\": \"resource\",\n \"type\": \"V2beta2ResourceMetricStatus\"\n },\n {\n \"name\": \"type\",\n \"baseName\": \"type\",\n \"type\": \"string\"\n }\n];\n//# sourceMappingURL=v2beta2MetricStatus.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V2beta2MetricTarget = void 0;\n/**\n* MetricTarget defines the target value, average value, or average utilization of a specific metric\n*/\nclass V2beta2MetricTarget {\n static getAttributeTypeMap() {\n return V2beta2MetricTarget.attributeTypeMap;\n }\n}\nexports.V2beta2MetricTarget = V2beta2MetricTarget;\nV2beta2MetricTarget.discriminator = undefined;\nV2beta2MetricTarget.attributeTypeMap = [\n {\n \"name\": \"averageUtilization\",\n \"baseName\": \"averageUtilization\",\n \"type\": \"number\"\n },\n {\n \"name\": \"averageValue\",\n \"baseName\": \"averageValue\",\n \"type\": \"string\"\n },\n {\n \"name\": \"type\",\n \"baseName\": \"type\",\n \"type\": \"string\"\n },\n {\n \"name\": \"value\",\n \"baseName\": \"value\",\n \"type\": \"string\"\n }\n];\n//# sourceMappingURL=v2beta2MetricTarget.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V2beta2MetricValueStatus = void 0;\n/**\n* MetricValueStatus holds the current value for a metric\n*/\nclass V2beta2MetricValueStatus {\n static getAttributeTypeMap() {\n return V2beta2MetricValueStatus.attributeTypeMap;\n }\n}\nexports.V2beta2MetricValueStatus = V2beta2MetricValueStatus;\nV2beta2MetricValueStatus.discriminator = undefined;\nV2beta2MetricValueStatus.attributeTypeMap = [\n {\n \"name\": \"averageUtilization\",\n \"baseName\": \"averageUtilization\",\n \"type\": \"number\"\n },\n {\n \"name\": \"averageValue\",\n \"baseName\": \"averageValue\",\n \"type\": \"string\"\n },\n {\n \"name\": \"value\",\n \"baseName\": \"value\",\n \"type\": \"string\"\n }\n];\n//# sourceMappingURL=v2beta2MetricValueStatus.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V2beta2ObjectMetricSource = void 0;\n/**\n* ObjectMetricSource indicates how to scale on a metric describing a kubernetes object (for example, hits-per-second on an Ingress object).\n*/\nclass V2beta2ObjectMetricSource {\n static getAttributeTypeMap() {\n return V2beta2ObjectMetricSource.attributeTypeMap;\n }\n}\nexports.V2beta2ObjectMetricSource = V2beta2ObjectMetricSource;\nV2beta2ObjectMetricSource.discriminator = undefined;\nV2beta2ObjectMetricSource.attributeTypeMap = [\n {\n \"name\": \"describedObject\",\n \"baseName\": \"describedObject\",\n \"type\": \"V2beta2CrossVersionObjectReference\"\n },\n {\n \"name\": \"metric\",\n \"baseName\": \"metric\",\n \"type\": \"V2beta2MetricIdentifier\"\n },\n {\n \"name\": \"target\",\n \"baseName\": \"target\",\n \"type\": \"V2beta2MetricTarget\"\n }\n];\n//# sourceMappingURL=v2beta2ObjectMetricSource.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V2beta2ObjectMetricStatus = void 0;\n/**\n* ObjectMetricStatus indicates the current value of a metric describing a kubernetes object (for example, hits-per-second on an Ingress object).\n*/\nclass V2beta2ObjectMetricStatus {\n static getAttributeTypeMap() {\n return V2beta2ObjectMetricStatus.attributeTypeMap;\n }\n}\nexports.V2beta2ObjectMetricStatus = V2beta2ObjectMetricStatus;\nV2beta2ObjectMetricStatus.discriminator = undefined;\nV2beta2ObjectMetricStatus.attributeTypeMap = [\n {\n \"name\": \"current\",\n \"baseName\": \"current\",\n \"type\": \"V2beta2MetricValueStatus\"\n },\n {\n \"name\": \"describedObject\",\n \"baseName\": \"describedObject\",\n \"type\": \"V2beta2CrossVersionObjectReference\"\n },\n {\n \"name\": \"metric\",\n \"baseName\": \"metric\",\n \"type\": \"V2beta2MetricIdentifier\"\n }\n];\n//# sourceMappingURL=v2beta2ObjectMetricStatus.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V2beta2PodsMetricSource = void 0;\n/**\n* PodsMetricSource indicates how to scale on a metric describing each pod in the current scale target (for example, transactions-processed-per-second). The values will be averaged together before being compared to the target value.\n*/\nclass V2beta2PodsMetricSource {\n static getAttributeTypeMap() {\n return V2beta2PodsMetricSource.attributeTypeMap;\n }\n}\nexports.V2beta2PodsMetricSource = V2beta2PodsMetricSource;\nV2beta2PodsMetricSource.discriminator = undefined;\nV2beta2PodsMetricSource.attributeTypeMap = [\n {\n \"name\": \"metric\",\n \"baseName\": \"metric\",\n \"type\": \"V2beta2MetricIdentifier\"\n },\n {\n \"name\": \"target\",\n \"baseName\": \"target\",\n \"type\": \"V2beta2MetricTarget\"\n }\n];\n//# sourceMappingURL=v2beta2PodsMetricSource.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V2beta2PodsMetricStatus = void 0;\n/**\n* PodsMetricStatus indicates the current value of a metric describing each pod in the current scale target (for example, transactions-processed-per-second).\n*/\nclass V2beta2PodsMetricStatus {\n static getAttributeTypeMap() {\n return V2beta2PodsMetricStatus.attributeTypeMap;\n }\n}\nexports.V2beta2PodsMetricStatus = V2beta2PodsMetricStatus;\nV2beta2PodsMetricStatus.discriminator = undefined;\nV2beta2PodsMetricStatus.attributeTypeMap = [\n {\n \"name\": \"current\",\n \"baseName\": \"current\",\n \"type\": \"V2beta2MetricValueStatus\"\n },\n {\n \"name\": \"metric\",\n \"baseName\": \"metric\",\n \"type\": \"V2beta2MetricIdentifier\"\n }\n];\n//# sourceMappingURL=v2beta2PodsMetricStatus.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V2beta2ResourceMetricSource = void 0;\n/**\n* ResourceMetricSource indicates how to scale on a resource metric known to Kubernetes, as specified in requests and limits, describing each pod in the current scale target (e.g. CPU or memory). The values will be averaged together before being compared to the target. Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \\\"pods\\\" source. Only one \\\"target\\\" type should be set.\n*/\nclass V2beta2ResourceMetricSource {\n static getAttributeTypeMap() {\n return V2beta2ResourceMetricSource.attributeTypeMap;\n }\n}\nexports.V2beta2ResourceMetricSource = V2beta2ResourceMetricSource;\nV2beta2ResourceMetricSource.discriminator = undefined;\nV2beta2ResourceMetricSource.attributeTypeMap = [\n {\n \"name\": \"name\",\n \"baseName\": \"name\",\n \"type\": \"string\"\n },\n {\n \"name\": \"target\",\n \"baseName\": \"target\",\n \"type\": \"V2beta2MetricTarget\"\n }\n];\n//# sourceMappingURL=v2beta2ResourceMetricSource.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.V2beta2ResourceMetricStatus = void 0;\n/**\n* ResourceMetricStatus indicates the current value of a resource metric known to Kubernetes, as specified in requests and limits, describing each pod in the current scale target (e.g. CPU or memory). Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the \\\"pods\\\" source.\n*/\nclass V2beta2ResourceMetricStatus {\n static getAttributeTypeMap() {\n return V2beta2ResourceMetricStatus.attributeTypeMap;\n }\n}\nexports.V2beta2ResourceMetricStatus = V2beta2ResourceMetricStatus;\nV2beta2ResourceMetricStatus.discriminator = undefined;\nV2beta2ResourceMetricStatus.attributeTypeMap = [\n {\n \"name\": \"current\",\n \"baseName\": \"current\",\n \"type\": \"V2beta2MetricValueStatus\"\n },\n {\n \"name\": \"name\",\n \"baseName\": \"name\",\n \"type\": \"string\"\n }\n];\n//# sourceMappingURL=v2beta2ResourceMetricStatus.js.map","\"use strict\";\n/**\n * Kubernetes\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: v1.22.2\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.VersionInfo = void 0;\n/**\n* Info contains versioning information. how we\\'ll want to distribute that information.\n*/\nclass VersionInfo {\n static getAttributeTypeMap() {\n return VersionInfo.attributeTypeMap;\n }\n}\nexports.VersionInfo = VersionInfo;\nVersionInfo.discriminator = undefined;\nVersionInfo.attributeTypeMap = [\n {\n \"name\": \"buildDate\",\n \"baseName\": \"buildDate\",\n \"type\": \"string\"\n },\n {\n \"name\": \"compiler\",\n \"baseName\": \"compiler\",\n \"type\": \"string\"\n },\n {\n \"name\": \"gitCommit\",\n \"baseName\": \"gitCommit\",\n \"type\": \"string\"\n },\n {\n \"name\": \"gitTreeState\",\n \"baseName\": \"gitTreeState\",\n \"type\": \"string\"\n },\n {\n \"name\": \"gitVersion\",\n \"baseName\": \"gitVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"goVersion\",\n \"baseName\": \"goVersion\",\n \"type\": \"string\"\n },\n {\n \"name\": \"major\",\n \"baseName\": \"major\",\n \"type\": \"string\"\n },\n {\n \"name\": \"minor\",\n \"baseName\": \"minor\",\n \"type\": \"string\"\n },\n {\n \"name\": \"platform\",\n \"baseName\": \"platform\",\n \"type\": \"string\"\n }\n];\n//# sourceMappingURL=versionInfo.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst tslib_1 = require(\"tslib\");\ntslib_1.__exportStar(require(\"./config\"), exports);\ntslib_1.__exportStar(require(\"./cache\"), exports);\ntslib_1.__exportStar(require(\"./api\"), exports);\ntslib_1.__exportStar(require(\"./attach\"), exports);\ntslib_1.__exportStar(require(\"./watch\"), exports);\ntslib_1.__exportStar(require(\"./exec\"), exports);\ntslib_1.__exportStar(require(\"./portforward\"), exports);\ntslib_1.__exportStar(require(\"./types\"), exports);\ntslib_1.__exportStar(require(\"./yaml\"), exports);\ntslib_1.__exportStar(require(\"./log\"), exports);\ntslib_1.__exportStar(require(\"./informer\"), exports);\ntslib_1.__exportStar(require(\"./top\"), exports);\ntslib_1.__exportStar(require(\"./object\"), exports);\ntslib_1.__exportStar(require(\"./cp\"), exports);\ntslib_1.__exportStar(require(\"./patch\"), exports);\ntslib_1.__exportStar(require(\"./metrics\"), exports);\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.makeInformer = exports.ERROR = exports.CONNECT = exports.DELETE = exports.CHANGE = exports.UPDATE = exports.ADD = void 0;\nconst cache_1 = require(\"./cache\");\nconst watch_1 = require(\"./watch\");\n// These are issued per object\nexports.ADD = 'add';\nexports.UPDATE = 'update';\nexports.CHANGE = 'change';\nexports.DELETE = 'delete';\n// This is issued when a watch connects or reconnects\nexports.CONNECT = 'connect';\n// This is issued when there is an error\nexports.ERROR = 'error';\nfunction makeInformer(kubeconfig, path, listPromiseFn, labelSelector) {\n const watch = new watch_1.Watch(kubeconfig);\n return new cache_1.ListWatch(path, watch, listPromiseFn, false, labelSelector);\n}\nexports.makeInformer = makeInformer;\n//# sourceMappingURL=informer.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Log = void 0;\nconst request = require(\"request\");\nconst api_1 = require(\"./gen/api\");\nclass Log {\n constructor(config) {\n this.config = config;\n }\n async log(namespace, podName, containerName, stream, doneOrOptions, options) {\n let done = () => undefined;\n if (typeof doneOrOptions === 'function') {\n done = doneOrOptions;\n }\n else {\n options = doneOrOptions;\n }\n const path = `/api/v1/namespaces/${namespace}/pods/${podName}/log`;\n const cluster = this.config.getCurrentCluster();\n if (!cluster) {\n throw new Error('No currently active cluster');\n }\n const url = cluster.server + path;\n const requestOptions = {\n method: 'GET',\n qs: {\n ...options,\n container: containerName,\n },\n uri: url,\n };\n await this.config.applyToRequest(requestOptions);\n return new Promise((resolve, reject) => {\n const req = request(requestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n done(error);\n }\n else if (response.statusCode !== 200) {\n try {\n const deserializedBody = api_1.ObjectSerializer.deserialize(JSON.parse(body), 'V1Status');\n reject(new api_1.HttpError(response, deserializedBody, response.statusCode));\n }\n catch (e) {\n reject(new api_1.HttpError(response, body, response.statusCode));\n }\n done(body);\n }\n else {\n done(null);\n }\n }).on('response', (response) => {\n if (response.statusCode === 200) {\n req.pipe(stream);\n resolve(req);\n }\n });\n });\n }\n}\nexports.Log = Log;\n//# sourceMappingURL=log.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Metrics = void 0;\nconst request = require(\"request\");\nconst api_1 = require(\"./gen/api\");\nclass Metrics {\n constructor(config) {\n this.config = config;\n }\n async getNodeMetrics() {\n return this.metricsApiRequest('/apis/metrics.k8s.io/v1beta1/nodes');\n }\n async getPodMetrics(namespace) {\n let path;\n if (namespace !== undefined && namespace.length > 0) {\n path = `/apis/metrics.k8s.io/v1beta1/namespaces/${namespace}/pods`;\n }\n else {\n path = '/apis/metrics.k8s.io/v1beta1/pods';\n }\n return this.metricsApiRequest(path);\n }\n async metricsApiRequest(path) {\n const cluster = this.config.getCurrentCluster();\n if (!cluster) {\n throw new Error('No currently active cluster');\n }\n const requestOptions = {\n method: 'GET',\n uri: cluster.server + path,\n };\n await this.config.applyToRequest(requestOptions);\n return new Promise((resolve, reject) => {\n const req = request(requestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else if (response.statusCode !== 200) {\n try {\n const deserializedBody = api_1.ObjectSerializer.deserialize(JSON.parse(body), 'V1Status');\n reject(new api_1.HttpError(response, deserializedBody, response.statusCode));\n }\n catch (e) {\n reject(new api_1.HttpError(response, body, response.statusCode));\n }\n }\n else {\n resolve(JSON.parse(body));\n }\n });\n });\n }\n}\nexports.Metrics = Metrics;\n//# sourceMappingURL=metrics.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.KubernetesObjectApi = void 0;\nconst request = require(\"request\");\nconst api_1 = require(\"./api\");\n/**\n * Valid Content-Type header values for patch operations. See\n * https://kubernetes.io/docs/tasks/run-application/update-api-object-kubectl-patch/\n * for details.\n */\nvar KubernetesPatchStrategies;\n(function (KubernetesPatchStrategies) {\n /** Diff-like JSON format. */\n KubernetesPatchStrategies[\"JsonPatch\"] = \"application/json-patch+json\";\n /** Simple merge. */\n KubernetesPatchStrategies[\"MergePatch\"] = \"application/merge-patch+json\";\n /** Merge with different strategies depending on field metadata. */\n KubernetesPatchStrategies[\"StrategicMergePatch\"] = \"application/strategic-merge-patch+json\";\n})(KubernetesPatchStrategies || (KubernetesPatchStrategies = {}));\n/**\n * Dynamically construct Kubernetes API request URIs so client does not have to know what type of object it is acting\n * on.\n */\nclass KubernetesObjectApi extends api_1.ApisApi {\n constructor() {\n super(...arguments);\n /** Initialize the default namespace. May be overwritten by context. */\n this.defaultNamespace = 'default';\n /** Cache resource API response. */\n this.apiVersionResourceCache = {};\n }\n /**\n * Create a KubernetesObjectApi object from the provided KubeConfig. This method should be used rather than\n * [[KubeConfig.makeApiClient]] so we can properly determine the default namespace if one is provided by the current\n * context.\n *\n * @param kc Valid Kubernetes config\n * @return Properly instantiated [[KubernetesObjectApi]] object\n */\n static makeApiClient(kc) {\n const client = kc.makeApiClient(KubernetesObjectApi);\n client.setDefaultNamespace(kc);\n return client;\n }\n /**\n * Create any Kubernetes resource.\n * @param spec Kubernetes resource spec.\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized\n * dryRun directive will result in an error response and no further processing of the request. Valid values\n * are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The\n * value must be less than or 128 characters long, and only contain printable characters, as defined by\n * https://golang.org/pkg/unicode/#IsPrint.\n * @param options Optional headers to use in the request.\n * @return Promise containing the request response and [[KubernetesObject]].\n */\n async create(spec, pretty, dryRun, fieldManager, options = { headers: {} }) {\n // verify required parameter 'spec' is not null or undefined\n if (spec === null || spec === undefined) {\n throw new Error('Required parameter spec was null or undefined when calling create.');\n }\n const localVarPath = await this.specUriPath(spec, 'create');\n const localVarQueryParameters = {};\n const localVarHeaderParams = this.generateHeaders(options.headers);\n if (pretty !== undefined) {\n localVarQueryParameters.pretty = api_1.ObjectSerializer.serialize(pretty, 'string');\n }\n if (dryRun !== undefined) {\n localVarQueryParameters.dryRun = api_1.ObjectSerializer.serialize(dryRun, 'string');\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters.fieldManager = api_1.ObjectSerializer.serialize(fieldManager, 'string');\n }\n const localVarRequestOptions = {\n method: 'POST',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: api_1.ObjectSerializer.serialize(spec, 'KubernetesObject'),\n };\n return this.requestPromise(localVarRequestOptions);\n }\n /**\n * Delete any Kubernetes resource.\n * @param spec Kubernetes resource spec\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized\n * dryRun directive will result in an error response and no further processing of the request. Valid values\n * are: - All: all dry run stages will be processed\n * @param gracePeriodSeconds The duration in seconds before the object should be deleted. Value must be non-negative\n * integer. The value zero indicates delete immediately. If this value is nil, the default grace period for\n * the specified type will be used. Defaults to a per object value if not specified. zero means delete\n * immediately.\n * @param orphanDependents Deprecated: please use the PropagationPolicy, this field will be deprecated in\n * 1.7. Should the dependent objects be orphaned. If true/false, the \\"orphan\\" finalizer will be\n * added to/removed from the object\\'s finalizers list. Either this field or PropagationPolicy may be\n * set, but not both.\n * @param propagationPolicy Whether and how garbage collection will be performed. Either this field or\n * OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in\n * the metadata.finalizers and the resource-specific default policy. Acceptable values are:\n * \\'Orphan\\' - orphan the dependents; \\'Background\\' - allow the garbage collector to delete\n * the dependents in the background; \\'Foreground\\' - a cascading policy that deletes all dependents\n * in the foreground.\n * @param body See [[V1DeleteOptions]].\n * @param options Optional headers to use in the request.\n * @return Promise containing the request response and a Kubernetes [[V1Status]].\n */\n async delete(spec, pretty, dryRun, gracePeriodSeconds, orphanDependents, propagationPolicy, body, options = { headers: {} }) {\n // verify required parameter 'spec' is not null or undefined\n if (spec === null || spec === undefined) {\n throw new Error('Required parameter spec was null or undefined when calling delete.');\n }\n const localVarPath = await this.specUriPath(spec, 'delete');\n const localVarQueryParameters = {};\n const localVarHeaderParams = this.generateHeaders(options.headers);\n if (pretty !== undefined) {\n localVarQueryParameters.pretty = api_1.ObjectSerializer.serialize(pretty, 'string');\n }\n if (dryRun !== undefined) {\n localVarQueryParameters.dryRun = api_1.ObjectSerializer.serialize(dryRun, 'string');\n }\n if (gracePeriodSeconds !== undefined) {\n localVarQueryParameters.gracePeriodSeconds = api_1.ObjectSerializer.serialize(gracePeriodSeconds, 'number');\n }\n if (orphanDependents !== undefined) {\n localVarQueryParameters.orphanDependents = api_1.ObjectSerializer.serialize(orphanDependents, 'boolean');\n }\n if (propagationPolicy !== undefined) {\n localVarQueryParameters.propagationPolicy = api_1.ObjectSerializer.serialize(propagationPolicy, 'string');\n }\n const localVarRequestOptions = {\n method: 'DELETE',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: api_1.ObjectSerializer.serialize(body, 'V1DeleteOptions'),\n };\n return this.requestPromise(localVarRequestOptions, 'V1Status');\n }\n /**\n * Patch any Kubernetes resource.\n * @param spec Kubernetes resource spec\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized\n * dryRun directive will result in an error response and no further processing of the request. Valid values\n * are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The\n * value must be less than or 128 characters long, and only contain printable characters, as defined by\n * https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests\n * (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch,\n * StrategicMergePatch).\n * @param force Force is going to \\"force\\" Apply requests. It means user will re-acquire conflicting\n * fields owned by other people. Force flag must be unset for non-apply patch requests.\n * @param options Optional headers to use in the request.\n * @return Promise containing the request response and [[KubernetesObject]].\n */\n async patch(spec, pretty, dryRun, fieldManager, force, options = { headers: {} }) {\n // verify required parameter 'spec' is not null or undefined\n if (spec === null || spec === undefined) {\n throw new Error('Required parameter spec was null or undefined when calling patch.');\n }\n const localVarPath = await this.specUriPath(spec, 'patch');\n const localVarQueryParameters = {};\n const localVarHeaderParams = this.generateHeaders(options.headers, 'PATCH');\n if (pretty !== undefined) {\n localVarQueryParameters.pretty = api_1.ObjectSerializer.serialize(pretty, 'string');\n }\n if (dryRun !== undefined) {\n localVarQueryParameters.dryRun = api_1.ObjectSerializer.serialize(dryRun, 'string');\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters.fieldManager = api_1.ObjectSerializer.serialize(fieldManager, 'string');\n }\n if (force !== undefined) {\n localVarQueryParameters.force = api_1.ObjectSerializer.serialize(force, 'boolean');\n }\n const localVarRequestOptions = {\n method: 'PATCH',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: api_1.ObjectSerializer.serialize(spec, 'object'),\n };\n return this.requestPromise(localVarRequestOptions);\n }\n /**\n * Read any Kubernetes resource.\n * @param spec Kubernetes resource spec\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param exact Should the export be exact. Exact export maintains cluster-specific fields like\n * \\'Namespace\\'. Deprecated. Planned for removal in 1.18.\n * @param exportt Should this value be exported. Export strips fields that a user can not\n * specify. Deprecated. Planned for removal in 1.18.\n * @param options Optional headers to use in the request.\n * @return Promise containing the request response and [[KubernetesObject]].\n */\n async read(spec, pretty, exact, exportt, options = { headers: {} }) {\n // verify required parameter 'spec' is not null or undefined\n if (spec === null || spec === undefined) {\n throw new Error('Required parameter spec was null or undefined when calling read.');\n }\n const localVarPath = await this.specUriPath(spec, 'read');\n const localVarQueryParameters = {};\n const localVarHeaderParams = this.generateHeaders(options.headers);\n if (pretty !== undefined) {\n localVarQueryParameters.pretty = api_1.ObjectSerializer.serialize(pretty, 'string');\n }\n if (exact !== undefined) {\n localVarQueryParameters.exact = api_1.ObjectSerializer.serialize(exact, 'boolean');\n }\n if (exportt !== undefined) {\n localVarQueryParameters.export = api_1.ObjectSerializer.serialize(exportt, 'boolean');\n }\n const localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n return this.requestPromise(localVarRequestOptions);\n }\n /**\n * List any Kubernetes resources.\n * @param apiVersion api group and version of the form /\n * @param kind Kubernetes resource kind\n * @param namespace list resources in this namespace\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param exact Should the export be exact. Exact export maintains cluster-specific fields like\n * \\'Namespace\\'. Deprecated. Planned for removal in 1.18.\n * @param exportt Should this value be exported. Export strips fields that a user can not\n * specify. Deprecated. Planned for removal in 1.18.\n * @param fieldSelector A selector to restrict the list of returned objects by their fields. Defaults to everything.\n * @param labelSelector A selector to restrict the list of returned objects by their labels. Defaults to everything.\n * @param limit Number of returned resources.\n * @param options Optional headers to use in the request.\n * @return Promise containing the request response and [[KubernetesListObject]].\n */\n async list(apiVersion, kind, namespace, pretty, exact, exportt, fieldSelector, labelSelector, limit, continueToken, options = { headers: {} }) {\n // verify required parameters 'apiVersion', 'kind' is not null or undefined\n if (apiVersion === null || apiVersion === undefined) {\n throw new Error('Required parameter apiVersion was null or undefined when calling list.');\n }\n if (kind === null || kind === undefined) {\n throw new Error('Required parameter kind was null or undefined when calling list.');\n }\n const localVarPath = await this.specUriPath({\n apiVersion,\n kind,\n metadata: {\n namespace,\n },\n }, 'list');\n const localVarQueryParameters = {};\n const localVarHeaderParams = this.generateHeaders(options.headers);\n if (pretty !== undefined) {\n localVarQueryParameters.pretty = api_1.ObjectSerializer.serialize(pretty, 'string');\n }\n if (exact !== undefined) {\n localVarQueryParameters.exact = api_1.ObjectSerializer.serialize(exact, 'boolean');\n }\n if (exportt !== undefined) {\n localVarQueryParameters.export = api_1.ObjectSerializer.serialize(exportt, 'boolean');\n }\n if (fieldSelector !== undefined) {\n localVarQueryParameters.fieldSelector = api_1.ObjectSerializer.serialize(fieldSelector, 'string');\n }\n if (labelSelector !== undefined) {\n localVarQueryParameters.labelSelector = api_1.ObjectSerializer.serialize(labelSelector, 'string');\n }\n if (limit !== undefined) {\n localVarQueryParameters.limit = api_1.ObjectSerializer.serialize(limit, 'number');\n }\n if (continueToken !== undefined) {\n localVarQueryParameters.continue = api_1.ObjectSerializer.serialize(continueToken, 'string');\n }\n const localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n return this.requestPromise(localVarRequestOptions);\n }\n /**\n * Replace any Kubernetes resource.\n * @param spec Kubernetes resource spec\n * @param pretty If \\'true\\', then the output is pretty printed.\n * @param dryRun When present, indicates that modifications should not be persisted. An invalid or unrecognized\n * dryRun directive will result in an error response and no further processing of the request. Valid values\n * are: - All: all dry run stages will be processed\n * @param fieldManager fieldManager is a name associated with the actor or entity that is making these changes. The\n * value must be less than or 128 characters long, and only contain printable characters, as defined by\n * https://golang.org/pkg/unicode/#IsPrint.\n * @param options Optional headers to use in the request.\n * @return Promise containing the request response and [[KubernetesObject]].\n */\n async replace(spec, pretty, dryRun, fieldManager, options = { headers: {} }) {\n // verify required parameter 'spec' is not null or undefined\n if (spec === null || spec === undefined) {\n throw new Error('Required parameter spec was null or undefined when calling replace.');\n }\n const localVarPath = await this.specUriPath(spec, 'replace');\n const localVarQueryParameters = {};\n const localVarHeaderParams = this.generateHeaders(options.headers);\n if (pretty !== undefined) {\n localVarQueryParameters.pretty = api_1.ObjectSerializer.serialize(pretty, 'string');\n }\n if (dryRun !== undefined) {\n localVarQueryParameters.dryRun = api_1.ObjectSerializer.serialize(dryRun, 'string');\n }\n if (fieldManager !== undefined) {\n localVarQueryParameters.fieldManager = api_1.ObjectSerializer.serialize(fieldManager, 'string');\n }\n const localVarRequestOptions = {\n method: 'PUT',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n body: api_1.ObjectSerializer.serialize(spec, 'KubernetesObject'),\n };\n return this.requestPromise(localVarRequestOptions);\n }\n /** Set default namespace from current context, if available. */\n setDefaultNamespace(kc) {\n if (kc.currentContext) {\n const currentContext = kc.getContextObject(kc.currentContext);\n if (currentContext && currentContext.namespace) {\n this.defaultNamespace = currentContext.namespace;\n }\n }\n return this.defaultNamespace;\n }\n /**\n * Use spec information to construct resource URI path. If any required information in not provided, an Error is\n * thrown. If an `apiVersion` is not provided, 'v1' is used. If a `metadata.namespace` is not provided for a\n * request that requires one, the context default is used, if available, if not, 'default' is used.\n *\n * @param spec Kubernetes resource spec which must define kind and apiVersion properties.\n * @param action API action, see [[K8sApiAction]].\n * @return tail of resource-specific URI\n */\n async specUriPath(spec, action) {\n if (!spec.kind) {\n throw new Error('Required spec property kind is not set');\n }\n if (!spec.apiVersion) {\n spec.apiVersion = 'v1';\n }\n if (!spec.metadata) {\n spec.metadata = {};\n }\n const resource = await this.resource(spec.apiVersion, spec.kind);\n if (!resource) {\n throw new Error(`Unrecognized API version and kind: ${spec.apiVersion} ${spec.kind}`);\n }\n if (resource.namespaced && !spec.metadata.namespace && action !== 'list') {\n spec.metadata.namespace = this.defaultNamespace;\n }\n const parts = [this.apiVersionPath(spec.apiVersion)];\n if (resource.namespaced && spec.metadata.namespace) {\n parts.push('namespaces', encodeURIComponent(String(spec.metadata.namespace)));\n }\n parts.push(resource.name);\n if (action !== 'create' && action !== 'list') {\n if (!spec.metadata.name) {\n throw new Error('Required spec property name is not set');\n }\n parts.push(encodeURIComponent(String(spec.metadata.name)));\n }\n return parts.join('/').toLowerCase();\n }\n /** Return root of API path up to API version. */\n apiVersionPath(apiVersion) {\n const api = apiVersion.includes('/') ? 'apis' : 'api';\n return [this.basePath, api, apiVersion].join('/');\n }\n /**\n * Merge default headers and provided headers, setting the 'Accept' header to 'application/json' and, if the\n * `action` is 'PATCH', the 'Content-Type' header to [[KubernetesPatchStrategies.StrategicMergePatch]]. Both of\n * these defaults can be overriden by values provided in `optionsHeaders`.\n *\n * @param optionHeaders Headers from method's options argument.\n * @param action HTTP action headers are being generated for.\n * @return Headers to use in request.\n */\n generateHeaders(optionsHeaders, action = 'GET') {\n const headers = Object.assign({}, this._defaultHeaders);\n headers.accept = 'application/json';\n if (action === 'PATCH') {\n headers['content-type'] = KubernetesPatchStrategies.StrategicMergePatch;\n }\n Object.assign(headers, optionsHeaders);\n return headers;\n }\n /**\n * Get metadata from Kubernetes API for resources described by `kind` and `apiVersion`. If it is unable to find the\n * resource `kind` under the provided `apiVersion`, `undefined` is returned.\n *\n * This method caches responses from the Kubernetes API to use for future requests. If the cache for apiVersion\n * exists but the kind is not found the request is attempted again.\n *\n * @param apiVersion Kubernetes API version, e.g., 'v1' or 'apps/v1'.\n * @param kind Kubernetes resource kind, e.g., 'Pod' or 'Namespace'.\n * @return Promise of the resource metadata or `undefined` if the resource is not found.\n */\n async resource(apiVersion, kind) {\n // verify required parameter 'apiVersion' is not null or undefined\n if (apiVersion === null || apiVersion === undefined) {\n throw new Error('Required parameter apiVersion was null or undefined when calling resource');\n }\n // verify required parameter 'kind' is not null or undefined\n if (kind === null || kind === undefined) {\n throw new Error('Required parameter kind was null or undefined when calling resource');\n }\n if (this.apiVersionResourceCache[apiVersion]) {\n const resource = this.apiVersionResourceCache[apiVersion].resources.find((r) => r.kind === kind);\n if (resource) {\n return resource;\n }\n }\n const localVarPath = this.apiVersionPath(apiVersion);\n const localVarQueryParameters = {};\n const localVarHeaderParams = this.generateHeaders({});\n const localVarRequestOptions = {\n method: 'GET',\n qs: localVarQueryParameters,\n headers: localVarHeaderParams,\n uri: localVarPath,\n useQuerystring: this._useQuerystring,\n json: true,\n };\n try {\n const getApiResponse = await this.requestPromise(localVarRequestOptions, 'V1APIResourceList');\n this.apiVersionResourceCache[apiVersion] = getApiResponse.body;\n return this.apiVersionResourceCache[apiVersion].resources.find((r) => r.kind === kind);\n }\n catch (e) {\n e.message = `Failed to fetch resource metadata for ${apiVersion}/${kind}: ${e.message}`;\n throw e;\n }\n }\n /**\n * Standard Kubernetes request wrapped in a Promise.\n */\n async requestPromise(requestOptions, tipe = 'KubernetesObject') {\n let authenticationPromise = Promise.resolve();\n if (this.authentications.BearerToken.apiKey) {\n authenticationPromise = authenticationPromise.then(() => this.authentications.BearerToken.applyToRequest(requestOptions));\n }\n authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(requestOptions));\n let interceptorPromise = authenticationPromise;\n for (const interceptor of this.interceptors) {\n interceptorPromise = interceptorPromise.then(() => interceptor(requestOptions));\n }\n await interceptorPromise;\n return new Promise((resolve, reject) => {\n request(requestOptions, (error, response, body) => {\n if (error) {\n reject(error);\n }\n else {\n body = api_1.ObjectSerializer.deserialize(body, tipe);\n if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {\n resolve({ response, body });\n }\n else {\n reject(new api_1.HttpError(response, body, response.statusCode));\n }\n }\n });\n });\n }\n}\nexports.KubernetesObjectApi = KubernetesObjectApi;\n//# sourceMappingURL=object.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.OpenIDConnectAuth = void 0;\nconst openid_client_1 = require(\"openid-client\");\nconst rfc4648_1 = require(\"rfc4648\");\nconst util_1 = require(\"util\");\nclass OpenIDConnectAuth {\n constructor() {\n // public for testing purposes.\n this.currentTokenExpiration = 0;\n }\n static decodeJWT(token) {\n const parts = token.split('.');\n if (parts.length !== 3) {\n return null;\n }\n const header = JSON.parse(new util_1.TextDecoder().decode(rfc4648_1.base64url.parse(parts[0], { loose: true })));\n const payload = JSON.parse(new util_1.TextDecoder().decode(rfc4648_1.base64url.parse(parts[1], { loose: true })));\n const signature = parts[2];\n return {\n header,\n payload,\n signature,\n };\n }\n static expirationFromToken(token) {\n const jwt = OpenIDConnectAuth.decodeJWT(token);\n if (!jwt) {\n return 0;\n }\n return jwt.payload.exp;\n }\n isAuthProvider(user) {\n if (!user.authProvider) {\n return false;\n }\n return user.authProvider.name === 'oidc';\n }\n /**\n * Setup the authentication header for oidc authed clients\n * @param user user info\n * @param opts request options\n * @param overrideClient for testing, a preconfigured oidc client\n */\n async applyAuthentication(user, opts, overrideClient) {\n const token = await this.getToken(user, overrideClient);\n if (token) {\n opts.headers.Authorization = `Bearer ${token}`;\n }\n }\n async getToken(user, overrideClient) {\n if (!user.authProvider.config) {\n return null;\n }\n if (!user.authProvider.config['client-secret']) {\n user.authProvider.config['client-secret'] = '';\n }\n if (!user.authProvider.config || !user.authProvider.config['id-token']) {\n return null;\n }\n return this.refresh(user, overrideClient);\n }\n async refresh(user, overrideClient) {\n if (this.currentTokenExpiration === 0) {\n this.currentTokenExpiration = OpenIDConnectAuth.expirationFromToken(user.authProvider.config['id-token']);\n }\n if (Date.now() / 1000 > this.currentTokenExpiration) {\n if (!user.authProvider.config['client-id'] ||\n !user.authProvider.config['refresh-token'] ||\n !user.authProvider.config['idp-issuer-url']) {\n return null;\n }\n const client = overrideClient ? overrideClient : await this.getClient(user);\n const newToken = await client.refresh(user.authProvider.config['refresh-token']);\n user.authProvider.config['id-token'] = newToken.id_token;\n user.authProvider.config['refresh-token'] = newToken.refresh_token;\n this.currentTokenExpiration = newToken.expires_at || 0;\n }\n return user.authProvider.config['id-token'];\n }\n async getClient(user) {\n const oidcIssuer = await openid_client_1.Issuer.discover(user.authProvider.config['idp-issuer-url']);\n return new oidcIssuer.Client({\n client_id: user.authProvider.config['client-id'],\n client_secret: user.authProvider.config['client-secret'],\n });\n }\n}\nexports.OpenIDConnectAuth = OpenIDConnectAuth;\n//# sourceMappingURL=oidc_auth.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.PatchUtils = void 0;\nclass PatchUtils {\n}\nexports.PatchUtils = PatchUtils;\nPatchUtils.PATCH_FORMAT_JSON_PATCH = 'application/json-patch+json';\nPatchUtils.PATCH_FORMAT_JSON_MERGE_PATCH = 'application/merge-patch+json';\nPatchUtils.PATCH_FORMAT_STRATEGIC_MERGE_PATCH = 'application/strategic-merge-patch+json';\nPatchUtils.PATCH_FORMAT_APPLY_YAML = 'application/apply-patch+yaml';\n//# sourceMappingURL=patch.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.PortForward = void 0;\nconst querystring = require(\"querystring\");\nconst util_1 = require(\"util\");\nconst web_socket_handler_1 = require(\"./web-socket-handler\");\nclass PortForward {\n // handler is a parameter really only for injecting for testing.\n constructor(config, disconnectOnErr, handler) {\n this.handler = handler || new web_socket_handler_1.WebSocketHandler(config);\n this.disconnectOnErr = util_1.isUndefined(disconnectOnErr) ? true : disconnectOnErr;\n }\n // TODO: support multiple ports for real...\n async portForward(namespace, podName, targetPorts, output, err, input, retryCount = 0) {\n if (targetPorts.length === 0) {\n throw new Error('You must provide at least one port to forward to.');\n }\n if (targetPorts.length > 1) {\n throw new Error('Only one port is currently supported for port-forward');\n }\n const query = {\n ports: targetPorts[0],\n };\n const queryStr = querystring.stringify(query);\n const needsToReadPortNumber = [];\n targetPorts.forEach((value, index) => {\n needsToReadPortNumber[index * 2] = true;\n needsToReadPortNumber[index * 2 + 1] = true;\n });\n const path = `/api/v1/namespaces/${namespace}/pods/${podName}/portforward?${queryStr}`;\n const createWebSocket = () => {\n return this.handler.connect(path, null, (streamNum, buff) => {\n if (streamNum >= targetPorts.length * 2) {\n return !this.disconnectOnErr;\n }\n // First two bytes of each stream are the port number\n if (needsToReadPortNumber[streamNum]) {\n buff = buff.slice(2);\n needsToReadPortNumber[streamNum] = false;\n }\n if (streamNum % 2 === 1) {\n if (err) {\n err.write(buff);\n }\n }\n else {\n output.write(buff);\n }\n return true;\n });\n };\n if (retryCount < 1) {\n const ws = await createWebSocket();\n web_socket_handler_1.WebSocketHandler.handleStandardInput(ws, input, 0);\n return ws;\n }\n return web_socket_handler_1.WebSocketHandler.restartableHandleStandardInput(createWebSocket, input, 0, retryCount);\n }\n}\nexports.PortForward = PortForward;\n//# sourceMappingURL=portforward.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isResizable = exports.TerminalSizeQueue = void 0;\nconst stream_1 = require(\"stream\");\nclass TerminalSizeQueue extends stream_1.Readable {\n constructor(opts = {}) {\n super({\n ...opts,\n // tslint:disable-next-line:no-empty\n read() { },\n });\n }\n handleResizes(writeStream) {\n // Set initial size\n this.resize(getTerminalSize(writeStream));\n // Handle future size updates\n writeStream.on('resize', () => this.resize(getTerminalSize(writeStream)));\n }\n resize(size) {\n this.push(JSON.stringify(size));\n }\n}\nexports.TerminalSizeQueue = TerminalSizeQueue;\nfunction isResizable(stream) {\n if (stream == null) {\n return false;\n }\n const hasRows = 'rows' in stream;\n const hasColumns = 'columns' in stream;\n const hasOn = typeof stream.on === 'function';\n return hasRows && hasColumns && hasOn;\n}\nexports.isResizable = isResizable;\nfunction getTerminalSize(writeStream) {\n return { height: writeStream.rows, width: writeStream.columns };\n}\n//# sourceMappingURL=terminal-size-queue.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.topPods = exports.topNodes = exports.PodStatus = exports.ContainerStatus = exports.NodeStatus = exports.CurrentResourceUsage = exports.ResourceUsage = void 0;\nconst util_1 = require(\"./util\");\nclass ResourceUsage {\n constructor(Capacity, RequestTotal, LimitTotal) {\n this.Capacity = Capacity;\n this.RequestTotal = RequestTotal;\n this.LimitTotal = LimitTotal;\n }\n}\nexports.ResourceUsage = ResourceUsage;\nclass CurrentResourceUsage {\n constructor(CurrentUsage, RequestTotal, LimitTotal) {\n this.CurrentUsage = CurrentUsage;\n this.RequestTotal = RequestTotal;\n this.LimitTotal = LimitTotal;\n }\n}\nexports.CurrentResourceUsage = CurrentResourceUsage;\nclass NodeStatus {\n constructor(Node, CPU, Memory) {\n this.Node = Node;\n this.CPU = CPU;\n this.Memory = Memory;\n }\n}\nexports.NodeStatus = NodeStatus;\nclass ContainerStatus {\n constructor(Container, CPUUsage, MemoryUsage) {\n this.Container = Container;\n this.CPUUsage = CPUUsage;\n this.MemoryUsage = MemoryUsage;\n }\n}\nexports.ContainerStatus = ContainerStatus;\nclass PodStatus {\n constructor(Pod, CPU, Memory, Containers) {\n this.Pod = Pod;\n this.CPU = CPU;\n this.Memory = Memory;\n this.Containers = Containers;\n }\n}\nexports.PodStatus = PodStatus;\nasync function topNodes(api) {\n // TODO: Support metrics APIs in the client and this library\n const nodes = await api.listNode();\n const result = [];\n for (const node of nodes.body.items) {\n const availableCPU = util_1.quantityToScalar(node.status.allocatable.cpu);\n const availableMem = util_1.quantityToScalar(node.status.allocatable.memory);\n let totalPodCPU = 0;\n let totalPodCPULimit = 0;\n let totalPodMem = 0;\n let totalPodMemLimit = 0;\n let pods = await util_1.podsForNode(api, node.metadata.name);\n pods = pods.filter((pod) => pod.status.phase === 'Running');\n pods.forEach((pod) => {\n const cpuTotal = util_1.totalCPU(pod);\n totalPodCPU = util_1.add(totalPodCPU, cpuTotal.request);\n totalPodCPULimit = util_1.add(totalPodCPULimit, cpuTotal.limit);\n const memTotal = util_1.totalMemory(pod);\n totalPodMem = util_1.add(totalPodMem, memTotal.request);\n totalPodMemLimit = util_1.add(totalPodMemLimit, memTotal.limit);\n });\n const cpuUsage = new ResourceUsage(availableCPU, totalPodCPU, totalPodCPULimit);\n const memUsage = new ResourceUsage(availableMem, totalPodMem, totalPodMemLimit);\n result.push(new NodeStatus(node, cpuUsage, memUsage));\n }\n return result;\n}\nexports.topNodes = topNodes;\n// Returns the current pod CPU/Memory usage including the CPU/Memory usage of each container\nasync function topPods(api, metrics, namespace) {\n // Figure out which pod list endpoint to call\n const getPodList = async () => {\n if (namespace) {\n return (await api.listNamespacedPod(namespace)).body;\n }\n return (await api.listPodForAllNamespaces()).body;\n };\n const [podMetrics, podList] = await Promise.all([metrics.getPodMetrics(namespace), getPodList()]);\n // Create a map of pod names to their metric usage\n // to make it easier to look up when we need it later\n const podMetricsMap = podMetrics.items.reduce((accum, next) => {\n accum.set(next.metadata.name, next);\n return accum;\n }, new Map());\n const result = [];\n for (const pod of podList.items) {\n const podMetric = podMetricsMap.get(pod.metadata.name);\n const containerStatuses = [];\n let currentPodCPU = 0;\n let currentPodMem = 0;\n let podRequestsCPU = 0;\n let podLimitsCPU = 0;\n let podRequestsMem = 0;\n let podLimitsMem = 0;\n pod.spec.containers.forEach((container) => {\n // get the the container CPU/Memory container.resources.requests/limits\n const containerCpuTotal = util_1.totalCPUForContainer(container);\n const containerMemTotal = util_1.totalMemoryForContainer(container);\n // sum each container's CPU/Memory container.resources.requests/limits\n // to get the pod's overall requests/limits\n podRequestsCPU = util_1.add(podRequestsCPU, containerCpuTotal.request);\n podLimitsCPU = util_1.add(podLimitsCPU, containerCpuTotal.limit);\n podRequestsMem = util_1.add(podLimitsMem, containerMemTotal.request);\n podLimitsMem = util_1.add(podLimitsMem, containerMemTotal.limit);\n // Find the container metrics by container.name\n // if both the pod and container metrics exist\n const containerMetrics = podMetric !== undefined\n ? podMetric.containers.find((c) => c.name === container.name)\n : undefined;\n // Store the current usage of each container\n // Sum each container to get the overall pod usage\n if (containerMetrics !== undefined) {\n const currentContainerCPUUsage = util_1.quantityToScalar(containerMetrics.usage.cpu);\n const currentContainerMemUsage = util_1.quantityToScalar(containerMetrics.usage.memory);\n currentPodCPU = util_1.add(currentPodCPU, currentContainerCPUUsage);\n currentPodMem = util_1.add(currentPodMem, currentContainerMemUsage);\n const containerCpuUsage = new CurrentResourceUsage(currentContainerCPUUsage, containerCpuTotal.request, containerCpuTotal.limit);\n const containerMemUsage = new CurrentResourceUsage(currentContainerMemUsage, containerMemTotal.request, containerMemTotal.limit);\n containerStatuses.push(new ContainerStatus(containerMetrics.name, containerCpuUsage, containerMemUsage));\n }\n });\n const podCpuUsage = new CurrentResourceUsage(currentPodCPU, podRequestsCPU, podLimitsCPU);\n const podMemUsage = new CurrentResourceUsage(currentPodMem, podRequestsMem, podLimitsMem);\n result.push(new PodStatus(pod, podCpuUsage, podMemUsage, containerStatuses));\n }\n return result;\n}\nexports.topPods = topPods;\n//# sourceMappingURL=top.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\n//# sourceMappingURL=types.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.totalForResource = exports.containerTotalForResource = exports.add = exports.totalMemory = exports.totalCPU = exports.totalMemoryForContainer = exports.totalCPUForContainer = exports.ResourceStatus = exports.quantityToScalar = exports.findSuffix = exports.podsForNode = void 0;\nconst underscore_1 = require(\"underscore\");\nasync function podsForNode(api, nodeName) {\n const allPods = await api.listPodForAllNamespaces();\n return allPods.body.items.filter((pod) => pod.spec.nodeName === nodeName);\n}\nexports.podsForNode = podsForNode;\nfunction findSuffix(quantity) {\n let ix = quantity.length - 1;\n while (ix >= 0 && !/[\\.0-9]/.test(quantity.charAt(ix))) {\n ix--;\n }\n return ix === -1 ? '' : quantity.substring(ix + 1);\n}\nexports.findSuffix = findSuffix;\nfunction quantityToScalar(quantity) {\n if (!quantity) {\n return 0;\n }\n const suffix = findSuffix(quantity);\n if (suffix === '') {\n const num = Number(quantity).valueOf();\n if (isNaN(num)) {\n throw new Error('Unknown quantity ' + quantity);\n }\n return num;\n }\n switch (suffix) {\n case 'n':\n return Number(quantity.substr(0, quantity.length - 1)).valueOf() / 1000000000;\n case 'u':\n return Number(quantity.substr(0, quantity.length - 1)).valueOf() / 1000000;\n case 'm':\n return Number(quantity.substr(0, quantity.length - 1)).valueOf() / 1000.0;\n case 'k':\n return BigInt(quantity.substr(0, quantity.length - 1)) * BigInt(1000);\n case 'M':\n return BigInt(quantity.substr(0, quantity.length - 1)) * BigInt(1000 * 1000);\n case 'G':\n return BigInt(quantity.substr(0, quantity.length - 1)) * BigInt(1000 * 1000 * 1000);\n case 'T':\n return (BigInt(quantity.substr(0, quantity.length - 1)) * BigInt(1000 * 1000 * 1000) * BigInt(1000));\n case 'P':\n return (BigInt(quantity.substr(0, quantity.length - 1)) *\n BigInt(1000 * 1000 * 1000) *\n BigInt(1000 * 1000));\n case 'E':\n return (BigInt(quantity.substr(0, quantity.length - 1)) *\n BigInt(1000 * 1000 * 1000) *\n BigInt(1000 * 1000 * 1000));\n case 'Ki':\n return BigInt(quantity.substr(0, quantity.length - 2)) * BigInt(1024);\n case 'Mi':\n return BigInt(quantity.substr(0, quantity.length - 2)) * BigInt(1024 * 1024);\n case 'Gi':\n return BigInt(quantity.substr(0, quantity.length - 2)) * BigInt(1024 * 1024 * 1024);\n case 'Ti':\n return (BigInt(quantity.substr(0, quantity.length - 2)) * BigInt(1024 * 1024 * 1024) * BigInt(1024));\n case 'Pi':\n return (BigInt(quantity.substr(0, quantity.length - 2)) *\n BigInt(1024 * 1024 * 1024) *\n BigInt(1024 * 1024));\n case 'Ei':\n return (BigInt(quantity.substr(0, quantity.length - 2)) *\n BigInt(1024 * 1024 * 1024) *\n BigInt(1024 * 1024 * 1024));\n default:\n throw new Error(`Unknown suffix: ${suffix}`);\n }\n}\nexports.quantityToScalar = quantityToScalar;\nclass ResourceStatus {\n constructor(request, limit, resourceType) {\n this.request = request;\n this.limit = limit;\n this.resourceType = resourceType;\n }\n}\nexports.ResourceStatus = ResourceStatus;\nfunction totalCPUForContainer(container) {\n return containerTotalForResource(container, 'cpu');\n}\nexports.totalCPUForContainer = totalCPUForContainer;\nfunction totalMemoryForContainer(container) {\n return containerTotalForResource(container, 'memory');\n}\nexports.totalMemoryForContainer = totalMemoryForContainer;\nfunction totalCPU(pod) {\n return totalForResource(pod, 'cpu');\n}\nexports.totalCPU = totalCPU;\nfunction totalMemory(pod) {\n return totalForResource(pod, 'memory');\n}\nexports.totalMemory = totalMemory;\nfunction add(n1, n2) {\n if (underscore_1.isNumber(n1) && underscore_1.isNumber(n2)) {\n return n1 + n2;\n }\n if (underscore_1.isNumber(n1)) {\n return BigInt(Math.round(n1)) + n2;\n }\n else if (underscore_1.isNumber(n2)) {\n return n1 + BigInt(Math.round(n2));\n }\n return (n1 + n2);\n}\nexports.add = add;\nfunction containerTotalForResource(container, resource) {\n let reqTotal = 0;\n let limitTotal = 0;\n if (container.resources) {\n if (container.resources.requests) {\n reqTotal = add(reqTotal, quantityToScalar(container.resources.requests[resource]));\n }\n if (container.resources.limits) {\n limitTotal = add(limitTotal, quantityToScalar(container.resources.limits[resource]));\n }\n }\n return new ResourceStatus(reqTotal, limitTotal, resource);\n}\nexports.containerTotalForResource = containerTotalForResource;\nfunction totalForResource(pod, resource) {\n let reqTotal = 0;\n let limitTotal = 0;\n pod.spec.containers.forEach((container) => {\n const containerTotal = containerTotalForResource(container, resource);\n reqTotal = add(reqTotal, containerTotal.request);\n limitTotal = add(limitTotal, containerTotal.limit);\n });\n return new ResourceStatus(reqTotal, limitTotal, resource);\n}\nexports.totalForResource = totalForResource;\n//# sourceMappingURL=util.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Watch = exports.DefaultRequest = void 0;\nconst byline = require(\"byline\");\nconst request = require(\"request\");\nclass DefaultRequest {\n constructor(requestImpl) {\n this.requestImpl = requestImpl ? requestImpl : request;\n }\n // Using request lib can be confusing when combining Stream- with Callback-\n // style API. We avoid the callback and handle HTTP response errors, that\n // would otherwise require a different error handling, in a transparent way\n // to the user (see github issue request/request#647 for more info).\n webRequest(opts) {\n const req = this.requestImpl(opts);\n // pause the stream until we get a response not to miss any bytes\n req.pause();\n req.on('response', (resp) => {\n if (resp.statusCode === 200) {\n req.resume();\n }\n else {\n const error = new Error(resp.statusMessage);\n error.statusCode = resp.statusCode;\n req.emit('error', error);\n }\n });\n return req;\n }\n}\nexports.DefaultRequest = DefaultRequest;\nclass Watch {\n constructor(config, requestImpl) {\n this.config = config;\n if (requestImpl) {\n this.requestImpl = requestImpl;\n }\n else {\n this.requestImpl = new DefaultRequest();\n }\n }\n // Watch the resource and call provided callback with parsed json object\n // upon event received over the watcher connection.\n //\n // \"done\" callback is called either when connection is closed or when there\n // is an error. In either case, watcher takes care of properly closing the\n // underlaying connection so that it doesn't leak any resources.\n async watch(path, queryParams, callback, done) {\n const cluster = this.config.getCurrentCluster();\n if (!cluster) {\n throw new Error('No currently active cluster');\n }\n const url = cluster.server + path;\n queryParams.watch = true;\n const headerParams = {};\n const requestOptions = {\n method: 'GET',\n qs: queryParams,\n headers: headerParams,\n uri: url,\n useQuerystring: true,\n json: true,\n pool: false,\n };\n await this.config.applyToRequest(requestOptions);\n let req;\n let doneCalled = false;\n const doneCallOnce = (err) => {\n if (!doneCalled) {\n req.abort();\n doneCalled = true;\n done(err);\n }\n };\n req = this.requestImpl.webRequest(requestOptions);\n const stream = byline.createStream();\n req.on('error', doneCallOnce);\n req.on('socket', (socket) => {\n socket.setTimeout(30000);\n socket.setKeepAlive(true, 30000);\n });\n stream.on('error', doneCallOnce);\n stream.on('close', () => doneCallOnce(null));\n stream.on('data', (line) => {\n try {\n const data = JSON.parse(line);\n callback(data.type, data.object, data);\n }\n catch (ignore) {\n // ignore parse errors\n }\n });\n req.pipe(stream);\n return req;\n }\n}\nexports.Watch = Watch;\nWatch.SERVER_SIDE_CLOSE = { error: 'Connection closed on server' };\n//# sourceMappingURL=watch.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.WebSocketHandler = void 0;\nconst WebSocket = require(\"isomorphic-ws\");\nconst protocols = ['v4.channel.k8s.io', 'v3.channel.k8s.io', 'v2.channel.k8s.io', 'channel.k8s.io'];\nclass WebSocketHandler {\n // factory is really just for test injection\n constructor(config, socketFactory) {\n this.config = config;\n this.socketFactory = socketFactory;\n }\n static handleStandardStreams(streamNum, buff, stdout, stderr) {\n if (buff.length < 1) {\n return null;\n }\n if (stdout && streamNum === WebSocketHandler.StdoutStream) {\n stdout.write(buff);\n }\n else if (stderr && streamNum === WebSocketHandler.StderrStream) {\n stderr.write(buff);\n }\n else if (streamNum === WebSocketHandler.StatusStream) {\n // stream closing.\n if (stdout && stdout !== process.stdout) {\n stdout.end();\n }\n if (stderr && stderr !== process.stderr) {\n stderr.end();\n }\n return JSON.parse(buff.toString('utf8'));\n }\n else {\n throw new Error('Unknown stream: ' + streamNum);\n }\n return null;\n }\n static handleStandardInput(ws, stdin, streamNum = 0) {\n stdin.on('data', (data) => {\n const buff = Buffer.alloc(data.length + 1);\n buff.writeInt8(streamNum, 0);\n if (data instanceof Buffer) {\n data.copy(buff, 1);\n }\n else {\n buff.write(data, 1);\n }\n ws.send(buff);\n });\n stdin.on('end', () => {\n ws.close();\n });\n // Keep the stream open\n return true;\n }\n static async processData(data, ws, createWS, streamNum = 0, retryCount = 3) {\n const buff = Buffer.alloc(data.length + 1);\n buff.writeInt8(streamNum, 0);\n if (data instanceof Buffer) {\n data.copy(buff, 1);\n }\n else {\n buff.write(data, 1);\n }\n let i = 0;\n for (; i < retryCount; ++i) {\n if (ws !== null && ws.readyState === WebSocket.OPEN) {\n ws.send(buff);\n break;\n }\n else {\n ws = await createWS();\n }\n }\n // This throw doesn't go anywhere.\n // TODO: Figure out the right way to return an error.\n if (i >= retryCount) {\n throw new Error(\"can't send data to ws\");\n }\n return ws;\n }\n static restartableHandleStandardInput(createWS, stdin, streamNum = 0, retryCount = 3) {\n if (retryCount < 0) {\n throw new Error(\"retryCount can't be lower than 0.\");\n }\n let queue = Promise.resolve();\n let ws = null;\n stdin.on('data', (data) => {\n queue = queue.then(async () => {\n ws = await WebSocketHandler.processData(data, ws, createWS, streamNum, retryCount);\n });\n });\n stdin.on('end', () => {\n if (ws) {\n ws.close();\n }\n });\n return () => ws;\n }\n /**\n * Connect to a web socket endpoint.\n * @param path The HTTP Path to connect to on the server.\n * @param textHandler Callback for text over the web socket.\n * Returns true if the connection should be kept alive, false to disconnect.\n * @param binaryHandler Callback for binary data over the web socket.\n * Returns true if the connection should be kept alive, false to disconnect.\n */\n async connect(path, textHandler, binaryHandler) {\n const cluster = this.config.getCurrentCluster();\n if (!cluster) {\n throw new Error('No cluster is defined.');\n }\n const server = cluster.server;\n const ssl = server.startsWith('https://');\n const target = ssl ? server.substr(8) : server.substr(7);\n const proto = ssl ? 'wss' : 'ws';\n const uri = `${proto}://${target}${path}`;\n const opts = {};\n await this.config.applytoHTTPSOptions(opts);\n return await new Promise((resolve, reject) => {\n const client = this.socketFactory\n ? this.socketFactory(uri, opts)\n : new WebSocket(uri, protocols, opts);\n let resolved = false;\n client.onopen = () => {\n resolved = true;\n resolve(client);\n };\n client.onerror = (err) => {\n if (!resolved) {\n reject(err);\n }\n };\n client.onmessage = ({ data }) => {\n // TODO: support ArrayBuffer and Buffer[] data types?\n if (typeof data === 'string') {\n if (textHandler && !textHandler(data)) {\n client.close();\n }\n }\n else if (data instanceof Buffer) {\n const streamNum = data.readInt8(0);\n if (binaryHandler && !binaryHandler(streamNum, data.slice(1))) {\n client.close();\n }\n }\n };\n });\n }\n}\nexports.WebSocketHandler = WebSocketHandler;\nWebSocketHandler.StdinStream = 0;\nWebSocketHandler.StdoutStream = 1;\nWebSocketHandler.StderrStream = 2;\nWebSocketHandler.StatusStream = 3;\nWebSocketHandler.ResizeStream = 4;\n//# sourceMappingURL=web-socket-handler.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.dumpYaml = exports.loadAllYaml = exports.loadYaml = void 0;\nconst tslib_1 = require(\"tslib\");\nconst yaml = tslib_1.__importStar(require(\"js-yaml\"));\nfunction loadYaml(data, opts) {\n return yaml.load(data, opts);\n}\nexports.loadYaml = loadYaml;\nfunction loadAllYaml(data, opts) {\n return yaml.loadAll(data, undefined, opts);\n}\nexports.loadAllYaml = loadAllYaml;\nfunction dumpYaml(object, opts) {\n return yaml.dump(object, opts);\n}\nexports.dumpYaml = dumpYaml;\n//# sourceMappingURL=yaml.js.map","'use strict';\nconst path = require('path');\nconst childProcess = require('child_process');\nconst crossSpawn = require('cross-spawn');\nconst stripFinalNewline = require('strip-final-newline');\nconst npmRunPath = require('npm-run-path');\nconst onetime = require('onetime');\nconst makeError = require('./lib/error');\nconst normalizeStdio = require('./lib/stdio');\nconst {spawnedKill, spawnedCancel, setupTimeout, setExitHandler} = require('./lib/kill');\nconst {handleInput, getSpawnedResult, makeAllStream, validateInputSync} = require('./lib/stream.js');\nconst {mergePromise, getSpawnedPromise} = require('./lib/promise.js');\nconst {joinCommand, parseCommand} = require('./lib/command.js');\n\nconst DEFAULT_MAX_BUFFER = 1000 * 1000 * 100;\n\nconst getEnv = ({env: envOption, extendEnv, preferLocal, localDir, execPath}) => {\n\tconst env = extendEnv ? {...process.env, ...envOption} : envOption;\n\n\tif (preferLocal) {\n\t\treturn npmRunPath.env({env, cwd: localDir, execPath});\n\t}\n\n\treturn env;\n};\n\nconst handleArguments = (file, args, options = {}) => {\n\tconst parsed = crossSpawn._parse(file, args, options);\n\tfile = parsed.command;\n\targs = parsed.args;\n\toptions = parsed.options;\n\n\toptions = {\n\t\tmaxBuffer: DEFAULT_MAX_BUFFER,\n\t\tbuffer: true,\n\t\tstripFinalNewline: true,\n\t\textendEnv: true,\n\t\tpreferLocal: false,\n\t\tlocalDir: options.cwd || process.cwd(),\n\t\texecPath: process.execPath,\n\t\tencoding: 'utf8',\n\t\treject: true,\n\t\tcleanup: true,\n\t\tall: false,\n\t\twindowsHide: true,\n\t\t...options\n\t};\n\n\toptions.env = getEnv(options);\n\n\toptions.stdio = normalizeStdio(options);\n\n\tif (process.platform === 'win32' && path.basename(file, '.exe') === 'cmd') {\n\t\t// #116\n\t\targs.unshift('/q');\n\t}\n\n\treturn {file, args, options, parsed};\n};\n\nconst handleOutput = (options, value, error) => {\n\tif (typeof value !== 'string' && !Buffer.isBuffer(value)) {\n\t\t// When `execa.sync()` errors, we normalize it to '' to mimic `execa()`\n\t\treturn error === undefined ? undefined : '';\n\t}\n\n\tif (options.stripFinalNewline) {\n\t\treturn stripFinalNewline(value);\n\t}\n\n\treturn value;\n};\n\nconst execa = (file, args, options) => {\n\tconst parsed = handleArguments(file, args, options);\n\tconst command = joinCommand(file, args);\n\n\tlet spawned;\n\ttry {\n\t\tspawned = childProcess.spawn(parsed.file, parsed.args, parsed.options);\n\t} catch (error) {\n\t\t// Ensure the returned error is always both a promise and a child process\n\t\tconst dummySpawned = new childProcess.ChildProcess();\n\t\tconst errorPromise = Promise.reject(makeError({\n\t\t\terror,\n\t\t\tstdout: '',\n\t\t\tstderr: '',\n\t\t\tall: '',\n\t\t\tcommand,\n\t\t\tparsed,\n\t\t\ttimedOut: false,\n\t\t\tisCanceled: false,\n\t\t\tkilled: false\n\t\t}));\n\t\treturn mergePromise(dummySpawned, errorPromise);\n\t}\n\n\tconst spawnedPromise = getSpawnedPromise(spawned);\n\tconst timedPromise = setupTimeout(spawned, parsed.options, spawnedPromise);\n\tconst processDone = setExitHandler(spawned, parsed.options, timedPromise);\n\n\tconst context = {isCanceled: false};\n\n\tspawned.kill = spawnedKill.bind(null, spawned.kill.bind(spawned));\n\tspawned.cancel = spawnedCancel.bind(null, spawned, context);\n\n\tconst handlePromise = async () => {\n\t\tconst [{error, exitCode, signal, timedOut}, stdoutResult, stderrResult, allResult] = await getSpawnedResult(spawned, parsed.options, processDone);\n\t\tconst stdout = handleOutput(parsed.options, stdoutResult);\n\t\tconst stderr = handleOutput(parsed.options, stderrResult);\n\t\tconst all = handleOutput(parsed.options, allResult);\n\n\t\tif (error || exitCode !== 0 || signal !== null) {\n\t\t\tconst returnedError = makeError({\n\t\t\t\terror,\n\t\t\t\texitCode,\n\t\t\t\tsignal,\n\t\t\t\tstdout,\n\t\t\t\tstderr,\n\t\t\t\tall,\n\t\t\t\tcommand,\n\t\t\t\tparsed,\n\t\t\t\ttimedOut,\n\t\t\t\tisCanceled: context.isCanceled,\n\t\t\t\tkilled: spawned.killed\n\t\t\t});\n\n\t\t\tif (!parsed.options.reject) {\n\t\t\t\treturn returnedError;\n\t\t\t}\n\n\t\t\tthrow returnedError;\n\t\t}\n\n\t\treturn {\n\t\t\tcommand,\n\t\t\texitCode: 0,\n\t\t\tstdout,\n\t\t\tstderr,\n\t\t\tall,\n\t\t\tfailed: false,\n\t\t\ttimedOut: false,\n\t\t\tisCanceled: false,\n\t\t\tkilled: false\n\t\t};\n\t};\n\n\tconst handlePromiseOnce = onetime(handlePromise);\n\n\thandleInput(spawned, parsed.options.input);\n\n\tspawned.all = makeAllStream(spawned, parsed.options);\n\n\treturn mergePromise(spawned, handlePromiseOnce);\n};\n\nmodule.exports = execa;\n\nmodule.exports.sync = (file, args, options) => {\n\tconst parsed = handleArguments(file, args, options);\n\tconst command = joinCommand(file, args);\n\n\tvalidateInputSync(parsed.options);\n\n\tlet result;\n\ttry {\n\t\tresult = childProcess.spawnSync(parsed.file, parsed.args, parsed.options);\n\t} catch (error) {\n\t\tthrow makeError({\n\t\t\terror,\n\t\t\tstdout: '',\n\t\t\tstderr: '',\n\t\t\tall: '',\n\t\t\tcommand,\n\t\t\tparsed,\n\t\t\ttimedOut: false,\n\t\t\tisCanceled: false,\n\t\t\tkilled: false\n\t\t});\n\t}\n\n\tconst stdout = handleOutput(parsed.options, result.stdout, result.error);\n\tconst stderr = handleOutput(parsed.options, result.stderr, result.error);\n\n\tif (result.error || result.status !== 0 || result.signal !== null) {\n\t\tconst error = makeError({\n\t\t\tstdout,\n\t\t\tstderr,\n\t\t\terror: result.error,\n\t\t\tsignal: result.signal,\n\t\t\texitCode: result.status,\n\t\t\tcommand,\n\t\t\tparsed,\n\t\t\ttimedOut: result.error && result.error.code === 'ETIMEDOUT',\n\t\t\tisCanceled: false,\n\t\t\tkilled: result.signal !== null\n\t\t});\n\n\t\tif (!parsed.options.reject) {\n\t\t\treturn error;\n\t\t}\n\n\t\tthrow error;\n\t}\n\n\treturn {\n\t\tcommand,\n\t\texitCode: 0,\n\t\tstdout,\n\t\tstderr,\n\t\tfailed: false,\n\t\ttimedOut: false,\n\t\tisCanceled: false,\n\t\tkilled: false\n\t};\n};\n\nmodule.exports.command = (command, options) => {\n\tconst [file, ...args] = parseCommand(command);\n\treturn execa(file, args, options);\n};\n\nmodule.exports.commandSync = (command, options) => {\n\tconst [file, ...args] = parseCommand(command);\n\treturn execa.sync(file, args, options);\n};\n\nmodule.exports.node = (scriptPath, args, options = {}) => {\n\tif (args && !Array.isArray(args) && typeof args === 'object') {\n\t\toptions = args;\n\t\targs = [];\n\t}\n\n\tconst stdio = normalizeStdio.node(options);\n\tconst defaultExecArgv = process.execArgv.filter(arg => !arg.startsWith('--inspect'));\n\n\tconst {\n\t\tnodePath = process.execPath,\n\t\tnodeOptions = defaultExecArgv\n\t} = options;\n\n\treturn execa(\n\t\tnodePath,\n\t\t[\n\t\t\t...nodeOptions,\n\t\t\tscriptPath,\n\t\t\t...(Array.isArray(args) ? args : [])\n\t\t],\n\t\t{\n\t\t\t...options,\n\t\t\tstdin: undefined,\n\t\t\tstdout: undefined,\n\t\t\tstderr: undefined,\n\t\t\tstdio,\n\t\t\tshell: false\n\t\t}\n\t);\n};\n","'use strict';\nconst SPACES_REGEXP = / +/g;\n\nconst joinCommand = (file, args = []) => {\n\tif (!Array.isArray(args)) {\n\t\treturn file;\n\t}\n\n\treturn [file, ...args].join(' ');\n};\n\n// Handle `execa.command()`\nconst parseCommand = command => {\n\tconst tokens = [];\n\tfor (const token of command.trim().split(SPACES_REGEXP)) {\n\t\t// Allow spaces to be escaped by a backslash if not meant as a delimiter\n\t\tconst previousToken = tokens[tokens.length - 1];\n\t\tif (previousToken && previousToken.endsWith('\\\\')) {\n\t\t\t// Merge previous token with current one\n\t\t\ttokens[tokens.length - 1] = `${previousToken.slice(0, -1)} ${token}`;\n\t\t} else {\n\t\t\ttokens.push(token);\n\t\t}\n\t}\n\n\treturn tokens;\n};\n\nmodule.exports = {\n\tjoinCommand,\n\tparseCommand\n};\n","'use strict';\nconst {signalsByName} = require('human-signals');\n\nconst getErrorPrefix = ({timedOut, timeout, errorCode, signal, signalDescription, exitCode, isCanceled}) => {\n\tif (timedOut) {\n\t\treturn `timed out after ${timeout} milliseconds`;\n\t}\n\n\tif (isCanceled) {\n\t\treturn 'was canceled';\n\t}\n\n\tif (errorCode !== undefined) {\n\t\treturn `failed with ${errorCode}`;\n\t}\n\n\tif (signal !== undefined) {\n\t\treturn `was killed with ${signal} (${signalDescription})`;\n\t}\n\n\tif (exitCode !== undefined) {\n\t\treturn `failed with exit code ${exitCode}`;\n\t}\n\n\treturn 'failed';\n};\n\nconst makeError = ({\n\tstdout,\n\tstderr,\n\tall,\n\terror,\n\tsignal,\n\texitCode,\n\tcommand,\n\ttimedOut,\n\tisCanceled,\n\tkilled,\n\tparsed: {options: {timeout}}\n}) => {\n\t// `signal` and `exitCode` emitted on `spawned.on('exit')` event can be `null`.\n\t// We normalize them to `undefined`\n\texitCode = exitCode === null ? undefined : exitCode;\n\tsignal = signal === null ? undefined : signal;\n\tconst signalDescription = signal === undefined ? undefined : signalsByName[signal].description;\n\n\tconst errorCode = error && error.code;\n\n\tconst prefix = getErrorPrefix({timedOut, timeout, errorCode, signal, signalDescription, exitCode, isCanceled});\n\tconst execaMessage = `Command ${prefix}: ${command}`;\n\tconst isError = Object.prototype.toString.call(error) === '[object Error]';\n\tconst shortMessage = isError ? `${execaMessage}\\n${error.message}` : execaMessage;\n\tconst message = [shortMessage, stderr, stdout].filter(Boolean).join('\\n');\n\n\tif (isError) {\n\t\terror.originalMessage = error.message;\n\t\terror.message = message;\n\t} else {\n\t\terror = new Error(message);\n\t}\n\n\terror.shortMessage = shortMessage;\n\terror.command = command;\n\terror.exitCode = exitCode;\n\terror.signal = signal;\n\terror.signalDescription = signalDescription;\n\terror.stdout = stdout;\n\terror.stderr = stderr;\n\n\tif (all !== undefined) {\n\t\terror.all = all;\n\t}\n\n\tif ('bufferedData' in error) {\n\t\tdelete error.bufferedData;\n\t}\n\n\terror.failed = true;\n\terror.timedOut = Boolean(timedOut);\n\terror.isCanceled = isCanceled;\n\terror.killed = killed && !timedOut;\n\n\treturn error;\n};\n\nmodule.exports = makeError;\n","'use strict';\nconst os = require('os');\nconst onExit = require('signal-exit');\n\nconst DEFAULT_FORCE_KILL_TIMEOUT = 1000 * 5;\n\n// Monkey-patches `childProcess.kill()` to add `forceKillAfterTimeout` behavior\nconst spawnedKill = (kill, signal = 'SIGTERM', options = {}) => {\n\tconst killResult = kill(signal);\n\tsetKillTimeout(kill, signal, options, killResult);\n\treturn killResult;\n};\n\nconst setKillTimeout = (kill, signal, options, killResult) => {\n\tif (!shouldForceKill(signal, options, killResult)) {\n\t\treturn;\n\t}\n\n\tconst timeout = getForceKillAfterTimeout(options);\n\tconst t = setTimeout(() => {\n\t\tkill('SIGKILL');\n\t}, timeout);\n\n\t// Guarded because there's no `.unref()` when `execa` is used in the renderer\n\t// process in Electron. This cannot be tested since we don't run tests in\n\t// Electron.\n\t// istanbul ignore else\n\tif (t.unref) {\n\t\tt.unref();\n\t}\n};\n\nconst shouldForceKill = (signal, {forceKillAfterTimeout}, killResult) => {\n\treturn isSigterm(signal) && forceKillAfterTimeout !== false && killResult;\n};\n\nconst isSigterm = signal => {\n\treturn signal === os.constants.signals.SIGTERM ||\n\t\t(typeof signal === 'string' && signal.toUpperCase() === 'SIGTERM');\n};\n\nconst getForceKillAfterTimeout = ({forceKillAfterTimeout = true}) => {\n\tif (forceKillAfterTimeout === true) {\n\t\treturn DEFAULT_FORCE_KILL_TIMEOUT;\n\t}\n\n\tif (!Number.isFinite(forceKillAfterTimeout) || forceKillAfterTimeout < 0) {\n\t\tthrow new TypeError(`Expected the \\`forceKillAfterTimeout\\` option to be a non-negative integer, got \\`${forceKillAfterTimeout}\\` (${typeof forceKillAfterTimeout})`);\n\t}\n\n\treturn forceKillAfterTimeout;\n};\n\n// `childProcess.cancel()`\nconst spawnedCancel = (spawned, context) => {\n\tconst killResult = spawned.kill();\n\n\tif (killResult) {\n\t\tcontext.isCanceled = true;\n\t}\n};\n\nconst timeoutKill = (spawned, signal, reject) => {\n\tspawned.kill(signal);\n\treject(Object.assign(new Error('Timed out'), {timedOut: true, signal}));\n};\n\n// `timeout` option handling\nconst setupTimeout = (spawned, {timeout, killSignal = 'SIGTERM'}, spawnedPromise) => {\n\tif (timeout === 0 || timeout === undefined) {\n\t\treturn spawnedPromise;\n\t}\n\n\tif (!Number.isFinite(timeout) || timeout < 0) {\n\t\tthrow new TypeError(`Expected the \\`timeout\\` option to be a non-negative integer, got \\`${timeout}\\` (${typeof timeout})`);\n\t}\n\n\tlet timeoutId;\n\tconst timeoutPromise = new Promise((resolve, reject) => {\n\t\ttimeoutId = setTimeout(() => {\n\t\t\ttimeoutKill(spawned, killSignal, reject);\n\t\t}, timeout);\n\t});\n\n\tconst safeSpawnedPromise = spawnedPromise.finally(() => {\n\t\tclearTimeout(timeoutId);\n\t});\n\n\treturn Promise.race([timeoutPromise, safeSpawnedPromise]);\n};\n\n// `cleanup` option handling\nconst setExitHandler = async (spawned, {cleanup, detached}, timedPromise) => {\n\tif (!cleanup || detached) {\n\t\treturn timedPromise;\n\t}\n\n\tconst removeExitHandler = onExit(() => {\n\t\tspawned.kill();\n\t});\n\n\treturn timedPromise.finally(() => {\n\t\tremoveExitHandler();\n\t});\n};\n\nmodule.exports = {\n\tspawnedKill,\n\tspawnedCancel,\n\tsetupTimeout,\n\tsetExitHandler\n};\n","'use strict';\n\nconst nativePromisePrototype = (async () => {})().constructor.prototype;\nconst descriptors = ['then', 'catch', 'finally'].map(property => [\n\tproperty,\n\tReflect.getOwnPropertyDescriptor(nativePromisePrototype, property)\n]);\n\n// The return value is a mixin of `childProcess` and `Promise`\nconst mergePromise = (spawned, promise) => {\n\tfor (const [property, descriptor] of descriptors) {\n\t\t// Starting the main `promise` is deferred to avoid consuming streams\n\t\tconst value = typeof promise === 'function' ?\n\t\t\t(...args) => Reflect.apply(descriptor.value, promise(), args) :\n\t\t\tdescriptor.value.bind(promise);\n\n\t\tReflect.defineProperty(spawned, property, {...descriptor, value});\n\t}\n\n\treturn spawned;\n};\n\n// Use promises instead of `child_process` events\nconst getSpawnedPromise = spawned => {\n\treturn new Promise((resolve, reject) => {\n\t\tspawned.on('exit', (exitCode, signal) => {\n\t\t\tresolve({exitCode, signal});\n\t\t});\n\n\t\tspawned.on('error', error => {\n\t\t\treject(error);\n\t\t});\n\n\t\tif (spawned.stdin) {\n\t\t\tspawned.stdin.on('error', error => {\n\t\t\t\treject(error);\n\t\t\t});\n\t\t}\n\t});\n};\n\nmodule.exports = {\n\tmergePromise,\n\tgetSpawnedPromise\n};\n\n","'use strict';\nconst aliases = ['stdin', 'stdout', 'stderr'];\n\nconst hasAlias = options => aliases.some(alias => options[alias] !== undefined);\n\nconst normalizeStdio = options => {\n\tif (!options) {\n\t\treturn;\n\t}\n\n\tconst {stdio} = options;\n\n\tif (stdio === undefined) {\n\t\treturn aliases.map(alias => options[alias]);\n\t}\n\n\tif (hasAlias(options)) {\n\t\tthrow new Error(`It's not possible to provide \\`stdio\\` in combination with one of ${aliases.map(alias => `\\`${alias}\\``).join(', ')}`);\n\t}\n\n\tif (typeof stdio === 'string') {\n\t\treturn stdio;\n\t}\n\n\tif (!Array.isArray(stdio)) {\n\t\tthrow new TypeError(`Expected \\`stdio\\` to be of type \\`string\\` or \\`Array\\`, got \\`${typeof stdio}\\``);\n\t}\n\n\tconst length = Math.max(stdio.length, aliases.length);\n\treturn Array.from({length}, (value, index) => stdio[index]);\n};\n\nmodule.exports = normalizeStdio;\n\n// `ipc` is pushed unless it is already present\nmodule.exports.node = options => {\n\tconst stdio = normalizeStdio(options);\n\n\tif (stdio === 'ipc') {\n\t\treturn 'ipc';\n\t}\n\n\tif (stdio === undefined || typeof stdio === 'string') {\n\t\treturn [stdio, stdio, stdio, 'ipc'];\n\t}\n\n\tif (stdio.includes('ipc')) {\n\t\treturn stdio;\n\t}\n\n\treturn [...stdio, 'ipc'];\n};\n","'use strict';\nconst isStream = require('is-stream');\nconst getStream = require('get-stream');\nconst mergeStream = require('merge-stream');\n\n// `input` option\nconst handleInput = (spawned, input) => {\n\t// Checking for stdin is workaround for https://github.com/nodejs/node/issues/26852\n\t// TODO: Remove `|| spawned.stdin === undefined` once we drop support for Node.js <=12.2.0\n\tif (input === undefined || spawned.stdin === undefined) {\n\t\treturn;\n\t}\n\n\tif (isStream(input)) {\n\t\tinput.pipe(spawned.stdin);\n\t} else {\n\t\tspawned.stdin.end(input);\n\t}\n};\n\n// `all` interleaves `stdout` and `stderr`\nconst makeAllStream = (spawned, {all}) => {\n\tif (!all || (!spawned.stdout && !spawned.stderr)) {\n\t\treturn;\n\t}\n\n\tconst mixed = mergeStream();\n\n\tif (spawned.stdout) {\n\t\tmixed.add(spawned.stdout);\n\t}\n\n\tif (spawned.stderr) {\n\t\tmixed.add(spawned.stderr);\n\t}\n\n\treturn mixed;\n};\n\n// On failure, `result.stdout|stderr|all` should contain the currently buffered stream\nconst getBufferedData = async (stream, streamPromise) => {\n\tif (!stream) {\n\t\treturn;\n\t}\n\n\tstream.destroy();\n\n\ttry {\n\t\treturn await streamPromise;\n\t} catch (error) {\n\t\treturn error.bufferedData;\n\t}\n};\n\nconst getStreamPromise = (stream, {encoding, buffer, maxBuffer}) => {\n\tif (!stream || !buffer) {\n\t\treturn;\n\t}\n\n\tif (encoding) {\n\t\treturn getStream(stream, {encoding, maxBuffer});\n\t}\n\n\treturn getStream.buffer(stream, {maxBuffer});\n};\n\n// Retrieve result of child process: exit code, signal, error, streams (stdout/stderr/all)\nconst getSpawnedResult = async ({stdout, stderr, all}, {encoding, buffer, maxBuffer}, processDone) => {\n\tconst stdoutPromise = getStreamPromise(stdout, {encoding, buffer, maxBuffer});\n\tconst stderrPromise = getStreamPromise(stderr, {encoding, buffer, maxBuffer});\n\tconst allPromise = getStreamPromise(all, {encoding, buffer, maxBuffer: maxBuffer * 2});\n\n\ttry {\n\t\treturn await Promise.all([processDone, stdoutPromise, stderrPromise, allPromise]);\n\t} catch (error) {\n\t\treturn Promise.all([\n\t\t\t{error, signal: error.signal, timedOut: error.timedOut},\n\t\t\tgetBufferedData(stdout, stdoutPromise),\n\t\t\tgetBufferedData(stderr, stderrPromise),\n\t\t\tgetBufferedData(all, allPromise)\n\t\t]);\n\t}\n};\n\nconst validateInputSync = ({input}) => {\n\tif (isStream(input)) {\n\t\tthrow new TypeError('The `input` option cannot be a stream in sync mode');\n\t}\n};\n\nmodule.exports = {\n\thandleInput,\n\tmakeAllStream,\n\tgetSpawnedResult,\n\tvalidateInputSync\n};\n\n","'use strict';\nconst {PassThrough: PassThroughStream} = require('stream');\n\nmodule.exports = options => {\n\toptions = {...options};\n\n\tconst {array} = options;\n\tlet {encoding} = options;\n\tconst isBuffer = encoding === 'buffer';\n\tlet objectMode = false;\n\n\tif (array) {\n\t\tobjectMode = !(encoding || isBuffer);\n\t} else {\n\t\tencoding = encoding || 'utf8';\n\t}\n\n\tif (isBuffer) {\n\t\tencoding = null;\n\t}\n\n\tconst stream = new PassThroughStream({objectMode});\n\n\tif (encoding) {\n\t\tstream.setEncoding(encoding);\n\t}\n\n\tlet length = 0;\n\tconst chunks = [];\n\n\tstream.on('data', chunk => {\n\t\tchunks.push(chunk);\n\n\t\tif (objectMode) {\n\t\t\tlength = chunks.length;\n\t\t} else {\n\t\t\tlength += chunk.length;\n\t\t}\n\t});\n\n\tstream.getBufferedValue = () => {\n\t\tif (array) {\n\t\t\treturn chunks;\n\t\t}\n\n\t\treturn isBuffer ? Buffer.concat(chunks, length) : chunks.join('');\n\t};\n\n\tstream.getBufferedLength = () => length;\n\n\treturn stream;\n};\n","'use strict';\nconst {constants: BufferConstants} = require('buffer');\nconst stream = require('stream');\nconst {promisify} = require('util');\nconst bufferStream = require('./buffer-stream');\n\nconst streamPipelinePromisified = promisify(stream.pipeline);\n\nclass MaxBufferError extends Error {\n\tconstructor() {\n\t\tsuper('maxBuffer exceeded');\n\t\tthis.name = 'MaxBufferError';\n\t}\n}\n\nasync function getStream(inputStream, options) {\n\tif (!inputStream) {\n\t\tthrow new Error('Expected a stream');\n\t}\n\n\toptions = {\n\t\tmaxBuffer: Infinity,\n\t\t...options\n\t};\n\n\tconst {maxBuffer} = options;\n\tconst stream = bufferStream(options);\n\n\tawait new Promise((resolve, reject) => {\n\t\tconst rejectPromise = error => {\n\t\t\t// Don't retrieve an oversized buffer.\n\t\t\tif (error && stream.getBufferedLength() <= BufferConstants.MAX_LENGTH) {\n\t\t\t\terror.bufferedData = stream.getBufferedValue();\n\t\t\t}\n\n\t\t\treject(error);\n\t\t};\n\n\t\t(async () => {\n\t\t\ttry {\n\t\t\t\tawait streamPipelinePromisified(inputStream, stream);\n\t\t\t\tresolve();\n\t\t\t} catch (error) {\n\t\t\t\trejectPromise(error);\n\t\t\t}\n\t\t})();\n\n\t\tstream.on('data', () => {\n\t\t\tif (stream.getBufferedLength() > maxBuffer) {\n\t\t\t\trejectPromise(new MaxBufferError());\n\t\t\t}\n\t\t});\n\t});\n\n\treturn stream.getBufferedValue();\n}\n\nmodule.exports = getStream;\nmodule.exports.buffer = (stream, options) => getStream(stream, {...options, encoding: 'buffer'});\nmodule.exports.array = (stream, options) => getStream(stream, {...options, array: true});\nmodule.exports.MaxBufferError = MaxBufferError;\n","const CODES = {\n JOSEAlgNotWhitelisted: 'ERR_JOSE_ALG_NOT_WHITELISTED',\n JOSECritNotUnderstood: 'ERR_JOSE_CRIT_NOT_UNDERSTOOD',\n JOSEInvalidEncoding: 'ERR_JOSE_INVALID_ENCODING',\n JOSEMultiError: 'ERR_JOSE_MULTIPLE_ERRORS',\n JOSENotSupported: 'ERR_JOSE_NOT_SUPPORTED',\n JWEDecryptionFailed: 'ERR_JWE_DECRYPTION_FAILED',\n JWEInvalid: 'ERR_JWE_INVALID',\n JWKImportFailed: 'ERR_JWK_IMPORT_FAILED',\n JWKInvalid: 'ERR_JWK_INVALID',\n JWKKeySupport: 'ERR_JWK_KEY_SUPPORT',\n JWKSNoMatchingKey: 'ERR_JWKS_NO_MATCHING_KEY',\n JWSInvalid: 'ERR_JWS_INVALID',\n JWSVerificationFailed: 'ERR_JWS_VERIFICATION_FAILED',\n JWTClaimInvalid: 'ERR_JWT_CLAIM_INVALID',\n JWTExpired: 'ERR_JWT_EXPIRED',\n JWTMalformed: 'ERR_JWT_MALFORMED'\n}\n\nconst DEFAULT_MESSAGES = {\n JWEDecryptionFailed: 'decryption operation failed',\n JWEInvalid: 'JWE invalid',\n JWKSNoMatchingKey: 'no matching key found in the KeyStore',\n JWSInvalid: 'JWS invalid',\n JWSVerificationFailed: 'signature verification failed'\n}\n\nclass JOSEError extends Error {\n constructor (message) {\n super(message)\n if (message === undefined) {\n this.message = DEFAULT_MESSAGES[this.constructor.name]\n }\n this.name = this.constructor.name\n this.code = CODES[this.constructor.name]\n Error.captureStackTrace(this, this.constructor)\n }\n}\n\nconst isMulti = e => e instanceof JOSEMultiError\nclass JOSEMultiError extends JOSEError {\n constructor (errors) {\n super()\n let i\n while ((i = errors.findIndex(isMulti)) && i !== -1) {\n errors.splice(i, 1, ...errors[i])\n }\n Object.defineProperty(this, 'errors', { value: errors })\n }\n\n * [Symbol.iterator] () {\n for (const error of this.errors) {\n yield error\n }\n }\n}\nmodule.exports.JOSEError = JOSEError\n\nmodule.exports.JOSEAlgNotWhitelisted = class JOSEAlgNotWhitelisted extends JOSEError {}\nmodule.exports.JOSECritNotUnderstood = class JOSECritNotUnderstood extends JOSEError {}\nmodule.exports.JOSEInvalidEncoding = class JOSEInvalidEncoding extends JOSEError {}\nmodule.exports.JOSEMultiError = JOSEMultiError\nmodule.exports.JOSENotSupported = class JOSENotSupported extends JOSEError {}\n\nmodule.exports.JWEDecryptionFailed = class JWEDecryptionFailed extends JOSEError {}\nmodule.exports.JWEInvalid = class JWEInvalid extends JOSEError {}\n\nmodule.exports.JWKImportFailed = class JWKImportFailed extends JOSEError {}\nmodule.exports.JWKInvalid = class JWKInvalid extends JOSEError {}\nmodule.exports.JWKKeySupport = class JWKKeySupport extends JOSEError {}\n\nmodule.exports.JWKSNoMatchingKey = class JWKSNoMatchingKey extends JOSEError {}\n\nmodule.exports.JWSInvalid = class JWSInvalid extends JOSEError {}\nmodule.exports.JWSVerificationFailed = class JWSVerificationFailed extends JOSEError {}\n\nclass JWTClaimInvalid extends JOSEError {\n constructor (message, claim = 'unspecified', reason = 'unspecified') {\n super(message)\n this.claim = claim\n this.reason = reason\n }\n}\nmodule.exports.JWTClaimInvalid = JWTClaimInvalid\nmodule.exports.JWTExpired = class JWTExpired extends JWTClaimInvalid {}\nmodule.exports.JWTMalformed = class JWTMalformed extends JOSEError {}\n","const oids = require('./oids')\n\nmodule.exports = function () {\n this.seq().obj(\n this.key('algorithm').objid(oids),\n this.key('parameters').optional().choice({ namedCurve: this.objid(oids), null: this.null_() })\n )\n}\n","const oids = require('./oids')\n\nmodule.exports = function () {\n this.seq().obj(\n this.key('version').int(),\n this.key('privateKey').octstr(),\n this.key('parameters').explicit(0).optional().choice({ namedCurve: this.objid(oids) }),\n this.key('publicKey').explicit(1).optional().bitstr()\n )\n}\n","const asn1 = require('@panva/asn1.js')\n\nconst types = new Map()\n\nconst AlgorithmIdentifier = asn1.define('AlgorithmIdentifier', require('./algorithm_identifier'))\ntypes.set('AlgorithmIdentifier', AlgorithmIdentifier)\n\nconst ECPrivateKey = asn1.define('ECPrivateKey', require('./ec_private_key'))\ntypes.set('ECPrivateKey', ECPrivateKey)\n\nconst PrivateKeyInfo = asn1.define('PrivateKeyInfo', require('./private_key_info')(AlgorithmIdentifier))\ntypes.set('PrivateKeyInfo', PrivateKeyInfo)\n\nconst PublicKeyInfo = asn1.define('PublicKeyInfo', require('./public_key_info')(AlgorithmIdentifier))\ntypes.set('PublicKeyInfo', PublicKeyInfo)\n\nconst PrivateKey = asn1.define('PrivateKey', require('./private_key'))\ntypes.set('PrivateKey', PrivateKey)\n\nconst OneAsymmetricKey = asn1.define('OneAsymmetricKey', require('./one_asymmetric_key')(AlgorithmIdentifier, PrivateKey))\ntypes.set('OneAsymmetricKey', OneAsymmetricKey)\n\nconst RSAPrivateKey = asn1.define('RSAPrivateKey', require('./rsa_private_key'))\ntypes.set('RSAPrivateKey', RSAPrivateKey)\n\nconst RSAPublicKey = asn1.define('RSAPublicKey', require('./rsa_public_key'))\ntypes.set('RSAPublicKey', RSAPublicKey)\n\nmodule.exports = types\n","const oids = {\n '1 2 840 10045 3 1 7': 'P-256',\n '1 3 132 0 10': 'secp256k1',\n '1 3 132 0 34': 'P-384',\n '1 3 132 0 35': 'P-521',\n '1 2 840 10045 2 1': 'ecPublicKey',\n '1 2 840 113549 1 1 1': 'rsaEncryption',\n '1 3 101 110': 'X25519',\n '1 3 101 111': 'X448',\n '1 3 101 112': 'Ed25519',\n '1 3 101 113': 'Ed448'\n}\n\nmodule.exports = oids\n","module.exports = (AlgorithmIdentifier, PrivateKey) => function () {\n this.seq().obj(\n this.key('version').int(),\n this.key('algorithm').use(AlgorithmIdentifier),\n this.key('privateKey').use(PrivateKey)\n )\n}\n","module.exports = function () {\n this.octstr().contains().obj(\n this.key('privateKey').octstr()\n )\n}\n","module.exports = (AlgorithmIdentifier) => function () {\n this.seq().obj(\n this.key('version').int(),\n this.key('algorithm').use(AlgorithmIdentifier),\n this.key('privateKey').octstr()\n )\n}\n","module.exports = AlgorithmIdentifier => function () {\n this.seq().obj(\n this.key('algorithm').use(AlgorithmIdentifier),\n this.key('publicKey').bitstr()\n )\n}\n","module.exports = function () {\n this.seq().obj(\n this.key('version').int({ 0: 'two-prime', 1: 'multi' }),\n this.key('n').int(),\n this.key('e').int(),\n this.key('d').int(),\n this.key('p').int(),\n this.key('q').int(),\n this.key('dp').int(),\n this.key('dq').int(),\n this.key('qi').int()\n )\n}\n","module.exports = function () {\n this.seq().obj(\n this.key('n').int(),\n this.key('e').int()\n )\n}\n","let encode\nlet encodeBuffer\nif (Buffer.isEncoding('base64url')) {\n encode = (input, encoding = 'utf8') => Buffer.from(input, encoding).toString('base64url')\n encodeBuffer = (buf) => buf.toString('base64url')\n} else {\n const fromBase64 = (base64) => base64.replace(/=/g, '').replace(/\\+/g, '-').replace(/\\//g, '_')\n encode = (input, encoding = 'utf8') => fromBase64(Buffer.from(input, encoding).toString('base64'))\n encodeBuffer = (buf) => fromBase64(buf.toString('base64'))\n}\n\nconst decodeToBuffer = (input) => {\n return Buffer.from(input, 'base64')\n}\n\nconst decode = (input, encoding = 'utf8') => {\n return decodeToBuffer(input).toString(encoding)\n}\n\nconst b64uJSON = {\n encode: (input) => {\n return encode(JSON.stringify(input))\n },\n decode: (input, encoding = 'utf8') => {\n return JSON.parse(decode(input, encoding))\n }\n}\n\nb64uJSON.decode.try = (input, encoding = 'utf8') => {\n try {\n return b64uJSON.decode(input, encoding)\n } catch (err) {\n return decode(input, encoding)\n }\n}\n\nconst bnToBuf = (bn) => {\n let hex = BigInt(bn).toString(16)\n if (hex.length % 2) {\n hex = `0${hex}`\n }\n\n const len = hex.length / 2\n const u8 = new Uint8Array(len)\n\n let i = 0\n let j = 0\n while (i < len) {\n u8[i] = parseInt(hex.slice(j, j + 2), 16)\n i += 1\n j += 2\n }\n\n return u8\n}\n\nconst encodeBigInt = (bn) => encodeBuffer(Buffer.from(bnToBuf(bn)))\n\nmodule.exports.decode = decode\nmodule.exports.decodeToBuffer = decodeToBuffer\nmodule.exports.encode = encode\nmodule.exports.encodeBuffer = encodeBuffer\nmodule.exports.JSON = b64uJSON\nmodule.exports.encodeBigInt = encodeBigInt\n","module.exports.KEYOBJECT = Symbol('KEYOBJECT')\nmodule.exports.PRIVATE_MEMBERS = Symbol('PRIVATE_MEMBERS')\nmodule.exports.PUBLIC_MEMBERS = Symbol('PUBLIC_MEMBERS')\nmodule.exports.THUMBPRINT_MATERIAL = Symbol('THUMBPRINT_MATERIAL')\nmodule.exports.JWK_MEMBERS = Symbol('JWK_MEMBERS')\nmodule.exports.KEY_MANAGEMENT_ENCRYPT = Symbol('KEY_MANAGEMENT_ENCRYPT')\nmodule.exports.KEY_MANAGEMENT_DECRYPT = Symbol('KEY_MANAGEMENT_DECRYPT')\n\nconst USES_MAPPING = {\n sig: new Set(['sign', 'verify']),\n enc: new Set(['encrypt', 'decrypt', 'wrapKey', 'unwrapKey', 'deriveKey'])\n}\nconst OPS = new Set([...USES_MAPPING.sig, ...USES_MAPPING.enc])\nconst USES = new Set(Object.keys(USES_MAPPING))\n\nmodule.exports.USES_MAPPING = USES_MAPPING\nmodule.exports.OPS = OPS\nmodule.exports.USES = USES\n","module.exports = obj => JSON.parse(JSON.stringify(obj))\n","const MAX_OCTET = 0x80\nconst CLASS_UNIVERSAL = 0\nconst PRIMITIVE_BIT = 0x20\nconst TAG_SEQ = 0x10\nconst TAG_INT = 0x02\nconst ENCODED_TAG_SEQ = (TAG_SEQ | PRIMITIVE_BIT) | (CLASS_UNIVERSAL << 6)\nconst ENCODED_TAG_INT = TAG_INT | (CLASS_UNIVERSAL << 6)\n\nconst getParamSize = keySize => ((keySize / 8) | 0) + (keySize % 8 === 0 ? 0 : 1)\n\nconst paramBytesForAlg = {\n ES256: getParamSize(256),\n ES256K: getParamSize(256),\n ES384: getParamSize(384),\n ES512: getParamSize(521)\n}\n\nconst countPadding = (buf, start, stop) => {\n let padding = 0\n while (start + padding < stop && buf[start + padding] === 0) {\n ++padding\n }\n\n const needsSign = buf[start + padding] >= MAX_OCTET\n if (needsSign) {\n --padding\n }\n\n return padding\n}\n\nmodule.exports.derToJose = (signature, alg) => {\n if (!Buffer.isBuffer(signature)) {\n throw new TypeError('ECDSA signature must be a Buffer')\n }\n\n if (!paramBytesForAlg[alg]) {\n throw new Error(`Unknown algorithm \"${alg}\"`)\n }\n\n const paramBytes = paramBytesForAlg[alg]\n\n // the DER encoded param should at most be the param size, plus a padding\n // zero, since due to being a signed integer\n const maxEncodedParamLength = paramBytes + 1\n\n const inputLength = signature.length\n\n let offset = 0\n if (signature[offset++] !== ENCODED_TAG_SEQ) {\n throw new Error('Could not find expected \"seq\"')\n }\n\n let seqLength = signature[offset++]\n if (seqLength === (MAX_OCTET | 1)) {\n seqLength = signature[offset++]\n }\n\n if (inputLength - offset < seqLength) {\n throw new Error(`\"seq\" specified length of ${seqLength}\", only ${inputLength - offset}\" remaining`)\n }\n\n if (signature[offset++] !== ENCODED_TAG_INT) {\n throw new Error('Could not find expected \"int\" for \"r\"')\n }\n\n const rLength = signature[offset++]\n\n if (inputLength - offset - 2 < rLength) {\n throw new Error(`\"r\" specified length of \"${rLength}\", only \"${inputLength - offset - 2}\" available`)\n }\n\n if (maxEncodedParamLength < rLength) {\n throw new Error(`\"r\" specified length of \"${rLength}\", max of \"${maxEncodedParamLength}\" is acceptable`)\n }\n\n const rOffset = offset\n offset += rLength\n\n if (signature[offset++] !== ENCODED_TAG_INT) {\n throw new Error('Could not find expected \"int\" for \"s\"')\n }\n\n const sLength = signature[offset++]\n\n if (inputLength - offset !== sLength) {\n throw new Error(`\"s\" specified length of \"${sLength}\", expected \"${inputLength - offset}\"`)\n }\n\n if (maxEncodedParamLength < sLength) {\n throw new Error(`\"s\" specified length of \"${sLength}\", max of \"${maxEncodedParamLength}\" is acceptable`)\n }\n\n const sOffset = offset\n offset += sLength\n\n if (offset !== inputLength) {\n throw new Error(`Expected to consume entire buffer, but \"${inputLength - offset}\" bytes remain`)\n }\n\n const rPadding = paramBytes - rLength\n\n const sPadding = paramBytes - sLength\n\n const dst = Buffer.allocUnsafe(rPadding + rLength + sPadding + sLength)\n\n for (offset = 0; offset < rPadding; ++offset) {\n dst[offset] = 0\n }\n signature.copy(dst, offset, rOffset + Math.max(-rPadding, 0), rOffset + rLength)\n\n offset = paramBytes\n\n for (const o = offset; offset < o + sPadding; ++offset) {\n dst[offset] = 0\n }\n signature.copy(dst, offset, sOffset + Math.max(-sPadding, 0), sOffset + sLength)\n\n return dst\n}\n\nmodule.exports.joseToDer = (signature, alg) => {\n if (!Buffer.isBuffer(signature)) {\n throw new TypeError('ECDSA signature must be a Buffer')\n }\n\n if (!paramBytesForAlg[alg]) {\n throw new TypeError(`Unknown algorithm \"${alg}\"`)\n }\n\n const paramBytes = paramBytesForAlg[alg]\n\n const signatureBytes = signature.length\n if (signatureBytes !== paramBytes * 2) {\n throw new Error(`\"${alg}\" signatures must be \"${paramBytes * 2}\" bytes, saw \"${signatureBytes}\"`)\n }\n\n const rPadding = countPadding(signature, 0, paramBytes)\n const sPadding = countPadding(signature, paramBytes, signature.length)\n const rLength = paramBytes - rPadding\n const sLength = paramBytes - sPadding\n\n const rsBytes = 1 + 1 + rLength + 1 + 1 + sLength\n\n const shortLength = rsBytes < MAX_OCTET\n\n const dst = Buffer.allocUnsafe((shortLength ? 2 : 3) + rsBytes)\n\n let offset = 0\n dst[offset++] = ENCODED_TAG_SEQ\n if (shortLength) {\n // Bit 8 has value \"0\"\n // bits 7-1 give the length.\n dst[offset++] = rsBytes\n } else {\n // Bit 8 of first octet has value \"1\"\n // bits 7-1 give the number of additional length octets.\n dst[offset++] = MAX_OCTET\t| 1 // eslint-disable-line no-tabs\n // length, base 256\n dst[offset++] = rsBytes & 0xff\n }\n dst[offset++] = ENCODED_TAG_INT\n dst[offset++] = rLength\n if (rPadding < 0) {\n dst[offset++] = 0\n offset += signature.copy(dst, offset, 0, paramBytes)\n } else {\n offset += signature.copy(dst, offset, rPadding, paramBytes)\n }\n dst[offset++] = ENCODED_TAG_INT\n dst[offset++] = sLength\n if (sPadding < 0) {\n dst[offset++] = 0\n signature.copy(dst, offset, paramBytes)\n } else {\n signature.copy(dst, offset, paramBytes + sPadding)\n }\n\n return dst\n}\n","module.exports = (date) => Math.floor(date.getTime() / 1000)\n","const { randomBytes } = require('crypto')\n\nconst { IVLENGTHS } = require('../registry')\n\nmodule.exports = alg => randomBytes(IVLENGTHS.get(alg) / 8)\n","const errors = require('../errors')\nconst Key = require('../jwk/key/base')\nconst importKey = require('../jwk/import')\nconst { KeyStore } = require('../jwks/keystore')\n\nmodule.exports = (input, keyStoreAllowed = false) => {\n if (input instanceof Key) {\n return input\n }\n\n if (input instanceof KeyStore) {\n if (!keyStoreAllowed) {\n throw new TypeError('key argument for this operation must not be a JWKS.KeyStore instance')\n }\n\n return input\n }\n\n try {\n return importKey(input)\n } catch (err) {\n if (err instanceof errors.JOSEError && !(err instanceof errors.JWKImportFailed)) {\n throw err\n }\n\n let msg\n if (keyStoreAllowed) {\n msg = 'key must be an instance of a key instantiated by JWK.asKey, a valid JWK.asKey input, or a JWKS.KeyStore instance'\n } else {\n msg = 'key must be an instance of a key instantiated by JWK.asKey, or a valid JWK.asKey input'\n }\n\n throw new TypeError(msg)\n }\n}\n","module.exports = (a = {}, b = {}) => {\n const keysA = Object.keys(a)\n const keysB = new Set(Object.keys(b))\n return !keysA.some((ka) => keysB.has(ka))\n}\n","module.exports = a => !!a && a.constructor === Object\n","const { keyObjectSupported } = require('./runtime_support')\n\nlet createPublicKey\nlet createPrivateKey\nlet createSecretKey\nlet KeyObject\nlet asInput\n\nif (keyObjectSupported) {\n ({ createPublicKey, createPrivateKey, createSecretKey, KeyObject } = require('crypto'))\n asInput = (input) => input\n} else {\n const { EOL } = require('os')\n\n const errors = require('../errors')\n const isObject = require('./is_object')\n const asn1 = require('./asn1')\n const toInput = Symbol('toInput')\n\n const namedCurve = Symbol('namedCurve')\n\n asInput = (keyObject, needsPublic) => {\n if (keyObject instanceof KeyObject) {\n return keyObject[toInput](needsPublic)\n }\n\n return createSecretKey(keyObject)[toInput](needsPublic)\n }\n\n const pemToDer = pem => Buffer.from(pem.replace(/(?:-----(?:BEGIN|END)(?: (?:RSA|EC))? (?:PRIVATE|PUBLIC) KEY-----|\\s)/g, ''), 'base64')\n const derToPem = (der, label) => `-----BEGIN ${label}-----${EOL}${(der.toString('base64').match(/.{1,64}/g) || []).join(EOL)}${EOL}-----END ${label}-----`\n const unsupported = (input) => {\n const label = typeof input === 'string' ? input : `OID ${input.join('.')}`\n throw new errors.JOSENotSupported(`${label} is not supported in your Node.js runtime version`)\n }\n\n KeyObject = class KeyObject {\n export ({ cipher, passphrase, type, format } = {}) {\n if (this._type === 'secret') {\n return this._buffer\n }\n\n if (this._type === 'public') {\n if (this.asymmetricKeyType === 'rsa') {\n switch (type) {\n case 'pkcs1':\n if (format === 'pem') {\n return this._pem\n }\n\n return pemToDer(this._pem)\n case 'spki': {\n const PublicKeyInfo = asn1.get('PublicKeyInfo')\n const pem = PublicKeyInfo.encode({\n algorithm: {\n algorithm: 'rsaEncryption',\n parameters: { type: 'null' }\n },\n publicKey: {\n unused: 0,\n data: pemToDer(this._pem)\n }\n }, 'pem', { label: 'PUBLIC KEY' })\n\n return format === 'pem' ? pem : pemToDer(pem)\n }\n default:\n throw new TypeError(`The value ${type} is invalid for option \"type\"`)\n }\n }\n\n if (this.asymmetricKeyType === 'ec') {\n if (type !== 'spki') {\n throw new TypeError(`The value ${type} is invalid for option \"type\"`)\n }\n\n if (format === 'pem') {\n return this._pem\n }\n\n return pemToDer(this._pem)\n }\n }\n\n if (this._type === 'private') {\n if (passphrase !== undefined || cipher !== undefined) {\n throw new errors.JOSENotSupported('encrypted private keys are not supported in your Node.js runtime version')\n }\n\n if (type === 'pkcs8') {\n if (this._pkcs8) {\n if (format === 'der' && typeof this._pkcs8 === 'string') {\n return pemToDer(this._pkcs8)\n }\n\n if (format === 'pem' && Buffer.isBuffer(this._pkcs8)) {\n return derToPem(this._pkcs8, 'PRIVATE KEY')\n }\n\n return this._pkcs8\n }\n\n if (this.asymmetricKeyType === 'rsa') {\n const parsed = this._asn1\n const RSAPrivateKey = asn1.get('RSAPrivateKey')\n const privateKey = RSAPrivateKey.encode(parsed)\n const PrivateKeyInfo = asn1.get('PrivateKeyInfo')\n const pkcs8 = PrivateKeyInfo.encode({\n version: 0,\n privateKey,\n algorithm: {\n algorithm: 'rsaEncryption',\n parameters: { type: 'null' }\n }\n })\n\n this._pkcs8 = pkcs8\n\n return this.export({ type, format })\n }\n\n if (this.asymmetricKeyType === 'ec') {\n const parsed = this._asn1\n const ECPrivateKey = asn1.get('ECPrivateKey')\n const privateKey = ECPrivateKey.encode({\n version: parsed.version,\n privateKey: parsed.privateKey,\n publicKey: parsed.publicKey\n })\n const PrivateKeyInfo = asn1.get('PrivateKeyInfo')\n const pkcs8 = PrivateKeyInfo.encode({\n version: 0,\n privateKey,\n algorithm: {\n algorithm: 'ecPublicKey',\n parameters: this._asn1.parameters\n }\n })\n\n this._pkcs8 = pkcs8\n\n return this.export({ type, format })\n }\n }\n\n if (this.asymmetricKeyType === 'rsa' && type === 'pkcs1') {\n if (format === 'pem') {\n return this._pem\n }\n\n return pemToDer(this._pem)\n } else if (this.asymmetricKeyType === 'ec' && type === 'sec1') {\n if (format === 'pem') {\n return this._pem\n }\n\n return pemToDer(this._pem)\n } else {\n throw new TypeError(`The value ${type} is invalid for option \"type\"`)\n }\n }\n }\n\n get type () {\n return this._type\n }\n\n get asymmetricKeyType () {\n return this._asymmetricKeyType\n }\n\n get symmetricKeySize () {\n return this._symmetricKeySize\n }\n\n [toInput] (needsPublic) {\n switch (this._type) {\n case 'secret':\n return this._buffer\n case 'public':\n return this._pem\n default:\n if (needsPublic) {\n if (!('_pub' in this)) {\n this._pub = createPublicKey(this)\n }\n\n return this._pub[toInput](false)\n }\n\n return this._pem\n }\n }\n }\n\n createSecretKey = (buffer) => {\n if (!Buffer.isBuffer(buffer) || !buffer.length) {\n throw new TypeError('input must be a non-empty Buffer instance')\n }\n\n const keyObject = new KeyObject()\n keyObject._buffer = Buffer.from(buffer)\n keyObject._symmetricKeySize = buffer.length\n keyObject._type = 'secret'\n\n return keyObject\n }\n\n createPublicKey = (input) => {\n if (input instanceof KeyObject) {\n if (input.type !== 'private') {\n throw new TypeError(`Invalid key object type ${input.type}, expected private.`)\n }\n\n switch (input.asymmetricKeyType) {\n case 'ec': {\n const PublicKeyInfo = asn1.get('PublicKeyInfo')\n const key = PublicKeyInfo.encode({\n algorithm: {\n algorithm: 'ecPublicKey',\n parameters: input._asn1.parameters\n },\n publicKey: input._asn1.publicKey\n })\n\n return createPublicKey({ key, format: 'der', type: 'spki' })\n }\n case 'rsa': {\n const RSAPublicKey = asn1.get('RSAPublicKey')\n const key = RSAPublicKey.encode(input._asn1)\n return createPublicKey({ key, format: 'der', type: 'pkcs1' })\n }\n }\n }\n\n if (typeof input === 'string' || Buffer.isBuffer(input)) {\n input = { key: input, format: 'pem' }\n }\n\n if (!isObject(input)) {\n throw new TypeError('input must be a string, Buffer or an object')\n }\n\n const { format, passphrase } = input\n let { key, type } = input\n\n if (typeof key !== 'string' && !Buffer.isBuffer(key)) {\n throw new TypeError('key must be a string or Buffer')\n }\n\n if (format !== 'pem' && format !== 'der') {\n throw new TypeError('format must be one of \"pem\" or \"der\"')\n }\n\n let label\n if (format === 'pem') {\n key = key.toString()\n switch (key.split(/\\r?\\n/g)[0].toString()) {\n case '-----BEGIN PUBLIC KEY-----':\n type = 'spki'\n label = 'PUBLIC KEY'\n break\n case '-----BEGIN RSA PUBLIC KEY-----':\n type = 'pkcs1'\n label = 'RSA PUBLIC KEY'\n break\n case '-----BEGIN CERTIFICATE-----':\n throw new errors.JOSENotSupported('X.509 certificates are not supported in your Node.js runtime version')\n case '-----BEGIN PRIVATE KEY-----':\n case '-----BEGIN EC PRIVATE KEY-----':\n case '-----BEGIN RSA PRIVATE KEY-----':\n return createPublicKey(createPrivateKey(key))\n default:\n throw new TypeError('unknown/unsupported PEM type')\n }\n }\n\n switch (type) {\n case 'spki': {\n const PublicKeyInfo = asn1.get('PublicKeyInfo')\n const parsed = PublicKeyInfo.decode(key, format, { label })\n\n let type, keyObject\n switch (parsed.algorithm.algorithm) {\n case 'ecPublicKey': {\n keyObject = new KeyObject()\n keyObject._asn1 = parsed\n keyObject._asymmetricKeyType = 'ec'\n keyObject._type = 'public'\n keyObject._pem = PublicKeyInfo.encode(parsed, 'pem', { label: 'PUBLIC KEY' })\n\n break\n }\n case 'rsaEncryption': {\n type = 'pkcs1'\n keyObject = createPublicKey({ type, key: parsed.publicKey.data, format: 'der' })\n break\n }\n default:\n unsupported(parsed.algorithm.algorithm)\n }\n\n return keyObject\n }\n case 'pkcs1': {\n const RSAPublicKey = asn1.get('RSAPublicKey')\n const parsed = RSAPublicKey.decode(key, format, { label })\n\n // special case when private pkcs1 PEM / DER is used with createPublicKey\n if (parsed.n === BigInt(0)) {\n return createPublicKey(createPrivateKey({ key, format, type, passphrase }))\n }\n\n const keyObject = new KeyObject()\n keyObject._asn1 = parsed\n keyObject._asymmetricKeyType = 'rsa'\n keyObject._type = 'public'\n keyObject._pem = RSAPublicKey.encode(parsed, 'pem', { label: 'RSA PUBLIC KEY' })\n\n return keyObject\n }\n case 'pkcs8':\n case 'sec1':\n return createPublicKey(createPrivateKey({ format, key, type, passphrase }))\n default:\n throw new TypeError(`The value ${type} is invalid for option \"type\"`)\n }\n }\n\n createPrivateKey = (input, hints) => {\n if (typeof input === 'string' || Buffer.isBuffer(input)) {\n input = { key: input, format: 'pem' }\n }\n\n if (!isObject(input)) {\n throw new TypeError('input must be a string, Buffer or an object')\n }\n\n const { format, passphrase } = input\n let { key, type } = input\n\n if (typeof key !== 'string' && !Buffer.isBuffer(key)) {\n throw new TypeError('key must be a string or Buffer')\n }\n\n if (passphrase !== undefined) {\n throw new errors.JOSENotSupported('encrypted private keys are not supported in your Node.js runtime version')\n }\n\n if (format !== 'pem' && format !== 'der') {\n throw new TypeError('format must be one of \"pem\" or \"der\"')\n }\n\n let label\n if (format === 'pem') {\n key = key.toString()\n switch (key.split(/\\r?\\n/g)[0].toString()) {\n case '-----BEGIN PRIVATE KEY-----':\n type = 'pkcs8'\n label = 'PRIVATE KEY'\n break\n case '-----BEGIN EC PRIVATE KEY-----':\n type = 'sec1'\n label = 'EC PRIVATE KEY'\n break\n case '-----BEGIN RSA PRIVATE KEY-----':\n type = 'pkcs1'\n label = 'RSA PRIVATE KEY'\n break\n default:\n throw new TypeError('unknown/unsupported PEM type')\n }\n }\n\n switch (type) {\n case 'pkcs8': {\n const PrivateKeyInfo = asn1.get('PrivateKeyInfo')\n const parsed = PrivateKeyInfo.decode(key, format, { label })\n\n let type, keyObject\n switch (parsed.algorithm.algorithm) {\n case 'ecPublicKey': {\n type = 'sec1'\n keyObject = createPrivateKey({ type, key: parsed.privateKey, format: 'der' }, { [namedCurve]: parsed.algorithm.parameters.value })\n break\n }\n case 'rsaEncryption': {\n type = 'pkcs1'\n keyObject = createPrivateKey({ type, key: parsed.privateKey, format: 'der' })\n break\n }\n default:\n unsupported(parsed.algorithm.algorithm)\n }\n\n keyObject._pkcs8 = key\n return keyObject\n }\n case 'pkcs1': {\n const RSAPrivateKey = asn1.get('RSAPrivateKey')\n const parsed = RSAPrivateKey.decode(key, format, { label })\n\n const keyObject = new KeyObject()\n keyObject._asn1 = parsed\n keyObject._asymmetricKeyType = 'rsa'\n keyObject._type = 'private'\n keyObject._pem = RSAPrivateKey.encode(parsed, 'pem', { label: 'RSA PRIVATE KEY' })\n\n return keyObject\n }\n case 'sec1': {\n const ECPrivateKey = asn1.get('ECPrivateKey')\n let parsed = ECPrivateKey.decode(key, format, { label })\n\n if (!('parameters' in parsed) && !hints[namedCurve]) {\n throw new Error('invalid sec1')\n } else if (!('parameters' in parsed)) {\n parsed = { ...parsed, parameters: { type: 'namedCurve', value: hints[namedCurve] } }\n }\n\n const keyObject = new KeyObject()\n keyObject._asn1 = parsed\n keyObject._asymmetricKeyType = 'ec'\n keyObject._type = 'private'\n keyObject._pem = ECPrivateKey.encode(parsed, 'pem', { label: 'EC PRIVATE KEY' })\n\n return keyObject\n }\n default:\n throw new TypeError(`The value ${type} is invalid for option \"type\"`)\n }\n }\n}\n\nmodule.exports = { createPublicKey, createPrivateKey, createSecretKey, KeyObject, asInput }\n","const { EOL } = require('os')\n\nconst errors = require('../errors')\n\nconst { keyObjectSupported } = require('./runtime_support')\nconst { createPublicKey } = require('./key_object')\nconst base64url = require('./base64url')\nconst asn1 = require('./asn1')\nconst computePrimes = require('./rsa_primes')\nconst { OKP_CURVES, EC_CURVES } = require('../registry')\n\nconst formatPem = (base64pem, descriptor) => `-----BEGIN ${descriptor} KEY-----${EOL}${(base64pem.match(/.{1,64}/g) || []).join(EOL)}${EOL}-----END ${descriptor} KEY-----`\n\nconst okpToJWK = {\n private (crv, keyObject) {\n const der = keyObject.export({ type: 'pkcs8', format: 'der' })\n const OneAsymmetricKey = asn1.get('OneAsymmetricKey')\n const { privateKey: { privateKey: d } } = OneAsymmetricKey.decode(der)\n\n return {\n ...okpToJWK.public(crv, createPublicKey(keyObject)),\n d: base64url.encodeBuffer(d)\n }\n },\n public (crv, keyObject) {\n const der = keyObject.export({ type: 'spki', format: 'der' })\n\n const PublicKeyInfo = asn1.get('PublicKeyInfo')\n\n const { publicKey: { data: x } } = PublicKeyInfo.decode(der)\n\n return {\n kty: 'OKP',\n crv,\n x: base64url.encodeBuffer(x)\n }\n }\n}\n\nconst keyObjectToJWK = {\n rsa: {\n private (keyObject) {\n const der = keyObject.export({ type: 'pkcs8', format: 'der' })\n\n const PrivateKeyInfo = asn1.get('PrivateKeyInfo')\n const RSAPrivateKey = asn1.get('RSAPrivateKey')\n\n const { privateKey } = PrivateKeyInfo.decode(der)\n const { version, n, e, d, p, q, dp, dq, qi } = RSAPrivateKey.decode(privateKey)\n\n if (version !== 'two-prime') {\n throw new errors.JOSENotSupported('Private RSA keys with more than two primes are not supported')\n }\n\n return {\n kty: 'RSA',\n n: base64url.encodeBigInt(n),\n e: base64url.encodeBigInt(e),\n d: base64url.encodeBigInt(d),\n p: base64url.encodeBigInt(p),\n q: base64url.encodeBigInt(q),\n dp: base64url.encodeBigInt(dp),\n dq: base64url.encodeBigInt(dq),\n qi: base64url.encodeBigInt(qi)\n }\n },\n public (keyObject) {\n const der = keyObject.export({ type: 'spki', format: 'der' })\n\n const PublicKeyInfo = asn1.get('PublicKeyInfo')\n const RSAPublicKey = asn1.get('RSAPublicKey')\n\n const { publicKey: { data: publicKey } } = PublicKeyInfo.decode(der)\n const { n, e } = RSAPublicKey.decode(publicKey)\n\n return {\n kty: 'RSA',\n n: base64url.encodeBigInt(n),\n e: base64url.encodeBigInt(e)\n }\n }\n },\n ec: {\n private (keyObject) {\n const der = keyObject.export({ type: 'pkcs8', format: 'der' })\n\n const PrivateKeyInfo = asn1.get('PrivateKeyInfo')\n const ECPrivateKey = asn1.get('ECPrivateKey')\n\n const { privateKey, algorithm: { parameters: { value: crv } } } = PrivateKeyInfo.decode(der)\n const { privateKey: d, publicKey } = ECPrivateKey.decode(privateKey)\n\n if (typeof publicKey === 'undefined') {\n if (keyObjectSupported) {\n return {\n ...keyObjectToJWK.ec.public(createPublicKey(keyObject)),\n d: base64url.encodeBuffer(d)\n }\n }\n\n throw new errors.JOSENotSupported('Private EC keys without the public key embedded are not supported in your Node.js runtime version')\n }\n\n const x = publicKey.data.slice(1, ((publicKey.data.length - 1) / 2) + 1)\n const y = publicKey.data.slice(((publicKey.data.length - 1) / 2) + 1)\n\n return {\n kty: 'EC',\n crv,\n d: base64url.encodeBuffer(d),\n x: base64url.encodeBuffer(x),\n y: base64url.encodeBuffer(y)\n }\n },\n public (keyObject) {\n const der = keyObject.export({ type: 'spki', format: 'der' })\n\n const PublicKeyInfo = asn1.get('PublicKeyInfo')\n\n const { publicKey: { data: publicKey }, algorithm: { parameters: { value: crv } } } = PublicKeyInfo.decode(der)\n\n const x = publicKey.slice(1, ((publicKey.length - 1) / 2) + 1)\n const y = publicKey.slice(((publicKey.length - 1) / 2) + 1)\n\n return {\n kty: 'EC',\n crv,\n x: base64url.encodeBuffer(x),\n y: base64url.encodeBuffer(y)\n }\n }\n },\n ed25519: {\n private (keyObject) {\n return okpToJWK.private('Ed25519', keyObject)\n },\n public (keyObject) {\n return okpToJWK.public('Ed25519', keyObject)\n }\n },\n ed448: {\n private (keyObject) {\n return okpToJWK.private('Ed448', keyObject)\n },\n public (keyObject) {\n return okpToJWK.public('Ed448', keyObject)\n }\n },\n x25519: {\n private (keyObject) {\n return okpToJWK.private('X25519', keyObject)\n },\n public (keyObject) {\n return okpToJWK.public('X25519', keyObject)\n }\n },\n x448: {\n private (keyObject) {\n return okpToJWK.private('X448', keyObject)\n },\n public (keyObject) {\n return okpToJWK.public('X448', keyObject)\n }\n }\n}\n\nmodule.exports.keyObjectToJWK = (keyObject) => {\n if (keyObject.type === 'private') {\n return keyObjectToJWK[keyObject.asymmetricKeyType].private(keyObject)\n }\n\n return keyObjectToJWK[keyObject.asymmetricKeyType].public(keyObject)\n}\n\nconst concatEcPublicKey = (x, y) => ({\n unused: 0,\n data: Buffer.concat([\n Buffer.alloc(1, 4),\n base64url.decodeToBuffer(x),\n base64url.decodeToBuffer(y)\n ])\n})\n\nconst jwkToPem = {\n RSA: {\n private (jwk, { calculateMissingRSAPrimes }) {\n const RSAPrivateKey = asn1.get('RSAPrivateKey')\n\n if ('oth' in jwk) {\n throw new errors.JOSENotSupported('Private RSA keys with more than two primes are not supported')\n }\n\n if (jwk.p || jwk.q || jwk.dp || jwk.dq || jwk.qi) {\n if (!(jwk.p && jwk.q && jwk.dp && jwk.dq && jwk.qi)) {\n throw new errors.JWKInvalid('all other private key parameters must be present when any one of them is present')\n }\n } else if (calculateMissingRSAPrimes) {\n jwk = computePrimes(jwk)\n } else if (!calculateMissingRSAPrimes) {\n throw new errors.JOSENotSupported('importing private RSA keys without all other private key parameters is not enabled, see documentation and its advisory on how and when its ok to enable it')\n }\n\n return RSAPrivateKey.encode({\n version: 0,\n n: BigInt(`0x${base64url.decodeToBuffer(jwk.n).toString('hex')}`),\n e: BigInt(`0x${base64url.decodeToBuffer(jwk.e).toString('hex')}`),\n d: BigInt(`0x${base64url.decodeToBuffer(jwk.d).toString('hex')}`),\n p: BigInt(`0x${base64url.decodeToBuffer(jwk.p).toString('hex')}`),\n q: BigInt(`0x${base64url.decodeToBuffer(jwk.q).toString('hex')}`),\n dp: BigInt(`0x${base64url.decodeToBuffer(jwk.dp).toString('hex')}`),\n dq: BigInt(`0x${base64url.decodeToBuffer(jwk.dq).toString('hex')}`),\n qi: BigInt(`0x${base64url.decodeToBuffer(jwk.qi).toString('hex')}`)\n }, 'pem', { label: 'RSA PRIVATE KEY' })\n },\n public (jwk) {\n const RSAPublicKey = asn1.get('RSAPublicKey')\n\n return RSAPublicKey.encode({\n version: 0,\n n: BigInt(`0x${base64url.decodeToBuffer(jwk.n).toString('hex')}`),\n e: BigInt(`0x${base64url.decodeToBuffer(jwk.e).toString('hex')}`)\n }, 'pem', { label: 'RSA PUBLIC KEY' })\n }\n },\n EC: {\n private (jwk) {\n const ECPrivateKey = asn1.get('ECPrivateKey')\n\n return ECPrivateKey.encode({\n version: 1,\n privateKey: base64url.decodeToBuffer(jwk.d),\n parameters: { type: 'namedCurve', value: jwk.crv },\n publicKey: concatEcPublicKey(jwk.x, jwk.y)\n }, 'pem', { label: 'EC PRIVATE KEY' })\n },\n public (jwk) {\n const PublicKeyInfo = asn1.get('PublicKeyInfo')\n\n return PublicKeyInfo.encode({\n algorithm: {\n algorithm: 'ecPublicKey',\n parameters: { type: 'namedCurve', value: jwk.crv }\n },\n publicKey: concatEcPublicKey(jwk.x, jwk.y)\n }, 'pem', { label: 'PUBLIC KEY' })\n }\n },\n OKP: {\n private (jwk) {\n const OneAsymmetricKey = asn1.get('OneAsymmetricKey')\n\n const b64 = OneAsymmetricKey.encode({\n version: 0,\n privateKey: { privateKey: base64url.decodeToBuffer(jwk.d) },\n algorithm: { algorithm: jwk.crv }\n }, 'der')\n\n // TODO: WHYYY? https://github.com/indutny/asn1.js/issues/110\n b64.write('04', 12, 1, 'hex')\n\n return formatPem(b64.toString('base64'), 'PRIVATE')\n },\n public (jwk) {\n const PublicKeyInfo = asn1.get('PublicKeyInfo')\n\n return PublicKeyInfo.encode({\n algorithm: { algorithm: jwk.crv },\n publicKey: {\n unused: 0,\n data: base64url.decodeToBuffer(jwk.x)\n }\n }, 'pem', { label: 'PUBLIC KEY' })\n }\n }\n}\n\nmodule.exports.jwkToPem = (jwk, { calculateMissingRSAPrimes = false } = {}) => {\n switch (jwk.kty) {\n case 'EC':\n if (!EC_CURVES.has(jwk.crv)) {\n throw new errors.JOSENotSupported(`unsupported EC key curve: ${jwk.crv}`)\n }\n break\n case 'OKP':\n if (!OKP_CURVES.has(jwk.crv)) {\n throw new errors.JOSENotSupported(`unsupported OKP key curve: ${jwk.crv}`)\n }\n break\n case 'RSA':\n break\n default:\n throw new errors.JOSENotSupported(`unsupported key type: ${jwk.kty}`)\n }\n\n if (jwk.d) {\n return jwkToPem[jwk.kty].private(jwk, { calculateMissingRSAPrimes })\n }\n\n return jwkToPem[jwk.kty].public(jwk)\n}\n","module.exports = alg => `sha${alg.substr(2, 3)}`\n","const { randomBytes } = require('crypto')\n\nconst base64url = require('./base64url')\nconst errors = require('../errors')\n\nconst ZERO = BigInt(0)\nconst ONE = BigInt(1)\nconst TWO = BigInt(2)\n\nconst toJWKParameter = (n) => {\n const hex = n.toString(16)\n return base64url.encodeBuffer(Buffer.from(hex.length % 2 ? `0${hex}` : hex, 'hex'))\n}\nconst fromBuffer = buf => BigInt(`0x${buf.toString('hex')}`)\nconst bitLength = n => n.toString(2).length\n\nconst eGcdX = (a, b) => {\n let x = ZERO\n let y = ONE\n let u = ONE\n let v = ZERO\n\n while (a !== ZERO) {\n const q = b / a\n const r = b % a\n const m = x - (u * q)\n const n = y - (v * q)\n b = a\n a = r\n x = u\n y = v\n u = m\n v = n\n }\n return x\n}\n\nconst gcd = (a, b) => {\n let shift = ZERO\n while (!((a | b) & ONE)) {\n a >>= ONE\n b >>= ONE\n shift++\n }\n while (!(a & ONE)) {\n a >>= ONE\n }\n do {\n while (!(b & ONE)) {\n b >>= ONE\n }\n if (a > b) {\n const x = a\n a = b\n b = x\n }\n b -= a\n } while (b)\n\n return a << shift\n}\n\nconst modPow = (a, b, n) => {\n a = toZn(a, n)\n let result = ONE\n let x = a\n while (b > 0) {\n const leastSignificantBit = b % TWO\n b = b / TWO\n if (leastSignificantBit === ONE) {\n result = result * x\n result = result % n\n }\n x = x * x\n x = x % n\n }\n return result\n}\n\nconst randBetween = (min, max) => {\n const interval = max - min\n const bitLen = bitLength(interval)\n let rnd\n do {\n rnd = fromBuffer(randBits(bitLen))\n } while (rnd > interval)\n return rnd + min\n}\n\nconst randBits = (bitLength) => {\n const byteLength = Math.ceil(bitLength / 8)\n const rndBytes = randomBytes(byteLength)\n // Fill with 0's the extra bits\n rndBytes[0] = rndBytes[0] & (2 ** (bitLength % 8) - 1)\n return rndBytes\n}\n\nconst toZn = (a, n) => {\n a = a % n\n return (a < 0) ? a + n : a\n}\n\nconst odd = (n) => {\n let r = n\n while (r % TWO === ZERO) {\n r = r / TWO\n }\n return r\n}\n\n// not sold on these values\nconst maxCountWhileNoY = 30\nconst maxCountWhileInot0 = 22\n\nconst getPrimeFactors = (e, d, n) => {\n const r = odd(e * d - ONE)\n\n let countWhileNoY = 0\n let y\n do {\n countWhileNoY++\n if (countWhileNoY === maxCountWhileNoY) {\n throw new errors.JWKImportFailed('failed to calculate missing primes')\n }\n\n let countWhileInot0 = 0\n let i = modPow(randBetween(TWO, n), r, n)\n let o = ZERO\n while (i !== ONE) {\n countWhileInot0++\n if (countWhileInot0 === maxCountWhileInot0) {\n throw new errors.JWKImportFailed('failed to calculate missing primes')\n }\n o = i\n i = (i * i) % n\n }\n if (o !== (n - ONE)) {\n y = o\n }\n } while (!y)\n\n const p = gcd(y - ONE, n)\n const q = n / p\n\n return p > q ? { p, q } : { p: q, q: p }\n}\n\nmodule.exports = (jwk) => {\n const e = fromBuffer(base64url.decodeToBuffer(jwk.e))\n const d = fromBuffer(base64url.decodeToBuffer(jwk.d))\n const n = fromBuffer(base64url.decodeToBuffer(jwk.n))\n\n if (d >= n) {\n throw new errors.JWKInvalid('invalid RSA private exponent')\n }\n\n const { p, q } = getPrimeFactors(e, d, n)\n const dp = d % (p - ONE)\n const dq = d % (q - ONE)\n const qi = toZn(eGcdX(toZn(q, p), p), p)\n\n return {\n ...jwk,\n p: toJWKParameter(p),\n q: toJWKParameter(q),\n dp: toJWKParameter(dp),\n dq: toJWKParameter(dq),\n qi: toJWKParameter(qi)\n }\n}\n","const { diffieHellman, KeyObject, sign, verify } = require('crypto')\n\nconst [major, minor] = process.version.substr(1).split('.').map(x => parseInt(x, 10))\n\nmodule.exports = {\n oaepHashSupported: major > 12 || (major === 12 && minor >= 9),\n keyObjectSupported: !!KeyObject && major >= 12,\n edDSASupported: !!sign && !!verify,\n dsaEncodingSupported: major > 13 || (major === 13 && minor >= 2) || (major === 12 && minor >= 16),\n improvedDH: !!diffieHellman\n}\n","const minute = 60\nconst hour = minute * 60\nconst day = hour * 24\nconst week = day * 7\nconst year = day * 365.25\n\nconst REGEX = /^(\\d+|\\d+\\.\\d+) ?(seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)$/i\n\nmodule.exports = (str) => {\n const matched = REGEX.exec(str)\n\n if (!matched) {\n throw new TypeError(`invalid time period format (\"${str}\")`)\n }\n\n const value = parseFloat(matched[1])\n const unit = matched[2].toLowerCase()\n\n switch (unit) {\n case 'sec':\n case 'secs':\n case 'second':\n case 'seconds':\n case 's':\n return Math.round(value)\n case 'minute':\n case 'minutes':\n case 'min':\n case 'mins':\n case 'm':\n return Math.round(value * minute)\n case 'hour':\n case 'hours':\n case 'hr':\n case 'hrs':\n case 'h':\n return Math.round(value * hour)\n case 'day':\n case 'days':\n case 'd':\n return Math.round(value * day)\n case 'week':\n case 'weeks':\n case 'w':\n return Math.round(value * week)\n case 'year':\n case 'years':\n case 'yr':\n case 'yrs':\n case 'y':\n return Math.round(value * year)\n }\n}\n","const { timingSafeEqual: TSE } = require('crypto')\n\nconst paddedBuffer = (input, length) => {\n if (input.length === length) {\n return input\n }\n\n const buffer = Buffer.alloc(length)\n input.copy(buffer)\n return buffer\n}\n\nconst timingSafeEqual = (a, b) => {\n const length = Math.max(a.length, b.length)\n return TSE(paddedBuffer(a, length), paddedBuffer(b, length))\n}\n\nmodule.exports = timingSafeEqual\n","const MAX_INT32 = Math.pow(2, 32)\n\nmodule.exports = (value, buf = Buffer.allocUnsafe(8)) => {\n const high = Math.floor(value / MAX_INT32)\n const low = value % MAX_INT32\n\n buf.writeUInt32BE(high, 0)\n buf.writeUInt32BE(low, 4)\n return buf\n}\n","const { JOSECritNotUnderstood, JWSInvalid } = require('../errors')\n\nconst DEFINED = new Set([\n 'alg', 'jku', 'jwk', 'kid', 'x5u', 'x5c', 'x5t', 'x5t#S256', 'typ', 'cty',\n 'crit', 'enc', 'zip', 'epk', 'apu', 'apv', 'iv', 'tag', 'p2s', 'p2c'\n])\n\nmodule.exports = function validateCrit (Err, protectedHeader, unprotectedHeader, understood) {\n if (protectedHeader && 'crit' in protectedHeader) {\n if (\n !Array.isArray(protectedHeader.crit) ||\n protectedHeader.crit.length === 0 ||\n protectedHeader.crit.some(s => typeof s !== 'string' || !s)\n ) {\n throw new Err('\"crit\" Header Parameter MUST be an array of non-empty strings when present')\n }\n const whitelisted = new Set(understood)\n const combined = { ...protectedHeader, ...unprotectedHeader }\n protectedHeader.crit.forEach((parameter) => {\n if (DEFINED.has(parameter)) {\n throw new Err(`The critical list contains a non-extension Header Parameter ${parameter}`)\n }\n if (!whitelisted.has(parameter)) {\n throw new JOSECritNotUnderstood(`critical \"${parameter}\" is not understood`)\n }\n if (parameter === 'b64') {\n if (!('b64' in protectedHeader)) {\n throw new JWSInvalid('\"b64\" critical parameter must be integrity protected')\n }\n if (typeof protectedHeader.b64 !== 'boolean') {\n throw new JWSInvalid('\"b64\" critical parameter must be a boolean')\n }\n } else if (!(parameter in combined)) {\n throw new Err(`critical parameter \"${parameter}\" is missing`)\n }\n })\n }\n if (unprotectedHeader && 'crit' in unprotectedHeader) {\n throw new Err('\"crit\" Header Parameter MUST be integrity protected when present')\n }\n}\n","module.exports = {\n JWE: require('./jwe'),\n JWK: require('./jwk'),\n JWKS: require('./jwks'),\n JWS: require('./jws'),\n JWT: require('./jwt'),\n errors: require('./errors')\n}\n","const { createCipheriv, createDecipheriv, getCiphers } = require('crypto')\n\nconst uint64be = require('../help/uint64be')\nconst timingSafeEqual = require('../help/timing_safe_equal')\nconst { KEYOBJECT } = require('../help/consts')\nconst { JWEInvalid, JWEDecryptionFailed } = require('../errors')\n\nconst checkInput = function (size, iv, tag) {\n if (iv.length !== 16) {\n throw new JWEInvalid('invalid iv')\n }\n if (arguments.length === 3) {\n if (tag.length !== size / 8) {\n throw new JWEInvalid('invalid tag')\n }\n }\n}\n\nconst encrypt = (size, sign, { [KEYOBJECT]: keyObject }, cleartext, { iv, aad = Buffer.alloc(0) }) => {\n const key = keyObject.export()\n checkInput(size, iv)\n\n const keySize = size / 8\n const encKey = key.slice(keySize)\n const cipher = createCipheriv(`aes-${size}-cbc`, encKey, iv)\n const ciphertext = Buffer.concat([cipher.update(cleartext), cipher.final()])\n const macData = Buffer.concat([aad, iv, ciphertext, uint64be(aad.length * 8)])\n\n const macKey = key.slice(0, keySize)\n const tag = sign({ [KEYOBJECT]: macKey }, macData).slice(0, keySize)\n\n return { ciphertext, tag }\n}\n\nconst decrypt = (size, sign, { [KEYOBJECT]: keyObject }, ciphertext, { iv, tag = Buffer.alloc(0), aad = Buffer.alloc(0) }) => {\n checkInput(size, iv, tag)\n\n const keySize = size / 8\n const key = keyObject.export()\n const encKey = key.slice(keySize)\n const macKey = key.slice(0, keySize)\n\n const macData = Buffer.concat([aad, iv, ciphertext, uint64be(aad.length * 8)])\n const expectedTag = sign({ [KEYOBJECT]: macKey }, macData, tag).slice(0, keySize)\n const macCheckPassed = timingSafeEqual(tag, expectedTag)\n\n if (!macCheckPassed) {\n throw new JWEDecryptionFailed()\n }\n\n let cleartext\n try {\n const cipher = createDecipheriv(`aes-${size}-cbc`, encKey, iv)\n cleartext = Buffer.concat([cipher.update(ciphertext), cipher.final()])\n } catch (err) {}\n\n if (!cleartext) {\n throw new JWEDecryptionFailed()\n }\n\n return cleartext\n}\n\nmodule.exports = (JWA, JWK) => {\n ['A128CBC-HS256', 'A192CBC-HS384', 'A256CBC-HS512'].forEach((jwaAlg) => {\n const size = parseInt(jwaAlg.substr(1, 3), 10)\n const sign = JWA.sign.get(`HS${size * 2}`)\n if (getCiphers().includes(`aes-${size}-cbc`)) {\n JWA.encrypt.set(jwaAlg, encrypt.bind(undefined, size, sign))\n JWA.decrypt.set(jwaAlg, decrypt.bind(undefined, size, sign))\n JWK.oct.encrypt[jwaAlg] = JWK.oct.decrypt[jwaAlg] = key => (key.use === 'enc' || key.use === undefined) && key.length / 2 === size\n }\n })\n}\n","const { createCipheriv, createDecipheriv, getCiphers } = require('crypto')\n\nconst { KEYOBJECT } = require('../help/consts')\nconst { JWEInvalid, JWEDecryptionFailed } = require('../errors')\nconst { asInput } = require('../help/key_object')\n\nconst checkInput = function (size, iv, tag) {\n if (iv.length !== 12) {\n throw new JWEInvalid('invalid iv')\n }\n if (arguments.length === 3) {\n if (tag.length !== 16) {\n throw new JWEInvalid('invalid tag')\n }\n }\n}\n\nconst encrypt = (size, { [KEYOBJECT]: keyObject }, cleartext, { iv, aad = Buffer.alloc(0) }) => {\n const key = asInput(keyObject, false)\n checkInput(size, iv)\n\n const cipher = createCipheriv(`aes-${size}-gcm`, key, iv, { authTagLength: 16 })\n cipher.setAAD(aad)\n\n const ciphertext = Buffer.concat([cipher.update(cleartext), cipher.final()])\n const tag = cipher.getAuthTag()\n\n return { ciphertext, tag }\n}\n\nconst decrypt = (size, { [KEYOBJECT]: keyObject }, ciphertext, { iv, tag = Buffer.alloc(0), aad = Buffer.alloc(0) }) => {\n const key = asInput(keyObject, false)\n checkInput(size, iv, tag)\n\n try {\n const cipher = createDecipheriv(`aes-${size}-gcm`, key, iv, { authTagLength: 16 })\n cipher.setAuthTag(tag)\n cipher.setAAD(aad)\n\n return Buffer.concat([cipher.update(ciphertext), cipher.final()])\n } catch (err) {\n throw new JWEDecryptionFailed()\n }\n}\n\nmodule.exports = (JWA, JWK) => {\n ['A128GCM', 'A192GCM', 'A256GCM'].forEach((jwaAlg) => {\n const size = parseInt(jwaAlg.substr(1, 3), 10)\n if (getCiphers().includes(`aes-${size}-gcm`)) {\n JWA.encrypt.set(jwaAlg, encrypt.bind(undefined, size))\n JWA.decrypt.set(jwaAlg, decrypt.bind(undefined, size))\n JWK.oct.encrypt[jwaAlg] = JWK.oct.decrypt[jwaAlg] = key => (key.use === 'enc' || key.use === undefined) && key.length === size\n }\n })\n}\n","const generateIV = require('../help/generate_iv')\nconst base64url = require('../help/base64url')\n\nmodule.exports = (JWA, JWK) => {\n ['A128GCMKW', 'A192GCMKW', 'A256GCMKW'].forEach((jwaAlg) => {\n const encAlg = jwaAlg.substr(0, 7)\n const size = parseInt(jwaAlg.substr(1, 3), 10)\n const encrypt = JWA.encrypt.get(encAlg)\n const decrypt = JWA.decrypt.get(encAlg)\n\n if (encrypt && decrypt) {\n JWA.keyManagementEncrypt.set(jwaAlg, (key, payload) => {\n const iv = generateIV(jwaAlg)\n const { ciphertext, tag } = encrypt(key, payload, { iv })\n return {\n wrapped: ciphertext,\n header: { tag: base64url.encodeBuffer(tag), iv: base64url.encodeBuffer(iv) }\n }\n })\n JWA.keyManagementDecrypt.set(jwaAlg, decrypt)\n JWK.oct.wrapKey[jwaAlg] = JWK.oct.unwrapKey[jwaAlg] = key => (key.use === 'enc' || key.use === undefined) && key.length === size\n }\n })\n}\n","const { createCipheriv, createDecipheriv, getCiphers } = require('crypto')\n\nconst { KEYOBJECT } = require('../help/consts')\nconst { asInput } = require('../help/key_object')\n\nconst checkInput = (data) => {\n if (data !== undefined && data.length % 8 !== 0) {\n throw new Error('invalid data length')\n }\n}\n\nconst wrapKey = (alg, { [KEYOBJECT]: keyObject }, payload) => {\n const key = asInput(keyObject, false)\n const cipher = createCipheriv(alg, key, Buffer.alloc(8, 'a6', 'hex'))\n\n return { wrapped: Buffer.concat([cipher.update(payload), cipher.final()]) }\n}\n\nconst unwrapKey = (alg, { [KEYOBJECT]: keyObject }, payload) => {\n const key = asInput(keyObject, false)\n checkInput(payload)\n const cipher = createDecipheriv(alg, key, Buffer.alloc(8, 'a6', 'hex'))\n\n return Buffer.concat([cipher.update(payload), cipher.final()])\n}\n\nmodule.exports = (JWA, JWK) => {\n ['A128KW', 'A192KW', 'A256KW'].forEach((jwaAlg) => {\n const size = parseInt(jwaAlg.substr(1, 3), 10)\n const alg = `aes${size}-wrap`\n if (getCiphers().includes(alg)) {\n JWA.keyManagementEncrypt.set(jwaAlg, wrapKey.bind(undefined, alg))\n JWA.keyManagementDecrypt.set(jwaAlg, unwrapKey.bind(undefined, alg))\n JWK.oct.wrapKey[jwaAlg] = JWK.oct.unwrapKey[jwaAlg] = key => (key.use === 'enc' || key.use === undefined) && key.length === size\n }\n })\n}\n","const { improvedDH } = require('../../help/runtime_support')\n\nif (improvedDH) {\n const { diffieHellman } = require('crypto')\n\n const { KeyObject } = require('../../help/key_object')\n const importKey = require('../../jwk/import')\n\n module.exports = ({ keyObject: privateKey }, publicKey) => {\n if (!(publicKey instanceof KeyObject)) {\n ({ keyObject: publicKey } = importKey(publicKey))\n }\n\n return diffieHellman({ privateKey, publicKey })\n }\n} else {\n const { createECDH, constants: { POINT_CONVERSION_UNCOMPRESSED } } = require('crypto')\n\n const base64url = require('../../help/base64url')\n\n const crvToCurve = (crv) => {\n switch (crv) {\n case 'P-256':\n return 'prime256v1'\n case 'P-384':\n return 'secp384r1'\n case 'P-521':\n return 'secp521r1'\n }\n }\n\n const UNCOMPRESSED = Buffer.alloc(1, POINT_CONVERSION_UNCOMPRESSED)\n const pubToBuffer = (x, y) => Buffer.concat([UNCOMPRESSED, base64url.decodeToBuffer(x), base64url.decodeToBuffer(y)])\n\n module.exports = ({ crv, d }, { x, y }) => {\n const curve = crvToCurve(crv)\n const exchange = createECDH(curve)\n\n exchange.setPrivateKey(base64url.decodeToBuffer(d))\n\n return exchange.computeSecret(pubToBuffer(x, y))\n }\n}\n","const { createHash } = require('crypto')\nconst ecdhComputeSecret = require('./compute_secret')\n\nconst concat = (key, length, value) => {\n const iterations = Math.ceil(length / 32)\n let res\n\n for (let iter = 1; iter <= iterations; iter++) {\n const buf = Buffer.allocUnsafe(4 + key.length + value.length)\n buf.writeUInt32BE(iter, 0)\n key.copy(buf, 4)\n value.copy(buf, 4 + key.length)\n if (!res) {\n res = createHash('sha256').update(buf).digest()\n } else {\n res = Buffer.concat([res, createHash('sha256').update(buf).digest()])\n }\n }\n\n return res.slice(0, length)\n}\n\nconst uint32be = (value, buf = Buffer.allocUnsafe(4)) => {\n buf.writeUInt32BE(value)\n return buf\n}\n\nconst lengthAndInput = input => Buffer.concat([uint32be(input.length), input])\n\nmodule.exports = (alg, keyLen, privKey, pubKey, { apu = Buffer.alloc(0), apv = Buffer.alloc(0) } = {}, computeSecret = ecdhComputeSecret) => {\n const value = Buffer.concat([\n lengthAndInput(Buffer.from(alg)),\n lengthAndInput(apu),\n lengthAndInput(apv),\n uint32be(keyLen)\n ])\n\n const sharedSecret = computeSecret(privKey, pubKey)\n return concat(sharedSecret, keyLen / 8, value)\n}\n","const { improvedDH } = require('../../help/runtime_support')\nconst { KEYLENGTHS } = require('../../registry')\nconst { generateSync } = require('../../jwk/generate')\n\nconst derive = require('./derive')\n\nconst wrapKey = (key, payload, { enc }) => {\n const epk = generateSync(key.kty, key.crv)\n\n const derivedKey = derive(enc, KEYLENGTHS.get(enc), epk, key)\n\n return {\n wrapped: derivedKey,\n header: { epk: { kty: key.kty, crv: key.crv, x: epk.x, y: epk.y } }\n }\n}\n\nconst unwrapKey = (key, payload, header) => {\n const { enc, epk } = header\n return derive(enc, KEYLENGTHS.get(enc), key, epk, header)\n}\n\nmodule.exports = (JWA, JWK) => {\n JWA.keyManagementEncrypt.set('ECDH-ES', wrapKey)\n JWA.keyManagementDecrypt.set('ECDH-ES', unwrapKey)\n JWK.EC.deriveKey['ECDH-ES'] = key => (key.use === 'enc' || key.use === undefined) && key.crv !== 'secp256k1'\n\n if (improvedDH) {\n JWK.OKP.deriveKey['ECDH-ES'] = key => (key.use === 'enc' || key.use === undefined) && key.keyObject.asymmetricKeyType.startsWith('x')\n }\n}\n","const { improvedDH } = require('../../help/runtime_support')\nconst { KEYOBJECT } = require('../../help/consts')\nconst { generateSync } = require('../../jwk/generate')\nconst { ECDH_DERIVE_LENGTHS } = require('../../registry')\n\nconst derive = require('./derive')\n\nconst wrapKey = (wrap, derive, key, payload) => {\n const epk = generateSync(key.kty, key.crv)\n\n const derivedKey = derive(epk, key, payload)\n\n const result = wrap({ [KEYOBJECT]: derivedKey }, payload)\n result.header = result.header || {}\n Object.assign(result.header, { epk: { kty: key.kty, crv: key.crv, x: epk.x, y: epk.y } })\n\n return result\n}\n\nconst unwrapKey = (unwrap, derive, key, payload, header) => {\n const { epk } = header\n const derivedKey = derive(key, epk, header)\n\n return unwrap({ [KEYOBJECT]: derivedKey }, payload, header)\n}\n\nmodule.exports = (JWA, JWK) => {\n ['ECDH-ES+A128KW', 'ECDH-ES+A192KW', 'ECDH-ES+A256KW'].forEach((jwaAlg) => {\n const kw = jwaAlg.substr(-6)\n const kwWrap = JWA.keyManagementEncrypt.get(kw)\n const kwUnwrap = JWA.keyManagementDecrypt.get(kw)\n const keylen = parseInt(jwaAlg.substr(9, 3), 10)\n ECDH_DERIVE_LENGTHS.set(jwaAlg, keylen)\n\n if (kwWrap && kwUnwrap) {\n JWA.keyManagementEncrypt.set(jwaAlg, wrapKey.bind(undefined, kwWrap, derive.bind(undefined, jwaAlg, keylen)))\n JWA.keyManagementDecrypt.set(jwaAlg, unwrapKey.bind(undefined, kwUnwrap, derive.bind(undefined, jwaAlg, keylen)))\n JWK.EC.deriveKey[jwaAlg] = key => (key.use === 'enc' || key.use === undefined) && key.crv !== 'secp256k1'\n\n if (improvedDH) {\n JWK.OKP.deriveKey[jwaAlg] = key => (key.use === 'enc' || key.use === undefined) && key.keyObject.asymmetricKeyType.startsWith('x')\n }\n }\n })\n}\nmodule.exports.wrapKey = wrapKey\nmodule.exports.unwrapKey = unwrapKey\n","const { sign: signOneShot, verify: verifyOneShot, createSign, createVerify, getCurves } = require('crypto')\n\nconst { derToJose, joseToDer } = require('../help/ecdsa_signatures')\nconst { KEYOBJECT } = require('../help/consts')\nconst resolveNodeAlg = require('../help/node_alg')\nconst { asInput } = require('../help/key_object')\nconst { dsaEncodingSupported } = require('../help/runtime_support')\n\nlet sign, verify\n\nif (dsaEncodingSupported) {\n sign = (jwaAlg, nodeAlg, { [KEYOBJECT]: keyObject }, payload) => {\n if (typeof payload === 'string') {\n payload = Buffer.from(payload)\n }\n return signOneShot(nodeAlg, payload, { key: asInput(keyObject, false), dsaEncoding: 'ieee-p1363' })\n }\n verify = (jwaAlg, nodeAlg, { [KEYOBJECT]: keyObject }, payload, signature) => {\n try {\n return verifyOneShot(nodeAlg, payload, { key: asInput(keyObject, true), dsaEncoding: 'ieee-p1363' }, signature)\n } catch (err) {\n return false\n }\n }\n} else {\n sign = (jwaAlg, nodeAlg, { [KEYOBJECT]: keyObject }, payload) => {\n return derToJose(createSign(nodeAlg).update(payload).sign(asInput(keyObject, false)), jwaAlg)\n }\n verify = (jwaAlg, nodeAlg, { [KEYOBJECT]: keyObject }, payload, signature) => {\n try {\n return createVerify(nodeAlg).update(payload).verify(asInput(keyObject, true), joseToDer(signature, jwaAlg))\n } catch (err) {\n return false\n }\n }\n}\n\nconst crvToAlg = (crv) => {\n switch (crv) {\n case 'P-256':\n return 'ES256'\n case 'secp256k1':\n return 'ES256K'\n case 'P-384':\n return 'ES384'\n case 'P-521':\n return 'ES512'\n }\n}\n\nmodule.exports = (JWA, JWK) => {\n const algs = []\n\n if (getCurves().includes('prime256v1')) {\n algs.push('ES256')\n }\n\n if (getCurves().includes('secp256k1')) {\n algs.push('ES256K')\n }\n\n if (getCurves().includes('secp384r1')) {\n algs.push('ES384')\n }\n\n if (getCurves().includes('secp521r1')) {\n algs.push('ES512')\n }\n\n algs.forEach((jwaAlg) => {\n const nodeAlg = resolveNodeAlg(jwaAlg)\n JWA.sign.set(jwaAlg, sign.bind(undefined, jwaAlg, nodeAlg))\n JWA.verify.set(jwaAlg, verify.bind(undefined, jwaAlg, nodeAlg))\n JWK.EC.sign[jwaAlg] = key => key.private && JWK.EC.verify[jwaAlg](key)\n JWK.EC.verify[jwaAlg] = key => (key.use === 'sig' || key.use === undefined) && crvToAlg(key.crv) === jwaAlg\n })\n}\n","const { sign: signOneShot, verify: verifyOneShot } = require('crypto')\n\nconst { KEYOBJECT } = require('../help/consts')\nconst { edDSASupported } = require('../help/runtime_support')\n\nconst sign = ({ [KEYOBJECT]: keyObject }, payload) => {\n if (typeof payload === 'string') {\n payload = Buffer.from(payload)\n }\n return signOneShot(undefined, payload, keyObject)\n}\n\nconst verify = ({ [KEYOBJECT]: keyObject }, payload, signature) => {\n return verifyOneShot(undefined, payload, keyObject, signature)\n}\n\nmodule.exports = (JWA, JWK) => {\n if (edDSASupported) {\n JWA.sign.set('EdDSA', sign)\n JWA.verify.set('EdDSA', verify)\n JWK.OKP.sign.EdDSA = key => key.private && JWK.OKP.verify.EdDSA(key)\n JWK.OKP.verify.EdDSA = key => (key.use === 'sig' || key.use === undefined) && key.keyObject.asymmetricKeyType.startsWith('ed')\n }\n}\n","const { createHmac } = require('crypto')\n\nconst { KEYOBJECT } = require('../help/consts')\nconst timingSafeEqual = require('../help/timing_safe_equal')\nconst resolveNodeAlg = require('../help/node_alg')\nconst { asInput } = require('../help/key_object')\n\nconst sign = (jwaAlg, hmacAlg, { [KEYOBJECT]: keyObject }, payload) => {\n const hmac = createHmac(hmacAlg, asInput(keyObject, false))\n hmac.update(payload)\n return hmac.digest()\n}\n\nconst verify = (jwaAlg, hmacAlg, key, payload, signature) => {\n const expected = sign(jwaAlg, hmacAlg, key, payload)\n const actual = signature\n\n return timingSafeEqual(actual, expected)\n}\n\nmodule.exports = (JWA, JWK) => {\n ['HS256', 'HS384', 'HS512'].forEach((jwaAlg) => {\n const hmacAlg = resolveNodeAlg(jwaAlg)\n JWA.sign.set(jwaAlg, sign.bind(undefined, jwaAlg, hmacAlg))\n JWA.verify.set(jwaAlg, verify.bind(undefined, jwaAlg, hmacAlg))\n JWK.oct.sign[jwaAlg] = JWK.oct.verify[jwaAlg] = key => key.use === 'sig' || key.use === undefined\n })\n}\n","const { JWKKeySupport, JOSENotSupported } = require('../errors')\nconst { KEY_MANAGEMENT_ENCRYPT, KEY_MANAGEMENT_DECRYPT } = require('../help/consts')\n\nconst { JWA, JWK } = require('../registry')\n\n// sign, verify\nrequire('./hmac')(JWA, JWK)\nrequire('./ecdsa')(JWA, JWK)\nrequire('./eddsa')(JWA, JWK)\nrequire('./rsassa_pss')(JWA, JWK)\nrequire('./rsassa')(JWA, JWK)\nrequire('./none')(JWA)\n\n// encrypt, decrypt\nrequire('./aes_cbc_hmac_sha2')(JWA, JWK)\nrequire('./aes_gcm')(JWA, JWK)\n\n// wrapKey, unwrapKey\nrequire('./rsaes')(JWA, JWK)\nrequire('./aes_kw')(JWA, JWK)\nrequire('./aes_gcm_kw')(JWA, JWK)\n\n// deriveKey\nrequire('./pbes2')(JWA, JWK)\nrequire('./ecdh/dir')(JWA, JWK)\nrequire('./ecdh/kw')(JWA, JWK)\n\nconst check = (key, op, alg) => {\n const cache = `_${op}_${alg}`\n\n let label\n let keyOp\n if (op === 'keyManagementEncrypt') {\n label = 'key management (encryption)'\n keyOp = KEY_MANAGEMENT_ENCRYPT\n } else if (op === 'keyManagementDecrypt') {\n label = 'key management (decryption)'\n keyOp = KEY_MANAGEMENT_DECRYPT\n }\n\n if (cache in key) {\n if (key[cache]) {\n return\n }\n throw new JWKKeySupport(`the key does not support ${alg} ${label || op} algorithm`)\n }\n\n let value = true\n if (!JWA[op].has(alg)) {\n throw new JOSENotSupported(`unsupported ${label || op} alg: ${alg}`)\n } else if (!key.algorithms(keyOp).has(alg)) {\n value = false\n }\n\n Object.defineProperty(key, cache, { value, enumerable: false })\n\n if (!value) {\n return check(key, op, alg)\n }\n}\n\nmodule.exports = {\n check,\n sign: (alg, key, payload) => {\n check(key, 'sign', alg)\n return JWA.sign.get(alg)(key, payload)\n },\n verify: (alg, key, payload, signature) => {\n check(key, 'verify', alg)\n return JWA.verify.get(alg)(key, payload, signature)\n },\n keyManagementEncrypt: (alg, key, payload, opts) => {\n check(key, 'keyManagementEncrypt', alg)\n return JWA.keyManagementEncrypt.get(alg)(key, payload, opts)\n },\n keyManagementDecrypt: (alg, key, payload, opts) => {\n check(key, 'keyManagementDecrypt', alg)\n return JWA.keyManagementDecrypt.get(alg)(key, payload, opts)\n },\n encrypt: (alg, key, cleartext, opts) => {\n check(key, 'encrypt', alg)\n return JWA.encrypt.get(alg)(key, cleartext, opts)\n },\n decrypt: (alg, key, ciphertext, opts) => {\n check(key, 'decrypt', alg)\n return JWA.decrypt.get(alg)(key, ciphertext, opts)\n }\n}\n","const sign = () => Buffer.from('')\nconst verify = (key, payload, signature) => !signature.length\n\nmodule.exports = (JWA, JWK) => {\n JWA.sign.set('none', sign)\n JWA.verify.set('none', verify)\n}\n","const { pbkdf2Sync: pbkdf2, randomBytes } = require('crypto')\n\nconst { KEYOBJECT } = require('../help/consts')\nconst base64url = require('../help/base64url')\n\nconst SALT_LENGTH = 16\nconst NULL_BUFFER = Buffer.alloc(1, 0)\n\nconst concatSalt = (alg, p2s) => {\n return Buffer.concat([\n Buffer.from(alg, 'utf8'),\n NULL_BUFFER,\n p2s\n ])\n}\n\nconst wrapKey = (keylen, sha, concat, wrap, { [KEYOBJECT]: keyObject }, payload) => {\n // Note that if password-based encryption is used for multiple\n // recipients, it is expected that each recipient use different values\n // for the PBES2 parameters \"p2s\" and \"p2c\".\n // here we generate p2c between 2048 and 4096 and random p2s\n const p2c = Math.floor((Math.random() * 2049) + 2048)\n const p2s = randomBytes(SALT_LENGTH)\n const salt = concat(p2s)\n\n const derivedKey = pbkdf2(keyObject.export(), salt, p2c, keylen, sha)\n\n const result = wrap({ [KEYOBJECT]: derivedKey }, payload)\n result.header = result.header || {}\n Object.assign(result.header, { p2c, p2s: base64url.encodeBuffer(p2s) })\n\n return result\n}\n\nconst unwrapKey = (keylen, sha, concat, unwrap, { [KEYOBJECT]: keyObject }, payload, header) => {\n const { p2s, p2c } = header\n const salt = concat(p2s)\n const derivedKey = pbkdf2(keyObject.export(), salt, p2c, keylen, sha)\n return unwrap({ [KEYOBJECT]: derivedKey }, payload, header)\n}\n\nmodule.exports = (JWA, JWK) => {\n ['PBES2-HS256+A128KW', 'PBES2-HS384+A192KW', 'PBES2-HS512+A256KW'].forEach((jwaAlg) => {\n const kw = jwaAlg.substr(-6)\n const kwWrap = JWA.keyManagementEncrypt.get(kw)\n const kwUnwrap = JWA.keyManagementDecrypt.get(kw)\n const keylen = parseInt(jwaAlg.substr(13, 3), 10) / 8\n const sha = `sha${jwaAlg.substr(8, 3)}`\n\n if (kwWrap && kwUnwrap) {\n JWA.keyManagementEncrypt.set(jwaAlg, wrapKey.bind(undefined, keylen, sha, concatSalt.bind(undefined, jwaAlg), kwWrap))\n JWA.keyManagementDecrypt.set(jwaAlg, unwrapKey.bind(undefined, keylen, sha, concatSalt.bind(undefined, jwaAlg), kwUnwrap))\n JWK.oct.deriveKey[jwaAlg] = key => key.use === 'enc' || key.use === undefined\n }\n })\n}\n","const { publicEncrypt, privateDecrypt, constants } = require('crypto')\n\nconst { oaepHashSupported } = require('../help/runtime_support')\nconst { KEYOBJECT } = require('../help/consts')\nconst { asInput } = require('../help/key_object')\n\nconst resolvePadding = (alg) => {\n switch (alg) {\n case 'RSA-OAEP':\n case 'RSA-OAEP-256':\n case 'RSA-OAEP-384':\n case 'RSA-OAEP-512':\n return constants.RSA_PKCS1_OAEP_PADDING\n case 'RSA1_5':\n return constants.RSA_PKCS1_PADDING\n }\n}\n\nconst resolveOaepHash = (alg) => {\n switch (alg) {\n case 'RSA-OAEP':\n return 'sha1'\n case 'RSA-OAEP-256':\n return 'sha256'\n case 'RSA-OAEP-384':\n return 'sha384'\n case 'RSA-OAEP-512':\n return 'sha512'\n default:\n return undefined\n }\n}\n\nconst wrapKey = (padding, oaepHash, { [KEYOBJECT]: keyObject }, payload) => {\n const key = asInput(keyObject, true)\n return { wrapped: publicEncrypt({ key, oaepHash, padding }, payload) }\n}\n\nconst unwrapKey = (padding, oaepHash, { [KEYOBJECT]: keyObject }, payload) => {\n const key = asInput(keyObject, false)\n return privateDecrypt({ key, oaepHash, padding }, payload)\n}\n\nconst LENGTHS = {\n RSA1_5: 0,\n 'RSA-OAEP': 592,\n 'RSA-OAEP-256': 784,\n 'RSA-OAEP-384': 1040,\n 'RSA-OAEP-512': 1296\n}\n\nmodule.exports = (JWA, JWK) => {\n const algs = ['RSA-OAEP', 'RSA1_5']\n\n if (oaepHashSupported) {\n algs.splice(1, 0, 'RSA-OAEP-256', 'RSA-OAEP-384', 'RSA-OAEP-512')\n }\n\n algs.forEach((jwaAlg) => {\n const padding = resolvePadding(jwaAlg)\n const oaepHash = resolveOaepHash(jwaAlg)\n JWA.keyManagementEncrypt.set(jwaAlg, wrapKey.bind(undefined, padding, oaepHash))\n JWA.keyManagementDecrypt.set(jwaAlg, unwrapKey.bind(undefined, padding, oaepHash))\n JWK.RSA.wrapKey[jwaAlg] = key => (key.use === 'enc' || key.use === undefined) && key.length >= LENGTHS[jwaAlg]\n JWK.RSA.unwrapKey[jwaAlg] = key => key.private && (key.use === 'enc' || key.use === undefined) && key.length >= LENGTHS[jwaAlg]\n })\n}\n","const { createSign, createVerify } = require('crypto')\n\nconst { KEYOBJECT } = require('../help/consts')\nconst resolveNodeAlg = require('../help/node_alg')\nconst { asInput } = require('../help/key_object')\n\nconst sign = (nodeAlg, { [KEYOBJECT]: keyObject }, payload) => {\n return createSign(nodeAlg).update(payload).sign(asInput(keyObject, false))\n}\n\nconst verify = (nodeAlg, { [KEYOBJECT]: keyObject }, payload, signature) => {\n return createVerify(nodeAlg).update(payload).verify(asInput(keyObject, true), signature)\n}\n\nconst LENGTHS = {\n RS256: 0,\n RS384: 624,\n RS512: 752\n}\n\nmodule.exports = (JWA, JWK) => {\n ['RS256', 'RS384', 'RS512'].forEach((jwaAlg) => {\n const nodeAlg = resolveNodeAlg(jwaAlg)\n JWA.sign.set(jwaAlg, sign.bind(undefined, nodeAlg))\n JWA.verify.set(jwaAlg, verify.bind(undefined, nodeAlg))\n JWK.RSA.sign[jwaAlg] = key => key.private && JWK.RSA.verify[jwaAlg](key)\n JWK.RSA.verify[jwaAlg] = key => (key.use === 'sig' || key.use === undefined) && key.length >= LENGTHS[jwaAlg]\n })\n}\n","const {\n createSign,\n createVerify,\n constants\n} = require('crypto')\n\nconst { KEYOBJECT } = require('../help/consts')\nconst resolveNodeAlg = require('../help/node_alg')\nconst { asInput } = require('../help/key_object')\n\nconst sign = (nodeAlg, { [KEYOBJECT]: keyObject }, payload) => {\n const key = asInput(keyObject, false)\n return createSign(nodeAlg).update(payload).sign({\n key,\n padding: constants.RSA_PKCS1_PSS_PADDING,\n saltLength: constants.RSA_PSS_SALTLEN_DIGEST\n })\n}\n\nconst verify = (nodeAlg, { [KEYOBJECT]: keyObject }, payload, signature) => {\n const key = asInput(keyObject, true)\n return createVerify(nodeAlg).update(payload).verify({\n key,\n padding: constants.RSA_PKCS1_PSS_PADDING,\n saltLength: constants.RSA_PSS_SALTLEN_DIGEST\n }, signature)\n}\n\nconst LENGTHS = {\n PS256: 528,\n PS384: 784,\n PS512: 1040\n}\n\nmodule.exports = (JWA, JWK) => {\n ['PS256', 'PS384', 'PS512'].forEach((jwaAlg) => {\n const nodeAlg = resolveNodeAlg(jwaAlg)\n JWA.sign.set(jwaAlg, sign.bind(undefined, nodeAlg))\n JWA.verify.set(jwaAlg, verify.bind(undefined, nodeAlg))\n JWK.RSA.sign[jwaAlg] = key => key.private && JWK.RSA.verify[jwaAlg](key)\n JWK.RSA.verify[jwaAlg] = key => (key.use === 'sig' || key.use === undefined) && key.length >= LENGTHS[jwaAlg]\n })\n}\n","const { inflateRawSync } = require('zlib')\n\nconst base64url = require('../help/base64url')\nconst getKey = require('../help/get_key')\nconst { KeyStore } = require('../jwks')\nconst errors = require('../errors')\nconst { check, decrypt, keyManagementDecrypt } = require('../jwa')\nconst JWK = require('../jwk')\n\nconst { createSecretKey } = require('../help/key_object')\nconst generateCEK = require('./generate_cek')\nconst validateHeaders = require('./validate_headers')\nconst { detect: resolveSerialization } = require('./serializers')\n\nconst SINGLE_RECIPIENT = new Set(['compact', 'flattened'])\n\nconst combineHeader = (prot = {}, unprotected = {}, header = {}) => {\n if (typeof prot === 'string') {\n prot = base64url.JSON.decode(prot)\n }\n\n const p2s = prot.p2s || unprotected.p2s || header.p2s\n const apu = prot.apu || unprotected.apu || header.apu\n const apv = prot.apv || unprotected.apv || header.apv\n const iv = prot.iv || unprotected.iv || header.iv\n const tag = prot.tag || unprotected.tag || header.tag\n\n return {\n ...prot,\n ...unprotected,\n ...header,\n ...(typeof p2s === 'string' ? { p2s: base64url.decodeToBuffer(p2s) } : undefined),\n ...(typeof apu === 'string' ? { apu: base64url.decodeToBuffer(apu) } : undefined),\n ...(typeof apv === 'string' ? { apv: base64url.decodeToBuffer(apv) } : undefined),\n ...(typeof iv === 'string' ? { iv: base64url.decodeToBuffer(iv) } : undefined),\n ...(typeof tag === 'string' ? { tag: base64url.decodeToBuffer(tag) } : undefined)\n }\n}\n\nconst validateAlgorithms = (algorithms, option) => {\n if (algorithms !== undefined && (!Array.isArray(algorithms) || algorithms.some(s => typeof s !== 'string' || !s))) {\n throw new TypeError(`\"${option}\" option must be an array of non-empty strings`)\n }\n\n if (!algorithms) {\n return undefined\n }\n\n return new Set(algorithms)\n}\n\n/*\n * @public\n */\nconst jweDecrypt = (skipValidateHeaders, serialization, jwe, key, { crit = [], complete = false, keyManagementAlgorithms, contentEncryptionAlgorithms, maxPBES2Count = 10000 } = {}) => {\n key = getKey(key, true)\n\n keyManagementAlgorithms = validateAlgorithms(keyManagementAlgorithms, 'keyManagementAlgorithms')\n contentEncryptionAlgorithms = validateAlgorithms(contentEncryptionAlgorithms, 'contentEncryptionAlgorithms')\n\n if (!Array.isArray(crit) || crit.some(s => typeof s !== 'string' || !s)) {\n throw new TypeError('\"crit\" option must be an array of non-empty strings')\n }\n\n if (!serialization) {\n serialization = resolveSerialization(jwe)\n }\n\n let alg, ciphertext, enc, encryptedKey, iv, opts, prot, tag, unprotected, cek, aad, header\n\n // treat general format with one recipient as flattened\n // skips iteration and avoids multi errors in this case\n if (serialization === 'general' && jwe.recipients.length === 1) {\n serialization = 'flattened'\n const { recipients, ...root } = jwe\n jwe = { ...root, ...recipients[0] }\n }\n\n if (SINGLE_RECIPIENT.has(serialization)) {\n if (serialization === 'compact') { // compact serialization format\n ([prot, encryptedKey, iv, ciphertext, tag] = jwe.split('.'))\n } else { // flattened serialization format\n ({ protected: prot, encrypted_key: encryptedKey, iv, ciphertext, tag, unprotected, aad, header } = jwe)\n }\n\n if (!skipValidateHeaders) {\n validateHeaders(prot, unprotected, [{ header }], true, crit)\n }\n\n opts = combineHeader(prot, unprotected, header)\n\n ;({ alg, enc } = opts)\n\n if (keyManagementAlgorithms && !keyManagementAlgorithms.has(alg)) {\n throw new errors.JOSEAlgNotWhitelisted('key management algorithm not whitelisted')\n }\n\n if (contentEncryptionAlgorithms && !contentEncryptionAlgorithms.has(enc)) {\n throw new errors.JOSEAlgNotWhitelisted('content encryption algorithm not whitelisted')\n }\n\n if (key instanceof KeyStore) {\n const keystore = key\n let keys\n if (opts.alg === 'dir') {\n keys = keystore.all({ kid: opts.kid, alg: opts.enc, key_ops: ['decrypt'] })\n } else {\n keys = keystore.all({ kid: opts.kid, alg: opts.alg, key_ops: ['unwrapKey'] })\n }\n switch (keys.length) {\n case 0:\n throw new errors.JWKSNoMatchingKey()\n case 1:\n // treat the call as if a Key instance was passed in\n // skips iteration and avoids multi errors in this case\n key = keys[0]\n break\n default: {\n const errs = []\n for (const key of keys) {\n try {\n return jweDecrypt(true, serialization, jwe, key, {\n crit,\n complete,\n contentEncryptionAlgorithms: contentEncryptionAlgorithms ? [...contentEncryptionAlgorithms] : undefined,\n keyManagementAlgorithms: keyManagementAlgorithms ? [...keyManagementAlgorithms] : undefined\n })\n } catch (err) {\n errs.push(err)\n continue\n }\n }\n\n const multi = new errors.JOSEMultiError(errs)\n if ([...multi].some(e => e instanceof errors.JWEDecryptionFailed)) {\n throw new errors.JWEDecryptionFailed()\n }\n throw multi\n }\n }\n }\n\n check(key, ...(alg === 'dir' ? ['decrypt', enc] : ['keyManagementDecrypt', alg]))\n\n if (alg.startsWith('PBES2')) {\n if (opts && opts.p2c > maxPBES2Count) {\n throw new errors.JWEInvalid('JOSE Header \"p2c\" (PBES2 Count) out is of acceptable bounds')\n }\n }\n\n try {\n if (alg === 'dir') {\n cek = JWK.asKey(key, { alg: enc, use: 'enc' })\n } else if (alg === 'ECDH-ES') {\n const unwrapped = keyManagementDecrypt(alg, key, undefined, opts)\n cek = JWK.asKey(createSecretKey(unwrapped), { alg: enc, use: 'enc' })\n } else {\n const unwrapped = keyManagementDecrypt(alg, key, base64url.decodeToBuffer(encryptedKey), opts)\n cek = JWK.asKey(createSecretKey(unwrapped), { alg: enc, use: 'enc' })\n }\n } catch (err) {\n // To mitigate the attacks described in RFC 3218, the\n // recipient MUST NOT distinguish between format, padding, and length\n // errors of encrypted keys. It is strongly recommended, in the event\n // of receiving an improperly formatted key, that the recipient\n // substitute a randomly generated CEK and proceed to the next step, to\n // mitigate timing attacks.\n cek = generateCEK(enc)\n }\n\n let adata\n if (aad) {\n adata = Buffer.concat([\n Buffer.from(prot || ''),\n Buffer.from('.'),\n Buffer.from(aad)\n ])\n } else {\n adata = Buffer.from(prot || '')\n }\n\n try {\n iv = base64url.decodeToBuffer(iv)\n } catch (err) {}\n try {\n tag = base64url.decodeToBuffer(tag)\n } catch (err) {}\n\n let cleartext = decrypt(enc, cek, base64url.decodeToBuffer(ciphertext), { iv, tag, aad: adata })\n\n if (opts.zip) {\n cleartext = inflateRawSync(cleartext)\n }\n\n if (complete) {\n const result = { cleartext, key, cek }\n if (aad) result.aad = aad\n if (header) result.header = header\n if (unprotected) result.unprotected = unprotected\n if (prot) result.protected = base64url.JSON.decode(prot)\n return result\n }\n\n return cleartext\n }\n\n validateHeaders(jwe.protected, jwe.unprotected, jwe.recipients.map(({ header }) => ({ header })), true, crit)\n\n // general serialization format\n const { recipients, ...root } = jwe\n const errs = []\n for (const recipient of recipients) {\n try {\n return jweDecrypt(true, 'flattened', { ...root, ...recipient }, key, {\n crit,\n complete,\n contentEncryptionAlgorithms: contentEncryptionAlgorithms ? [...contentEncryptionAlgorithms] : undefined,\n keyManagementAlgorithms: keyManagementAlgorithms ? [...keyManagementAlgorithms] : undefined\n })\n } catch (err) {\n errs.push(err)\n continue\n }\n }\n\n const multi = new errors.JOSEMultiError(errs)\n if ([...multi].some(e => e instanceof errors.JWEDecryptionFailed)) {\n throw new errors.JWEDecryptionFailed()\n } else if ([...multi].every(e => e instanceof errors.JWKSNoMatchingKey)) {\n throw new errors.JWKSNoMatchingKey()\n }\n throw multi\n}\n\nmodule.exports = jweDecrypt.bind(undefined, false, undefined)\n","const { deflateRawSync } = require('zlib')\n\nconst { KEYOBJECT } = require('../help/consts')\nconst generateIV = require('../help/generate_iv')\nconst base64url = require('../help/base64url')\nconst getKey = require('../help/get_key')\nconst isObject = require('../help/is_object')\nconst { createSecretKey } = require('../help/key_object')\nconst deepClone = require('../help/deep_clone')\nconst importKey = require('../jwk/import')\nconst { JWEInvalid } = require('../errors')\nconst { check, keyManagementEncrypt, encrypt } = require('../jwa')\n\nconst serializers = require('./serializers')\nconst generateCEK = require('./generate_cek')\nconst validateHeaders = require('./validate_headers')\n\nconst PROCESS_RECIPIENT = Symbol('PROCESS_RECIPIENT')\n\nclass Encrypt {\n constructor (cleartext, protectedHeader, aad, unprotectedHeader) {\n if (!Buffer.isBuffer(cleartext) && typeof cleartext !== 'string') {\n throw new TypeError('cleartext argument must be a Buffer or a string')\n }\n cleartext = Buffer.from(cleartext)\n\n if (aad !== undefined && !Buffer.isBuffer(aad) && typeof aad !== 'string') {\n throw new TypeError('aad argument must be a Buffer or a string when provided')\n }\n aad = aad ? Buffer.from(aad) : undefined\n\n if (protectedHeader !== undefined && !isObject(protectedHeader)) {\n throw new TypeError('protectedHeader argument must be a plain object when provided')\n }\n\n if (unprotectedHeader !== undefined && !isObject(unprotectedHeader)) {\n throw new TypeError('unprotectedHeader argument must be a plain object when provided')\n }\n\n this._recipients = []\n this._cleartext = cleartext\n this._aad = aad\n this._unprotected = unprotectedHeader ? deepClone(unprotectedHeader) : undefined\n this._protected = protectedHeader ? deepClone(protectedHeader) : undefined\n }\n\n /*\n * @public\n */\n recipient (key, header) {\n key = getKey(key)\n\n if (header !== undefined && !isObject(header)) {\n throw new TypeError('header argument must be a plain object when provided')\n }\n\n this._recipients.push({\n key,\n header: header ? deepClone(header) : undefined\n })\n\n return this\n }\n\n /*\n * @private\n */\n [PROCESS_RECIPIENT] (recipient) {\n const unprotectedHeader = this._unprotected\n const protectedHeader = this._protected\n const { length: recipientCount } = this._recipients\n\n const jweHeader = {\n ...protectedHeader,\n ...unprotectedHeader,\n ...recipient.header\n }\n const { key } = recipient\n\n const enc = jweHeader.enc\n let alg = jweHeader.alg\n\n if (key.use === 'sig') {\n throw new TypeError('a key with \"use\":\"sig\" is not usable for encryption')\n }\n\n if (alg === 'dir') {\n check(key, 'encrypt', enc)\n } else if (alg) {\n check(key, 'keyManagementEncrypt', alg)\n } else {\n alg = key.alg || [...key.algorithms('wrapKey')][0] || [...key.algorithms('deriveKey')][0]\n\n if (alg === 'ECDH-ES' && recipientCount !== 1) {\n alg = [...key.algorithms('deriveKey')][1]\n }\n\n if (!alg) {\n throw new JWEInvalid('could not resolve a usable \"alg\" for a recipient')\n }\n\n if (recipientCount === 1) {\n if (protectedHeader) {\n protectedHeader.alg = alg\n } else {\n this._protected = { alg }\n }\n } else {\n if (recipient.header) {\n recipient.header.alg = alg\n } else {\n recipient.header = { alg }\n }\n }\n }\n\n let wrapped\n let generatedHeader\n\n if (key.kty === 'oct' && alg === 'dir') {\n this._cek = importKey(key[KEYOBJECT], { use: 'enc', alg: enc })\n } else {\n check(this._cek, 'encrypt', enc)\n ;({ wrapped, header: generatedHeader } = keyManagementEncrypt(alg, key, this._cek[KEYOBJECT].export(), { enc, alg }))\n if (alg === 'ECDH-ES') {\n this._cek = importKey(createSecretKey(wrapped), { use: 'enc', alg: enc })\n }\n }\n\n if (alg === 'dir' || alg === 'ECDH-ES') {\n recipient.encrypted_key = ''\n } else {\n recipient.encrypted_key = base64url.encodeBuffer(wrapped)\n }\n\n if (generatedHeader) {\n recipient.generatedHeader = generatedHeader\n }\n }\n\n /*\n * @public\n */\n encrypt (serialization) {\n const serializer = serializers[serialization]\n if (!serializer) {\n throw new TypeError('serialization must be one of \"compact\", \"flattened\", \"general\"')\n }\n\n if (!this._recipients.length) {\n throw new JWEInvalid('missing recipients')\n }\n\n serializer.validate(this._protected, this._unprotected, this._aad, this._recipients)\n\n let enc = validateHeaders(this._protected, this._unprotected, this._recipients, false, this._protected ? this._protected.crit : undefined)\n if (!enc) {\n enc = 'A128CBC-HS256'\n if (this._protected) {\n this._protected.enc = enc\n } else {\n this._protected = { enc }\n }\n }\n const final = {}\n this._cek = generateCEK(enc)\n\n for (const recipient of this._recipients) {\n this[PROCESS_RECIPIENT](recipient)\n }\n\n const iv = generateIV(enc)\n final.iv = base64url.encodeBuffer(iv)\n\n if (this._recipients.length === 1 && this._recipients[0].generatedHeader) {\n const [{ generatedHeader }] = this._recipients\n delete this._recipients[0].generatedHeader\n this._protected = {\n ...this._protected,\n ...generatedHeader\n }\n }\n\n if (this._protected) {\n final.protected = base64url.JSON.encode(this._protected)\n }\n final.unprotected = this._unprotected\n\n let aad\n if (this._aad) {\n final.aad = base64url.encode(this._aad)\n aad = Buffer.concat([\n Buffer.from(final.protected || ''),\n Buffer.from('.'),\n Buffer.from(final.aad)\n ])\n } else {\n aad = Buffer.from(final.protected || '')\n }\n\n let cleartext = this._cleartext\n if (this._protected && 'zip' in this._protected) {\n cleartext = deflateRawSync(cleartext)\n }\n\n const { ciphertext, tag } = encrypt(enc, this._cek, cleartext, { iv, aad })\n final.tag = base64url.encodeBuffer(tag)\n final.ciphertext = base64url.encodeBuffer(ciphertext)\n\n return serializer(final, this._recipients)\n }\n}\n\nmodule.exports = Encrypt\n","const { randomBytes } = require('crypto')\n\nconst { createSecretKey } = require('../help/key_object')\nconst { KEYLENGTHS } = require('../registry')\nconst Key = require('../jwk/key/oct')\n\nmodule.exports = (alg) => {\n const keyLength = KEYLENGTHS.get(alg)\n\n if (!keyLength) {\n return new Key({ type: 'secret' })\n }\n\n return new Key(createSecretKey(randomBytes(keyLength / 8)), { use: 'enc', alg })\n}\n","const Encrypt = require('./encrypt')\nconst decrypt = require('./decrypt')\n\nconst single = (serialization, cleartext, key, protectedHeader, aad, unprotectedHeader) => {\n return new Encrypt(cleartext, protectedHeader, aad, unprotectedHeader)\n .recipient(key)\n .encrypt(serialization)\n}\n\nmodule.exports.Encrypt = Encrypt\nmodule.exports.encrypt = single.bind(undefined, 'compact')\nmodule.exports.encrypt.flattened = single.bind(undefined, 'flattened')\nmodule.exports.encrypt.general = single.bind(undefined, 'general')\n\nmodule.exports.decrypt = decrypt\n","const isObject = require('../help/is_object')\nlet validateCrit = require('../help/validate_crit')\n\nconst { JWEInvalid } = require('../errors')\n\nvalidateCrit = validateCrit.bind(undefined, JWEInvalid)\n\nconst compactSerializer = (final, [recipient]) => {\n return `${final.protected}.${recipient.encrypted_key}.${final.iv}.${final.ciphertext}.${final.tag}`\n}\ncompactSerializer.validate = (protectedHeader, unprotectedHeader, aad, { 0: { header }, length }) => {\n if (length !== 1 || aad || unprotectedHeader || header) {\n throw new JWEInvalid('JWE Compact Serialization doesn\\'t support multiple recipients, JWE unprotected headers or AAD')\n }\n validateCrit(protectedHeader, unprotectedHeader, protectedHeader ? protectedHeader.crit : undefined)\n}\n\nconst flattenedSerializer = (final, [recipient]) => {\n const { header, encrypted_key: encryptedKey } = recipient\n\n return {\n ...(final.protected ? { protected: final.protected } : undefined),\n ...(final.unprotected ? { unprotected: final.unprotected } : undefined),\n ...(header ? { header } : undefined),\n ...(encryptedKey ? { encrypted_key: encryptedKey } : undefined),\n ...(final.aad ? { aad: final.aad } : undefined),\n iv: final.iv,\n ciphertext: final.ciphertext,\n tag: final.tag\n }\n}\nflattenedSerializer.validate = (protectedHeader, unprotectedHeader, aad, { 0: { header }, length }) => {\n if (length !== 1) {\n throw new JWEInvalid('Flattened JWE JSON Serialization doesn\\'t support multiple recipients')\n }\n validateCrit(protectedHeader, { ...unprotectedHeader, ...header }, protectedHeader ? protectedHeader.crit : undefined)\n}\n\nconst generalSerializer = (final, recipients) => {\n const result = {\n ...(final.protected ? { protected: final.protected } : undefined),\n ...(final.unprotected ? { unprotected: final.unprotected } : undefined),\n recipients: recipients.map(({ header, encrypted_key: encryptedKey, generatedHeader }) => {\n if (!header && !encryptedKey && !generatedHeader) {\n return false\n }\n\n return {\n ...(header || generatedHeader ? { header: { ...header, ...generatedHeader } } : undefined),\n ...(encryptedKey ? { encrypted_key: encryptedKey } : undefined)\n }\n }).filter(Boolean),\n ...(final.aad ? { aad: final.aad } : undefined),\n iv: final.iv,\n ciphertext: final.ciphertext,\n tag: final.tag\n }\n\n if (!result.recipients.length) {\n delete result.recipients\n }\n\n return result\n}\ngeneralSerializer.validate = (protectedHeader, unprotectedHeader, aad, recipients) => {\n recipients.forEach(({ header }) => {\n validateCrit(protectedHeader, { ...header, ...unprotectedHeader }, protectedHeader ? protectedHeader.crit : undefined)\n })\n}\n\nconst isJSON = (input) => {\n return isObject(input) &&\n typeof input.ciphertext === 'string' &&\n typeof input.iv === 'string' &&\n typeof input.tag === 'string' &&\n (input.unprotected === undefined || isObject(input.unprotected)) &&\n (input.protected === undefined || typeof input.protected === 'string') &&\n (input.aad === undefined || typeof input.aad === 'string')\n}\n\nconst isSingleRecipient = (input) => {\n return (input.encrypted_key === undefined || typeof input.encrypted_key === 'string') &&\n (input.header === undefined || isObject(input.header))\n}\n\nconst isValidRecipient = (recipient) => {\n return isObject(recipient) && typeof recipient.encrypted_key === 'string' && (recipient.header === undefined || isObject(recipient.header))\n}\n\nconst isMultiRecipient = (input) => {\n if (Array.isArray(input.recipients) && input.recipients.every(isValidRecipient)) {\n return true\n }\n\n return false\n}\n\nconst detect = (input) => {\n if (typeof input === 'string' && input.split('.').length === 5) {\n return 'compact'\n }\n\n if (isJSON(input)) {\n if (isMultiRecipient(input)) {\n return 'general'\n }\n\n if (isSingleRecipient(input)) {\n return 'flattened'\n }\n }\n\n throw new JWEInvalid('JWE malformed or invalid serialization')\n}\n\nmodule.exports = {\n compact: compactSerializer,\n flattened: flattenedSerializer,\n general: generalSerializer,\n detect\n}\n","const isDisjoint = require('../help/is_disjoint')\nconst base64url = require('../help/base64url')\nlet validateCrit = require('../help/validate_crit')\nconst { JWEInvalid, JOSENotSupported } = require('../errors')\n\nvalidateCrit = validateCrit.bind(undefined, JWEInvalid)\n\nmodule.exports = (prot, unprotected, recipients, checkAlgorithms, crit) => {\n if (typeof prot === 'string') {\n try {\n prot = base64url.JSON.decode(prot)\n } catch (err) {\n throw new JWEInvalid('could not parse JWE protected header')\n }\n }\n\n let alg = []\n const enc = new Set()\n if (!isDisjoint(prot, unprotected) || !recipients.every(({ header }) => {\n if (typeof header === 'object') {\n alg.push(header.alg)\n enc.add(header.enc)\n }\n const combined = { ...unprotected, ...header }\n validateCrit(prot, combined, crit)\n if ('zip' in combined) {\n throw new JWEInvalid('\"zip\" Header Parameter MUST be integrity protected')\n } else if (prot && 'zip' in prot && prot.zip !== 'DEF') {\n throw new JOSENotSupported('only \"DEF\" compression algorithm is supported')\n }\n return isDisjoint(header, prot) && isDisjoint(header, unprotected)\n })) {\n throw new JWEInvalid('JWE Shared Protected, JWE Shared Unprotected and JWE Per-Recipient Header Parameter names must be disjoint')\n }\n\n if (typeof prot === 'object') {\n alg.push(prot.alg)\n enc.add(prot.enc)\n }\n if (typeof unprotected === 'object') {\n alg.push(unprotected.alg)\n enc.add(unprotected.enc)\n }\n\n alg = alg.filter(Boolean)\n enc.delete(undefined)\n\n if (recipients.length !== 1) {\n if (alg.includes('dir') || alg.includes('ECDH-ES')) {\n throw new JWEInvalid('dir and ECDH-ES alg may only be used with a single recipient')\n }\n }\n\n if (checkAlgorithms) {\n if (alg.length !== recipients.length) {\n throw new JWEInvalid('missing Key Management algorithm')\n }\n if (enc.size === 0) {\n throw new JWEInvalid('missing Content Encryption algorithm')\n } else if (enc.size !== 1) {\n throw new JWEInvalid('there must only be one Content Encryption algorithm')\n }\n } else {\n if (enc.size > 1) {\n throw new JWEInvalid('there must only be one Content Encryption algorithm')\n }\n }\n\n return [...enc][0]\n}\n","const errors = require('../errors')\n\nconst importKey = require('./import')\n\nconst RSAKey = require('./key/rsa')\nconst ECKey = require('./key/ec')\nconst OKPKey = require('./key/okp')\nconst OctKey = require('./key/oct')\n\nconst generate = async (kty, crvOrSize, params, generatePrivate = true) => {\n switch (kty) {\n case 'RSA':\n return importKey(\n await RSAKey.generate(crvOrSize, generatePrivate),\n params\n )\n case 'EC':\n return importKey(\n await ECKey.generate(crvOrSize, generatePrivate),\n params\n )\n case 'OKP':\n return importKey(\n await OKPKey.generate(crvOrSize, generatePrivate),\n params\n )\n case 'oct':\n return importKey(\n await OctKey.generate(crvOrSize, generatePrivate),\n params\n )\n default:\n throw new errors.JOSENotSupported(`unsupported key type: ${kty}`)\n }\n}\n\nconst generateSync = (kty, crvOrSize, params, generatePrivate = true) => {\n switch (kty) {\n case 'RSA':\n return importKey(RSAKey.generateSync(crvOrSize, generatePrivate), params)\n case 'EC':\n return importKey(ECKey.generateSync(crvOrSize, generatePrivate), params)\n case 'OKP':\n return importKey(OKPKey.generateSync(crvOrSize, generatePrivate), params)\n case 'oct':\n return importKey(OctKey.generateSync(crvOrSize, generatePrivate), params)\n default:\n throw new errors.JOSENotSupported(`unsupported key type: ${kty}`)\n }\n}\n\nmodule.exports.generate = generate\nmodule.exports.generateSync = generateSync\n","const { createPublicKey, createPrivateKey, createSecretKey, KeyObject } = require('../help/key_object')\nconst base64url = require('../help/base64url')\nconst isObject = require('../help/is_object')\nconst { jwkToPem } = require('../help/key_utils')\nconst errors = require('../errors')\n\nconst RSAKey = require('./key/rsa')\nconst ECKey = require('./key/ec')\nconst OKPKey = require('./key/okp')\nconst OctKey = require('./key/oct')\n\nconst importable = new Set(['string', 'buffer', 'object'])\n\nconst mergedParameters = (target = {}, source = {}) => {\n return {\n alg: source.alg,\n key_ops: source.key_ops,\n kid: source.kid,\n use: source.use,\n x5c: source.x5c,\n x5t: source.x5t,\n 'x5t#S256': source['x5t#S256'],\n ...target\n }\n}\n\nconst openSSHpublicKey = /^[a-zA-Z0-9-]+ AAAA(?:[0-9A-Za-z+/])+(?:==|=)?(?: .*)?$/\n\nconst asKey = (key, parameters, { calculateMissingRSAPrimes = false } = {}) => {\n let privateKey, publicKey, secret\n\n if (!importable.has(typeof key)) {\n throw new TypeError('key argument must be a string, buffer or an object')\n }\n\n if (parameters !== undefined && !isObject(parameters)) {\n throw new TypeError('parameters argument must be a plain object when provided')\n }\n\n if (key instanceof KeyObject) {\n switch (key.type) {\n case 'private':\n privateKey = key\n break\n case 'public':\n publicKey = key\n break\n case 'secret':\n secret = key\n break\n }\n } else if (typeof key === 'object' && key && 'kty' in key && key.kty === 'oct') { // symmetric key \n try {\n secret = createSecretKey(base64url.decodeToBuffer(key.k))\n } catch (err) {\n if (!('k' in key)) {\n secret = { type: 'secret' }\n }\n }\n parameters = mergedParameters(parameters, key)\n } else if (typeof key === 'object' && key && 'kty' in key) { // assume JWK formatted asymmetric key \n ({ calculateMissingRSAPrimes = false } = parameters || { calculateMissingRSAPrimes })\n let pem\n\n try {\n pem = jwkToPem(key, { calculateMissingRSAPrimes })\n } catch (err) {\n if (err instanceof errors.JOSEError) {\n throw err\n }\n }\n\n if (pem && key.d) {\n privateKey = createPrivateKey(pem)\n } else if (pem) {\n publicKey = createPublicKey(pem)\n }\n\n parameters = mergedParameters({}, key)\n } else if (key && (typeof key === 'object' || typeof key === 'string')) { // | | passed to crypto.createPrivateKey or crypto.createPublicKey or passed to crypto.createSecretKey\n try {\n privateKey = createPrivateKey(key)\n } catch (err) {\n if (err instanceof errors.JOSEError) {\n throw err\n }\n }\n\n try {\n publicKey = createPublicKey(key)\n if (key.startsWith('-----BEGIN CERTIFICATE-----') && (!parameters || !('x5c' in parameters))) {\n parameters = mergedParameters(parameters, {\n x5c: [key.replace(/(?:-----(?:BEGIN|END) CERTIFICATE-----|\\s)/g, '')]\n })\n }\n } catch (err) {\n if (err instanceof errors.JOSEError) {\n throw err\n }\n }\n\n try {\n // this is to filter out invalid PEM keys and certs, i'll rather have them fail import then\n // have them imported as symmetric \"oct\" keys\n if (!key.includes('-----BEGIN') && !openSSHpublicKey.test(key.toString('ascii').replace(/[\\r\\n]/g, ''))) {\n secret = createSecretKey(Buffer.isBuffer(key) ? key : Buffer.from(key))\n }\n } catch (err) {}\n }\n\n const keyObject = privateKey || publicKey || secret\n\n if (privateKey || publicKey) {\n switch (keyObject.asymmetricKeyType) {\n case 'rsa':\n return new RSAKey(keyObject, parameters)\n case 'ec':\n return new ECKey(keyObject, parameters)\n case 'ed25519':\n case 'ed448':\n case 'x25519':\n case 'x448':\n return new OKPKey(keyObject, parameters)\n default:\n throw new errors.JOSENotSupported('only RSA, EC and OKP asymmetric keys are supported')\n }\n } else if (secret) {\n return new OctKey(keyObject, parameters)\n }\n\n throw new errors.JWKImportFailed('key import failed')\n}\n\nmodule.exports = asKey\n","const Key = require('./key/base')\nconst None = require('./key/none')\nconst EmbeddedJWK = require('./key/embedded.jwk')\nconst EmbeddedX5C = require('./key/embedded.x5c')\nconst importKey = require('./import')\nconst generate = require('./generate')\n\nmodule.exports = {\n ...generate,\n asKey: importKey,\n isKey: input => input instanceof Key,\n None,\n EmbeddedJWK,\n EmbeddedX5C\n}\n","const { strict: assert } = require('assert')\nconst { inspect } = require('util')\nconst { EOL } = require('os')\n\nconst { keyObjectSupported } = require('../../help/runtime_support')\nconst { createPublicKey } = require('../../help/key_object')\nconst { keyObjectToJWK } = require('../../help/key_utils')\nconst {\n THUMBPRINT_MATERIAL, PUBLIC_MEMBERS, PRIVATE_MEMBERS, JWK_MEMBERS, KEYOBJECT,\n USES_MAPPING, OPS, USES\n} = require('../../help/consts')\nconst isObject = require('../../help/is_object')\nconst thumbprint = require('../thumbprint')\nconst errors = require('../../errors')\n\nconst privateApi = Symbol('privateApi')\nconst { JWK } = require('../../registry')\n\nclass Key {\n constructor (keyObject, { alg, use, kid, key_ops: ops, x5c, x5t, 'x5t#S256': x5t256 } = {}) {\n if (use !== undefined) {\n if (typeof use !== 'string' || !USES.has(use)) {\n throw new TypeError('`use` must be either \"sig\" or \"enc\" string when provided')\n }\n }\n\n if (alg !== undefined) {\n if (typeof alg !== 'string' || !alg) {\n throw new TypeError('`alg` must be a non-empty string when provided')\n }\n }\n\n if (kid !== undefined) {\n if (typeof kid !== 'string' || !kid) {\n throw new TypeError('`kid` must be a non-empty string when provided')\n }\n }\n\n if (ops !== undefined) {\n if (!Array.isArray(ops) || !ops.length || ops.some(o => typeof o !== 'string')) {\n throw new TypeError('`key_ops` must be a non-empty array of strings when provided')\n }\n ops = Array.from(new Set(ops)).filter(x => OPS.has(x))\n }\n\n if (ops && use) {\n if (\n (use === 'enc' && ops.some(x => USES_MAPPING.sig.has(x))) ||\n (use === 'sig' && ops.some(x => USES_MAPPING.enc.has(x)))\n ) {\n throw new errors.JWKInvalid('inconsistent JWK \"use\" and \"key_ops\"')\n }\n }\n\n if (keyObjectSupported && x5c !== undefined) {\n if (!Array.isArray(x5c) || !x5c.length || x5c.some(c => typeof c !== 'string')) {\n throw new TypeError('`x5c` must be an array of one or more PKIX certificates when provided')\n }\n\n x5c.forEach((cert, i) => {\n let publicKey\n try {\n publicKey = createPublicKey({\n key: `-----BEGIN CERTIFICATE-----${EOL}${(cert.match(/.{1,64}/g) || []).join(EOL)}${EOL}-----END CERTIFICATE-----`, format: 'pem'\n })\n } catch (err) {\n throw new errors.JWKInvalid(`\\`x5c\\` member at index ${i} is not a valid base64-encoded DER PKIX certificate`)\n }\n if (i === 0) {\n try {\n assert.deepEqual(\n publicKey.export({ type: 'spki', format: 'der' }),\n (keyObject.type === 'public' ? keyObject : createPublicKey(keyObject)).export({ type: 'spki', format: 'der' })\n )\n } catch (err) {\n throw new errors.JWKInvalid('The key in the first `x5c` certificate MUST match the public key represented by the JWK')\n }\n }\n })\n }\n\n Object.defineProperties(this, {\n [KEYOBJECT]: { value: isObject(keyObject) ? undefined : keyObject },\n keyObject: {\n get () {\n if (!keyObjectSupported) {\n throw new errors.JOSENotSupported('KeyObject class is not supported in your Node.js runtime version')\n }\n\n return this[KEYOBJECT]\n }\n },\n type: { value: keyObject.type },\n private: { value: keyObject.type === 'private' },\n public: { value: keyObject.type === 'public' },\n secret: { value: keyObject.type === 'secret' },\n alg: { value: alg, enumerable: alg !== undefined },\n use: { value: use, enumerable: use !== undefined },\n x5c: {\n enumerable: x5c !== undefined,\n ...(x5c ? { get () { return [...x5c] } } : { value: undefined })\n },\n key_ops: {\n enumerable: ops !== undefined,\n ...(ops ? { get () { return [...ops] } } : { value: undefined })\n },\n kid: {\n enumerable: true,\n ...(kid\n ? { value: kid }\n : {\n get () {\n Object.defineProperty(this, 'kid', { value: this.thumbprint, configurable: false })\n return this.kid\n },\n configurable: true\n })\n },\n ...(x5c\n ? {\n x5t: {\n enumerable: true,\n ...(x5t\n ? { value: x5t }\n : {\n get () {\n Object.defineProperty(this, 'x5t', { value: thumbprint.x5t(this.x5c[0]), configurable: false })\n return this.x5t\n },\n configurable: true\n })\n }\n }\n : undefined),\n ...(x5c\n ? {\n 'x5t#S256': {\n enumerable: true,\n ...(x5t256\n ? { value: x5t256 }\n : {\n get () {\n Object.defineProperty(this, 'x5t#S256', { value: thumbprint['x5t#S256'](this.x5c[0]), configurable: false })\n return this['x5t#S256']\n },\n configurable: true\n })\n }\n }\n : undefined),\n thumbprint: {\n get () {\n Object.defineProperty(this, 'thumbprint', { value: thumbprint.kid(this[THUMBPRINT_MATERIAL]()), configurable: false })\n return this.thumbprint\n },\n configurable: true\n }\n })\n }\n\n toPEM (priv = false, encoding = {}) {\n if (this.secret) {\n throw new TypeError('symmetric keys cannot be exported as PEM')\n }\n\n if (priv && this.public === true) {\n throw new TypeError('public key cannot be exported as private')\n }\n\n const { type = priv ? 'pkcs8' : 'spki', cipher, passphrase } = encoding\n\n let keyObject = this[KEYOBJECT]\n\n if (!priv) {\n if (this.private) {\n keyObject = createPublicKey(keyObject)\n }\n if (cipher || passphrase) {\n throw new TypeError('cipher and passphrase can only be applied when exporting private keys')\n }\n }\n\n if (priv) {\n return keyObject.export({ format: 'pem', type, cipher, passphrase })\n }\n\n return keyObject.export({ format: 'pem', type })\n }\n\n toJWK (priv = false) {\n if (priv && this.public === true) {\n throw new TypeError('public key cannot be exported as private')\n }\n\n const components = [...this.constructor[priv ? PRIVATE_MEMBERS : PUBLIC_MEMBERS]]\n .map(k => [k, this[k]])\n\n const result = {}\n\n Object.keys(components).forEach((key) => {\n const [k, v] = components[key]\n\n result[k] = v\n })\n\n result.kty = this.kty\n result.kid = this.kid\n\n if (this.alg) {\n result.alg = this.alg\n }\n\n if (this.key_ops && this.key_ops.length) {\n result.key_ops = this.key_ops\n }\n\n if (this.use) {\n result.use = this.use\n }\n\n if (this.x5c) {\n result.x5c = this.x5c\n }\n\n if (this.x5t) {\n result.x5t = this.x5t\n }\n\n if (this['x5t#S256']) {\n result['x5t#S256'] = this['x5t#S256']\n }\n\n return result\n }\n\n [JWK_MEMBERS] () {\n const props = this[KEYOBJECT].type === 'private' ? this.constructor[PRIVATE_MEMBERS] : this.constructor[PUBLIC_MEMBERS]\n Object.defineProperties(this, [...props].reduce((acc, component) => {\n acc[component] = {\n get () {\n const jwk = keyObjectToJWK(this[KEYOBJECT])\n Object.defineProperties(\n this,\n Object.entries(jwk)\n .filter(([key]) => props.has(key))\n .reduce((acc, [key, value]) => {\n acc[key] = { value, enumerable: this.constructor[PUBLIC_MEMBERS].has(key), configurable: false }\n return acc\n }, {})\n )\n\n return this[component]\n },\n enumerable: this.constructor[PUBLIC_MEMBERS].has(component),\n configurable: true\n }\n return acc\n }, {}))\n }\n\n /* c8 ignore next 8 */\n [inspect.custom] () {\n return `${this.constructor.name} ${inspect(this.toJWK(false), {\n depth: Infinity,\n colors: process.stdout.isTTY,\n compact: false,\n sorted: true\n })}`\n }\n\n /* c8 ignore next 3 */\n [THUMBPRINT_MATERIAL] () {\n throw new Error(`\"[THUMBPRINT_MATERIAL]()\" is not implemented on ${this.constructor.name}`)\n }\n\n algorithms (operation, /* the rest is private API */ int, opts) {\n const { use = this.use, alg = this.alg, key_ops: ops = this.key_ops } = int === privateApi ? opts : {}\n if (alg) {\n return new Set(this.algorithms(operation, privateApi, { alg: null, use, key_ops: ops }).has(alg) ? [alg] : undefined)\n }\n\n if (typeof operation === 'symbol') {\n try {\n return this[operation]()\n } catch (err) {\n return new Set()\n }\n }\n\n if (operation && ops && !ops.includes(operation)) {\n return new Set()\n }\n\n switch (operation) {\n case 'decrypt':\n case 'deriveKey':\n case 'encrypt':\n case 'sign':\n case 'unwrapKey':\n case 'verify':\n case 'wrapKey':\n return new Set(Object.entries(JWK[this.kty][operation]).map(([alg, fn]) => fn(this) ? alg : undefined).filter(Boolean))\n case undefined:\n return new Set([\n ...this.algorithms('sign'),\n ...this.algorithms('verify'),\n ...this.algorithms('decrypt'),\n ...this.algorithms('encrypt'),\n ...this.algorithms('unwrapKey'),\n ...this.algorithms('wrapKey'),\n ...this.algorithms('deriveKey')\n ])\n default:\n throw new TypeError('invalid key operation')\n }\n }\n\n /* c8 ignore next 3 */\n static async generate () {\n throw new Error(`\"static async generate()\" is not implemented on ${this.name}`)\n }\n\n /* c8 ignore next 3 */\n static generateSync () {\n throw new Error(`\"static generateSync()\" is not implemented on ${this.name}`)\n }\n\n /* c8 ignore next 3 */\n static get [PUBLIC_MEMBERS] () {\n throw new Error(`\"static get [PUBLIC_MEMBERS]()\" is not implemented on ${this.name}`)\n }\n\n /* c8 ignore next 3 */\n static get [PRIVATE_MEMBERS] () {\n throw new Error(`\"static get [PRIVATE_MEMBERS]()\" is not implemented on ${this.name}`)\n }\n}\n\nmodule.exports = Key\n","const { generateKeyPairSync, generateKeyPair: async } = require('crypto')\nconst { promisify } = require('util')\n\nconst {\n THUMBPRINT_MATERIAL, JWK_MEMBERS, PUBLIC_MEMBERS,\n PRIVATE_MEMBERS, KEY_MANAGEMENT_DECRYPT, KEY_MANAGEMENT_ENCRYPT\n} = require('../../help/consts')\nconst { EC_CURVES } = require('../../registry')\nconst { keyObjectSupported } = require('../../help/runtime_support')\nconst { createPublicKey, createPrivateKey } = require('../../help/key_object')\n\nconst errors = require('../../errors')\n\nconst Key = require('./base')\n\nconst generateKeyPair = promisify(async)\n\nconst EC_PUBLIC = new Set(['crv', 'x', 'y'])\nObject.freeze(EC_PUBLIC)\nconst EC_PRIVATE = new Set([...EC_PUBLIC, 'd'])\nObject.freeze(EC_PRIVATE)\n\n// Elliptic Curve Key Type\nclass ECKey extends Key {\n constructor (...args) {\n super(...args)\n this[JWK_MEMBERS]()\n Object.defineProperty(this, 'kty', { value: 'EC', enumerable: true })\n if (!EC_CURVES.has(this.crv)) {\n throw new errors.JOSENotSupported('unsupported EC key curve')\n }\n }\n\n static get [PUBLIC_MEMBERS] () {\n return EC_PUBLIC\n }\n\n static get [PRIVATE_MEMBERS] () {\n return EC_PRIVATE\n }\n\n // https://tc39.github.io/ecma262/#sec-ordinaryownpropertykeys no need for any special\n // JSON.stringify handling in V8\n [THUMBPRINT_MATERIAL] () {\n return { crv: this.crv, kty: 'EC', x: this.x, y: this.y }\n }\n\n [KEY_MANAGEMENT_ENCRYPT] () {\n return this.algorithms('deriveKey')\n }\n\n [KEY_MANAGEMENT_DECRYPT] () {\n if (this.public) {\n return new Set()\n }\n return this.algorithms('deriveKey')\n }\n\n static async generate (crv = 'P-256', privat = true) {\n if (!EC_CURVES.has(crv)) {\n throw new errors.JOSENotSupported(`unsupported EC key curve: ${crv}`)\n }\n\n let privateKey, publicKey\n\n if (keyObjectSupported) {\n ({ privateKey, publicKey } = await generateKeyPair('ec', { namedCurve: crv }))\n return privat ? privateKey : publicKey\n }\n\n ({ privateKey, publicKey } = await generateKeyPair('ec', {\n namedCurve: crv,\n publicKeyEncoding: { type: 'spki', format: 'pem' },\n privateKeyEncoding: { type: 'pkcs8', format: 'pem' }\n }))\n\n if (privat) {\n return createPrivateKey(privateKey)\n } else {\n return createPublicKey(publicKey)\n }\n }\n\n static generateSync (crv = 'P-256', privat = true) {\n if (!EC_CURVES.has(crv)) {\n throw new errors.JOSENotSupported(`unsupported EC key curve: ${crv}`)\n }\n\n let privateKey, publicKey\n\n if (keyObjectSupported) {\n ({ privateKey, publicKey } = generateKeyPairSync('ec', { namedCurve: crv }))\n return privat ? privateKey : publicKey\n }\n\n ({ privateKey, publicKey } = generateKeyPairSync('ec', {\n namedCurve: crv,\n publicKeyEncoding: { type: 'spki', format: 'pem' },\n privateKeyEncoding: { type: 'pkcs8', format: 'pem' }\n }))\n\n if (privat) {\n return createPrivateKey(privateKey)\n } else {\n return createPublicKey(publicKey)\n }\n }\n}\n\nmodule.exports = ECKey\n","const { inspect } = require('util')\n\nconst Key = require('./base')\n\nclass EmbeddedJWK extends Key {\n constructor () {\n super({ type: 'embedded' })\n Object.defineProperties(this, {\n kid: { value: undefined },\n kty: { value: undefined },\n thumbprint: { value: undefined },\n toJWK: { value: undefined },\n toPEM: { value: undefined }\n })\n }\n\n /* c8 ignore next 3 */\n [inspect.custom] () {\n return 'Embedded.JWK {}'\n }\n\n algorithms () {\n return new Set()\n }\n}\n\nmodule.exports = new EmbeddedJWK()\n","const { inspect } = require('util')\n\nconst Key = require('./base')\n\nclass EmbeddedX5C extends Key {\n constructor () {\n super({ type: 'embedded' })\n Object.defineProperties(this, {\n kid: { value: undefined },\n kty: { value: undefined },\n thumbprint: { value: undefined },\n toJWK: { value: undefined },\n toPEM: { value: undefined }\n })\n }\n\n /* c8 ignore next 3 */\n [inspect.custom] () {\n return 'Embedded.X5C {}'\n }\n\n algorithms () {\n return new Set()\n }\n}\n\nmodule.exports = new EmbeddedX5C()\n","const { inspect } = require('util')\n\nconst Key = require('./base')\n\nclass NoneKey extends Key {\n constructor () {\n super({ type: 'unsecured' }, { alg: 'none' })\n Object.defineProperties(this, {\n kid: { value: undefined },\n kty: { value: undefined },\n thumbprint: { value: undefined },\n toJWK: { value: undefined },\n toPEM: { value: undefined }\n })\n }\n\n /* c8 ignore next 3 */\n [inspect.custom] () {\n return 'None {}'\n }\n\n algorithms (operation) {\n switch (operation) {\n case 'sign':\n case 'verify':\n case undefined:\n return new Set(['none'])\n default:\n return new Set()\n }\n }\n}\n\nmodule.exports = new NoneKey()\n","const { randomBytes } = require('crypto')\n\nconst { createSecretKey } = require('../../help/key_object')\nconst base64url = require('../../help/base64url')\nconst {\n THUMBPRINT_MATERIAL, PUBLIC_MEMBERS, PRIVATE_MEMBERS,\n KEY_MANAGEMENT_DECRYPT, KEY_MANAGEMENT_ENCRYPT, KEYOBJECT\n} = require('../../help/consts')\n\nconst Key = require('./base')\n\nconst OCT_PUBLIC = new Set()\nObject.freeze(OCT_PUBLIC)\nconst OCT_PRIVATE = new Set(['k'])\nObject.freeze(OCT_PRIVATE)\n\n// Octet sequence Key Type\nclass OctKey extends Key {\n constructor (...args) {\n super(...args)\n Object.defineProperties(this, {\n kty: {\n value: 'oct',\n enumerable: true\n },\n length: {\n value: this[KEYOBJECT] ? this[KEYOBJECT].symmetricKeySize * 8 : undefined\n },\n k: {\n enumerable: false,\n get () {\n if (this[KEYOBJECT]) {\n Object.defineProperty(this, 'k', {\n value: base64url.encodeBuffer(this[KEYOBJECT].export()),\n configurable: false\n })\n } else {\n Object.defineProperty(this, 'k', {\n value: undefined,\n configurable: false\n })\n }\n\n return this.k\n },\n configurable: true\n }\n })\n }\n\n static get [PUBLIC_MEMBERS] () {\n return OCT_PUBLIC\n }\n\n static get [PRIVATE_MEMBERS] () {\n return OCT_PRIVATE\n }\n\n // https://tc39.github.io/ecma262/#sec-ordinaryownpropertykeys no need for any special\n // JSON.stringify handling in V8\n [THUMBPRINT_MATERIAL] () {\n if (!this[KEYOBJECT]) {\n throw new TypeError('reference \"oct\" keys without \"k\" cannot have their thumbprint calculated')\n }\n return { k: this.k, kty: 'oct' }\n }\n\n [KEY_MANAGEMENT_ENCRYPT] () {\n return new Set([\n ...this.algorithms('wrapKey'),\n ...this.algorithms('deriveKey')\n ])\n }\n\n [KEY_MANAGEMENT_DECRYPT] () {\n return this[KEY_MANAGEMENT_ENCRYPT]()\n }\n\n algorithms (...args) {\n if (!this[KEYOBJECT]) {\n return new Set()\n }\n\n return Key.prototype.algorithms.call(this, ...args)\n }\n\n static async generate (...args) {\n return this.generateSync(...args)\n }\n\n static generateSync (len = 256, privat = true) {\n if (!privat) {\n throw new TypeError('\"oct\" keys cannot be generated as public')\n }\n if (!Number.isSafeInteger(len) || !len || len % 8 !== 0) {\n throw new TypeError('invalid bit length')\n }\n\n return createSecretKey(randomBytes(len / 8))\n }\n}\n\nmodule.exports = OctKey\n","const { generateKeyPairSync, generateKeyPair: async } = require('crypto')\nconst { promisify } = require('util')\n\nconst {\n THUMBPRINT_MATERIAL, JWK_MEMBERS, PUBLIC_MEMBERS,\n PRIVATE_MEMBERS, KEY_MANAGEMENT_DECRYPT, KEY_MANAGEMENT_ENCRYPT\n} = require('../../help/consts')\nconst { OKP_CURVES } = require('../../registry')\nconst { edDSASupported } = require('../../help/runtime_support')\nconst errors = require('../../errors')\n\nconst Key = require('./base')\n\nconst generateKeyPair = promisify(async)\n\nconst OKP_PUBLIC = new Set(['crv', 'x'])\nObject.freeze(OKP_PUBLIC)\nconst OKP_PRIVATE = new Set([...OKP_PUBLIC, 'd'])\nObject.freeze(OKP_PRIVATE)\n\n// Octet string key pairs Key Type\nclass OKPKey extends Key {\n constructor (...args) {\n super(...args)\n this[JWK_MEMBERS]()\n Object.defineProperty(this, 'kty', { value: 'OKP', enumerable: true })\n if (!OKP_CURVES.has(this.crv)) {\n throw new errors.JOSENotSupported('unsupported OKP key curve')\n }\n }\n\n static get [PUBLIC_MEMBERS] () {\n return OKP_PUBLIC\n }\n\n static get [PRIVATE_MEMBERS] () {\n return OKP_PRIVATE\n }\n\n // https://tc39.github.io/ecma262/#sec-ordinaryownpropertykeys no need for any special\n // JSON.stringify handling in V8\n [THUMBPRINT_MATERIAL] () {\n return { crv: this.crv, kty: 'OKP', x: this.x }\n }\n\n [KEY_MANAGEMENT_ENCRYPT] () {\n return this.algorithms('deriveKey')\n }\n\n [KEY_MANAGEMENT_DECRYPT] () {\n if (this.public) {\n return new Set()\n }\n return this.algorithms('deriveKey')\n }\n\n static async generate (crv = 'Ed25519', privat = true) {\n if (!edDSASupported) {\n throw new errors.JOSENotSupported('OKP keys are not supported in your Node.js runtime version')\n }\n\n if (!OKP_CURVES.has(crv)) {\n throw new errors.JOSENotSupported(`unsupported OKP key curve: ${crv}`)\n }\n\n const { privateKey, publicKey } = await generateKeyPair(crv.toLowerCase())\n\n return privat ? privateKey : publicKey\n }\n\n static generateSync (crv = 'Ed25519', privat = true) {\n if (!edDSASupported) {\n throw new errors.JOSENotSupported('OKP keys are not supported in your Node.js runtime version')\n }\n\n if (!OKP_CURVES.has(crv)) {\n throw new errors.JOSENotSupported(`unsupported OKP key curve: ${crv}`)\n }\n\n const { privateKey, publicKey } = generateKeyPairSync(crv.toLowerCase())\n\n return privat ? privateKey : publicKey\n }\n}\n\nmodule.exports = OKPKey\n","const { generateKeyPairSync, generateKeyPair: async } = require('crypto')\nconst { promisify } = require('util')\n\nconst {\n THUMBPRINT_MATERIAL, JWK_MEMBERS, PUBLIC_MEMBERS,\n PRIVATE_MEMBERS, KEY_MANAGEMENT_DECRYPT, KEY_MANAGEMENT_ENCRYPT\n} = require('../../help/consts')\nconst { keyObjectSupported } = require('../../help/runtime_support')\nconst { createPublicKey, createPrivateKey } = require('../../help/key_object')\n\nconst Key = require('./base')\n\nconst generateKeyPair = promisify(async)\n\nconst RSA_PUBLIC = new Set(['e', 'n'])\nObject.freeze(RSA_PUBLIC)\nconst RSA_PRIVATE = new Set([...RSA_PUBLIC, 'd', 'p', 'q', 'dp', 'dq', 'qi'])\nObject.freeze(RSA_PRIVATE)\n\n// RSA Key Type\nclass RSAKey extends Key {\n constructor (...args) {\n super(...args)\n this[JWK_MEMBERS]()\n Object.defineProperties(this, {\n kty: {\n value: 'RSA',\n enumerable: true\n },\n length: {\n get () {\n Object.defineProperty(this, 'length', {\n value: Buffer.byteLength(this.n, 'base64') * 8,\n configurable: false\n })\n\n return this.length\n },\n configurable: true\n }\n })\n }\n\n static get [PUBLIC_MEMBERS] () {\n return RSA_PUBLIC\n }\n\n static get [PRIVATE_MEMBERS] () {\n return RSA_PRIVATE\n }\n\n // https://tc39.github.io/ecma262/#sec-ordinaryownpropertykeys no need for any special\n // JSON.stringify handling in V8\n [THUMBPRINT_MATERIAL] () {\n return { e: this.e, kty: 'RSA', n: this.n }\n }\n\n [KEY_MANAGEMENT_ENCRYPT] () {\n return this.algorithms('wrapKey')\n }\n\n [KEY_MANAGEMENT_DECRYPT] () {\n return this.algorithms('unwrapKey')\n }\n\n static async generate (len = 2048, privat = true) {\n if (!Number.isSafeInteger(len) || len < 512 || len % 8 !== 0 || (('electron' in process.versions) && len % 128 !== 0)) {\n throw new TypeError('invalid bit length')\n }\n\n let privateKey, publicKey\n\n if (keyObjectSupported) {\n ({ privateKey, publicKey } = await generateKeyPair('rsa', { modulusLength: len }))\n return privat ? privateKey : publicKey\n }\n\n ({ privateKey, publicKey } = await generateKeyPair('rsa', {\n modulusLength: len,\n publicKeyEncoding: { type: 'spki', format: 'pem' },\n privateKeyEncoding: { type: 'pkcs8', format: 'pem' }\n }))\n\n if (privat) {\n return createPrivateKey(privateKey)\n } else {\n return createPublicKey(publicKey)\n }\n }\n\n static generateSync (len = 2048, privat = true) {\n if (!Number.isSafeInteger(len) || len < 512 || len % 8 !== 0 || (('electron' in process.versions) && len % 128 !== 0)) {\n throw new TypeError('invalid bit length')\n }\n\n let privateKey, publicKey\n\n if (keyObjectSupported) {\n ({ privateKey, publicKey } = generateKeyPairSync('rsa', { modulusLength: len }))\n return privat ? privateKey : publicKey\n }\n\n ({ privateKey, publicKey } = generateKeyPairSync('rsa', {\n modulusLength: len,\n publicKeyEncoding: { type: 'spki', format: 'pem' },\n privateKeyEncoding: { type: 'pkcs8', format: 'pem' }\n }))\n\n if (privat) {\n return createPrivateKey(privateKey)\n } else {\n return createPublicKey(publicKey)\n }\n }\n}\n\nmodule.exports = RSAKey\n","const { createHash } = require('crypto')\n\nconst base64url = require('../help/base64url')\n\nconst x5t = (hash, cert) => base64url.encodeBuffer(createHash(hash).update(Buffer.from(cert, 'base64')).digest())\n\nmodule.exports.kid = components => base64url.encodeBuffer(createHash('sha256').update(JSON.stringify(components)).digest())\nmodule.exports.x5t = x5t.bind(undefined, 'sha1')\nmodule.exports['x5t#S256'] = x5t.bind(undefined, 'sha256')\n","const KeyStore = require('./keystore')\n\nmodule.exports = KeyStore\n","const { inspect } = require('util')\n\nconst isObject = require('../help/is_object')\nconst { generate, generateSync } = require('../jwk/generate')\nconst { USES_MAPPING } = require('../help/consts')\nconst { isKey, asKey: importKey } = require('../jwk')\n\nconst keyscore = (key, { alg, use, ops }) => {\n let score = 0\n\n if (alg && key.alg) {\n score++\n }\n\n if (use && key.use) {\n score++\n }\n\n if (ops && key.key_ops) {\n score++\n }\n\n return score\n}\n\nclass KeyStore {\n constructor (...keys) {\n while (keys.some(Array.isArray)) {\n keys = keys.flat\n ? keys.flat()\n : keys.reduce((acc, val) => {\n if (Array.isArray(val)) {\n return [...acc, ...val]\n }\n\n acc.push(val)\n return acc\n }, [])\n }\n if (keys.some(k => !isKey(k) || !k.kty)) {\n throw new TypeError('all keys must be instances of a key instantiated by JWK.asKey')\n }\n\n this._keys = new Set(keys)\n }\n\n all ({ alg, kid, thumbprint, use, kty, key_ops: ops, x5t, 'x5t#S256': x5t256, crv } = {}) {\n if (ops !== undefined && (!Array.isArray(ops) || !ops.length || ops.some(x => typeof x !== 'string'))) {\n throw new TypeError('`key_ops` must be a non-empty array of strings')\n }\n\n const search = { alg, use, ops }\n return [...this._keys]\n .filter((key) => {\n let candidate = true\n\n if (candidate && kid !== undefined && key.kid !== kid) {\n candidate = false\n }\n\n if (candidate && thumbprint !== undefined && key.thumbprint !== thumbprint) {\n candidate = false\n }\n\n if (candidate && x5t !== undefined && key.x5t !== x5t) {\n candidate = false\n }\n\n if (candidate && x5t256 !== undefined && key['x5t#S256'] !== x5t256) {\n candidate = false\n }\n\n if (candidate && kty !== undefined && key.kty !== kty) {\n candidate = false\n }\n\n if (candidate && crv !== undefined && (key.crv !== crv)) {\n candidate = false\n }\n\n if (alg !== undefined && !key.algorithms().has(alg)) {\n candidate = false\n }\n\n if (candidate && use !== undefined && (key.use !== undefined && key.use !== use)) {\n candidate = false\n }\n\n // TODO:\n if (candidate && ops !== undefined && (key.key_ops !== undefined || key.use !== undefined)) {\n let keyOps\n if (key.key_ops) {\n keyOps = new Set(key.key_ops)\n } else {\n keyOps = USES_MAPPING[key.use]\n }\n if (ops.some(x => !keyOps.has(x))) {\n candidate = false\n }\n }\n\n return candidate\n })\n .sort((first, second) => keyscore(second, search) - keyscore(first, search))\n }\n\n get (...args) {\n return this.all(...args)[0]\n }\n\n add (key) {\n if (!isKey(key) || !key.kty) {\n throw new TypeError('key must be an instance of a key instantiated by JWK.asKey')\n }\n\n this._keys.add(key)\n }\n\n remove (key) {\n if (!isKey(key)) {\n throw new TypeError('key must be an instance of a key instantiated by JWK.asKey')\n }\n\n this._keys.delete(key)\n }\n\n toJWKS (priv = false) {\n return {\n keys: [...this._keys.values()].map(\n key => key.toJWK(priv && (key.private || (key.secret && key.k)))\n )\n }\n }\n\n async generate (...args) {\n this._keys.add(await generate(...args))\n }\n\n generateSync (...args) {\n this._keys.add(generateSync(...args))\n }\n\n get size () {\n return this._keys.size\n }\n\n /* c8 ignore next 8 */\n [inspect.custom] () {\n return `${this.constructor.name} ${inspect(this.toJWKS(false), {\n depth: Infinity,\n colors: process.stdout.isTTY,\n compact: false,\n sorted: true\n })}`\n }\n\n * [Symbol.iterator] () {\n for (const key of this._keys) {\n yield key\n }\n }\n}\n\nfunction asKeyStore (jwks, { ignoreErrors = false, calculateMissingRSAPrimes = false } = {}) {\n if (!isObject(jwks) || !Array.isArray(jwks.keys) || jwks.keys.some(k => !isObject(k) || !('kty' in k))) {\n throw new TypeError('jwks must be a JSON Web Key Set formatted object')\n }\n\n const keys = jwks.keys.map((jwk) => {\n try {\n return importKey(jwk, { calculateMissingRSAPrimes })\n } catch (err) {\n if (!ignoreErrors) {\n throw err\n }\n return undefined\n }\n }).filter(Boolean)\n\n return new KeyStore(...keys)\n}\n\nmodule.exports = { KeyStore, asKeyStore }\n","const Sign = require('./sign')\nconst { verify } = require('./verify')\n\nconst single = (serialization, payload, key, protectedHeader, unprotectedHeader) => {\n return new Sign(payload)\n .recipient(key, protectedHeader, unprotectedHeader)\n .sign(serialization)\n}\n\nmodule.exports.Sign = Sign\nmodule.exports.sign = single.bind(undefined, 'compact')\nmodule.exports.sign.flattened = single.bind(undefined, 'flattened')\nmodule.exports.sign.general = single.bind(undefined, 'general')\n\nmodule.exports.verify = verify\n","const isObject = require('../help/is_object')\nlet validateCrit = require('../help/validate_crit')\nconst { JWSInvalid } = require('../errors')\n\nvalidateCrit = validateCrit.bind(undefined, JWSInvalid)\n\nconst compactSerializer = (payload, [recipient]) => {\n return `${recipient.protected}.${payload}.${recipient.signature}`\n}\ncompactSerializer.validate = (jws, { 0: { unprotectedHeader, protectedHeader }, length }) => {\n if (length !== 1 || unprotectedHeader) {\n throw new JWSInvalid('JWS Compact Serialization doesn\\'t support multiple recipients or JWS unprotected headers')\n }\n validateCrit(protectedHeader, unprotectedHeader, protectedHeader ? protectedHeader.crit : undefined)\n}\n\nconst flattenedSerializer = (payload, [recipient]) => {\n const { header, signature, protected: prot } = recipient\n\n return {\n payload,\n ...prot ? { protected: prot } : undefined,\n ...header ? { header } : undefined,\n signature\n }\n}\nflattenedSerializer.validate = (jws, { 0: { unprotectedHeader, protectedHeader }, length }) => {\n if (length !== 1) {\n throw new JWSInvalid('Flattened JWS JSON Serialization doesn\\'t support multiple recipients')\n }\n validateCrit(protectedHeader, unprotectedHeader, protectedHeader ? protectedHeader.crit : undefined)\n}\n\nconst generalSerializer = (payload, recipients) => {\n return {\n payload,\n signatures: recipients.map(({ header, signature, protected: prot }) => {\n return {\n ...prot ? { protected: prot } : undefined,\n ...header ? { header } : undefined,\n signature\n }\n })\n }\n}\ngeneralSerializer.validate = (jws, recipients) => {\n let validateB64 = false\n recipients.forEach(({ protectedHeader, unprotectedHeader }) => {\n if (protectedHeader && !validateB64 && 'b64' in protectedHeader) {\n validateB64 = true\n }\n validateCrit(protectedHeader, unprotectedHeader, protectedHeader ? protectedHeader.crit : undefined)\n })\n\n if (validateB64) {\n const values = recipients.map(({ protectedHeader }) => protectedHeader && protectedHeader.b64)\n if (!values.every((actual, i, [expected]) => actual === expected)) {\n throw new JWSInvalid('the \"b64\" Header Parameter value MUST be the same for all recipients')\n }\n }\n}\n\nconst isJSON = (input) => {\n return isObject(input) && (typeof input.payload === 'string' || Buffer.isBuffer(input.payload))\n}\n\nconst isValidRecipient = (recipient) => {\n return isObject(recipient) && typeof recipient.signature === 'string' &&\n (recipient.header === undefined || isObject(recipient.header)) &&\n (recipient.protected === undefined || typeof recipient.protected === 'string')\n}\n\nconst isMultiRecipient = (input) => {\n if (Array.isArray(input.signatures) && input.signatures.every(isValidRecipient)) {\n return true\n }\n\n return false\n}\n\nconst detect = (input) => {\n if (typeof input === 'string' && input.split('.').length === 3) {\n return 'compact'\n }\n\n if (isJSON(input)) {\n if (isMultiRecipient(input)) {\n return 'general'\n }\n\n if (isValidRecipient(input)) {\n return 'flattened'\n }\n }\n\n throw new JWSInvalid('JWS malformed or invalid serialization')\n}\n\nmodule.exports = {\n compact: compactSerializer,\n flattened: flattenedSerializer,\n general: generalSerializer,\n detect\n}\n","const base64url = require('../help/base64url')\nconst isDisjoint = require('../help/is_disjoint')\nconst isObject = require('../help/is_object')\nconst deepClone = require('../help/deep_clone')\nconst { JWSInvalid } = require('../errors')\nconst { sign } = require('../jwa')\nconst getKey = require('../help/get_key')\n\nconst serializers = require('./serializers')\n\nconst PROCESS_RECIPIENT = Symbol('PROCESS_RECIPIENT')\n\nclass Sign {\n constructor (payload) {\n if (typeof payload === 'string') {\n payload = base64url.encode(payload)\n } else if (Buffer.isBuffer(payload)) {\n payload = base64url.encodeBuffer(payload)\n this._binary = true\n } else if (isObject(payload)) {\n payload = base64url.JSON.encode(payload)\n } else {\n throw new TypeError('payload argument must be a Buffer, string or an object')\n }\n\n this._payload = payload\n this._recipients = []\n }\n\n /*\n * @public\n */\n recipient (key, protectedHeader, unprotectedHeader) {\n key = getKey(key)\n\n if (protectedHeader !== undefined && !isObject(protectedHeader)) {\n throw new TypeError('protectedHeader argument must be a plain object when provided')\n }\n\n if (unprotectedHeader !== undefined && !isObject(unprotectedHeader)) {\n throw new TypeError('unprotectedHeader argument must be a plain object when provided')\n }\n\n if (!isDisjoint(protectedHeader, unprotectedHeader)) {\n throw new JWSInvalid('JWS Protected and JWS Unprotected Header Parameter names must be disjoint')\n }\n\n this._recipients.push({\n key,\n protectedHeader: protectedHeader ? deepClone(protectedHeader) : undefined,\n unprotectedHeader: unprotectedHeader ? deepClone(unprotectedHeader) : undefined\n })\n\n return this\n }\n\n /*\n * @private\n */\n [PROCESS_RECIPIENT] (recipient, first) {\n const { key, protectedHeader, unprotectedHeader } = recipient\n\n if (key.use === 'enc') {\n throw new TypeError('a key with \"use\":\"enc\" is not usable for signing')\n }\n\n const joseHeader = {\n protected: protectedHeader || {},\n unprotected: unprotectedHeader || {}\n }\n\n let alg = joseHeader.protected.alg || joseHeader.unprotected.alg\n\n if (!alg) {\n alg = key.alg || [...key.algorithms('sign')][0]\n if (recipient.protectedHeader) {\n joseHeader.protected.alg = recipient.protectedHeader.alg = alg\n } else {\n joseHeader.protected = recipient.protectedHeader = { alg }\n }\n }\n\n if (!alg) {\n throw new JWSInvalid('could not resolve a usable \"alg\" for a recipient')\n }\n\n recipient.header = unprotectedHeader\n recipient.protected = Object.keys(joseHeader.protected).length ? base64url.JSON.encode(joseHeader.protected) : ''\n\n if (first && joseHeader.protected.crit && joseHeader.protected.crit.includes('b64') && joseHeader.protected.b64 === false) {\n if (this._binary) {\n this._payload = base64url.decodeToBuffer(this._payload)\n } else {\n this._payload = base64url.decode(this._payload)\n }\n }\n\n const data = Buffer.concat([\n Buffer.from(recipient.protected || ''),\n Buffer.from('.'),\n Buffer.from(this._payload)\n ])\n\n recipient.signature = base64url.encodeBuffer(sign(alg, key, data))\n }\n\n /*\n * @public\n */\n sign (serialization) {\n const serializer = serializers[serialization]\n if (!serializer) {\n throw new TypeError('serialization must be one of \"compact\", \"flattened\", \"general\"')\n }\n\n if (!this._recipients.length) {\n throw new JWSInvalid('missing recipients')\n }\n\n serializer.validate(this, this._recipients)\n\n this._recipients.forEach((recipient, i) => {\n this[PROCESS_RECIPIENT](recipient, i === 0)\n })\n\n return serializer(this._payload, this._recipients)\n }\n}\n\nmodule.exports = Sign\n","const { EOL } = require('os')\n\nconst base64url = require('../help/base64url')\nconst isDisjoint = require('../help/is_disjoint')\nconst isObject = require('../help/is_object')\nlet validateCrit = require('../help/validate_crit')\nconst getKey = require('../help/get_key')\nconst { KeyStore } = require('../jwks')\nconst errors = require('../errors')\nconst { check, verify } = require('../jwa')\nconst JWK = require('../jwk')\n\nconst { detect: resolveSerialization } = require('./serializers')\n\nvalidateCrit = validateCrit.bind(undefined, errors.JWSInvalid)\nconst SINGLE_RECIPIENT = new Set(['compact', 'flattened', 'preparsed'])\n\n/*\n * @public\n */\nconst jwsVerify = (skipDisjointCheck, serialization, jws, key, { crit = [], complete = false, algorithms } = {}) => {\n key = getKey(key, true)\n\n if (algorithms !== undefined && (!Array.isArray(algorithms) || algorithms.some(s => typeof s !== 'string' || !s))) {\n throw new TypeError('\"algorithms\" option must be an array of non-empty strings')\n } else if (algorithms) {\n algorithms = new Set(algorithms)\n }\n\n if (!Array.isArray(crit) || crit.some(s => typeof s !== 'string' || !s)) {\n throw new TypeError('\"crit\" option must be an array of non-empty strings')\n }\n\n if (!serialization) {\n serialization = resolveSerialization(jws)\n }\n\n let prot // protected header\n let header // unprotected header\n let payload\n let signature\n let alg\n\n // treat general format with one recipient as flattened\n // skips iteration and avoids multi errors in this case\n if (serialization === 'general' && jws.signatures.length === 1) {\n serialization = 'flattened'\n const { signatures, ...root } = jws\n jws = { ...root, ...signatures[0] }\n }\n\n let decoded\n\n if (SINGLE_RECIPIENT.has(serialization)) {\n let parsedProt = {}\n\n switch (serialization) {\n case 'compact': // compact serialization format\n ([prot, payload, signature] = jws.split('.'))\n break\n case 'flattened': // flattened serialization format\n ({ protected: prot, payload, signature, header } = jws)\n break\n case 'preparsed': { // from the JWT module\n ({ decoded } = jws);\n ([prot, payload, signature] = jws.token.split('.'))\n break\n }\n }\n\n if (!header) {\n skipDisjointCheck = true\n }\n\n if (decoded) {\n parsedProt = decoded.header\n } else if (prot) {\n try {\n parsedProt = base64url.JSON.decode(prot)\n } catch (err) {\n throw new errors.JWSInvalid('could not parse JWS protected header')\n }\n } else {\n skipDisjointCheck = skipDisjointCheck || true\n }\n\n if (!skipDisjointCheck && !isDisjoint(parsedProt, header)) {\n throw new errors.JWSInvalid('JWS Protected and JWS Unprotected Header Parameter names must be disjoint')\n }\n\n const combinedHeader = { ...parsedProt, ...header }\n validateCrit(parsedProt, header, crit)\n\n alg = parsedProt.alg || (header && header.alg)\n if (!alg) {\n throw new errors.JWSInvalid('missing JWS signature algorithm')\n } else if (algorithms && !algorithms.has(alg)) {\n throw new errors.JOSEAlgNotWhitelisted('alg not whitelisted')\n }\n\n if (key instanceof KeyStore) {\n const keystore = key\n const keys = keystore.all({ kid: combinedHeader.kid, alg: combinedHeader.alg, key_ops: ['verify'] })\n switch (keys.length) {\n case 0:\n throw new errors.JWKSNoMatchingKey()\n case 1:\n // treat the call as if a Key instance was passed in\n // skips iteration and avoids multi errors in this case\n key = keys[0]\n break\n default: {\n const errs = []\n for (const key of keys) {\n try {\n return jwsVerify(true, serialization, jws, key, { crit, complete, algorithms: algorithms ? [...algorithms] : undefined })\n } catch (err) {\n errs.push(err)\n continue\n }\n }\n\n const multi = new errors.JOSEMultiError(errs)\n if ([...multi].some(e => e instanceof errors.JWSVerificationFailed)) {\n throw new errors.JWSVerificationFailed()\n }\n throw multi\n }\n }\n }\n\n if (key === JWK.EmbeddedJWK) {\n if (!isObject(combinedHeader.jwk)) {\n throw new errors.JWSInvalid('JWS Header Parameter \"jwk\" must be a JSON object')\n }\n key = JWK.asKey(combinedHeader.jwk)\n if (key.type !== 'public') {\n throw new errors.JWSInvalid('JWS Header Parameter \"jwk\" must be a public key')\n }\n } else if (key === JWK.EmbeddedX5C) {\n if (!Array.isArray(combinedHeader.x5c) || !combinedHeader.x5c.length || combinedHeader.x5c.some(c => typeof c !== 'string' || !c)) {\n throw new errors.JWSInvalid('JWS Header Parameter \"x5c\" must be a JSON array of certificate value strings')\n }\n key = JWK.asKey(\n `-----BEGIN CERTIFICATE-----${EOL}${(combinedHeader.x5c[0].match(/.{1,64}/g) || []).join(EOL)}${EOL}-----END CERTIFICATE-----`,\n { x5c: combinedHeader.x5c }\n )\n }\n\n check(key, 'verify', alg)\n\n const toBeVerified = Buffer.concat([\n Buffer.from(prot || ''),\n Buffer.from('.'),\n Buffer.isBuffer(payload) ? payload : Buffer.from(payload)\n ])\n\n if (!verify(alg, key, toBeVerified, base64url.decodeToBuffer(signature))) {\n throw new errors.JWSVerificationFailed()\n }\n\n if (combinedHeader.b64 === false) {\n payload = Buffer.from(payload)\n } else {\n payload = base64url.decodeToBuffer(payload)\n }\n\n if (complete) {\n const result = { payload, key }\n if (prot) result.protected = parsedProt\n if (header) result.header = header\n return result\n }\n\n return payload\n }\n\n // general serialization format\n const { signatures, ...root } = jws\n const errs = []\n for (const recipient of signatures) {\n try {\n return jwsVerify(false, 'flattened', { ...root, ...recipient }, key, { crit, complete, algorithms: algorithms ? [...algorithms] : undefined })\n } catch (err) {\n errs.push(err)\n continue\n }\n }\n\n const multi = new errors.JOSEMultiError(errs)\n if ([...multi].some(e => e instanceof errors.JWSVerificationFailed)) {\n throw new errors.JWSVerificationFailed()\n } else if ([...multi].every(e => e instanceof errors.JWKSNoMatchingKey)) {\n throw new errors.JWKSNoMatchingKey()\n }\n throw multi\n}\n\nmodule.exports = {\n bare: jwsVerify,\n verify: jwsVerify.bind(undefined, false, undefined)\n}\n","const base64url = require('../help/base64url')\nconst errors = require('../errors')\n\nmodule.exports = (token, { complete = false } = {}) => {\n if (typeof token !== 'string' || !token) {\n throw new TypeError('JWT must be a string')\n }\n\n const { 0: header, 1: payload, 2: signature, length } = token.split('.')\n\n if (length === 5) {\n throw new TypeError('encrypted JWTs cannot be decoded')\n }\n\n if (length !== 3) {\n throw new errors.JWTMalformed('JWTs must have three components')\n }\n\n try {\n const result = {\n header: base64url.JSON.decode(header),\n payload: base64url.JSON.decode(payload),\n signature\n }\n\n return complete ? result : result.payload\n } catch (err) {\n throw new errors.JWTMalformed('JWT is malformed')\n }\n}\n","const decode = require('./decode')\nconst sign = require('./sign')\nconst verify = require('./verify')\nconst profiles = require('./profiles')\n\nmodule.exports = {\n sign,\n verify,\n ...profiles\n}\n\nObject.defineProperty(module.exports, 'decode', {\n enumerable: false,\n configurable: true,\n value: decode\n})\n","const { JWTClaimInvalid } = require('../errors')\nconst secs = require('../help/secs')\nconst epoch = require('../help/epoch')\nconst isObject = require('../help/is_object')\n\nconst verify = require('./verify')\nconst {\n isString,\n isRequired,\n isTimestamp,\n isStringOrArrayOfStrings\n} = require('./shared_validations')\n\nconst isPayloadRequired = isRequired.bind(undefined, JWTClaimInvalid)\nconst isPayloadString = isString.bind(undefined, JWTClaimInvalid)\nconst isOptionString = isString.bind(undefined, TypeError)\n\nconst defineLazyExportWithWarning = (obj, property, name, definition) => {\n Object.defineProperty(obj, property, {\n enumerable: true,\n configurable: true,\n value (...args) {\n process.emitWarning(\n `The ${name} API implements an IETF draft. Breaking draft implementations are included as minor versions of the jose library, therefore, the ~ semver operator should be used and close attention be payed to library changelog as well as the drafts themselves.`,\n 'DraftWarning'\n )\n Object.defineProperty(obj, property, {\n enumerable: true,\n configurable: true,\n value: definition\n })\n return obj[property](...args)\n }\n })\n}\n\nconst validateCommonOptions = (options, profile) => {\n if (!isObject(options)) {\n throw new TypeError('options must be an object')\n }\n\n if (!options.issuer) {\n throw new TypeError(`\"issuer\" option is required to validate ${profile}`)\n }\n\n if (!options.audience) {\n throw new TypeError(`\"audience\" option is required to validate ${profile}`)\n }\n}\n\nmodule.exports = {\n IdToken: {\n verify: (token, key, options = {}) => {\n validateCommonOptions(options, 'an ID Token')\n\n if ('maxAuthAge' in options) {\n isOptionString(options.maxAuthAge, 'options.maxAuthAge')\n }\n if ('nonce' in options) {\n isOptionString(options.nonce, 'options.nonce')\n }\n\n const unix = epoch(options.now || new Date())\n const result = verify(token, key, { ...options })\n const payload = options.complete ? result.payload : result\n\n if (Array.isArray(payload.aud) && payload.aud.length > 1) {\n isPayloadRequired(payload.azp, '\"azp\" claim', 'azp')\n }\n isPayloadRequired(payload.iat, '\"iat\" claim', 'iat')\n isPayloadRequired(payload.sub, '\"sub\" claim', 'sub')\n isPayloadRequired(payload.exp, '\"exp\" claim', 'exp')\n isTimestamp(payload.auth_time, 'auth_time', !!options.maxAuthAge)\n isPayloadString(payload.nonce, '\"nonce\" claim', 'nonce', !!options.nonce)\n isPayloadString(payload.acr, '\"acr\" claim', 'acr')\n isStringOrArrayOfStrings(payload.amr, 'amr')\n\n if (options.nonce && payload.nonce !== options.nonce) {\n throw new JWTClaimInvalid('unexpected \"nonce\" claim value', 'nonce', 'check_failed')\n }\n\n const tolerance = options.clockTolerance ? secs(options.clockTolerance) : 0\n\n if (options.maxAuthAge) {\n const maxAuthAgeSeconds = secs(options.maxAuthAge)\n if (payload.auth_time + maxAuthAgeSeconds < unix - tolerance) {\n throw new JWTClaimInvalid('\"auth_time\" claim timestamp check failed (too much time has elapsed since the last End-User authentication)', 'auth_time', 'check_failed')\n }\n }\n\n if (Array.isArray(payload.aud) && payload.aud.length > 1 && payload.azp !== options.audience) {\n throw new JWTClaimInvalid('unexpected \"azp\" claim value', 'azp', 'check_failed')\n }\n\n return result\n }\n },\n LogoutToken: {},\n AccessToken: {}\n}\n\ndefineLazyExportWithWarning(module.exports.LogoutToken, 'verify', 'jose.JWT.LogoutToken.verify', (token, key, options = {}) => {\n validateCommonOptions(options, 'a Logout Token')\n\n const result = verify(token, key, { ...options })\n const payload = options.complete ? result.payload : result\n\n isPayloadRequired(payload.iat, '\"iat\" claim', 'iat')\n isPayloadRequired(payload.jti, '\"jti\" claim', 'jti')\n isPayloadString(payload.sid, '\"sid\" claim', 'sid')\n\n if (!('sid' in payload) && !('sub' in payload)) {\n throw new JWTClaimInvalid('either \"sid\" or \"sub\" (or both) claims must be present')\n }\n\n if ('nonce' in payload) {\n throw new JWTClaimInvalid('\"nonce\" claim is prohibited', 'nonce', 'prohibited')\n }\n\n if (!('events' in payload)) {\n throw new JWTClaimInvalid('\"events\" claim is missing', 'events', 'missing')\n }\n\n if (!isObject(payload.events)) {\n throw new JWTClaimInvalid('\"events\" claim must be an object', 'events', 'invalid')\n }\n\n if (!('http://schemas.openid.net/event/backchannel-logout' in payload.events)) {\n throw new JWTClaimInvalid('\"http://schemas.openid.net/event/backchannel-logout\" member is missing in the \"events\" claim', 'events', 'invalid')\n }\n\n if (!isObject(payload.events['http://schemas.openid.net/event/backchannel-logout'])) {\n throw new JWTClaimInvalid('\"http://schemas.openid.net/event/backchannel-logout\" member in the \"events\" claim must be an object', 'events', 'invalid')\n }\n\n return result\n})\n\ndefineLazyExportWithWarning(module.exports.AccessToken, 'verify', 'jose.JWT.AccessToken.verify', (token, key, options = {}) => {\n validateCommonOptions(options, 'a JWT Access Token')\n\n isOptionString(options.maxAuthAge, 'options.maxAuthAge')\n\n const unix = epoch(options.now || new Date())\n const typ = 'at+JWT'\n const result = verify(token, key, { ...options, typ })\n const payload = options.complete ? result.payload : result\n\n isPayloadRequired(payload.iat, '\"iat\" claim', 'iat')\n isPayloadRequired(payload.exp, '\"exp\" claim', 'exp')\n isPayloadRequired(payload.sub, '\"sub\" claim', 'sub')\n isPayloadRequired(payload.jti, '\"jti\" claim', 'jti')\n isPayloadString(payload.client_id, '\"client_id\" claim', 'client_id', true)\n isTimestamp(payload.auth_time, 'auth_time', !!options.maxAuthAge)\n isPayloadString(payload.acr, '\"acr\" claim', 'acr')\n isStringOrArrayOfStrings(payload.amr, 'amr')\n\n const tolerance = options.clockTolerance ? secs(options.clockTolerance) : 0\n\n if (options.maxAuthAge) {\n const maxAuthAgeSeconds = secs(options.maxAuthAge)\n if (payload.auth_time + maxAuthAgeSeconds < unix - tolerance) {\n throw new JWTClaimInvalid('\"auth_time\" claim timestamp check failed (too much time has elapsed since the last End-User authentication)', 'auth_time', 'check_failed')\n }\n }\n\n return result\n})\n","const { JWTClaimInvalid } = require('../errors')\n\nconst isNotString = val => typeof val !== 'string' || val.length === 0\nconst isNotArrayOfStrings = val => !Array.isArray(val) || val.length === 0 || val.some(isNotString)\nconst isRequired = (Err, value, label, claim) => {\n if (value === undefined) {\n throw new Err(`${label} is missing`, claim, 'missing')\n }\n}\nconst isString = (Err, value, label, claim, required = false) => {\n if (required) {\n isRequired(Err, value, label, claim)\n }\n\n if (value !== undefined && isNotString(value)) {\n throw new Err(`${label} must be a string`, claim, 'invalid')\n }\n}\nconst isTimestamp = (value, label, required = false) => {\n if (required && value === undefined) {\n throw new JWTClaimInvalid(`\"${label}\" claim is missing`, label, 'missing')\n }\n\n if (value !== undefined && (typeof value !== 'number')) {\n throw new JWTClaimInvalid(`\"${label}\" claim must be a JSON numeric value`, label, 'invalid')\n }\n}\nconst isStringOrArrayOfStrings = (value, label, required = false) => {\n if (required && value === undefined) {\n throw new JWTClaimInvalid(`\"${label}\" claim is missing`, label, 'missing')\n }\n\n if (value !== undefined && (isNotString(value) && isNotArrayOfStrings(value))) {\n throw new JWTClaimInvalid(`\"${label}\" claim must be a string or array of strings`, label, 'invalid')\n }\n}\n\nmodule.exports = {\n isNotArrayOfStrings,\n isRequired,\n isNotString,\n isString,\n isTimestamp,\n isStringOrArrayOfStrings\n}\n","const isObject = require('../help/is_object')\nconst secs = require('../help/secs')\nconst epoch = require('../help/epoch')\nconst getKey = require('../help/get_key')\nconst JWS = require('../jws')\n\nconst isString = require('./shared_validations').isString.bind(undefined, TypeError)\n\nconst validateOptions = (options) => {\n if (typeof options.iat !== 'boolean') {\n throw new TypeError('options.iat must be a boolean')\n }\n\n if (typeof options.kid !== 'boolean') {\n throw new TypeError('options.kid must be a boolean')\n }\n\n isString(options.subject, 'options.subject')\n isString(options.issuer, 'options.issuer')\n\n if (\n options.audience !== undefined &&\n (\n (typeof options.audience !== 'string' || !options.audience) &&\n (!Array.isArray(options.audience) || options.audience.length === 0 || options.audience.some(a => !a || typeof a !== 'string'))\n )\n ) {\n throw new TypeError('options.audience must be a string or an array of strings')\n }\n\n if (!isObject(options.header)) {\n throw new TypeError('options.header must be an object')\n }\n\n isString(options.algorithm, 'options.algorithm')\n isString(options.expiresIn, 'options.expiresIn')\n isString(options.notBefore, 'options.notBefore')\n isString(options.jti, 'options.jti')\n\n if (options.now !== undefined && (!(options.now instanceof Date) || !options.now.getTime())) {\n throw new TypeError('options.now must be a valid Date object')\n }\n}\n\nmodule.exports = (payload, key, options = {}) => {\n if (!isObject(options)) {\n throw new TypeError('options must be an object')\n }\n\n const {\n algorithm, audience, expiresIn, header = {}, iat = true,\n issuer, jti, kid = true, notBefore, subject, now\n } = options\n\n validateOptions({\n algorithm, audience, expiresIn, header, iat, issuer, jti, kid, notBefore, now, subject\n })\n\n if (!isObject(payload)) {\n throw new TypeError('payload must be an object')\n }\n\n let unix\n if (expiresIn || notBefore || iat) {\n unix = epoch(now || new Date())\n }\n\n payload = {\n ...payload,\n sub: subject || payload.sub,\n aud: audience || payload.aud,\n iss: issuer || payload.iss,\n jti: jti || payload.jti,\n iat: iat ? unix : payload.iat,\n exp: expiresIn ? unix + secs(expiresIn) : payload.exp,\n nbf: notBefore ? unix + secs(notBefore) : payload.nbf\n }\n\n key = getKey(key)\n\n let includeKid\n\n if (typeof options.kid === 'boolean') {\n includeKid = kid\n } else {\n includeKid = !key.secret\n }\n\n return JWS.sign(JSON.stringify(payload), key, {\n ...header,\n alg: algorithm || header.alg,\n kid: includeKid ? key.kid : header.kid\n })\n}\n","const isObject = require('../help/is_object')\nconst epoch = require('../help/epoch')\nconst secs = require('../help/secs')\nconst getKey = require('../help/get_key')\nconst { bare: verify } = require('../jws/verify')\nconst { JWTClaimInvalid, JWTExpired } = require('../errors')\n\nconst {\n isString,\n isNotString,\n isNotArrayOfStrings,\n isTimestamp,\n isStringOrArrayOfStrings\n} = require('./shared_validations')\nconst decode = require('./decode')\n\nconst isPayloadString = isString.bind(undefined, JWTClaimInvalid)\nconst isOptionString = isString.bind(undefined, TypeError)\n\nconst normalizeTyp = (value) => value.toLowerCase().replace(/^application\\//, '')\n\nconst validateOptions = ({\n algorithms, audience, clockTolerance, complete = false, crit, ignoreExp = false,\n ignoreIat = false, ignoreNbf = false, issuer, jti, maxTokenAge, now = new Date(),\n subject, typ\n}) => {\n if (typeof complete !== 'boolean') {\n throw new TypeError('options.complete must be a boolean')\n }\n\n if (typeof ignoreExp !== 'boolean') {\n throw new TypeError('options.ignoreExp must be a boolean')\n }\n\n if (typeof ignoreNbf !== 'boolean') {\n throw new TypeError('options.ignoreNbf must be a boolean')\n }\n\n if (typeof ignoreIat !== 'boolean') {\n throw new TypeError('options.ignoreIat must be a boolean')\n }\n\n isOptionString(maxTokenAge, 'options.maxTokenAge')\n isOptionString(subject, 'options.subject')\n isOptionString(jti, 'options.jti')\n isOptionString(clockTolerance, 'options.clockTolerance')\n isOptionString(typ, 'options.typ')\n\n if (issuer !== undefined && (isNotString(issuer) && isNotArrayOfStrings(issuer))) {\n throw new TypeError('options.issuer must be a string or an array of strings')\n }\n\n if (audience !== undefined && (isNotString(audience) && isNotArrayOfStrings(audience))) {\n throw new TypeError('options.audience must be a string or an array of strings')\n }\n\n if (algorithms !== undefined && isNotArrayOfStrings(algorithms)) {\n throw new TypeError('options.algorithms must be an array of strings')\n }\n\n if (!(now instanceof Date) || !now.getTime()) {\n throw new TypeError('options.now must be a valid Date object')\n }\n\n if (ignoreIat && maxTokenAge !== undefined) {\n throw new TypeError('options.ignoreIat and options.maxTokenAge cannot used together')\n }\n\n if (crit !== undefined && isNotArrayOfStrings(crit)) {\n throw new TypeError('options.crit must be an array of strings')\n }\n\n return {\n algorithms,\n audience,\n clockTolerance,\n complete,\n crit,\n ignoreExp,\n ignoreIat,\n ignoreNbf,\n issuer,\n jti,\n maxTokenAge,\n now,\n subject,\n typ\n }\n}\n\nconst validateTypes = ({ header, payload }, options) => {\n isPayloadString(header.alg, '\"alg\" header parameter', 'alg', true)\n\n isTimestamp(payload.iat, 'iat', !!options.maxTokenAge)\n isTimestamp(payload.exp, 'exp')\n isTimestamp(payload.nbf, 'nbf')\n isPayloadString(payload.jti, '\"jti\" claim', 'jti', !!options.jti)\n isStringOrArrayOfStrings(payload.iss, 'iss', !!options.issuer)\n isPayloadString(payload.sub, '\"sub\" claim', 'sub', !!options.subject)\n isStringOrArrayOfStrings(payload.aud, 'aud', !!options.audience)\n isPayloadString(header.typ, '\"typ\" header parameter', 'typ', !!options.typ)\n}\n\nconst checkAudiencePresence = (audPayload, audOption) => {\n if (typeof audPayload === 'string') {\n return audOption.includes(audPayload)\n }\n\n // Each principal intended to process the JWT MUST\n // identify itself with a value in the audience claim\n audPayload = new Set(audPayload)\n return audOption.some(Set.prototype.has.bind(audPayload))\n}\n\nmodule.exports = (token, key, options = {}) => {\n if (!isObject(options)) {\n throw new TypeError('options must be an object')\n }\n\n const {\n algorithms, audience, clockTolerance, complete, crit, ignoreExp, ignoreIat, ignoreNbf, issuer,\n jti, maxTokenAge, now, subject, typ\n } = options = validateOptions(options)\n\n const decoded = decode(token, { complete: true })\n key = getKey(key, true)\n\n if (complete) {\n ({ key } = verify(true, 'preparsed', { decoded, token }, key, { crit, algorithms, complete: true }))\n decoded.key = key\n } else {\n verify(true, 'preparsed', { decoded, token }, key, { crit, algorithms })\n }\n\n const unix = epoch(now)\n validateTypes(decoded, options)\n\n if (issuer && (typeof decoded.payload.iss !== 'string' || !(typeof issuer === 'string' ? [issuer] : issuer).includes(decoded.payload.iss))) {\n throw new JWTClaimInvalid('unexpected \"iss\" claim value', 'iss', 'check_failed')\n }\n\n if (subject && decoded.payload.sub !== subject) {\n throw new JWTClaimInvalid('unexpected \"sub\" claim value', 'sub', 'check_failed')\n }\n\n if (jti && decoded.payload.jti !== jti) {\n throw new JWTClaimInvalid('unexpected \"jti\" claim value', 'jti', 'check_failed')\n }\n\n if (audience && !checkAudiencePresence(decoded.payload.aud, typeof audience === 'string' ? [audience] : audience)) {\n throw new JWTClaimInvalid('unexpected \"aud\" claim value', 'aud', 'check_failed')\n }\n\n if (typ && normalizeTyp(decoded.header.typ) !== normalizeTyp(typ)) {\n throw new JWTClaimInvalid('unexpected \"typ\" JWT header value', 'typ', 'check_failed')\n }\n\n const tolerance = clockTolerance ? secs(clockTolerance) : 0\n\n if (!ignoreIat && !('exp' in decoded.payload) && 'iat' in decoded.payload && decoded.payload.iat > unix + tolerance) {\n throw new JWTClaimInvalid('\"iat\" claim timestamp check failed (it should be in the past)', 'iat', 'check_failed')\n }\n\n if (!ignoreNbf && 'nbf' in decoded.payload && decoded.payload.nbf > unix + tolerance) {\n throw new JWTClaimInvalid('\"nbf\" claim timestamp check failed', 'nbf', 'check_failed')\n }\n\n if (!ignoreExp && 'exp' in decoded.payload && decoded.payload.exp <= unix - tolerance) {\n throw new JWTExpired('\"exp\" claim timestamp check failed', 'exp', 'check_failed')\n }\n\n if (maxTokenAge) {\n const age = unix - decoded.payload.iat\n const max = secs(maxTokenAge)\n\n if (age - tolerance > max) {\n throw new JWTExpired('\"iat\" claim timestamp check failed (too far in the past)', 'iat', 'check_failed')\n }\n\n if (age < 0 - tolerance) {\n throw new JWTClaimInvalid('\"iat\" claim timestamp check failed (it should be in the past)', 'iat', 'check_failed')\n }\n }\n\n return complete ? decoded : decoded.payload\n}\n","const { getCurves } = require('crypto')\n\nconst curves = new Set()\n\nif (getCurves().includes('prime256v1')) {\n curves.add('P-256')\n}\n\nif (getCurves().includes('secp256k1')) {\n curves.add('secp256k1')\n}\n\nif (getCurves().includes('secp384r1')) {\n curves.add('P-384')\n}\n\nif (getCurves().includes('secp521r1')) {\n curves.add('P-521')\n}\n\nmodule.exports = curves\n","module.exports = new Map()\n","const EC_CURVES = require('./ec_curves')\nconst IVLENGTHS = require('./iv_lengths')\nconst JWA = require('./jwa')\nconst JWK = require('./jwk')\nconst KEYLENGTHS = require('./key_lengths')\nconst OKP_CURVES = require('./okp_curves')\nconst ECDH_DERIVE_LENGTHS = require('./ecdh_derive_lengths')\n\nmodule.exports = {\n EC_CURVES,\n ECDH_DERIVE_LENGTHS,\n IVLENGTHS,\n JWA,\n JWK,\n KEYLENGTHS,\n OKP_CURVES\n}\n","module.exports = new Map([\n ['A128CBC-HS256', 128],\n ['A128GCM', 96],\n ['A128GCMKW', 96],\n ['A192CBC-HS384', 128],\n ['A192GCM', 96],\n ['A192GCMKW', 96],\n ['A256CBC-HS512', 128],\n ['A256GCM', 96],\n ['A256GCMKW', 96]\n])\n","module.exports = {\n sign: new Map(),\n verify: new Map(),\n keyManagementEncrypt: new Map(),\n keyManagementDecrypt: new Map(),\n encrypt: new Map(),\n decrypt: new Map()\n}\n","module.exports = {\n oct: {\n decrypt: {},\n deriveKey: {},\n encrypt: {},\n sign: {},\n unwrapKey: {},\n verify: {},\n wrapKey: {}\n },\n EC: {\n decrypt: {},\n deriveKey: {},\n encrypt: {},\n sign: {},\n unwrapKey: {},\n verify: {},\n wrapKey: {}\n },\n RSA: {\n decrypt: {},\n deriveKey: {},\n encrypt: {},\n sign: {},\n unwrapKey: {},\n verify: {},\n wrapKey: {}\n },\n OKP: {\n decrypt: {},\n deriveKey: {},\n encrypt: {},\n sign: {},\n unwrapKey: {},\n verify: {},\n wrapKey: {}\n }\n}\n","module.exports = new Map([\n ['A128CBC-HS256', 256],\n ['A128GCM', 128],\n ['A192CBC-HS384', 384],\n ['A192GCM', 192],\n ['A256CBC-HS512', 512],\n ['A256GCM', 256]\n])\n","const curves = new Set(['Ed25519'])\n\nif (!('electron' in process.versions)) {\n curves.add('Ed448')\n curves.add('X25519')\n curves.add('X448')\n}\n\nmodule.exports = curves\n","/* eslint-disable max-classes-per-file */\n\nconst { inspect } = require('util');\nconst stdhttp = require('http');\nconst crypto = require('crypto');\nconst { strict: assert } = require('assert');\nconst querystring = require('querystring');\nconst url = require('url');\n\nconst { ParseError } = require('got');\nconst jose = require('jose');\nconst tokenHash = require('oidc-token-hash');\n\nconst base64url = require('./helpers/base64url');\nconst defaults = require('./helpers/defaults');\nconst { assertSigningAlgValuesSupport, assertIssuerConfiguration } = require('./helpers/assert');\nconst pick = require('./helpers/pick');\nconst isPlainObject = require('./helpers/is_plain_object');\nconst processResponse = require('./helpers/process_response');\nconst TokenSet = require('./token_set');\nconst { OPError, RPError } = require('./errors');\nconst now = require('./helpers/unix_timestamp');\nconst { random } = require('./helpers/generators');\nconst request = require('./helpers/request');\nconst {\n CALLBACK_PROPERTIES, CLIENT_DEFAULTS, JWT_CONTENT, CLOCK_TOLERANCE,\n} = require('./helpers/consts');\nconst issuerRegistry = require('./issuer_registry');\nconst instance = require('./helpers/weak_cache');\nconst { authenticatedPost, resolveResponseType, resolveRedirectUri } = require('./helpers/client');\nconst DeviceFlowHandle = require('./device_flow_handle');\n\nfunction pickCb(input) {\n return pick(input, ...CALLBACK_PROPERTIES);\n}\n\nfunction authorizationHeaderValue(token, tokenType = 'Bearer') {\n return `${tokenType} ${token}`;\n}\n\nfunction cleanUpClaims(claims) {\n if (Object.keys(claims._claim_names).length === 0) {\n delete claims._claim_names;\n }\n if (Object.keys(claims._claim_sources).length === 0) {\n delete claims._claim_sources;\n }\n}\n\nfunction assignClaim(target, source, sourceName, throwOnMissing = true) {\n return ([claim, inSource]) => {\n if (inSource === sourceName) {\n if (throwOnMissing && source[claim] === undefined) {\n throw new RPError(`expected claim \"${claim}\" in \"${sourceName}\"`);\n } else if (source[claim] !== undefined) {\n target[claim] = source[claim];\n }\n delete target._claim_names[claim];\n }\n };\n}\n\nfunction verifyPresence(payload, jwt, prop) {\n if (payload[prop] === undefined) {\n throw new RPError({\n message: `missing required JWT property ${prop}`,\n jwt,\n });\n }\n}\n\nfunction authorizationParams(params) {\n const authParams = {\n client_id: this.client_id,\n scope: 'openid',\n response_type: resolveResponseType.call(this),\n redirect_uri: resolveRedirectUri.call(this),\n ...params,\n };\n\n Object.entries(authParams).forEach(([key, value]) => {\n if (value === null || value === undefined) {\n delete authParams[key];\n } else if (key === 'claims' && typeof value === 'object') {\n authParams[key] = JSON.stringify(value);\n } else if (key === 'resource' && Array.isArray(value)) {\n authParams[key] = value;\n } else if (typeof value !== 'string') {\n authParams[key] = String(value);\n }\n });\n\n return authParams;\n}\n\nasync function claimJWT(label, jwt) {\n try {\n const { header, payload } = jose.JWT.decode(jwt, { complete: true });\n const { iss } = payload;\n\n if (header.alg === 'none') {\n return payload;\n }\n\n let key;\n if (!iss || iss === this.issuer.issuer) {\n key = await this.issuer.queryKeyStore(header);\n } else if (issuerRegistry.has(iss)) {\n key = await issuerRegistry.get(iss).queryKeyStore(header);\n } else {\n const discovered = await this.issuer.constructor.discover(iss);\n key = await discovered.queryKeyStore(header);\n }\n return jose.JWT.verify(jwt, key);\n } catch (err) {\n if (err instanceof RPError || err instanceof OPError || err.name === 'AggregateError') {\n throw err;\n } else {\n throw new RPError({\n printf: ['failed to validate the %s JWT (%s: %s)', label, err.name, err.message],\n jwt,\n });\n }\n }\n}\n\nfunction getKeystore(jwks) {\n if (!isPlainObject(jwks) || !Array.isArray(jwks.keys) || jwks.keys.some((k) => !isPlainObject(k) || !('kty' in k))) {\n throw new TypeError('jwks must be a JSON Web Key Set formatted object');\n }\n\n // eslint-disable-next-line no-restricted-syntax\n for (const jwk of jwks.keys) {\n if (jwk.kid === undefined) {\n jwk.kid = `DONOTUSE.${random()}`;\n }\n }\n\n const keystore = jose.JWKS.asKeyStore(jwks);\n if (keystore.all().some((key) => key.type !== 'private')) {\n throw new TypeError('jwks must only contain private keys');\n }\n return keystore;\n}\n\n// if an OP doesnt support client_secret_basic but supports client_secret_post, use it instead\n// this is in place to take care of most common pitfalls when first using discovered Issuers without\n// the support for default values defined by Discovery 1.0\nfunction checkBasicSupport(client, metadata, properties) {\n try {\n const supported = client.issuer.token_endpoint_auth_methods_supported;\n if (!supported.includes(properties.token_endpoint_auth_method)) {\n if (supported.includes('client_secret_post')) {\n properties.token_endpoint_auth_method = 'client_secret_post';\n }\n }\n } catch (err) {}\n}\n\nfunction handleCommonMistakes(client, metadata, properties) {\n if (!metadata.token_endpoint_auth_method) { // if no explicit value was provided\n checkBasicSupport(client, metadata, properties);\n }\n\n // :fp: c'mon people... RTFM\n if (metadata.redirect_uri) {\n if (metadata.redirect_uris) {\n throw new TypeError('provide a redirect_uri or redirect_uris, not both');\n }\n properties.redirect_uris = [metadata.redirect_uri];\n delete properties.redirect_uri;\n }\n\n if (metadata.response_type) {\n if (metadata.response_types) {\n throw new TypeError('provide a response_type or response_types, not both');\n }\n properties.response_types = [metadata.response_type];\n delete properties.response_type;\n }\n}\n\nfunction getDefaultsForEndpoint(endpoint, issuer, properties) {\n if (!issuer[`${endpoint}_endpoint`]) return;\n\n const tokenEndpointAuthMethod = properties.token_endpoint_auth_method;\n const tokenEndpointAuthSigningAlg = properties.token_endpoint_auth_signing_alg;\n\n const eam = `${endpoint}_endpoint_auth_method`;\n const easa = `${endpoint}_endpoint_auth_signing_alg`;\n\n if (properties[eam] === undefined && properties[easa] === undefined) {\n if (tokenEndpointAuthMethod !== undefined) {\n properties[eam] = tokenEndpointAuthMethod;\n }\n if (tokenEndpointAuthSigningAlg !== undefined) {\n properties[easa] = tokenEndpointAuthSigningAlg;\n }\n }\n}\n\nclass BaseClient {}\n\nmodule.exports = (issuer, aadIssValidation = false) => class Client extends BaseClient {\n /**\n * @name constructor\n * @api public\n */\n constructor(metadata = {}, jwks, options) {\n super();\n\n if (typeof metadata.client_id !== 'string' || !metadata.client_id) {\n throw new TypeError('client_id is required');\n }\n\n const properties = { ...CLIENT_DEFAULTS, ...metadata };\n\n handleCommonMistakes(this, metadata, properties);\n\n assertSigningAlgValuesSupport('token', this.issuer, properties);\n\n ['introspection', 'revocation'].forEach((endpoint) => {\n getDefaultsForEndpoint(endpoint, this.issuer, properties);\n assertSigningAlgValuesSupport(endpoint, this.issuer, properties);\n });\n\n Object.entries(properties).forEach(([key, value]) => {\n instance(this).get('metadata').set(key, value);\n if (!this[key]) {\n Object.defineProperty(this, key, {\n get() { return instance(this).get('metadata').get(key); },\n enumerable: true,\n });\n }\n });\n\n if (jwks !== undefined) {\n const keystore = getKeystore.call(this, jwks);\n instance(this).set('keystore', keystore);\n }\n\n if (options !== undefined) {\n instance(this).set('options', options);\n }\n\n this[CLOCK_TOLERANCE] = 0;\n }\n\n /**\n * @name authorizationUrl\n * @api public\n */\n authorizationUrl(params = {}) {\n if (!isPlainObject(params)) {\n throw new TypeError('params must be a plain object');\n }\n assertIssuerConfiguration(this.issuer, 'authorization_endpoint');\n const target = url.parse(this.issuer.authorization_endpoint, true);\n target.search = null;\n target.query = {\n ...target.query,\n ...authorizationParams.call(this, params),\n };\n return url.format(target);\n }\n\n /**\n * @name authorizationPost\n * @api public\n */\n authorizationPost(params = {}) {\n if (!isPlainObject(params)) {\n throw new TypeError('params must be a plain object');\n }\n const inputs = authorizationParams.call(this, params);\n const formInputs = Object.keys(inputs)\n .map((name) => ``).join('\\n');\n\n return `\n\n Requesting Authorization\n\n\n
\n ${formInputs}\n
\n\n`;\n }\n\n /**\n * @name endSessionUrl\n * @api public\n */\n endSessionUrl(params = {}) {\n assertIssuerConfiguration(this.issuer, 'end_session_endpoint');\n\n const {\n 0: postLogout,\n length,\n } = this.post_logout_redirect_uris || [];\n\n const {\n post_logout_redirect_uri = length === 1 ? postLogout : undefined,\n } = params;\n\n let hint = params.id_token_hint;\n\n if (hint instanceof TokenSet) {\n if (!hint.id_token) {\n throw new TypeError('id_token not present in TokenSet');\n }\n hint = hint.id_token;\n }\n\n const target = url.parse(this.issuer.end_session_endpoint, true);\n target.search = null;\n target.query = {\n ...params,\n ...target.query,\n ...{\n post_logout_redirect_uri,\n id_token_hint: hint,\n },\n };\n\n Object.entries(target.query).forEach(([key, value]) => {\n if (value === null || value === undefined) {\n delete target.query[key];\n }\n });\n\n return url.format(target);\n }\n\n /**\n * @name callbackParams\n * @api public\n */\n callbackParams(input) { // eslint-disable-line class-methods-use-this\n const isIncomingMessage = input instanceof stdhttp.IncomingMessage\n || (input && input.method && input.url);\n const isString = typeof input === 'string';\n\n if (!isString && !isIncomingMessage) {\n throw new TypeError('#callbackParams only accepts string urls, http.IncomingMessage or a lookalike');\n }\n\n if (isIncomingMessage) {\n switch (input.method) {\n case 'GET':\n return pickCb(url.parse(input.url, true).query);\n case 'POST':\n if (input.body === undefined) {\n throw new TypeError('incoming message body missing, include a body parser prior to this method call');\n }\n switch (typeof input.body) {\n case 'object':\n case 'string':\n if (Buffer.isBuffer(input.body)) {\n return pickCb(querystring.parse(input.body.toString('utf-8')));\n }\n if (typeof input.body === 'string') {\n return pickCb(querystring.parse(input.body));\n }\n\n return pickCb(input.body);\n default:\n throw new TypeError('invalid IncomingMessage body object');\n }\n default:\n throw new TypeError('invalid IncomingMessage method');\n }\n } else {\n return pickCb(url.parse(input, true).query);\n }\n }\n\n /**\n * @name callback\n * @api public\n */\n async callback(\n redirectUri,\n parameters,\n checks = {},\n { exchangeBody, clientAssertionPayload, DPoP } = {},\n ) {\n let params = pickCb(parameters);\n\n if (checks.jarm && !('response' in parameters)) {\n throw new RPError({\n message: 'expected a JARM response',\n checks,\n params,\n });\n } else if ('response' in parameters) {\n const decrypted = await this.decryptJARM(params.response);\n params = await this.validateJARM(decrypted);\n }\n\n if (this.default_max_age && !checks.max_age) {\n checks.max_age = this.default_max_age;\n }\n\n if (params.state && !checks.state) {\n throw new TypeError('checks.state argument is missing');\n }\n\n if (!params.state && checks.state) {\n throw new RPError({\n message: 'state missing from the response',\n checks,\n params,\n });\n }\n\n if (checks.state !== params.state) {\n throw new RPError({\n printf: ['state mismatch, expected %s, got: %s', checks.state, params.state],\n checks,\n params,\n });\n }\n\n if (params.error) {\n throw new OPError(params);\n }\n\n const RESPONSE_TYPE_REQUIRED_PARAMS = {\n code: ['code'],\n id_token: ['id_token'],\n token: ['access_token', 'token_type'],\n };\n\n if (checks.response_type) {\n for (const type of checks.response_type.split(' ')) { // eslint-disable-line no-restricted-syntax\n if (type === 'none') {\n if (params.code || params.id_token || params.access_token) {\n throw new RPError({\n message: 'unexpected params encountered for \"none\" response',\n checks,\n params,\n });\n }\n } else {\n for (const param of RESPONSE_TYPE_REQUIRED_PARAMS[type]) { // eslint-disable-line no-restricted-syntax, max-len\n if (!params[param]) {\n throw new RPError({\n message: `${param} missing from response`,\n checks,\n params,\n });\n }\n }\n }\n }\n }\n\n if (params.id_token) {\n const tokenset = new TokenSet(params);\n await this.decryptIdToken(tokenset);\n await this.validateIdToken(tokenset, checks.nonce, 'authorization', checks.max_age, checks.state);\n\n if (!params.code) {\n return tokenset;\n }\n }\n\n if (params.code) {\n const tokenset = await this.grant({\n ...exchangeBody,\n grant_type: 'authorization_code',\n code: params.code,\n redirect_uri: redirectUri,\n code_verifier: checks.code_verifier,\n }, { clientAssertionPayload, DPoP });\n\n await this.decryptIdToken(tokenset);\n await this.validateIdToken(tokenset, checks.nonce, 'token', checks.max_age);\n\n if (params.session_state) {\n tokenset.session_state = params.session_state;\n }\n\n return tokenset;\n }\n\n return new TokenSet(params);\n }\n\n /**\n * @name oauthCallback\n * @api public\n */\n async oauthCallback(\n redirectUri,\n parameters,\n checks = {},\n { exchangeBody, clientAssertionPayload, DPoP } = {},\n ) {\n let params = pickCb(parameters);\n\n if (checks.jarm && !('response' in parameters)) {\n throw new RPError({\n message: 'expected a JARM response',\n checks,\n params,\n });\n } else if ('response' in parameters) {\n const decrypted = await this.decryptJARM(params.response);\n params = await this.validateJARM(decrypted);\n }\n\n if (params.state && !checks.state) {\n throw new TypeError('checks.state argument is missing');\n }\n\n if (!params.state && checks.state) {\n throw new RPError({\n message: 'state missing from the response',\n checks,\n params,\n });\n }\n\n if (checks.state !== params.state) {\n throw new RPError({\n printf: ['state mismatch, expected %s, got: %s', checks.state, params.state],\n checks,\n params,\n });\n }\n\n if (params.error) {\n throw new OPError(params);\n }\n\n const RESPONSE_TYPE_REQUIRED_PARAMS = {\n code: ['code'],\n token: ['access_token', 'token_type'],\n };\n\n if (checks.response_type) {\n for (const type of checks.response_type.split(' ')) { // eslint-disable-line no-restricted-syntax\n if (type === 'none') {\n if (params.code || params.id_token || params.access_token) {\n throw new RPError({\n message: 'unexpected params encountered for \"none\" response',\n checks,\n params,\n });\n }\n }\n\n if (RESPONSE_TYPE_REQUIRED_PARAMS[type]) {\n for (const param of RESPONSE_TYPE_REQUIRED_PARAMS[type]) { // eslint-disable-line no-restricted-syntax, max-len\n if (!params[param]) {\n throw new RPError({\n message: `${param} missing from response`,\n checks,\n params,\n });\n }\n }\n }\n }\n }\n\n if (params.code) {\n return this.grant({\n ...exchangeBody,\n grant_type: 'authorization_code',\n code: params.code,\n redirect_uri: redirectUri,\n code_verifier: checks.code_verifier,\n }, { clientAssertionPayload, DPoP });\n }\n\n return new TokenSet(params);\n }\n\n /**\n * @name decryptIdToken\n * @api private\n */\n async decryptIdToken(token) {\n if (!this.id_token_encrypted_response_alg) {\n return token;\n }\n\n let idToken = token;\n\n if (idToken instanceof TokenSet) {\n if (!idToken.id_token) {\n throw new TypeError('id_token not present in TokenSet');\n }\n idToken = idToken.id_token;\n }\n\n const expectedAlg = this.id_token_encrypted_response_alg;\n const expectedEnc = this.id_token_encrypted_response_enc;\n\n const result = await this.decryptJWE(idToken, expectedAlg, expectedEnc);\n\n if (token instanceof TokenSet) {\n token.id_token = result;\n return token;\n }\n\n return result;\n }\n\n async validateJWTUserinfo(body) {\n const expectedAlg = this.userinfo_signed_response_alg;\n\n return this.validateJWT(body, expectedAlg, []);\n }\n\n /**\n * @name decryptJARM\n * @api private\n */\n async decryptJARM(response) {\n if (!this.authorization_encrypted_response_alg) {\n return response;\n }\n\n const expectedAlg = this.authorization_encrypted_response_alg;\n const expectedEnc = this.authorization_encrypted_response_enc;\n\n return this.decryptJWE(response, expectedAlg, expectedEnc);\n }\n\n /**\n * @name decryptJWTUserinfo\n * @api private\n */\n async decryptJWTUserinfo(body) {\n if (!this.userinfo_encrypted_response_alg) {\n return body;\n }\n\n const expectedAlg = this.userinfo_encrypted_response_alg;\n const expectedEnc = this.userinfo_encrypted_response_enc;\n\n return this.decryptJWE(body, expectedAlg, expectedEnc);\n }\n\n /**\n * @name decryptJWE\n * @api private\n */\n async decryptJWE(jwe, expectedAlg, expectedEnc = 'A128CBC-HS256') {\n const header = JSON.parse(base64url.decode(jwe.split('.')[0]));\n\n if (header.alg !== expectedAlg) {\n throw new RPError({\n printf: ['unexpected JWE alg received, expected %s, got: %s', expectedAlg, header.alg],\n jwt: jwe,\n });\n }\n\n if (header.enc !== expectedEnc) {\n throw new RPError({\n printf: ['unexpected JWE enc received, expected %s, got: %s', expectedEnc, header.enc],\n jwt: jwe,\n });\n }\n\n let keyOrStore;\n\n if (expectedAlg.match(/^(?:RSA|ECDH)/)) {\n keyOrStore = instance(this).get('keystore');\n } else {\n keyOrStore = await this.joseSecret(expectedAlg === 'dir' ? expectedEnc : expectedAlg);\n }\n\n const payload = jose.JWE.decrypt(jwe, keyOrStore);\n return payload.toString('utf8');\n }\n\n /**\n * @name validateIdToken\n * @api private\n */\n async validateIdToken(tokenSet, nonce, returnedBy, maxAge, state) {\n let idToken = tokenSet;\n\n const expectedAlg = this.id_token_signed_response_alg;\n\n const isTokenSet = idToken instanceof TokenSet;\n\n if (isTokenSet) {\n if (!idToken.id_token) {\n throw new TypeError('id_token not present in TokenSet');\n }\n idToken = idToken.id_token;\n }\n\n idToken = String(idToken);\n\n const timestamp = now();\n const { protected: header, payload, key } = await this.validateJWT(idToken, expectedAlg);\n\n if (maxAge || (maxAge !== null && this.require_auth_time)) {\n if (!payload.auth_time) {\n throw new RPError({\n message: 'missing required JWT property auth_time',\n jwt: idToken,\n });\n }\n if (typeof payload.auth_time !== 'number') {\n throw new RPError({\n message: 'JWT auth_time claim must be a JSON numeric value',\n jwt: idToken,\n });\n }\n }\n\n if (maxAge && (payload.auth_time + maxAge < timestamp - this[CLOCK_TOLERANCE])) {\n throw new RPError({\n printf: ['too much time has elapsed since the last End-User authentication, max_age %i, auth_time: %i, now %i', maxAge, payload.auth_time, timestamp - this[CLOCK_TOLERANCE]],\n now: timestamp,\n tolerance: this[CLOCK_TOLERANCE],\n auth_time: payload.auth_time,\n jwt: idToken,\n });\n }\n\n if (nonce !== null && (payload.nonce || nonce !== undefined) && payload.nonce !== nonce) {\n throw new RPError({\n printf: ['nonce mismatch, expected %s, got: %s', nonce, payload.nonce],\n jwt: idToken,\n });\n }\n\n const fapi = this.constructor.name === 'FAPIClient';\n\n if (returnedBy === 'authorization') {\n if (!payload.at_hash && tokenSet.access_token) {\n throw new RPError({\n message: 'missing required property at_hash',\n jwt: idToken,\n });\n }\n\n if (!payload.c_hash && tokenSet.code) {\n throw new RPError({\n message: 'missing required property c_hash',\n jwt: idToken,\n });\n }\n\n if (fapi) {\n if (!payload.s_hash && (tokenSet.state || state)) {\n throw new RPError({\n message: 'missing required property s_hash',\n jwt: idToken,\n });\n }\n }\n\n if (payload.s_hash) {\n if (!state) {\n throw new TypeError('cannot verify s_hash, \"checks.state\" property not provided');\n }\n\n try {\n tokenHash.validate({ claim: 's_hash', source: 'state' }, payload.s_hash, state, header.alg, key && key.crv);\n } catch (err) {\n throw new RPError({ message: err.message, jwt: idToken });\n }\n }\n }\n\n if (fapi && payload.iat < timestamp - 3600) {\n throw new RPError({\n printf: ['JWT issued too far in the past, now %i, iat %i', timestamp, payload.iat],\n now: timestamp,\n tolerance: this[CLOCK_TOLERANCE],\n iat: payload.iat,\n jwt: idToken,\n });\n }\n\n if (tokenSet.access_token && payload.at_hash !== undefined) {\n try {\n tokenHash.validate({ claim: 'at_hash', source: 'access_token' }, payload.at_hash, tokenSet.access_token, header.alg, key && key.crv);\n } catch (err) {\n throw new RPError({ message: err.message, jwt: idToken });\n }\n }\n\n if (tokenSet.code && payload.c_hash !== undefined) {\n try {\n tokenHash.validate({ claim: 'c_hash', source: 'code' }, payload.c_hash, tokenSet.code, header.alg, key && key.crv);\n } catch (err) {\n throw new RPError({ message: err.message, jwt: idToken });\n }\n }\n\n return tokenSet;\n }\n\n /**\n * @name validateJWT\n * @api private\n */\n async validateJWT(jwt, expectedAlg, required = ['iss', 'sub', 'aud', 'exp', 'iat']) {\n const isSelfIssued = this.issuer.issuer === 'https://self-issued.me';\n const timestamp = now();\n let header;\n let payload;\n try {\n ({ header, payload } = jose.JWT.decode(jwt, { complete: true }));\n } catch (err) {\n throw new RPError({\n printf: ['failed to decode JWT (%s: %s)', err.name, err.message],\n jwt,\n });\n }\n\n if (header.alg !== expectedAlg) {\n throw new RPError({\n printf: ['unexpected JWT alg received, expected %s, got: %s', expectedAlg, header.alg],\n jwt,\n });\n }\n\n if (isSelfIssued) {\n required = [...required, 'sub_jwk']; // eslint-disable-line no-param-reassign\n }\n\n required.forEach(verifyPresence.bind(undefined, payload, jwt));\n\n if (payload.iss !== undefined) {\n let expectedIss = this.issuer.issuer;\n\n if (aadIssValidation) {\n expectedIss = this.issuer.issuer.replace('{tenantid}', payload.tid);\n }\n\n if (payload.iss !== expectedIss) {\n throw new RPError({\n printf: ['unexpected iss value, expected %s, got: %s', expectedIss, payload.iss],\n jwt,\n });\n }\n }\n\n if (payload.iat !== undefined) {\n if (typeof payload.iat !== 'number') {\n throw new RPError({\n message: 'JWT iat claim must be a JSON numeric value',\n jwt,\n });\n }\n }\n\n if (payload.nbf !== undefined) {\n if (typeof payload.nbf !== 'number') {\n throw new RPError({\n message: 'JWT nbf claim must be a JSON numeric value',\n jwt,\n });\n }\n if (payload.nbf > timestamp + this[CLOCK_TOLERANCE]) {\n throw new RPError({\n printf: ['JWT not active yet, now %i, nbf %i', timestamp + this[CLOCK_TOLERANCE], payload.nbf],\n now: timestamp,\n tolerance: this[CLOCK_TOLERANCE],\n nbf: payload.nbf,\n jwt,\n });\n }\n }\n\n if (payload.exp !== undefined) {\n if (typeof payload.exp !== 'number') {\n throw new RPError({\n message: 'JWT exp claim must be a JSON numeric value',\n jwt,\n });\n }\n if (timestamp - this[CLOCK_TOLERANCE] >= payload.exp) {\n throw new RPError({\n printf: ['JWT expired, now %i, exp %i', timestamp - this[CLOCK_TOLERANCE], payload.exp],\n now: timestamp,\n tolerance: this[CLOCK_TOLERANCE],\n exp: payload.exp,\n jwt,\n });\n }\n }\n\n if (payload.aud !== undefined) {\n if (Array.isArray(payload.aud)) {\n if (payload.aud.length > 1 && !payload.azp) {\n throw new RPError({\n message: 'missing required JWT property azp',\n jwt,\n });\n }\n\n if (!payload.aud.includes(this.client_id)) {\n throw new RPError({\n printf: ['aud is missing the client_id, expected %s to be included in %j', this.client_id, payload.aud],\n jwt,\n });\n }\n } else if (payload.aud !== this.client_id) {\n throw new RPError({\n printf: ['aud mismatch, expected %s, got: %s', this.client_id, payload.aud],\n jwt,\n });\n }\n }\n\n if (payload.azp !== undefined) {\n let { additionalAuthorizedParties } = instance(this).get('options') || {};\n\n if (typeof additionalAuthorizedParties === 'string') {\n additionalAuthorizedParties = [this.client_id, additionalAuthorizedParties];\n } else if (Array.isArray(additionalAuthorizedParties)) {\n additionalAuthorizedParties = [this.client_id, ...additionalAuthorizedParties];\n } else {\n additionalAuthorizedParties = [this.client_id];\n }\n\n if (!additionalAuthorizedParties.includes(payload.azp)) {\n throw new RPError({\n printf: ['azp mismatch, got: %s', payload.azp],\n jwt,\n });\n }\n }\n\n let key;\n\n if (isSelfIssued) {\n try {\n assert(isPlainObject(payload.sub_jwk));\n key = jose.JWK.asKey(payload.sub_jwk);\n assert.equal(key.type, 'public');\n } catch (err) {\n throw new RPError({\n message: 'failed to use sub_jwk claim as an asymmetric JSON Web Key',\n jwt,\n });\n }\n if (key.thumbprint !== payload.sub) {\n throw new RPError({\n message: 'failed to match the subject with sub_jwk',\n jwt,\n });\n }\n } else if (header.alg.startsWith('HS')) {\n key = await this.joseSecret();\n } else if (header.alg !== 'none') {\n key = await this.issuer.queryKeyStore(header);\n }\n\n if (!key && header.alg === 'none') {\n return { protected: header, payload };\n }\n\n try {\n return {\n ...jose.JWS.verify(jwt, key, { complete: true }),\n payload,\n };\n } catch (err) {\n throw new RPError({\n message: 'failed to validate JWT signature',\n jwt,\n });\n }\n }\n\n /**\n * @name refresh\n * @api public\n */\n async refresh(refreshToken, { exchangeBody, clientAssertionPayload, DPoP } = {}) {\n let token = refreshToken;\n\n if (token instanceof TokenSet) {\n if (!token.refresh_token) {\n throw new TypeError('refresh_token not present in TokenSet');\n }\n token = token.refresh_token;\n }\n\n const tokenset = await this.grant({\n ...exchangeBody,\n grant_type: 'refresh_token',\n refresh_token: String(token),\n }, { clientAssertionPayload, DPoP });\n\n if (tokenset.id_token) {\n await this.decryptIdToken(tokenset);\n await this.validateIdToken(tokenset, null, 'token', null);\n\n if (refreshToken instanceof TokenSet && refreshToken.id_token) {\n const expectedSub = refreshToken.claims().sub;\n const actualSub = tokenset.claims().sub;\n if (actualSub !== expectedSub) {\n throw new RPError({\n printf: ['sub mismatch, expected %s, got: %s', expectedSub, actualSub],\n jwt: tokenset.id_token,\n });\n }\n }\n }\n\n return tokenset;\n }\n\n async requestResource(\n resourceUrl,\n accessToken,\n {\n method,\n headers,\n body,\n DPoP,\n // eslint-disable-next-line no-nested-ternary\n tokenType = DPoP ? 'DPoP' : accessToken instanceof TokenSet ? accessToken.token_type : 'Bearer',\n } = {},\n ) {\n if (accessToken instanceof TokenSet) {\n if (!accessToken.access_token) {\n throw new TypeError('access_token not present in TokenSet');\n }\n accessToken = accessToken.access_token; // eslint-disable-line no-param-reassign\n }\n\n const requestOpts = {\n headers: {\n Authorization: authorizationHeaderValue(accessToken, tokenType),\n ...headers,\n },\n body,\n };\n\n const mTLS = !!this.tls_client_certificate_bound_access_tokens;\n\n return request.call(this, {\n ...requestOpts,\n responseType: 'buffer',\n method,\n url: resourceUrl,\n }, { accessToken, mTLS, DPoP });\n }\n\n /**\n * @name userinfo\n * @api public\n */\n async userinfo(accessToken, {\n method = 'GET', via = 'header', tokenType, params, DPoP,\n } = {}) {\n assertIssuerConfiguration(this.issuer, 'userinfo_endpoint');\n const options = {\n tokenType,\n method: String(method).toUpperCase(),\n DPoP,\n };\n\n if (options.method !== 'GET' && options.method !== 'POST') {\n throw new TypeError('#userinfo() method can only be POST or a GET');\n }\n\n if (via === 'query' && options.method !== 'GET') {\n throw new TypeError('userinfo endpoints will only parse query strings for GET requests');\n } else if (via === 'body' && options.method !== 'POST') {\n throw new TypeError('can only send body on POST');\n }\n\n const jwt = !!(this.userinfo_signed_response_alg || this.userinfo_encrypted_response_alg);\n\n if (jwt) {\n options.headers = { Accept: 'application/jwt' };\n } else {\n options.headers = { Accept: 'application/json' };\n }\n\n const mTLS = !!this.tls_client_certificate_bound_access_tokens;\n\n let targetUrl;\n if (mTLS && this.issuer.mtls_endpoint_aliases) {\n targetUrl = this.issuer.mtls_endpoint_aliases.userinfo_endpoint;\n }\n\n targetUrl = new url.URL(targetUrl || this.issuer.userinfo_endpoint);\n\n // when via is not header we clear the Authorization header and add either\n // query string parameters or urlencoded body access_token parameter\n if (via === 'query') {\n options.headers.Authorization = undefined;\n targetUrl.searchParams.append('access_token', accessToken instanceof TokenSet ? accessToken.access_token : accessToken);\n } else if (via === 'body') {\n options.headers.Authorization = undefined;\n options.headers['Content-Type'] = 'application/x-www-form-urlencoded';\n options.body = new url.URLSearchParams();\n options.body.append('access_token', accessToken instanceof TokenSet ? accessToken.access_token : accessToken);\n }\n\n // handle additional parameters, GET via querystring, POST via urlencoded body\n if (params) {\n if (options.method === 'GET') {\n Object.entries(params).forEach(([key, value]) => {\n targetUrl.searchParams.append(key, value);\n });\n } else if (options.body) { // POST && via body\n Object.entries(params).forEach(([key, value]) => {\n options.body.append(key, value);\n });\n } else { // POST && via header\n options.body = new url.URLSearchParams();\n options.headers['Content-Type'] = 'application/x-www-form-urlencoded';\n Object.entries(params).forEach(([key, value]) => {\n options.body.append(key, value);\n });\n }\n }\n\n if (options.body) {\n options.body = options.body.toString();\n }\n\n const response = await this.requestResource(targetUrl, accessToken, options);\n\n let parsed = processResponse(response, { bearer: true });\n\n if (jwt) {\n if (!JWT_CONTENT.test(response.headers['content-type'])) {\n throw new RPError({\n message: 'expected application/jwt response from the userinfo_endpoint',\n response,\n });\n }\n\n const body = response.body.toString();\n const userinfo = await this.decryptJWTUserinfo(body);\n if (!this.userinfo_signed_response_alg) {\n try {\n parsed = JSON.parse(userinfo);\n assert(isPlainObject(parsed));\n } catch (err) {\n throw new RPError({\n message: 'failed to parse userinfo JWE payload as JSON',\n jwt: userinfo,\n });\n }\n } else {\n ({ payload: parsed } = await this.validateJWTUserinfo(userinfo));\n }\n } else {\n try {\n parsed = JSON.parse(response.body);\n } catch (error) {\n throw new ParseError(error, response);\n }\n }\n\n if (accessToken instanceof TokenSet && accessToken.id_token) {\n const expectedSub = accessToken.claims().sub;\n if (parsed.sub !== expectedSub) {\n throw new RPError({\n printf: ['userinfo sub mismatch, expected %s, got: %s', expectedSub, parsed.sub],\n body: parsed,\n jwt: accessToken.id_token,\n });\n }\n }\n\n return parsed;\n }\n\n /**\n * @name derivedKey\n * @api private\n */\n async derivedKey(len) {\n const cacheKey = `${len}_key`;\n if (instance(this).has(cacheKey)) {\n return instance(this).get(cacheKey);\n }\n\n const hash = len <= 256 ? 'sha256' : len <= 384 ? 'sha384' : len <= 512 ? 'sha512' : false; // eslint-disable-line no-nested-ternary\n if (!hash) {\n throw new Error('unsupported symmetric encryption key derivation');\n }\n\n const derivedBuffer = crypto.createHash(hash)\n .update(this.client_secret)\n .digest()\n .slice(0, len / 8);\n\n const key = jose.JWK.asKey({ k: base64url.encode(derivedBuffer), kty: 'oct' });\n instance(this).set(cacheKey, key);\n\n return key;\n }\n\n /**\n * @name joseSecret\n * @api private\n */\n async joseSecret(alg) {\n if (!this.client_secret) {\n throw new TypeError('client_secret is required');\n }\n if (/^A(\\d{3})(?:GCM)?KW$/.test(alg)) {\n return this.derivedKey(parseInt(RegExp.$1, 10));\n }\n\n if (/^A(\\d{3})(?:GCM|CBC-HS(\\d{3}))$/.test(alg)) {\n return this.derivedKey(parseInt(RegExp.$2 || RegExp.$1, 10));\n }\n\n if (instance(this).has('jose_secret')) {\n return instance(this).get('jose_secret');\n }\n\n const key = jose.JWK.asKey({ k: base64url.encode(this.client_secret), kty: 'oct' });\n instance(this).set('jose_secret', key);\n\n return key;\n }\n\n /**\n * @name grant\n * @api public\n */\n async grant(body, { clientAssertionPayload, DPoP } = {}) {\n assertIssuerConfiguration(this.issuer, 'token_endpoint');\n const response = await authenticatedPost.call(\n this,\n 'token',\n {\n form: body,\n responseType: 'json',\n },\n { clientAssertionPayload, DPoP },\n );\n const responseBody = processResponse(response);\n\n return new TokenSet(responseBody);\n }\n\n /**\n * @name deviceAuthorization\n * @api public\n */\n async deviceAuthorization(params = {}, { exchangeBody, clientAssertionPayload, DPoP } = {}) {\n assertIssuerConfiguration(this.issuer, 'device_authorization_endpoint');\n assertIssuerConfiguration(this.issuer, 'token_endpoint');\n\n const body = authorizationParams.call(this, {\n client_id: this.client_id,\n redirect_uri: null,\n response_type: null,\n ...params,\n });\n\n const response = await authenticatedPost.call(\n this,\n 'device_authorization',\n {\n responseType: 'json',\n form: body,\n },\n { clientAssertionPayload, endpointAuthMethod: 'token' },\n );\n const responseBody = processResponse(response);\n\n return new DeviceFlowHandle({\n client: this,\n exchangeBody,\n clientAssertionPayload,\n response: responseBody,\n maxAge: params.max_age,\n DPoP,\n });\n }\n\n /**\n * @name revoke\n * @api public\n */\n async revoke(token, hint, { revokeBody, clientAssertionPayload } = {}) {\n assertIssuerConfiguration(this.issuer, 'revocation_endpoint');\n if (hint !== undefined && typeof hint !== 'string') {\n throw new TypeError('hint must be a string');\n }\n\n const form = { ...revokeBody, token };\n\n if (hint) {\n form.token_type_hint = hint;\n }\n\n const response = await authenticatedPost.call(\n this,\n 'revocation', {\n form,\n }, { clientAssertionPayload },\n );\n processResponse(response, { body: false });\n }\n\n /**\n * @name introspect\n * @api public\n */\n async introspect(token, hint, { introspectBody, clientAssertionPayload } = {}) {\n assertIssuerConfiguration(this.issuer, 'introspection_endpoint');\n if (hint !== undefined && typeof hint !== 'string') {\n throw new TypeError('hint must be a string');\n }\n\n const form = { ...introspectBody, token };\n if (hint) {\n form.token_type_hint = hint;\n }\n\n const response = await authenticatedPost.call(\n this,\n 'introspection',\n { form, responseType: 'json' },\n { clientAssertionPayload },\n );\n\n const responseBody = processResponse(response);\n\n return responseBody;\n }\n\n /**\n * @name fetchDistributedClaims\n * @api public\n */\n async fetchDistributedClaims(claims, tokens = {}) {\n if (!isPlainObject(claims)) {\n throw new TypeError('claims argument must be a plain object');\n }\n\n if (!isPlainObject(claims._claim_sources)) {\n return claims;\n }\n\n if (!isPlainObject(claims._claim_names)) {\n return claims;\n }\n\n const distributedSources = Object.entries(claims._claim_sources)\n .filter(([, value]) => value && value.endpoint);\n\n await Promise.all(distributedSources.map(async ([sourceName, def]) => {\n try {\n const requestOpts = {\n headers: {\n Accept: 'application/jwt',\n Authorization: authorizationHeaderValue(def.access_token || tokens[sourceName]),\n },\n };\n\n const response = await request.call(this, {\n ...requestOpts,\n method: 'GET',\n url: def.endpoint,\n });\n const body = processResponse(response, { bearer: true });\n\n const decoded = await claimJWT.call(this, 'distributed', body);\n delete claims._claim_sources[sourceName];\n Object.entries(claims._claim_names).forEach(\n assignClaim(claims, decoded, sourceName, false),\n );\n } catch (err) {\n err.src = sourceName;\n throw err;\n }\n }));\n\n cleanUpClaims(claims);\n return claims;\n }\n\n /**\n * @name unpackAggregatedClaims\n * @api public\n */\n async unpackAggregatedClaims(claims) {\n if (!isPlainObject(claims)) {\n throw new TypeError('claims argument must be a plain object');\n }\n\n if (!isPlainObject(claims._claim_sources)) {\n return claims;\n }\n\n if (!isPlainObject(claims._claim_names)) {\n return claims;\n }\n\n const aggregatedSources = Object.entries(claims._claim_sources)\n .filter(([, value]) => value && value.JWT);\n\n await Promise.all(aggregatedSources.map(async ([sourceName, def]) => {\n try {\n const decoded = await claimJWT.call(this, 'aggregated', def.JWT);\n delete claims._claim_sources[sourceName];\n Object.entries(claims._claim_names).forEach(assignClaim(claims, decoded, sourceName));\n } catch (err) {\n err.src = sourceName;\n throw err;\n }\n }));\n\n cleanUpClaims(claims);\n return claims;\n }\n\n /**\n * @name register\n * @api public\n */\n static async register(metadata, options = {}) {\n const { initialAccessToken, jwks, ...clientOptions } = options;\n\n assertIssuerConfiguration(this.issuer, 'registration_endpoint');\n\n if (jwks !== undefined && !(metadata.jwks || metadata.jwks_uri)) {\n const keystore = getKeystore.call(this, jwks);\n metadata.jwks = keystore.toJWKS(false);\n // eslint-disable-next-line no-restricted-syntax\n for (const jwk of metadata.jwks.keys) {\n if (jwk.kid.startsWith('DONOTUSE.')) {\n delete jwk.kid;\n }\n }\n }\n\n const response = await request.call(this, {\n headers: initialAccessToken ? {\n Authorization: authorizationHeaderValue(initialAccessToken),\n } : undefined,\n responseType: 'json',\n json: metadata,\n url: this.issuer.registration_endpoint,\n method: 'POST',\n });\n const responseBody = processResponse(response, { statusCode: 201, bearer: true });\n\n return new this(responseBody, jwks, clientOptions);\n }\n\n /**\n * @name metadata\n * @api public\n */\n get metadata() {\n const copy = {};\n instance(this).get('metadata').forEach((value, key) => {\n copy[key] = value;\n });\n return copy;\n }\n\n /**\n * @name fromUri\n * @api public\n */\n static async fromUri(registrationClientUri, registrationAccessToken, jwks, clientOptions) {\n const response = await request.call(this, {\n method: 'GET',\n url: registrationClientUri,\n responseType: 'json',\n headers: { Authorization: authorizationHeaderValue(registrationAccessToken) },\n });\n const responseBody = processResponse(response, { bearer: true });\n\n return new this(responseBody, jwks, clientOptions);\n }\n\n /**\n * @name requestObject\n * @api public\n */\n async requestObject(requestObject = {}, {\n sign: signingAlgorithm = this.request_object_signing_alg || 'none',\n encrypt: {\n alg: eKeyManagement = this.request_object_encryption_alg,\n enc: eContentEncryption = this.request_object_encryption_enc || 'A128CBC-HS256',\n } = {},\n } = {}) {\n if (!isPlainObject(requestObject)) {\n throw new TypeError('requestObject must be a plain object');\n }\n\n let signed;\n let key;\n\n const fapi = this.constructor.name === 'FAPIClient';\n const unix = now();\n const header = { alg: signingAlgorithm, typ: 'oauth-authz-req+jwt' };\n const payload = JSON.stringify(defaults({}, requestObject, {\n iss: this.client_id,\n aud: this.issuer.issuer,\n client_id: this.client_id,\n jti: random(),\n iat: unix,\n exp: unix + 300,\n ...(fapi ? { nbf: unix } : undefined),\n }));\n\n if (signingAlgorithm === 'none') {\n signed = [\n base64url.encode(JSON.stringify(header)),\n base64url.encode(payload),\n '',\n ].join('.');\n } else {\n const symmetric = signingAlgorithm.startsWith('HS');\n if (symmetric) {\n key = await this.joseSecret();\n } else {\n const keystore = instance(this).get('keystore');\n\n if (!keystore) {\n throw new TypeError(`no keystore present for client, cannot sign using alg ${signingAlgorithm}`);\n }\n key = keystore.get({ alg: signingAlgorithm, use: 'sig' });\n if (!key) {\n throw new TypeError(`no key to sign with found for alg ${signingAlgorithm}`);\n }\n }\n\n signed = jose.JWS.sign(payload, key, {\n ...header,\n kid: symmetric || key.kid.startsWith('DONOTUSE.') ? undefined : key.kid,\n });\n }\n\n if (!eKeyManagement) {\n return signed;\n }\n\n const fields = { alg: eKeyManagement, enc: eContentEncryption, cty: 'oauth-authz-req+jwt' };\n\n if (fields.alg.match(/^(RSA|ECDH)/)) {\n [key] = await this.issuer.queryKeyStore({\n alg: fields.alg,\n enc: fields.enc,\n use: 'enc',\n }, { allowMulti: true });\n } else {\n key = await this.joseSecret(fields.alg === 'dir' ? fields.enc : fields.alg);\n }\n\n return jose.JWE.encrypt(signed, key, {\n ...fields,\n kid: key.kty === 'oct' ? undefined : key.kid,\n });\n }\n\n /**\n * @name pushedAuthorizationRequest\n * @api public\n */\n async pushedAuthorizationRequest(params = {}, { clientAssertionPayload } = {}) {\n assertIssuerConfiguration(this.issuer, 'pushed_authorization_request_endpoint');\n\n const body = {\n ...('request' in params ? params : authorizationParams.call(this, params)),\n client_id: this.client_id,\n };\n\n const response = await authenticatedPost.call(\n this,\n 'pushed_authorization_request',\n {\n responseType: 'json',\n form: body,\n },\n { clientAssertionPayload, endpointAuthMethod: 'token' },\n );\n const responseBody = processResponse(response, { statusCode: 201 });\n\n if (!('expires_in' in responseBody)) {\n throw new RPError({\n message: 'expected expires_in in Pushed Authorization Successful Response',\n response,\n });\n }\n if (typeof responseBody.expires_in !== 'number') {\n throw new RPError({\n message: 'invalid expires_in value in Pushed Authorization Successful Response',\n response,\n });\n }\n if (!('request_uri' in responseBody)) {\n throw new RPError({\n message: 'expected request_uri in Pushed Authorization Successful Response',\n response,\n });\n }\n if (typeof responseBody.request_uri !== 'string') {\n throw new RPError({\n message: 'invalid request_uri value in Pushed Authorization Successful Response',\n response,\n });\n }\n\n return responseBody;\n }\n\n /**\n * @name issuer\n * @api public\n */\n static get issuer() {\n return issuer;\n }\n\n /**\n * @name issuer\n * @api public\n */\n get issuer() { // eslint-disable-line class-methods-use-this\n return issuer;\n }\n\n /* istanbul ignore next */\n [inspect.custom]() {\n return `${this.constructor.name} ${inspect(this.metadata, {\n depth: Infinity,\n colors: process.stdout.isTTY,\n compact: false,\n sorted: true,\n })}`;\n }\n};\n\n/**\n * @name validateJARM\n * @api private\n */\nasync function validateJARM(response) {\n const expectedAlg = this.authorization_signed_response_alg;\n const { payload } = await this.validateJWT(response, expectedAlg, ['iss', 'exp', 'aud']);\n return pickCb(payload);\n}\n\nObject.defineProperty(BaseClient.prototype, 'validateJARM', {\n enumerable: true,\n configurable: true,\n value(...args) {\n process.emitWarning(\n \"The JARM API implements an OIDF implementer's draft. Breaking draft implementations are included as minor versions of the openid-client library, therefore, the ~ semver operator should be used and close attention be payed to library changelog as well as the drafts themselves.\",\n 'DraftWarning',\n );\n Object.defineProperty(BaseClient.prototype, 'validateJARM', {\n enumerable: true,\n configurable: true,\n value: validateJARM,\n });\n return this.validateJARM(...args);\n },\n});\n\n/**\n * @name dpopProof\n * @api private\n */\nfunction dpopProof(payload, jwk, accessToken) {\n if (!isPlainObject(payload)) {\n throw new TypeError('payload must be a plain object');\n }\n\n let key;\n try {\n key = jose.JWK.asKey(jwk);\n assert(key.type === 'private');\n } catch (err) {\n throw new TypeError('\"DPoP\" option must be an asymmetric private key to sign the DPoP Proof JWT with');\n }\n\n let { alg } = key;\n\n if (!alg && this.issuer.dpop_signing_alg_values_supported) {\n const algs = key.algorithms('sign');\n alg = this.issuer.dpop_signing_alg_values_supported.find((a) => algs.has(a));\n }\n\n if (!alg) {\n [alg] = key.algorithms('sign');\n }\n\n return jose.JWS.sign({\n iat: now(),\n jti: random(),\n ath: accessToken ? base64url.encode(crypto.createHash('sha256').update(accessToken).digest()) : undefined,\n ...payload,\n }, jwk, {\n alg,\n typ: 'dpop+jwt',\n jwk: pick(key, 'kty', 'crv', 'x', 'y', 'e', 'n'),\n });\n}\n\nObject.defineProperty(BaseClient.prototype, 'dpopProof', {\n enumerable: true,\n configurable: true,\n value(...args) {\n process.emitWarning(\n 'The DPoP APIs implements an IETF draft (https://www.ietf.org/archive/id/draft-ietf-oauth-dpop-03.html). Breaking draft implementations are included as minor versions of the openid-client library, therefore, the ~ semver operator should be used and close attention be payed to library changelog as well as the drafts themselves.',\n 'DraftWarning',\n );\n Object.defineProperty(BaseClient.prototype, 'dpopProof', {\n enumerable: true,\n configurable: true,\n value: dpopProof,\n });\n return this.dpopProof(...args);\n },\n});\n\nmodule.exports.BaseClient = BaseClient;\n","/* eslint-disable camelcase */\nconst { inspect } = require('util');\n\nconst { RPError, OPError } = require('./errors');\nconst instance = require('./helpers/weak_cache');\nconst now = require('./helpers/unix_timestamp');\nconst { authenticatedPost } = require('./helpers/client');\nconst processResponse = require('./helpers/process_response');\nconst TokenSet = require('./token_set');\n\nclass DeviceFlowHandle {\n constructor({\n client, exchangeBody, clientAssertionPayload, response, maxAge, DPoP,\n }) {\n ['verification_uri', 'user_code', 'device_code'].forEach((prop) => {\n if (typeof response[prop] !== 'string' || !response[prop]) {\n throw new RPError(`expected ${prop} string to be returned by Device Authorization Response, got %j`, response[prop]);\n }\n });\n\n if (!Number.isSafeInteger(response.expires_in)) {\n throw new RPError('expected expires_in number to be returned by Device Authorization Response, got %j', response.expires_in);\n }\n\n instance(this).expires_at = now() + response.expires_in;\n instance(this).client = client;\n instance(this).DPoP = DPoP;\n instance(this).maxAge = maxAge;\n instance(this).exchangeBody = exchangeBody;\n instance(this).clientAssertionPayload = clientAssertionPayload;\n instance(this).response = response;\n instance(this).interval = response.interval * 1000 || 5000;\n }\n\n abort() {\n instance(this).aborted = true;\n }\n\n async poll({ signal } = {}) {\n if ((signal && signal.aborted) || instance(this).aborted) {\n throw new RPError('polling aborted');\n }\n\n if (this.expired()) {\n throw new RPError('the device code %j has expired and the device authorization session has concluded', this.device_code);\n }\n\n await new Promise((resolve) => setTimeout(resolve, instance(this).interval));\n\n const response = await authenticatedPost.call(\n instance(this).client,\n 'token',\n {\n form: {\n ...instance(this).exchangeBody,\n grant_type: 'urn:ietf:params:oauth:grant-type:device_code',\n device_code: this.device_code,\n },\n responseType: 'json',\n },\n { clientAssertionPayload: instance(this).clientAssertionPayload, DPoP: instance(this).DPoP },\n );\n\n let responseBody;\n try {\n responseBody = processResponse(response);\n } catch (err) {\n switch (err instanceof OPError && err.error) {\n case 'slow_down':\n instance(this).interval += 5000;\n case 'authorization_pending': // eslint-disable-line no-fallthrough\n return this.poll({ signal });\n default:\n throw err;\n }\n }\n\n const tokenset = new TokenSet(responseBody);\n\n if ('id_token' in tokenset) {\n await instance(this).client.decryptIdToken(tokenset);\n await instance(this).client.validateIdToken(tokenset, undefined, 'token', instance(this).maxAge);\n }\n\n return tokenset;\n }\n\n get device_code() {\n return instance(this).response.device_code;\n }\n\n get user_code() {\n return instance(this).response.user_code;\n }\n\n get verification_uri() {\n return instance(this).response.verification_uri;\n }\n\n get verification_uri_complete() {\n return instance(this).response.verification_uri_complete;\n }\n\n get expires_in() {\n return Math.max.apply(null, [instance(this).expires_at - now(), 0]);\n }\n\n expired() {\n return this.expires_in === 0;\n }\n\n /* istanbul ignore next */\n [inspect.custom]() {\n return `${this.constructor.name} ${inspect(instance(this).response, {\n depth: Infinity,\n colors: process.stdout.isTTY,\n compact: false,\n sorted: true,\n })}`;\n }\n}\n\nmodule.exports = DeviceFlowHandle;\n","/* eslint-disable camelcase */\nconst { format } = require('util');\n\nconst makeError = require('make-error');\n\nfunction OPError({\n error_description,\n error,\n error_uri,\n session_state,\n state,\n scope,\n}, response) {\n OPError.super.call(this, !error_description ? error : `${error} (${error_description})`);\n\n Object.assign(\n this,\n { error },\n (error_description && { error_description }),\n (error_uri && { error_uri }),\n (state && { state }),\n (scope && { scope }),\n (session_state && { session_state }),\n );\n\n if (response) {\n Object.defineProperty(this, 'response', {\n value: response,\n });\n }\n}\n\nmakeError(OPError);\n\nfunction RPError(...args) {\n if (typeof args[0] === 'string') {\n RPError.super.call(this, format(...args));\n } else {\n const {\n message, printf, response, ...rest\n } = args[0];\n if (printf) {\n RPError.super.call(this, format(...printf));\n } else {\n RPError.super.call(this, message);\n }\n Object.assign(this, rest);\n if (response) {\n Object.defineProperty(this, 'response', {\n value: response,\n });\n }\n }\n}\n\nmakeError(RPError);\n\nmodule.exports = {\n OPError,\n RPError,\n};\n","function assertSigningAlgValuesSupport(endpoint, issuer, properties) {\n if (!issuer[`${endpoint}_endpoint`]) return;\n\n const eam = `${endpoint}_endpoint_auth_method`;\n const easa = `${endpoint}_endpoint_auth_signing_alg`;\n const easavs = `${endpoint}_endpoint_auth_signing_alg_values_supported`;\n\n if (properties[eam] && properties[eam].endsWith('_jwt') && !properties[easa] && !issuer[easavs]) {\n throw new TypeError(`${easavs} must be configured on the issuer if ${easa} is not defined on a client`);\n }\n}\n\nfunction assertIssuerConfiguration(issuer, endpoint) {\n if (!issuer[endpoint]) {\n throw new TypeError(`${endpoint} must be configured on the issuer`);\n }\n}\n\nmodule.exports = {\n assertSigningAlgValuesSupport,\n assertIssuerConfiguration,\n};\n","let encode;\nif (Buffer.isEncoding('base64url')) {\n encode = (input, encoding = 'utf8') => Buffer.from(input, encoding).toString('base64url');\n} else {\n const fromBase64 = (base64) => base64.replace(/=/g, '').replace(/\\+/g, '-').replace(/\\//g, '_');\n encode = (input, encoding = 'utf8') => fromBase64(Buffer.from(input, encoding).toString('base64'));\n}\n\nconst decode = (input) => Buffer.from(input, 'base64');\n\nmodule.exports.decode = decode;\nmodule.exports.encode = encode;\n","const jose = require('jose');\n\nconst { assertIssuerConfiguration } = require('./assert');\nconst { random } = require('./generators');\nconst now = require('./unix_timestamp');\nconst request = require('./request');\nconst instance = require('./weak_cache');\nconst merge = require('./merge');\n\nconst formUrlEncode = (value) => encodeURIComponent(value).replace(/%20/g, '+');\n\nasync function clientAssertion(endpoint, payload) {\n let alg = this[`${endpoint}_endpoint_auth_signing_alg`];\n if (!alg) {\n assertIssuerConfiguration(this.issuer, `${endpoint}_endpoint_auth_signing_alg_values_supported`);\n }\n\n if (this[`${endpoint}_endpoint_auth_method`] === 'client_secret_jwt') {\n const key = await this.joseSecret();\n\n if (!alg) {\n const supported = this.issuer[`${endpoint}_endpoint_auth_signing_alg_values_supported`];\n alg = Array.isArray(supported) && supported.find((signAlg) => key.algorithms('sign').has(signAlg));\n }\n\n return jose.JWS.sign(payload, key, { alg, typ: 'JWT' });\n }\n\n const keystore = instance(this).get('keystore');\n\n if (!keystore) {\n throw new TypeError('no client jwks provided for signing a client assertion with');\n }\n\n if (!alg) {\n const algs = new Set();\n\n keystore.all().forEach((key) => {\n key.algorithms('sign').forEach(Set.prototype.add.bind(algs));\n });\n\n const supported = this.issuer[`${endpoint}_endpoint_auth_signing_alg_values_supported`];\n alg = Array.isArray(supported) && supported.find((signAlg) => algs.has(signAlg));\n }\n\n const key = keystore.get({ alg, use: 'sig' });\n if (!key) {\n throw new TypeError(`no key found in client jwks to sign a client assertion with using alg ${alg}`);\n }\n return jose.JWS.sign(payload, key, { alg, typ: 'JWT', kid: key.kid.startsWith('DONOTUSE.') ? undefined : key.kid });\n}\n\nasync function authFor(endpoint, { clientAssertionPayload } = {}) {\n const authMethod = this[`${endpoint}_endpoint_auth_method`];\n switch (authMethod) {\n case 'self_signed_tls_client_auth':\n case 'tls_client_auth':\n case 'none':\n return { form: { client_id: this.client_id } };\n case 'client_secret_post':\n if (!this.client_secret) {\n throw new TypeError('client_secret_post client authentication method requires a client_secret');\n }\n return { form: { client_id: this.client_id, client_secret: this.client_secret } };\n case 'private_key_jwt':\n case 'client_secret_jwt': {\n const timestamp = now();\n\n const mTLS = endpoint === 'token' && this.tls_client_certificate_bound_access_tokens;\n const audience = [...new Set([\n this.issuer.issuer,\n this.issuer.token_endpoint,\n this.issuer[`${endpoint}_endpoint`],\n mTLS && this.issuer.mtls_endpoint_aliases\n ? this.issuer.mtls_endpoint_aliases.token_endpoint : undefined,\n ].filter(Boolean))];\n\n const assertion = await clientAssertion.call(this, endpoint, {\n iat: timestamp,\n exp: timestamp + 60,\n jti: random(),\n iss: this.client_id,\n sub: this.client_id,\n aud: audience,\n ...clientAssertionPayload,\n });\n\n return {\n form: {\n client_id: this.client_id,\n client_assertion: assertion,\n client_assertion_type: 'urn:ietf:params:oauth:client-assertion-type:jwt-bearer',\n },\n };\n }\n default: { // client_secret_basic\n // This is correct behaviour, see https://tools.ietf.org/html/rfc6749#section-2.3.1 and the\n // related appendix. (also https://github.com/panva/node-openid-client/pull/91)\n // > The client identifier is encoded using the\n // > \"application/x-www-form-urlencoded\" encoding algorithm per\n // > Appendix B, and the encoded value is used as the username; the client\n // > password is encoded using the same algorithm and used as the\n // > password.\n if (!this.client_secret) {\n throw new TypeError('client_secret_basic client authentication method requires a client_secret');\n }\n const encoded = `${formUrlEncode(this.client_id)}:${formUrlEncode(this.client_secret)}`;\n const value = Buffer.from(encoded).toString('base64');\n return { headers: { Authorization: `Basic ${value}` } };\n }\n }\n}\n\nfunction resolveResponseType() {\n const { length, 0: value } = this.response_types;\n\n if (length === 1) {\n return value;\n }\n\n return undefined;\n}\n\nfunction resolveRedirectUri() {\n const { length, 0: value } = this.redirect_uris || [];\n\n if (length === 1) {\n return value;\n }\n\n return undefined;\n}\n\nasync function authenticatedPost(endpoint, opts, {\n clientAssertionPayload, endpointAuthMethod = endpoint, DPoP,\n} = {}) {\n const auth = await authFor.call(this, endpointAuthMethod, { clientAssertionPayload });\n const requestOpts = merge(opts, auth);\n\n const mTLS = this[`${endpointAuthMethod}_endpoint_auth_method`].includes('tls_client_auth')\n || (endpoint === 'token' && this.tls_client_certificate_bound_access_tokens);\n\n let targetUrl;\n if (mTLS && this.issuer.mtls_endpoint_aliases) {\n targetUrl = this.issuer.mtls_endpoint_aliases[`${endpoint}_endpoint`];\n }\n\n targetUrl = targetUrl || this.issuer[`${endpoint}_endpoint`];\n\n if ('form' in requestOpts) {\n for (const [key, value] of Object.entries(requestOpts.form)) { // eslint-disable-line no-restricted-syntax, max-len\n if (typeof value === 'undefined') {\n delete requestOpts.form[key];\n }\n }\n }\n\n return request.call(this, {\n ...requestOpts,\n method: 'POST',\n url: targetUrl,\n }, { mTLS, DPoP });\n}\n\nmodule.exports = {\n resolveResponseType,\n resolveRedirectUri,\n authFor,\n authenticatedPost,\n};\n","const OIDC_DISCOVERY = '/.well-known/openid-configuration';\nconst OAUTH2_DISCOVERY = '/.well-known/oauth-authorization-server';\nconst WEBFINGER = '/.well-known/webfinger';\nconst REL = 'http://openid.net/specs/connect/1.0/issuer';\nconst AAD_MULTITENANT_DISCOVERY = [\n `https://login.microsoftonline.com/common${OIDC_DISCOVERY}`,\n `https://login.microsoftonline.com/common/v2.0${OIDC_DISCOVERY}`,\n `https://login.microsoftonline.com/organizations/v2.0${OIDC_DISCOVERY}`,\n `https://login.microsoftonline.com/consumers/v2.0${OIDC_DISCOVERY}`,\n];\n\nconst CLIENT_DEFAULTS = {\n grant_types: ['authorization_code'],\n id_token_signed_response_alg: 'RS256',\n authorization_signed_response_alg: 'RS256',\n response_types: ['code'],\n token_endpoint_auth_method: 'client_secret_basic',\n};\n\nconst ISSUER_DEFAULTS = {\n claim_types_supported: ['normal'],\n claims_parameter_supported: false,\n grant_types_supported: ['authorization_code', 'implicit'],\n request_parameter_supported: false,\n request_uri_parameter_supported: true,\n require_request_uri_registration: false,\n response_modes_supported: ['query', 'fragment'],\n token_endpoint_auth_methods_supported: ['client_secret_basic'],\n};\n\nconst CALLBACK_PROPERTIES = [\n 'access_token', // 6749\n 'code', // 6749\n 'error', // 6749\n 'error_description', // 6749\n 'error_uri', // 6749\n 'expires_in', // 6749\n 'id_token', // Core 1.0\n 'state', // 6749\n 'token_type', // 6749\n 'session_state', // Session Management\n 'response', // JARM\n];\n\nconst JWT_CONTENT = /^application\\/jwt/;\n\nconst HTTP_OPTIONS = Symbol('openid-client.custom.http-options');\nconst CLOCK_TOLERANCE = Symbol('openid-client.custom.clock-tolerance');\n\nmodule.exports = {\n AAD_MULTITENANT_DISCOVERY,\n CALLBACK_PROPERTIES,\n CLIENT_DEFAULTS,\n CLOCK_TOLERANCE,\n HTTP_OPTIONS,\n ISSUER_DEFAULTS,\n JWT_CONTENT,\n OAUTH2_DISCOVERY,\n OIDC_DISCOVERY,\n REL,\n WEBFINGER,\n};\n","module.exports = (obj) => JSON.parse(JSON.stringify(obj));\n","/* eslint-disable no-restricted-syntax, no-continue */\n\nconst isPlainObject = require('./is_plain_object');\n\nfunction defaults(deep, target, ...sources) {\n for (const source of sources) {\n if (!isPlainObject(source)) {\n continue;\n }\n for (const [key, value] of Object.entries(source)) {\n /* istanbul ignore if */\n if (key === '__proto__' || key === 'constructor') {\n continue;\n }\n if (typeof target[key] === 'undefined' && typeof value !== 'undefined') {\n target[key] = value;\n }\n\n if (deep && isPlainObject(target[key]) && isPlainObject(value)) {\n defaults(true, target[key], value);\n }\n }\n }\n\n return target;\n}\n\nmodule.exports = defaults.bind(undefined, false);\nmodule.exports.deep = defaults.bind(undefined, true);\n","const { createHash, randomBytes } = require('crypto');\n\nconst base64url = require('./base64url');\n\nconst random = (bytes = 32) => base64url.encode(randomBytes(bytes));\n\nmodule.exports = {\n random,\n state: random,\n nonce: random,\n codeVerifier: random,\n codeChallenge: (codeVerifier) => base64url.encode(createHash('sha256').update(codeVerifier).digest()),\n};\n","const url = require('url');\nconst { strict: assert } = require('assert');\n\nmodule.exports = (target) => {\n try {\n const { protocol } = new url.URL(target);\n assert(protocol.match(/^(https?:)$/));\n return true;\n } catch (err) {\n throw new TypeError('only valid absolute URLs can be requested');\n }\n};\n","module.exports = (a) => !!a && a.constructor === Object;\n","/* eslint-disable no-restricted-syntax, no-param-reassign, no-continue */\n\nconst isPlainObject = require('./is_plain_object');\n\nfunction merge(target, ...sources) {\n for (const source of sources) {\n if (!isPlainObject(source)) {\n continue;\n }\n for (const [key, value] of Object.entries(source)) {\n /* istanbul ignore if */\n if (key === '__proto__' || key === 'constructor') {\n continue;\n }\n if (isPlainObject(target[key]) && isPlainObject(value)) {\n target[key] = merge(target[key], value);\n } else if (typeof value !== 'undefined') {\n target[key] = value;\n }\n }\n }\n\n return target;\n}\n\nmodule.exports = merge;\n","module.exports = function pick(object, ...paths) {\n const obj = {};\n for (const path of paths) { // eslint-disable-line no-restricted-syntax\n if (object[path]) {\n obj[path] = object[path];\n }\n }\n return obj;\n};\n","const { STATUS_CODES } = require('http');\nconst { format } = require('util');\n\nconst { OPError } = require('../errors');\n\nconst REGEXP = /(\\w+)=(\"[^\"]*\")/g;\nconst throwAuthenticateErrors = (response) => {\n const params = {};\n try {\n while ((REGEXP.exec(response.headers['www-authenticate'])) !== null) {\n if (RegExp.$1 && RegExp.$2) {\n params[RegExp.$1] = RegExp.$2.slice(1, -1);\n }\n }\n } catch (err) {}\n\n if (params.error) {\n throw new OPError(params, response);\n }\n};\n\nconst isStandardBodyError = (response) => {\n let result = false;\n try {\n let jsonbody;\n if (typeof response.body !== 'object' || Buffer.isBuffer(response.body)) {\n jsonbody = JSON.parse(response.body);\n } else {\n jsonbody = response.body;\n }\n result = typeof jsonbody.error === 'string' && jsonbody.error.length;\n if (result) response.body = jsonbody;\n } catch (err) {}\n\n return result;\n};\n\nfunction processResponse(response, { statusCode = 200, body = true, bearer = false } = {}) {\n if (response.statusCode !== statusCode) {\n if (bearer) {\n throwAuthenticateErrors(response);\n }\n\n if (isStandardBodyError(response)) {\n throw new OPError(response.body, response);\n }\n\n throw new OPError({\n error: format('expected %i %s, got: %i %s', statusCode, STATUS_CODES[statusCode], response.statusCode, STATUS_CODES[response.statusCode]),\n }, response);\n }\n\n if (body && !response.body) {\n throw new OPError({\n error: format('expected %i %s with body but no body was returned', statusCode, STATUS_CODES[statusCode]),\n }, response);\n }\n\n return response.body;\n}\n\nmodule.exports = processResponse;\n","const Got = require('got');\n\nconst pkg = require('../../package.json');\n\nconst { deep: defaultsDeep } = require('./defaults');\nconst isAbsoluteUrl = require('./is_absolute_url');\nconst { HTTP_OPTIONS } = require('./consts');\n\nlet DEFAULT_HTTP_OPTIONS;\nlet got;\n\nconst setDefaults = (options) => {\n DEFAULT_HTTP_OPTIONS = defaultsDeep({}, options, DEFAULT_HTTP_OPTIONS);\n got = Got.extend(DEFAULT_HTTP_OPTIONS);\n};\n\nsetDefaults({\n followRedirect: false,\n headers: { 'User-Agent': `${pkg.name}/${pkg.version} (${pkg.homepage})` },\n retry: 0,\n timeout: 3500,\n throwHttpErrors: false,\n});\n\nmodule.exports = async function request(options, { accessToken, mTLS = false, DPoP } = {}) {\n const { url } = options;\n isAbsoluteUrl(url);\n const optsFn = this[HTTP_OPTIONS];\n let opts = options;\n\n if (DPoP && 'dpopProof' in this) {\n opts.headers = opts.headers || {};\n opts.headers.DPoP = this.dpopProof({\n htu: url,\n htm: options.method,\n }, DPoP, accessToken);\n }\n\n if (optsFn) {\n opts = optsFn.call(this, defaultsDeep({}, opts, DEFAULT_HTTP_OPTIONS));\n }\n\n if (\n mTLS\n && (\n (!opts.key || !opts.cert)\n && (!opts.https || !((opts.https.key && opts.https.certificate) || opts.https.pfx))\n )\n ) {\n throw new TypeError('mutual-TLS certificate and key not set');\n }\n\n return got(opts);\n};\n\nmodule.exports.setDefaults = setDefaults;\n","module.exports = () => Math.floor(Date.now() / 1000);\n","const privateProps = new WeakMap();\n\nmodule.exports = (ctx) => {\n if (!privateProps.has(ctx)) {\n privateProps.set(ctx, new Map([['metadata', new Map()]]));\n }\n return privateProps.get(ctx);\n};\n","// Credit: https://github.com/rohe/pyoidc/blob/master/src/oic/utils/webfinger.py\n\n// -- Normalization --\n// A string of any other type is interpreted as a URI either the form of scheme\n// \"://\" authority path-abempty [ \"?\" query ] [ \"#\" fragment ] or authority\n// path-abempty [ \"?\" query ] [ \"#\" fragment ] per RFC 3986 [RFC3986] and is\n// normalized according to the following rules:\n//\n// If the user input Identifier does not have an RFC 3986 [RFC3986] scheme\n// portion, the string is interpreted as [userinfo \"@\"] host [\":\" port]\n// path-abempty [ \"?\" query ] [ \"#\" fragment ] per RFC 3986 [RFC3986].\n// If the userinfo component is present and all of the path component, query\n// component, and port component are empty, the acct scheme is assumed. In this\n// case, the normalized URI is formed by prefixing acct: to the string as the\n// scheme. Per the 'acct' URI Scheme [I‑D.ietf‑appsawg‑acct‑uri], if there is an\n// at-sign character ('@') in the userinfo component, it needs to be\n// percent-encoded as described in RFC 3986 [RFC3986].\n// For all other inputs without a scheme portion, the https scheme is assumed,\n// and the normalized URI is formed by prefixing https:// to the string as the\n// scheme.\n// If the resulting URI contains a fragment portion, it MUST be stripped off\n// together with the fragment delimiter character \"#\".\n// The WebFinger [I‑D.ietf‑appsawg‑webfinger] Resource in this case is the\n// resulting URI, and the WebFinger Host is the authority component.\n//\n// Note: Since the definition of authority in RFC 3986 [RFC3986] is\n// [ userinfo \"@\" ] host [ \":\" port ], it is legal to have a user input\n// identifier like userinfo@host:port, e.g., alice@example.com:8080.\n\nconst PORT = /^\\d+$/;\n\nfunction hasScheme(input) {\n if (input.includes('://')) return true;\n\n const authority = input.replace(/(\\/|\\?)/g, '#').split('#')[0];\n if (authority.includes(':')) {\n const index = authority.indexOf(':');\n const hostOrPort = authority.slice(index + 1);\n if (!PORT.test(hostOrPort)) {\n return true;\n }\n }\n\n return false;\n}\n\nfunction acctSchemeAssumed(input) {\n if (!input.includes('@')) return false;\n const parts = input.split('@');\n const host = parts[parts.length - 1];\n return !(host.includes(':') || host.includes('/') || host.includes('?'));\n}\n\nfunction normalize(input) {\n if (typeof input !== 'string') {\n throw new TypeError('input must be a string');\n }\n\n let output;\n if (hasScheme(input)) {\n output = input;\n } else if (acctSchemeAssumed(input)) {\n output = `acct:${input}`;\n } else {\n output = `https://${input}`;\n }\n\n return output.split('#')[0];\n}\n\nmodule.exports = normalize;\n","const Issuer = require('./issuer');\nconst { OPError, RPError } = require('./errors');\nconst Registry = require('./issuer_registry');\nconst Strategy = require('./passport_strategy');\nconst TokenSet = require('./token_set');\nconst { CLOCK_TOLERANCE, HTTP_OPTIONS } = require('./helpers/consts');\nconst generators = require('./helpers/generators');\nconst { setDefaults } = require('./helpers/request');\n\nmodule.exports = {\n Issuer,\n Registry,\n Strategy,\n TokenSet,\n errors: {\n OPError,\n RPError,\n },\n custom: {\n setHttpOptionsDefaults: setDefaults,\n http_options: HTTP_OPTIONS,\n clock_tolerance: CLOCK_TOLERANCE,\n },\n generators,\n};\n","/* eslint-disable max-classes-per-file */\n\nconst { inspect } = require('util');\nconst url = require('url');\n\nconst AggregateError = require('aggregate-error');\nconst jose = require('jose');\nconst LRU = require('lru-cache');\nconst objectHash = require('object-hash');\n\nconst { RPError } = require('./errors');\nconst getClient = require('./client');\nconst registry = require('./issuer_registry');\nconst processResponse = require('./helpers/process_response');\nconst webfingerNormalize = require('./helpers/webfinger_normalize');\nconst instance = require('./helpers/weak_cache');\nconst request = require('./helpers/request');\nconst { assertIssuerConfiguration } = require('./helpers/assert');\nconst {\n ISSUER_DEFAULTS, OIDC_DISCOVERY, OAUTH2_DISCOVERY, WEBFINGER, REL, AAD_MULTITENANT_DISCOVERY,\n} = require('./helpers/consts');\n\nconst AAD_MULTITENANT = Symbol('AAD_MULTITENANT');\n\nclass Issuer {\n /**\n * @name constructor\n * @api public\n */\n constructor(meta = {}) {\n const aadIssValidation = meta[AAD_MULTITENANT];\n delete meta[AAD_MULTITENANT];\n\n ['introspection', 'revocation'].forEach((endpoint) => {\n // if intro/revocation endpoint auth specific meta is missing use the token ones if they\n // are defined\n if (\n meta[`${endpoint}_endpoint`]\n && meta[`${endpoint}_endpoint_auth_methods_supported`] === undefined\n && meta[`${endpoint}_endpoint_auth_signing_alg_values_supported`] === undefined\n ) {\n if (meta.token_endpoint_auth_methods_supported) {\n meta[`${endpoint}_endpoint_auth_methods_supported`] = meta.token_endpoint_auth_methods_supported;\n }\n if (meta.token_endpoint_auth_signing_alg_values_supported) {\n meta[`${endpoint}_endpoint_auth_signing_alg_values_supported`] = meta.token_endpoint_auth_signing_alg_values_supported;\n }\n }\n });\n\n Object.entries(meta).forEach(([key, value]) => {\n instance(this).get('metadata').set(key, value);\n if (!this[key]) {\n Object.defineProperty(this, key, {\n get() { return instance(this).get('metadata').get(key); },\n enumerable: true,\n });\n }\n });\n\n instance(this).set('cache', new LRU({ max: 100 }));\n\n registry.set(this.issuer, this);\n\n const Client = getClient(this, aadIssValidation);\n\n Object.defineProperties(this, {\n Client: { value: Client },\n FAPIClient: { value: class FAPIClient extends Client {} },\n });\n }\n\n /**\n * @name keystore\n * @api public\n */\n async keystore(reload = false) {\n assertIssuerConfiguration(this, 'jwks_uri');\n\n const keystore = instance(this).get('keystore');\n const cache = instance(this).get('cache');\n\n if (reload || !keystore) {\n cache.reset();\n const response = await request.call(this, {\n method: 'GET',\n responseType: 'json',\n url: this.jwks_uri,\n });\n const jwks = processResponse(response);\n\n const joseKeyStore = jose.JWKS.asKeyStore(jwks, { ignoreErrors: true });\n cache.set('throttle', true, 60 * 1000);\n instance(this).set('keystore', joseKeyStore);\n return joseKeyStore;\n }\n\n return keystore;\n }\n\n /**\n * @name queryKeyStore\n * @api private\n */\n async queryKeyStore({\n kid, kty, alg, use, key_ops: ops,\n }, { allowMulti = false } = {}) {\n const cache = instance(this).get('cache');\n\n const def = {\n kid, kty, alg, use, key_ops: ops,\n };\n\n const defHash = objectHash(def, {\n algorithm: 'sha256',\n ignoreUnknown: true,\n unorderedArrays: true,\n unorderedSets: true,\n });\n\n // refresh keystore on every unknown key but also only upto once every minute\n const freshJwksUri = cache.get(defHash) || cache.get('throttle');\n\n const keystore = await this.keystore(!freshJwksUri);\n const keys = keystore.all(def);\n\n if (keys.length === 0) {\n throw new RPError({\n printf: [\"no valid key found in issuer's jwks_uri for key parameters %j\", def],\n jwks: keystore,\n });\n }\n\n if (!allowMulti && keys.length > 1 && !kid) {\n throw new RPError({\n printf: [\"multiple matching keys found in issuer's jwks_uri for key parameters %j, kid must be provided in this case\", def],\n jwks: keystore,\n });\n }\n\n cache.set(defHash, true);\n\n return new jose.JWKS.KeyStore(keys);\n }\n\n /**\n * @name metadata\n * @api public\n */\n get metadata() {\n const copy = {};\n instance(this).get('metadata').forEach((value, key) => {\n copy[key] = value;\n });\n return copy;\n }\n\n /**\n * @name webfinger\n * @api public\n */\n static async webfinger(input) {\n const resource = webfingerNormalize(input);\n const { host } = url.parse(resource);\n const webfingerUrl = `https://${host}${WEBFINGER}`;\n\n const response = await request.call(this, {\n method: 'GET',\n url: webfingerUrl,\n responseType: 'json',\n searchParams: { resource, rel: REL },\n followRedirect: true,\n });\n const body = processResponse(response);\n\n const location = Array.isArray(body.links) && body.links.find((link) => typeof link === 'object' && link.rel === REL && link.href);\n\n if (!location) {\n throw new RPError({\n message: 'no issuer found in webfinger response',\n body,\n });\n }\n\n if (typeof location.href !== 'string' || !location.href.startsWith('https://')) {\n throw new RPError({\n printf: ['invalid issuer location %s', location.href],\n body,\n });\n }\n\n const expectedIssuer = location.href;\n if (registry.has(expectedIssuer)) {\n return registry.get(expectedIssuer);\n }\n\n const issuer = await this.discover(expectedIssuer);\n\n if (issuer.issuer !== expectedIssuer) {\n registry.delete(issuer.issuer);\n throw new RPError('discovered issuer mismatch, expected %s, got: %s', expectedIssuer, issuer.issuer);\n }\n return issuer;\n }\n\n /**\n * @name discover\n * @api public\n */\n static async discover(uri) {\n const parsed = url.parse(uri);\n\n if (parsed.pathname.includes('/.well-known/')) {\n const response = await request.call(this, {\n method: 'GET',\n responseType: 'json',\n url: uri,\n });\n const body = processResponse(response);\n return new Issuer({\n ...ISSUER_DEFAULTS,\n ...body,\n [AAD_MULTITENANT]: !!AAD_MULTITENANT_DISCOVERY.find(\n (discoveryURL) => uri.startsWith(discoveryURL),\n ),\n });\n }\n\n const pathnames = [];\n if (parsed.pathname.endsWith('/')) {\n pathnames.push(`${parsed.pathname}${OIDC_DISCOVERY.substring(1)}`);\n } else {\n pathnames.push(`${parsed.pathname}${OIDC_DISCOVERY}`);\n }\n if (parsed.pathname === '/') {\n pathnames.push(`${OAUTH2_DISCOVERY}`);\n } else {\n pathnames.push(`${OAUTH2_DISCOVERY}${parsed.pathname}`);\n }\n\n const errors = [];\n // eslint-disable-next-line no-restricted-syntax\n for (const pathname of pathnames) {\n try {\n const wellKnownUri = url.format({ ...parsed, pathname });\n // eslint-disable-next-line no-await-in-loop\n const response = await request.call(this, {\n method: 'GET',\n responseType: 'json',\n url: wellKnownUri,\n });\n const body = processResponse(response);\n return new Issuer({\n ...ISSUER_DEFAULTS,\n ...body,\n [AAD_MULTITENANT]: !!AAD_MULTITENANT_DISCOVERY.find(\n (discoveryURL) => wellKnownUri.startsWith(discoveryURL),\n ),\n });\n } catch (err) {\n errors.push(err);\n }\n }\n\n const err = new AggregateError(errors);\n err.message = `Issuer.discover() failed.${err.message.split('\\n')\n .filter((line) => !line.startsWith(' at')).join('\\n')}`;\n throw err;\n }\n\n /* istanbul ignore next */\n [inspect.custom]() {\n return `${this.constructor.name} ${inspect(this.metadata, {\n depth: Infinity,\n colors: process.stdout.isTTY,\n compact: false,\n sorted: true,\n })}`;\n }\n}\n\nmodule.exports = Issuer;\n","const REGISTRY = new Map();\n\nmodule.exports = REGISTRY;\n","/* eslint-disable no-underscore-dangle */\n\nconst url = require('url');\nconst { format } = require('util');\n\nconst cloneDeep = require('./helpers/deep_clone');\nconst { RPError, OPError } = require('./errors');\nconst { BaseClient } = require('./client');\nconst { random, codeChallenge } = require('./helpers/generators');\nconst pick = require('./helpers/pick');\nconst { resolveResponseType, resolveRedirectUri } = require('./helpers/client');\n\nfunction verified(err, user, info = {}) {\n if (err) {\n this.error(err);\n } else if (!user) {\n this.fail(info);\n } else {\n this.success(user, info);\n }\n}\n\n/**\n * @name constructor\n * @api public\n */\nfunction OpenIDConnectStrategy({\n client,\n params = {},\n passReqToCallback = false,\n sessionKey,\n usePKCE = true,\n extras = {},\n} = {}, verify) {\n if (!(client instanceof BaseClient)) {\n throw new TypeError('client must be an instance of openid-client Client');\n }\n\n if (typeof verify !== 'function') {\n throw new TypeError('verify callback must be a function');\n }\n\n if (!client.issuer || !client.issuer.issuer) {\n throw new TypeError('client must have an issuer with an identifier');\n }\n\n this._client = client;\n this._issuer = client.issuer;\n this._verify = verify;\n this._passReqToCallback = passReqToCallback;\n this._usePKCE = usePKCE;\n this._key = sessionKey || `oidc:${url.parse(this._issuer.issuer).hostname}`;\n this._params = cloneDeep(params);\n this._extras = cloneDeep(extras);\n\n if (!this._params.response_type) this._params.response_type = resolveResponseType.call(client);\n if (!this._params.redirect_uri) this._params.redirect_uri = resolveRedirectUri.call(client);\n if (!this._params.scope) this._params.scope = 'openid';\n\n if (this._usePKCE === true) {\n const supportedMethods = Array.isArray(this._issuer.code_challenge_methods_supported)\n ? this._issuer.code_challenge_methods_supported : false;\n\n if (supportedMethods && supportedMethods.includes('S256')) {\n this._usePKCE = 'S256';\n } else if (supportedMethods && supportedMethods.includes('plain')) {\n this._usePKCE = 'plain';\n } else if (supportedMethods) {\n throw new TypeError('neither code_challenge_method supported by the client is supported by the issuer');\n } else {\n this._usePKCE = 'S256';\n }\n } else if (typeof this._usePKCE === 'string' && !['plain', 'S256'].includes(this._usePKCE)) {\n throw new TypeError(`${this._usePKCE} is not valid/implemented PKCE code_challenge_method`);\n }\n\n this.name = url.parse(client.issuer.issuer).hostname;\n}\n\nOpenIDConnectStrategy.prototype.authenticate = function authenticate(req, options) {\n (async () => {\n const client = this._client;\n if (!req.session) {\n throw new TypeError('authentication requires session support');\n }\n const reqParams = client.callbackParams(req);\n const sessionKey = this._key;\n\n /* start authentication request */\n if (Object.keys(reqParams).length === 0) {\n // provide options object with extra authentication parameters\n const params = {\n state: random(),\n ...this._params,\n ...options,\n };\n\n if (!params.nonce && params.response_type.includes('id_token')) {\n params.nonce = random();\n }\n\n req.session[sessionKey] = pick(params, 'nonce', 'state', 'max_age', 'response_type');\n\n if (this._usePKCE && params.response_type.includes('code')) {\n const verifier = random();\n req.session[sessionKey].code_verifier = verifier;\n\n switch (this._usePKCE) { // eslint-disable-line default-case\n case 'S256':\n params.code_challenge = codeChallenge(verifier);\n params.code_challenge_method = 'S256';\n break;\n case 'plain':\n params.code_challenge = verifier;\n break;\n }\n }\n\n this.redirect(client.authorizationUrl(params));\n return;\n }\n /* end authentication request */\n\n /* start authentication response */\n\n const session = req.session[sessionKey];\n if (Object.keys(session || {}).length === 0) {\n throw new Error(format('did not find expected authorization request details in session, req.session[\"%s\"] is %j', sessionKey, session));\n }\n\n const {\n state, nonce, max_age: maxAge, code_verifier: codeVerifier, response_type: responseType,\n } = session;\n\n try {\n delete req.session[sessionKey];\n } catch (err) {}\n\n const opts = {\n redirect_uri: this._params.redirect_uri,\n ...options,\n };\n\n const checks = {\n state,\n nonce,\n max_age: maxAge,\n code_verifier: codeVerifier,\n response_type: responseType,\n };\n\n const tokenset = await client.callback(opts.redirect_uri, reqParams, checks, this._extras);\n\n const passReq = this._passReqToCallback;\n const loadUserinfo = this._verify.length > (passReq ? 3 : 2) && client.issuer.userinfo_endpoint;\n\n const args = [tokenset, verified.bind(this)];\n\n if (loadUserinfo) {\n if (!tokenset.access_token) {\n throw new RPError({\n message: 'expected access_token to be returned when asking for userinfo in verify callback',\n tokenset,\n });\n }\n const userinfo = await client.userinfo(tokenset);\n args.splice(1, 0, userinfo);\n }\n\n if (passReq) {\n args.unshift(req);\n }\n\n this._verify(...args);\n /* end authentication response */\n })().catch((error) => {\n if (\n (error instanceof OPError && error.error !== 'server_error' && !error.error.startsWith('invalid'))\n || error instanceof RPError\n ) {\n this.fail(error);\n } else {\n this.error(error);\n }\n });\n};\n\nmodule.exports = OpenIDConnectStrategy;\n","const base64url = require('./helpers/base64url');\nconst now = require('./helpers/unix_timestamp');\n\nclass TokenSet {\n /**\n * @name constructor\n * @api public\n */\n constructor(values) {\n Object.assign(this, values);\n }\n\n /**\n * @name expires_in=\n * @api public\n */\n set expires_in(value) { // eslint-disable-line camelcase\n this.expires_at = now() + Number(value);\n }\n\n /**\n * @name expires_in\n * @api public\n */\n get expires_in() { // eslint-disable-line camelcase\n return Math.max.apply(null, [this.expires_at - now(), 0]);\n }\n\n /**\n * @name expired\n * @api public\n */\n expired() {\n return this.expires_in === 0;\n }\n\n /**\n * @name claims\n * @api public\n */\n claims() {\n if (!this.id_token) {\n throw new TypeError('id_token not present in TokenSet');\n }\n\n return JSON.parse(base64url.decode(this.id_token.split('.')[1]));\n }\n}\n\nmodule.exports = TokenSet;\n","/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n\r\n/* global global, define, System, Reflect, Promise */\r\nvar __extends;\r\nvar __assign;\r\nvar __rest;\r\nvar __decorate;\r\nvar __param;\r\nvar __metadata;\r\nvar __awaiter;\r\nvar __generator;\r\nvar __exportStar;\r\nvar __values;\r\nvar __read;\r\nvar __spread;\r\nvar __spreadArrays;\r\nvar __await;\r\nvar __asyncGenerator;\r\nvar __asyncDelegator;\r\nvar __asyncValues;\r\nvar __makeTemplateObject;\r\nvar __importStar;\r\nvar __importDefault;\r\nvar __classPrivateFieldGet;\r\nvar __classPrivateFieldSet;\r\nvar __createBinding;\r\n(function (factory) {\r\n var root = typeof global === \"object\" ? global : typeof self === \"object\" ? self : typeof this === \"object\" ? this : {};\r\n if (typeof define === \"function\" && define.amd) {\r\n define(\"tslib\", [\"exports\"], function (exports) { factory(createExporter(root, createExporter(exports))); });\r\n }\r\n else if (typeof module === \"object\" && typeof module.exports === \"object\") {\r\n factory(createExporter(root, createExporter(module.exports)));\r\n }\r\n else {\r\n factory(createExporter(root));\r\n }\r\n function createExporter(exports, previous) {\r\n if (exports !== root) {\r\n if (typeof Object.create === \"function\") {\r\n Object.defineProperty(exports, \"__esModule\", { value: true });\r\n }\r\n else {\r\n exports.__esModule = true;\r\n }\r\n }\r\n return function (id, v) { return exports[id] = previous ? previous(id, v) : v; };\r\n }\r\n})\r\n(function (exporter) {\r\n var extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n\r\n __extends = function (d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n };\r\n\r\n __assign = Object.assign || function (t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n };\r\n\r\n __rest = function (s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n };\r\n\r\n __decorate = function (decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n 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;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n };\r\n\r\n __param = function (paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n };\r\n\r\n __metadata = function (metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n };\r\n\r\n __awaiter = function (thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n };\r\n\r\n __generator = function (thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n };\r\n\r\n __createBinding = function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n };\r\n\r\n __exportStar = function (m, exports) {\r\n for (var p in m) if (p !== \"default\" && !exports.hasOwnProperty(p)) exports[p] = m[p];\r\n };\r\n\r\n __values = function (o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n };\r\n\r\n __read = function (o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n };\r\n\r\n __spread = function () {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n };\r\n\r\n __spreadArrays = function () {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n };\r\n\r\n __await = function (v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n };\r\n\r\n __asyncGenerator = function (thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n };\r\n\r\n __asyncDelegator = function (o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n };\r\n\r\n __asyncValues = function (o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n };\r\n\r\n __makeTemplateObject = function (cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n };\r\n\r\n __importStar = function (mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\r\n result[\"default\"] = mod;\r\n return result;\r\n };\r\n\r\n __importDefault = function (mod) {\r\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\r\n };\r\n\r\n __classPrivateFieldGet = function (receiver, privateMap) {\r\n if (!privateMap.has(receiver)) {\r\n throw new TypeError(\"attempted to get private field on non-instance\");\r\n }\r\n return privateMap.get(receiver);\r\n };\r\n\r\n __classPrivateFieldSet = function (receiver, privateMap, value) {\r\n if (!privateMap.has(receiver)) {\r\n throw new TypeError(\"attempted to set private field on non-instance\");\r\n }\r\n privateMap.set(receiver, value);\r\n return value;\r\n };\r\n\r\n exporter(\"__extends\", __extends);\r\n exporter(\"__assign\", __assign);\r\n exporter(\"__rest\", __rest);\r\n exporter(\"__decorate\", __decorate);\r\n exporter(\"__param\", __param);\r\n exporter(\"__metadata\", __metadata);\r\n exporter(\"__awaiter\", __awaiter);\r\n exporter(\"__generator\", __generator);\r\n exporter(\"__exportStar\", __exportStar);\r\n exporter(\"__createBinding\", __createBinding);\r\n exporter(\"__values\", __values);\r\n exporter(\"__read\", __read);\r\n exporter(\"__spread\", __spread);\r\n exporter(\"__spreadArrays\", __spreadArrays);\r\n exporter(\"__await\", __await);\r\n exporter(\"__asyncGenerator\", __asyncGenerator);\r\n exporter(\"__asyncDelegator\", __asyncDelegator);\r\n exporter(\"__asyncValues\", __asyncValues);\r\n exporter(\"__makeTemplateObject\", __makeTemplateObject);\r\n exporter(\"__importStar\", __importStar);\r\n exporter(\"__importDefault\", __importDefault);\r\n exporter(\"__classPrivateFieldGet\", __classPrivateFieldGet);\r\n exporter(\"__classPrivateFieldSet\", __classPrivateFieldSet);\r\n});\r\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', { value: true });\n\nconst REGEX_IS_INSTALLATION_LEGACY = /^v1\\./;\nconst REGEX_IS_INSTALLATION = /^ghs_/;\nconst REGEX_IS_USER_TO_SERVER = /^ghu_/;\nasync function auth(token) {\n const isApp = token.split(/\\./).length === 3;\n const isInstallation = REGEX_IS_INSTALLATION_LEGACY.test(token) || REGEX_IS_INSTALLATION.test(token);\n const isUserToServer = REGEX_IS_USER_TO_SERVER.test(token);\n const tokenType = isApp ? \"app\" : isInstallation ? \"installation\" : isUserToServer ? \"user-to-server\" : \"oauth\";\n return {\n type: \"token\",\n token: token,\n tokenType\n };\n}\n\n/**\n * Prefix token for usage in the Authorization header\n *\n * @param token OAuth token or JSON Web Token\n */\nfunction withAuthorizationPrefix(token) {\n if (token.split(/\\./).length === 3) {\n return `bearer ${token}`;\n }\n\n return `token ${token}`;\n}\n\nasync function hook(token, request, route, parameters) {\n const endpoint = request.endpoint.merge(route, parameters);\n endpoint.headers.authorization = withAuthorizationPrefix(token);\n return request(endpoint);\n}\n\nconst createTokenAuth = function createTokenAuth(token) {\n if (!token) {\n throw new Error(\"[@octokit/auth-token] No token passed to createTokenAuth\");\n }\n\n if (typeof token !== \"string\") {\n throw new Error(\"[@octokit/auth-token] Token passed to createTokenAuth is not a string\");\n }\n\n token = token.replace(/^(token|bearer) +/i, \"\");\n return Object.assign(auth.bind(null, token), {\n hook: hook.bind(null, token)\n });\n};\n\nexports.createTokenAuth = createTokenAuth;\n//# sourceMappingURL=index.js.map\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', { value: true });\n\nvar universalUserAgent = require('universal-user-agent');\nvar beforeAfterHook = require('before-after-hook');\nvar request = require('@octokit/request');\nvar graphql = require('@octokit/graphql');\nvar authToken = require('@octokit/auth-token');\n\nfunction _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n\n return target;\n}\n\nfunction _objectWithoutProperties(source, excluded) {\n if (source == null) return {};\n\n var target = _objectWithoutPropertiesLoose(source, excluded);\n\n var key, i;\n\n if (Object.getOwnPropertySymbols) {\n var sourceSymbolKeys = Object.getOwnPropertySymbols(source);\n\n for (i = 0; i < sourceSymbolKeys.length; i++) {\n key = sourceSymbolKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;\n target[key] = source[key];\n }\n }\n\n return target;\n}\n\nconst VERSION = \"3.5.1\";\n\nconst _excluded = [\"authStrategy\"];\nclass Octokit {\n constructor(options = {}) {\n const hook = new beforeAfterHook.Collection();\n const requestDefaults = {\n baseUrl: request.request.endpoint.DEFAULTS.baseUrl,\n headers: {},\n request: Object.assign({}, options.request, {\n // @ts-ignore internal usage only, no need to type\n hook: hook.bind(null, \"request\")\n }),\n mediaType: {\n previews: [],\n format: \"\"\n }\n }; // prepend default user agent with `options.userAgent` if set\n\n requestDefaults.headers[\"user-agent\"] = [options.userAgent, `octokit-core.js/${VERSION} ${universalUserAgent.getUserAgent()}`].filter(Boolean).join(\" \");\n\n if (options.baseUrl) {\n requestDefaults.baseUrl = options.baseUrl;\n }\n\n if (options.previews) {\n requestDefaults.mediaType.previews = options.previews;\n }\n\n if (options.timeZone) {\n requestDefaults.headers[\"time-zone\"] = options.timeZone;\n }\n\n this.request = request.request.defaults(requestDefaults);\n this.graphql = graphql.withCustomRequest(this.request).defaults(requestDefaults);\n this.log = Object.assign({\n debug: () => {},\n info: () => {},\n warn: console.warn.bind(console),\n error: console.error.bind(console)\n }, options.log);\n this.hook = hook; // (1) If neither `options.authStrategy` nor `options.auth` are set, the `octokit` instance\n // is unauthenticated. The `this.auth()` method is a no-op and no request hook is registered.\n // (2) If only `options.auth` is set, use the default token authentication strategy.\n // (3) If `options.authStrategy` is set then use it and pass in `options.auth`. Always pass own request as many strategies accept a custom request instance.\n // TODO: type `options.auth` based on `options.authStrategy`.\n\n if (!options.authStrategy) {\n if (!options.auth) {\n // (1)\n this.auth = async () => ({\n type: \"unauthenticated\"\n });\n } else {\n // (2)\n const auth = authToken.createTokenAuth(options.auth); // @ts-ignore ¯\\_(ツ)_/¯\n\n hook.wrap(\"request\", auth.hook);\n this.auth = auth;\n }\n } else {\n const {\n authStrategy\n } = options,\n otherOptions = _objectWithoutProperties(options, _excluded);\n\n const auth = authStrategy(Object.assign({\n request: this.request,\n log: this.log,\n // we pass the current octokit instance as well as its constructor options\n // to allow for authentication strategies that return a new octokit instance\n // that shares the same internal state as the current one. The original\n // requirement for this was the \"event-octokit\" authentication strategy\n // of https://github.com/probot/octokit-auth-probot.\n octokit: this,\n octokitOptions: otherOptions\n }, options.auth)); // @ts-ignore ¯\\_(ツ)_/¯\n\n hook.wrap(\"request\", auth.hook);\n this.auth = auth;\n } // apply plugins\n // https://stackoverflow.com/a/16345172\n\n\n const classConstructor = this.constructor;\n classConstructor.plugins.forEach(plugin => {\n Object.assign(this, plugin(this, options));\n });\n }\n\n static defaults(defaults) {\n const OctokitWithDefaults = class extends this {\n constructor(...args) {\n const options = args[0] || {};\n\n if (typeof defaults === \"function\") {\n super(defaults(options));\n return;\n }\n\n super(Object.assign({}, defaults, options, options.userAgent && defaults.userAgent ? {\n userAgent: `${options.userAgent} ${defaults.userAgent}`\n } : null));\n }\n\n };\n return OctokitWithDefaults;\n }\n /**\n * Attach a plugin (or many) to your Octokit instance.\n *\n * @example\n * const API = Octokit.plugin(plugin1, plugin2, plugin3, ...)\n */\n\n\n static plugin(...newPlugins) {\n var _a;\n\n const currentPlugins = this.plugins;\n const NewOctokit = (_a = class extends this {}, _a.plugins = currentPlugins.concat(newPlugins.filter(plugin => !currentPlugins.includes(plugin))), _a);\n return NewOctokit;\n }\n\n}\nOctokit.VERSION = VERSION;\nOctokit.plugins = [];\n\nexports.Octokit = Octokit;\n//# sourceMappingURL=index.js.map\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', { value: true });\n\nvar isPlainObject = require('is-plain-object');\nvar universalUserAgent = require('universal-user-agent');\n\nfunction lowercaseKeys(object) {\n if (!object) {\n return {};\n }\n\n return Object.keys(object).reduce((newObj, key) => {\n newObj[key.toLowerCase()] = object[key];\n return newObj;\n }, {});\n}\n\nfunction mergeDeep(defaults, options) {\n const result = Object.assign({}, defaults);\n Object.keys(options).forEach(key => {\n if (isPlainObject.isPlainObject(options[key])) {\n if (!(key in defaults)) Object.assign(result, {\n [key]: options[key]\n });else result[key] = mergeDeep(defaults[key], options[key]);\n } else {\n Object.assign(result, {\n [key]: options[key]\n });\n }\n });\n return result;\n}\n\nfunction removeUndefinedProperties(obj) {\n for (const key in obj) {\n if (obj[key] === undefined) {\n delete obj[key];\n }\n }\n\n return obj;\n}\n\nfunction merge(defaults, route, options) {\n if (typeof route === \"string\") {\n let [method, url] = route.split(\" \");\n options = Object.assign(url ? {\n method,\n url\n } : {\n url: method\n }, options);\n } else {\n options = Object.assign({}, route);\n } // lowercase header names before merging with defaults to avoid duplicates\n\n\n options.headers = lowercaseKeys(options.headers); // remove properties with undefined values before merging\n\n removeUndefinedProperties(options);\n removeUndefinedProperties(options.headers);\n const mergedOptions = mergeDeep(defaults || {}, options); // mediaType.previews arrays are merged, instead of overwritten\n\n if (defaults && defaults.mediaType.previews.length) {\n mergedOptions.mediaType.previews = defaults.mediaType.previews.filter(preview => !mergedOptions.mediaType.previews.includes(preview)).concat(mergedOptions.mediaType.previews);\n }\n\n mergedOptions.mediaType.previews = mergedOptions.mediaType.previews.map(preview => preview.replace(/-preview/, \"\"));\n return mergedOptions;\n}\n\nfunction addQueryParameters(url, parameters) {\n const separator = /\\?/.test(url) ? \"&\" : \"?\";\n const names = Object.keys(parameters);\n\n if (names.length === 0) {\n return url;\n }\n\n return url + separator + names.map(name => {\n if (name === \"q\") {\n return \"q=\" + parameters.q.split(\"+\").map(encodeURIComponent).join(\"+\");\n }\n\n return `${name}=${encodeURIComponent(parameters[name])}`;\n }).join(\"&\");\n}\n\nconst urlVariableRegex = /\\{[^}]+\\}/g;\n\nfunction removeNonChars(variableName) {\n return variableName.replace(/^\\W+|\\W+$/g, \"\").split(/,/);\n}\n\nfunction extractUrlVariableNames(url) {\n const matches = url.match(urlVariableRegex);\n\n if (!matches) {\n return [];\n }\n\n return matches.map(removeNonChars).reduce((a, b) => a.concat(b), []);\n}\n\nfunction omit(object, keysToOmit) {\n return Object.keys(object).filter(option => !keysToOmit.includes(option)).reduce((obj, key) => {\n obj[key] = object[key];\n return obj;\n }, {});\n}\n\n// Based on https://github.com/bramstein/url-template, licensed under BSD\n// TODO: create separate package.\n//\n// Copyright (c) 2012-2014, Bram Stein\n// All rights reserved.\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions\n// are met:\n// 1. Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n// 2. Redistributions in binary form must reproduce the above copyright\n// notice, this list of conditions and the following disclaimer in the\n// documentation and/or other materials provided with the distribution.\n// 3. The name of the author may not be used to endorse or promote products\n// derived from this software without specific prior written permission.\n// THIS SOFTWARE IS PROVIDED BY THE AUTHOR \"AS IS\" AND ANY EXPRESS OR IMPLIED\n// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\n// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO\n// EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\n// INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,\n// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY\n// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\n/* istanbul ignore file */\nfunction encodeReserved(str) {\n return str.split(/(%[0-9A-Fa-f]{2})/g).map(function (part) {\n if (!/%[0-9A-Fa-f]/.test(part)) {\n part = encodeURI(part).replace(/%5B/g, \"[\").replace(/%5D/g, \"]\");\n }\n\n return part;\n }).join(\"\");\n}\n\nfunction encodeUnreserved(str) {\n return encodeURIComponent(str).replace(/[!'()*]/g, function (c) {\n return \"%\" + c.charCodeAt(0).toString(16).toUpperCase();\n });\n}\n\nfunction encodeValue(operator, value, key) {\n value = operator === \"+\" || operator === \"#\" ? encodeReserved(value) : encodeUnreserved(value);\n\n if (key) {\n return encodeUnreserved(key) + \"=\" + value;\n } else {\n return value;\n }\n}\n\nfunction isDefined(value) {\n return value !== undefined && value !== null;\n}\n\nfunction isKeyOperator(operator) {\n return operator === \";\" || operator === \"&\" || operator === \"?\";\n}\n\nfunction getValues(context, operator, key, modifier) {\n var value = context[key],\n result = [];\n\n if (isDefined(value) && value !== \"\") {\n if (typeof value === \"string\" || typeof value === \"number\" || typeof value === \"boolean\") {\n value = value.toString();\n\n if (modifier && modifier !== \"*\") {\n value = value.substring(0, parseInt(modifier, 10));\n }\n\n result.push(encodeValue(operator, value, isKeyOperator(operator) ? key : \"\"));\n } else {\n if (modifier === \"*\") {\n if (Array.isArray(value)) {\n value.filter(isDefined).forEach(function (value) {\n result.push(encodeValue(operator, value, isKeyOperator(operator) ? key : \"\"));\n });\n } else {\n Object.keys(value).forEach(function (k) {\n if (isDefined(value[k])) {\n result.push(encodeValue(operator, value[k], k));\n }\n });\n }\n } else {\n const tmp = [];\n\n if (Array.isArray(value)) {\n value.filter(isDefined).forEach(function (value) {\n tmp.push(encodeValue(operator, value));\n });\n } else {\n Object.keys(value).forEach(function (k) {\n if (isDefined(value[k])) {\n tmp.push(encodeUnreserved(k));\n tmp.push(encodeValue(operator, value[k].toString()));\n }\n });\n }\n\n if (isKeyOperator(operator)) {\n result.push(encodeUnreserved(key) + \"=\" + tmp.join(\",\"));\n } else if (tmp.length !== 0) {\n result.push(tmp.join(\",\"));\n }\n }\n }\n } else {\n if (operator === \";\") {\n if (isDefined(value)) {\n result.push(encodeUnreserved(key));\n }\n } else if (value === \"\" && (operator === \"&\" || operator === \"?\")) {\n result.push(encodeUnreserved(key) + \"=\");\n } else if (value === \"\") {\n result.push(\"\");\n }\n }\n\n return result;\n}\n\nfunction parseUrl(template) {\n return {\n expand: expand.bind(null, template)\n };\n}\n\nfunction expand(template, context) {\n var operators = [\"+\", \"#\", \".\", \"/\", \";\", \"?\", \"&\"];\n return template.replace(/\\{([^\\{\\}]+)\\}|([^\\{\\}]+)/g, function (_, expression, literal) {\n if (expression) {\n let operator = \"\";\n const values = [];\n\n if (operators.indexOf(expression.charAt(0)) !== -1) {\n operator = expression.charAt(0);\n expression = expression.substr(1);\n }\n\n expression.split(/,/g).forEach(function (variable) {\n var tmp = /([^:\\*]*)(?::(\\d+)|(\\*))?/.exec(variable);\n values.push(getValues(context, operator, tmp[1], tmp[2] || tmp[3]));\n });\n\n if (operator && operator !== \"+\") {\n var separator = \",\";\n\n if (operator === \"?\") {\n separator = \"&\";\n } else if (operator !== \"#\") {\n separator = operator;\n }\n\n return (values.length !== 0 ? operator : \"\") + values.join(separator);\n } else {\n return values.join(\",\");\n }\n } else {\n return encodeReserved(literal);\n }\n });\n}\n\nfunction parse(options) {\n // https://fetch.spec.whatwg.org/#methods\n let method = options.method.toUpperCase(); // replace :varname with {varname} to make it RFC 6570 compatible\n\n let url = (options.url || \"/\").replace(/:([a-z]\\w+)/g, \"{$1}\");\n let headers = Object.assign({}, options.headers);\n let body;\n let parameters = omit(options, [\"method\", \"baseUrl\", \"url\", \"headers\", \"request\", \"mediaType\"]); // extract variable names from URL to calculate remaining variables later\n\n const urlVariableNames = extractUrlVariableNames(url);\n url = parseUrl(url).expand(parameters);\n\n if (!/^http/.test(url)) {\n url = options.baseUrl + url;\n }\n\n const omittedParameters = Object.keys(options).filter(option => urlVariableNames.includes(option)).concat(\"baseUrl\");\n const remainingParameters = omit(parameters, omittedParameters);\n const isBinaryRequest = /application\\/octet-stream/i.test(headers.accept);\n\n if (!isBinaryRequest) {\n if (options.mediaType.format) {\n // e.g. application/vnd.github.v3+json => application/vnd.github.v3.raw\n headers.accept = headers.accept.split(/,/).map(preview => preview.replace(/application\\/vnd(\\.\\w+)(\\.v3)?(\\.\\w+)?(\\+json)?$/, `application/vnd$1$2.${options.mediaType.format}`)).join(\",\");\n }\n\n if (options.mediaType.previews.length) {\n const previewsFromAcceptHeader = headers.accept.match(/[\\w-]+(?=-preview)/g) || [];\n headers.accept = previewsFromAcceptHeader.concat(options.mediaType.previews).map(preview => {\n const format = options.mediaType.format ? `.${options.mediaType.format}` : \"+json\";\n return `application/vnd.github.${preview}-preview${format}`;\n }).join(\",\");\n }\n } // for GET/HEAD requests, set URL query parameters from remaining parameters\n // for PATCH/POST/PUT/DELETE requests, set request body from remaining parameters\n\n\n if ([\"GET\", \"HEAD\"].includes(method)) {\n url = addQueryParameters(url, remainingParameters);\n } else {\n if (\"data\" in remainingParameters) {\n body = remainingParameters.data;\n } else {\n if (Object.keys(remainingParameters).length) {\n body = remainingParameters;\n } else {\n headers[\"content-length\"] = 0;\n }\n }\n } // default content-type for JSON if body is set\n\n\n if (!headers[\"content-type\"] && typeof body !== \"undefined\") {\n headers[\"content-type\"] = \"application/json; charset=utf-8\";\n } // GitHub expects 'content-length: 0' header for PUT/PATCH requests without body.\n // fetch does not allow to set `content-length` header, but we can set body to an empty string\n\n\n if ([\"PATCH\", \"PUT\"].includes(method) && typeof body === \"undefined\") {\n body = \"\";\n } // Only return body/request keys if present\n\n\n return Object.assign({\n method,\n url,\n headers\n }, typeof body !== \"undefined\" ? {\n body\n } : null, options.request ? {\n request: options.request\n } : null);\n}\n\nfunction endpointWithDefaults(defaults, route, options) {\n return parse(merge(defaults, route, options));\n}\n\nfunction withDefaults(oldDefaults, newDefaults) {\n const DEFAULTS = merge(oldDefaults, newDefaults);\n const endpoint = endpointWithDefaults.bind(null, DEFAULTS);\n return Object.assign(endpoint, {\n DEFAULTS,\n defaults: withDefaults.bind(null, DEFAULTS),\n merge: merge.bind(null, DEFAULTS),\n parse\n });\n}\n\nconst VERSION = \"6.0.11\";\n\nconst userAgent = `octokit-endpoint.js/${VERSION} ${universalUserAgent.getUserAgent()}`; // DEFAULTS has all properties set that EndpointOptions has, except url.\n// So we use RequestParameters and add method as additional required property.\n\nconst DEFAULTS = {\n method: \"GET\",\n baseUrl: \"https://api.github.com\",\n headers: {\n accept: \"application/vnd.github.v3+json\",\n \"user-agent\": userAgent\n },\n mediaType: {\n format: \"\",\n previews: []\n }\n};\n\nconst endpoint = withDefaults(null, DEFAULTS);\n\nexports.endpoint = endpoint;\n//# sourceMappingURL=index.js.map\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', { value: true });\n\nvar request = require('@octokit/request');\nvar universalUserAgent = require('universal-user-agent');\n\nconst VERSION = \"4.8.0\";\n\nfunction _buildMessageForResponseErrors(data) {\n return `Request failed due to following response errors:\\n` + data.errors.map(e => ` - ${e.message}`).join(\"\\n\");\n}\n\nclass GraphqlResponseError extends Error {\n constructor(request, headers, response) {\n super(_buildMessageForResponseErrors(response));\n this.request = request;\n this.headers = headers;\n this.response = response;\n this.name = \"GraphqlResponseError\"; // Expose the errors and response data in their shorthand properties.\n\n this.errors = response.errors;\n this.data = response.data; // Maintains proper stack trace (only available on V8)\n\n /* istanbul ignore next */\n\n if (Error.captureStackTrace) {\n Error.captureStackTrace(this, this.constructor);\n }\n }\n\n}\n\nconst NON_VARIABLE_OPTIONS = [\"method\", \"baseUrl\", \"url\", \"headers\", \"request\", \"query\", \"mediaType\"];\nconst FORBIDDEN_VARIABLE_OPTIONS = [\"query\", \"method\", \"url\"];\nconst GHES_V3_SUFFIX_REGEX = /\\/api\\/v3\\/?$/;\nfunction graphql(request, query, options) {\n if (options) {\n if (typeof query === \"string\" && \"query\" in options) {\n return Promise.reject(new Error(`[@octokit/graphql] \"query\" cannot be used as variable name`));\n }\n\n for (const key in options) {\n if (!FORBIDDEN_VARIABLE_OPTIONS.includes(key)) continue;\n return Promise.reject(new Error(`[@octokit/graphql] \"${key}\" cannot be used as variable name`));\n }\n }\n\n const parsedOptions = typeof query === \"string\" ? Object.assign({\n query\n }, options) : query;\n const requestOptions = Object.keys(parsedOptions).reduce((result, key) => {\n if (NON_VARIABLE_OPTIONS.includes(key)) {\n result[key] = parsedOptions[key];\n return result;\n }\n\n if (!result.variables) {\n result.variables = {};\n }\n\n result.variables[key] = parsedOptions[key];\n return result;\n }, {}); // workaround for GitHub Enterprise baseUrl set with /api/v3 suffix\n // https://github.com/octokit/auth-app.js/issues/111#issuecomment-657610451\n\n const baseUrl = parsedOptions.baseUrl || request.endpoint.DEFAULTS.baseUrl;\n\n if (GHES_V3_SUFFIX_REGEX.test(baseUrl)) {\n requestOptions.url = baseUrl.replace(GHES_V3_SUFFIX_REGEX, \"/api/graphql\");\n }\n\n return request(requestOptions).then(response => {\n if (response.data.errors) {\n const headers = {};\n\n for (const key of Object.keys(response.headers)) {\n headers[key] = response.headers[key];\n }\n\n throw new GraphqlResponseError(requestOptions, headers, response.data);\n }\n\n return response.data.data;\n });\n}\n\nfunction withDefaults(request$1, newDefaults) {\n const newRequest = request$1.defaults(newDefaults);\n\n const newApi = (query, options) => {\n return graphql(newRequest, query, options);\n };\n\n return Object.assign(newApi, {\n defaults: withDefaults.bind(null, newRequest),\n endpoint: request.request.endpoint\n });\n}\n\nconst graphql$1 = withDefaults(request.request, {\n headers: {\n \"user-agent\": `octokit-graphql.js/${VERSION} ${universalUserAgent.getUserAgent()}`\n },\n method: \"POST\",\n url: \"/graphql\"\n});\nfunction withCustomRequest(customRequest) {\n return withDefaults(customRequest, {\n method: \"POST\",\n url: \"/graphql\"\n });\n}\n\nexports.GraphqlResponseError = GraphqlResponseError;\nexports.graphql = graphql$1;\nexports.withCustomRequest = withCustomRequest;\n//# sourceMappingURL=index.js.map\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', { value: true });\n\nfunction _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }\n\nvar deprecation = require('deprecation');\nvar once = _interopDefault(require('once'));\n\nconst logOnceCode = once(deprecation => console.warn(deprecation));\nconst logOnceHeaders = once(deprecation => console.warn(deprecation));\n/**\n * Error with extra properties to help with debugging\n */\n\nclass RequestError extends Error {\n constructor(message, statusCode, options) {\n super(message); // Maintains proper stack trace (only available on V8)\n\n /* istanbul ignore next */\n\n if (Error.captureStackTrace) {\n Error.captureStackTrace(this, this.constructor);\n }\n\n this.name = \"HttpError\";\n this.status = statusCode;\n let headers;\n\n if (\"headers\" in options && typeof options.headers !== \"undefined\") {\n headers = options.headers;\n }\n\n if (\"response\" in options) {\n this.response = options.response;\n headers = options.response.headers;\n } // redact request credentials without mutating original request options\n\n\n const requestCopy = Object.assign({}, options.request);\n\n if (options.request.headers.authorization) {\n requestCopy.headers = Object.assign({}, options.request.headers, {\n authorization: options.request.headers.authorization.replace(/ .*$/, \" [REDACTED]\")\n });\n }\n\n requestCopy.url = requestCopy.url // client_id & client_secret can be passed as URL query parameters to increase rate limit\n // see https://developer.github.com/v3/#increasing-the-unauthenticated-rate-limit-for-oauth-applications\n .replace(/\\bclient_secret=\\w+/g, \"client_secret=[REDACTED]\") // OAuth tokens can be passed as URL query parameters, although it is not recommended\n // see https://developer.github.com/v3/#oauth2-token-sent-in-a-header\n .replace(/\\baccess_token=\\w+/g, \"access_token=[REDACTED]\");\n this.request = requestCopy; // deprecations\n\n Object.defineProperty(this, \"code\", {\n get() {\n logOnceCode(new deprecation.Deprecation(\"[@octokit/request-error] `error.code` is deprecated, use `error.status`.\"));\n return statusCode;\n }\n\n });\n Object.defineProperty(this, \"headers\", {\n get() {\n logOnceHeaders(new deprecation.Deprecation(\"[@octokit/request-error] `error.headers` is deprecated, use `error.response.headers`.\"));\n return headers || {};\n }\n\n });\n }\n\n}\n\nexports.RequestError = RequestError;\n//# sourceMappingURL=index.js.map\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', { value: true });\n\nfunction _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }\n\nvar endpoint = require('@octokit/endpoint');\nvar universalUserAgent = require('universal-user-agent');\nvar isPlainObject = require('is-plain-object');\nvar nodeFetch = _interopDefault(require('node-fetch'));\nvar requestError = require('@octokit/request-error');\n\nconst VERSION = \"5.6.2\";\n\nfunction getBufferResponse(response) {\n return response.arrayBuffer();\n}\n\nfunction fetchWrapper(requestOptions) {\n const log = requestOptions.request && requestOptions.request.log ? requestOptions.request.log : console;\n\n if (isPlainObject.isPlainObject(requestOptions.body) || Array.isArray(requestOptions.body)) {\n requestOptions.body = JSON.stringify(requestOptions.body);\n }\n\n let headers = {};\n let status;\n let url;\n const fetch = requestOptions.request && requestOptions.request.fetch || nodeFetch;\n return fetch(requestOptions.url, Object.assign({\n method: requestOptions.method,\n body: requestOptions.body,\n headers: requestOptions.headers,\n redirect: requestOptions.redirect\n }, // `requestOptions.request.agent` type is incompatible\n // see https://github.com/octokit/types.ts/pull/264\n requestOptions.request)).then(async response => {\n url = response.url;\n status = response.status;\n\n for (const keyAndValue of response.headers) {\n headers[keyAndValue[0]] = keyAndValue[1];\n }\n\n if (\"deprecation\" in headers) {\n const matches = headers.link && headers.link.match(/<([^>]+)>; rel=\"deprecation\"/);\n const deprecationLink = matches && matches.pop();\n log.warn(`[@octokit/request] \"${requestOptions.method} ${requestOptions.url}\" is deprecated. It is scheduled to be removed on ${headers.sunset}${deprecationLink ? `. See ${deprecationLink}` : \"\"}`);\n }\n\n if (status === 204 || status === 205) {\n return;\n } // GitHub API returns 200 for HEAD requests\n\n\n if (requestOptions.method === \"HEAD\") {\n if (status < 400) {\n return;\n }\n\n throw new requestError.RequestError(response.statusText, status, {\n response: {\n url,\n status,\n headers,\n data: undefined\n },\n request: requestOptions\n });\n }\n\n if (status === 304) {\n throw new requestError.RequestError(\"Not modified\", status, {\n response: {\n url,\n status,\n headers,\n data: await getResponseData(response)\n },\n request: requestOptions\n });\n }\n\n if (status >= 400) {\n const data = await getResponseData(response);\n const error = new requestError.RequestError(toErrorMessage(data), status, {\n response: {\n url,\n status,\n headers,\n data\n },\n request: requestOptions\n });\n throw error;\n }\n\n return getResponseData(response);\n }).then(data => {\n return {\n status,\n url,\n headers,\n data\n };\n }).catch(error => {\n if (error instanceof requestError.RequestError) throw error;\n throw new requestError.RequestError(error.message, 500, {\n request: requestOptions\n });\n });\n}\n\nasync function getResponseData(response) {\n const contentType = response.headers.get(\"content-type\");\n\n if (/application\\/json/.test(contentType)) {\n return response.json();\n }\n\n if (!contentType || /^text\\/|charset=utf-8$/.test(contentType)) {\n return response.text();\n }\n\n return getBufferResponse(response);\n}\n\nfunction toErrorMessage(data) {\n if (typeof data === \"string\") return data; // istanbul ignore else - just in case\n\n if (\"message\" in data) {\n if (Array.isArray(data.errors)) {\n return `${data.message}: ${data.errors.map(JSON.stringify).join(\", \")}`;\n }\n\n return data.message;\n } // istanbul ignore next - just in case\n\n\n return `Unknown error: ${JSON.stringify(data)}`;\n}\n\nfunction withDefaults(oldEndpoint, newDefaults) {\n const endpoint = oldEndpoint.defaults(newDefaults);\n\n const newApi = function (route, parameters) {\n const endpointOptions = endpoint.merge(route, parameters);\n\n if (!endpointOptions.request || !endpointOptions.request.hook) {\n return fetchWrapper(endpoint.parse(endpointOptions));\n }\n\n const request = (route, parameters) => {\n return fetchWrapper(endpoint.parse(endpoint.merge(route, parameters)));\n };\n\n Object.assign(request, {\n endpoint,\n defaults: withDefaults.bind(null, endpoint)\n });\n return endpointOptions.request.hook(request, endpointOptions);\n };\n\n return Object.assign(newApi, {\n endpoint,\n defaults: withDefaults.bind(null, endpoint)\n });\n}\n\nconst request = withDefaults(endpoint.endpoint, {\n headers: {\n \"user-agent\": `octokit-request.js/${VERSION} ${universalUserAgent.getUserAgent()}`\n }\n});\n\nexports.request = request;\n//# sourceMappingURL=index.js.map\n","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ContextAPI = void 0;\nconst NoopContextManager_1 = require(\"../context/NoopContextManager\");\nconst global_utils_1 = require(\"../internal/global-utils\");\nconst diag_1 = require(\"./diag\");\nconst API_NAME = 'context';\nconst NOOP_CONTEXT_MANAGER = new NoopContextManager_1.NoopContextManager();\n/**\n * Singleton object which represents the entry point to the OpenTelemetry Context API\n */\nclass ContextAPI {\n /** Empty private constructor prevents end users from constructing a new instance of the API */\n constructor() { }\n /** Get the singleton instance of the Context API */\n static getInstance() {\n if (!this._instance) {\n this._instance = new ContextAPI();\n }\n return this._instance;\n }\n /**\n * Set the current context manager.\n *\n * @returns true if the context manager was successfully registered, else false\n */\n setGlobalContextManager(contextManager) {\n return (0, global_utils_1.registerGlobal)(API_NAME, contextManager, diag_1.DiagAPI.instance());\n }\n /**\n * Get the currently active context\n */\n active() {\n return this._getContextManager().active();\n }\n /**\n * Execute a function with an active context\n *\n * @param context context to be active during function execution\n * @param fn function to execute in a context\n * @param thisArg optional receiver to be used for calling fn\n * @param args optional arguments forwarded to fn\n */\n with(context, fn, thisArg, ...args) {\n return this._getContextManager().with(context, fn, thisArg, ...args);\n }\n /**\n * Bind a context to a target function or event emitter\n *\n * @param context context to bind to the event emitter or function. Defaults to the currently active context\n * @param target function or event emitter to bind\n */\n bind(context, target) {\n return this._getContextManager().bind(context, target);\n }\n _getContextManager() {\n return (0, global_utils_1.getGlobal)(API_NAME) || NOOP_CONTEXT_MANAGER;\n }\n /** Disable and remove the global context manager */\n disable() {\n this._getContextManager().disable();\n (0, global_utils_1.unregisterGlobal)(API_NAME, diag_1.DiagAPI.instance());\n }\n}\nexports.ContextAPI = ContextAPI;\n//# sourceMappingURL=context.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.DiagAPI = void 0;\nconst ComponentLogger_1 = require(\"../diag/ComponentLogger\");\nconst logLevelLogger_1 = require(\"../diag/internal/logLevelLogger\");\nconst types_1 = require(\"../diag/types\");\nconst global_utils_1 = require(\"../internal/global-utils\");\nconst API_NAME = 'diag';\n/**\n * Singleton object which represents the entry point to the OpenTelemetry internal\n * diagnostic API\n */\nclass DiagAPI {\n /**\n * Private internal constructor\n * @private\n */\n constructor() {\n function _logProxy(funcName) {\n return function (...args) {\n const logger = (0, global_utils_1.getGlobal)('diag');\n // shortcut if logger not set\n if (!logger)\n return;\n return logger[funcName](...args);\n };\n }\n // Using self local variable for minification purposes as 'this' cannot be minified\n const self = this;\n // DiagAPI specific functions\n const setLogger = (logger, optionsOrLogLevel = { logLevel: types_1.DiagLogLevel.INFO }) => {\n var _a, _b, _c;\n if (logger === self) {\n // There isn't much we can do here.\n // Logging to the console might break the user application.\n // Try to log to self. If a logger was previously registered it will receive the log.\n const err = new Error('Cannot use diag as the logger for itself. Please use a DiagLogger implementation like ConsoleDiagLogger or a custom implementation');\n self.error((_a = err.stack) !== null && _a !== void 0 ? _a : err.message);\n return false;\n }\n if (typeof optionsOrLogLevel === 'number') {\n optionsOrLogLevel = {\n logLevel: optionsOrLogLevel,\n };\n }\n const oldLogger = (0, global_utils_1.getGlobal)('diag');\n const newLogger = (0, logLevelLogger_1.createLogLevelDiagLogger)((_b = optionsOrLogLevel.logLevel) !== null && _b !== void 0 ? _b : types_1.DiagLogLevel.INFO, logger);\n // There already is an logger registered. We'll let it know before overwriting it.\n if (oldLogger && !optionsOrLogLevel.suppressOverrideMessage) {\n const stack = (_c = new Error().stack) !== null && _c !== void 0 ? _c : '';\n oldLogger.warn(`Current logger will be overwritten from ${stack}`);\n newLogger.warn(`Current logger will overwrite one already registered from ${stack}`);\n }\n return (0, global_utils_1.registerGlobal)('diag', newLogger, self, true);\n };\n self.setLogger = setLogger;\n self.disable = () => {\n (0, global_utils_1.unregisterGlobal)(API_NAME, self);\n };\n self.createComponentLogger = (options) => {\n return new ComponentLogger_1.DiagComponentLogger(options);\n };\n self.verbose = _logProxy('verbose');\n self.debug = _logProxy('debug');\n self.info = _logProxy('info');\n self.warn = _logProxy('warn');\n self.error = _logProxy('error');\n }\n /** Get the singleton instance of the DiagAPI API */\n static instance() {\n if (!this._instance) {\n this._instance = new DiagAPI();\n }\n return this._instance;\n }\n}\nexports.DiagAPI = DiagAPI;\n//# sourceMappingURL=diag.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.MetricsAPI = void 0;\nconst NoopMeterProvider_1 = require(\"../metrics/NoopMeterProvider\");\nconst global_utils_1 = require(\"../internal/global-utils\");\nconst diag_1 = require(\"./diag\");\nconst API_NAME = 'metrics';\n/**\n * Singleton object which represents the entry point to the OpenTelemetry Metrics API\n */\nclass MetricsAPI {\n /** Empty private constructor prevents end users from constructing a new instance of the API */\n constructor() { }\n /** Get the singleton instance of the Metrics API */\n static getInstance() {\n if (!this._instance) {\n this._instance = new MetricsAPI();\n }\n return this._instance;\n }\n /**\n * Set the current global meter provider.\n * Returns true if the meter provider was successfully registered, else false.\n */\n setGlobalMeterProvider(provider) {\n return (0, global_utils_1.registerGlobal)(API_NAME, provider, diag_1.DiagAPI.instance());\n }\n /**\n * Returns the global meter provider.\n */\n getMeterProvider() {\n return (0, global_utils_1.getGlobal)(API_NAME) || NoopMeterProvider_1.NOOP_METER_PROVIDER;\n }\n /**\n * Returns a meter from the global meter provider.\n */\n getMeter(name, version, options) {\n return this.getMeterProvider().getMeter(name, version, options);\n }\n /** Remove the global meter provider */\n disable() {\n (0, global_utils_1.unregisterGlobal)(API_NAME, diag_1.DiagAPI.instance());\n }\n}\nexports.MetricsAPI = MetricsAPI;\n//# sourceMappingURL=metrics.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.PropagationAPI = void 0;\nconst global_utils_1 = require(\"../internal/global-utils\");\nconst NoopTextMapPropagator_1 = require(\"../propagation/NoopTextMapPropagator\");\nconst TextMapPropagator_1 = require(\"../propagation/TextMapPropagator\");\nconst context_helpers_1 = require(\"../baggage/context-helpers\");\nconst utils_1 = require(\"../baggage/utils\");\nconst diag_1 = require(\"./diag\");\nconst API_NAME = 'propagation';\nconst NOOP_TEXT_MAP_PROPAGATOR = new NoopTextMapPropagator_1.NoopTextMapPropagator();\n/**\n * Singleton object which represents the entry point to the OpenTelemetry Propagation API\n */\nclass PropagationAPI {\n /** Empty private constructor prevents end users from constructing a new instance of the API */\n constructor() {\n this.createBaggage = utils_1.createBaggage;\n this.getBaggage = context_helpers_1.getBaggage;\n this.getActiveBaggage = context_helpers_1.getActiveBaggage;\n this.setBaggage = context_helpers_1.setBaggage;\n this.deleteBaggage = context_helpers_1.deleteBaggage;\n }\n /** Get the singleton instance of the Propagator API */\n static getInstance() {\n if (!this._instance) {\n this._instance = new PropagationAPI();\n }\n return this._instance;\n }\n /**\n * Set the current propagator.\n *\n * @returns true if the propagator was successfully registered, else false\n */\n setGlobalPropagator(propagator) {\n return (0, global_utils_1.registerGlobal)(API_NAME, propagator, diag_1.DiagAPI.instance());\n }\n /**\n * Inject context into a carrier to be propagated inter-process\n *\n * @param context Context carrying tracing data to inject\n * @param carrier carrier to inject context into\n * @param setter Function used to set values on the carrier\n */\n inject(context, carrier, setter = TextMapPropagator_1.defaultTextMapSetter) {\n return this._getGlobalPropagator().inject(context, carrier, setter);\n }\n /**\n * Extract context from a carrier\n *\n * @param context Context which the newly created context will inherit from\n * @param carrier Carrier to extract context from\n * @param getter Function used to extract keys from a carrier\n */\n extract(context, carrier, getter = TextMapPropagator_1.defaultTextMapGetter) {\n return this._getGlobalPropagator().extract(context, carrier, getter);\n }\n /**\n * Return a list of all fields which may be used by the propagator.\n */\n fields() {\n return this._getGlobalPropagator().fields();\n }\n /** Remove the global propagator */\n disable() {\n (0, global_utils_1.unregisterGlobal)(API_NAME, diag_1.DiagAPI.instance());\n }\n _getGlobalPropagator() {\n return (0, global_utils_1.getGlobal)(API_NAME) || NOOP_TEXT_MAP_PROPAGATOR;\n }\n}\nexports.PropagationAPI = PropagationAPI;\n//# sourceMappingURL=propagation.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.TraceAPI = void 0;\nconst global_utils_1 = require(\"../internal/global-utils\");\nconst ProxyTracerProvider_1 = require(\"../trace/ProxyTracerProvider\");\nconst spancontext_utils_1 = require(\"../trace/spancontext-utils\");\nconst context_utils_1 = require(\"../trace/context-utils\");\nconst diag_1 = require(\"./diag\");\nconst API_NAME = 'trace';\n/**\n * Singleton object which represents the entry point to the OpenTelemetry Tracing API\n */\nclass TraceAPI {\n /** Empty private constructor prevents end users from constructing a new instance of the API */\n constructor() {\n this._proxyTracerProvider = new ProxyTracerProvider_1.ProxyTracerProvider();\n this.wrapSpanContext = spancontext_utils_1.wrapSpanContext;\n this.isSpanContextValid = spancontext_utils_1.isSpanContextValid;\n this.deleteSpan = context_utils_1.deleteSpan;\n this.getSpan = context_utils_1.getSpan;\n this.getActiveSpan = context_utils_1.getActiveSpan;\n this.getSpanContext = context_utils_1.getSpanContext;\n this.setSpan = context_utils_1.setSpan;\n this.setSpanContext = context_utils_1.setSpanContext;\n }\n /** Get the singleton instance of the Trace API */\n static getInstance() {\n if (!this._instance) {\n this._instance = new TraceAPI();\n }\n return this._instance;\n }\n /**\n * Set the current global tracer.\n *\n * @returns true if the tracer provider was successfully registered, else false\n */\n setGlobalTracerProvider(provider) {\n const success = (0, global_utils_1.registerGlobal)(API_NAME, this._proxyTracerProvider, diag_1.DiagAPI.instance());\n if (success) {\n this._proxyTracerProvider.setDelegate(provider);\n }\n return success;\n }\n /**\n * Returns the global tracer provider.\n */\n getTracerProvider() {\n return (0, global_utils_1.getGlobal)(API_NAME) || this._proxyTracerProvider;\n }\n /**\n * Returns a tracer from the global tracer provider.\n */\n getTracer(name, version) {\n return this.getTracerProvider().getTracer(name, version);\n }\n /** Remove the global tracer provider */\n disable() {\n (0, global_utils_1.unregisterGlobal)(API_NAME, diag_1.DiagAPI.instance());\n this._proxyTracerProvider = new ProxyTracerProvider_1.ProxyTracerProvider();\n }\n}\nexports.TraceAPI = TraceAPI;\n//# sourceMappingURL=trace.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.deleteBaggage = exports.setBaggage = exports.getActiveBaggage = exports.getBaggage = void 0;\nconst context_1 = require(\"../api/context\");\nconst context_2 = require(\"../context/context\");\n/**\n * Baggage key\n */\nconst BAGGAGE_KEY = (0, context_2.createContextKey)('OpenTelemetry Baggage Key');\n/**\n * Retrieve the current baggage from the given context\n *\n * @param {Context} Context that manage all context values\n * @returns {Baggage} Extracted baggage from the context\n */\nfunction getBaggage(context) {\n return context.getValue(BAGGAGE_KEY) || undefined;\n}\nexports.getBaggage = getBaggage;\n/**\n * Retrieve the current baggage from the active/current context\n *\n * @returns {Baggage} Extracted baggage from the context\n */\nfunction getActiveBaggage() {\n return getBaggage(context_1.ContextAPI.getInstance().active());\n}\nexports.getActiveBaggage = getActiveBaggage;\n/**\n * Store a baggage in the given context\n *\n * @param {Context} Context that manage all context values\n * @param {Baggage} baggage that will be set in the actual context\n */\nfunction setBaggage(context, baggage) {\n return context.setValue(BAGGAGE_KEY, baggage);\n}\nexports.setBaggage = setBaggage;\n/**\n * Delete the baggage stored in the given context\n *\n * @param {Context} Context that manage all context values\n */\nfunction deleteBaggage(context) {\n return context.deleteValue(BAGGAGE_KEY);\n}\nexports.deleteBaggage = deleteBaggage;\n//# sourceMappingURL=context-helpers.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.BaggageImpl = void 0;\nclass BaggageImpl {\n constructor(entries) {\n this._entries = entries ? new Map(entries) : new Map();\n }\n getEntry(key) {\n const entry = this._entries.get(key);\n if (!entry) {\n return undefined;\n }\n return Object.assign({}, entry);\n }\n getAllEntries() {\n return Array.from(this._entries.entries()).map(([k, v]) => [k, v]);\n }\n setEntry(key, entry) {\n const newBaggage = new BaggageImpl(this._entries);\n newBaggage._entries.set(key, entry);\n return newBaggage;\n }\n removeEntry(key) {\n const newBaggage = new BaggageImpl(this._entries);\n newBaggage._entries.delete(key);\n return newBaggage;\n }\n removeEntries(...keys) {\n const newBaggage = new BaggageImpl(this._entries);\n for (const key of keys) {\n newBaggage._entries.delete(key);\n }\n return newBaggage;\n }\n clear() {\n return new BaggageImpl();\n }\n}\nexports.BaggageImpl = BaggageImpl;\n//# sourceMappingURL=baggage-impl.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.baggageEntryMetadataSymbol = void 0;\n/**\n * Symbol used to make BaggageEntryMetadata an opaque type\n */\nexports.baggageEntryMetadataSymbol = Symbol('BaggageEntryMetadata');\n//# sourceMappingURL=symbol.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.baggageEntryMetadataFromString = exports.createBaggage = void 0;\nconst diag_1 = require(\"../api/diag\");\nconst baggage_impl_1 = require(\"./internal/baggage-impl\");\nconst symbol_1 = require(\"./internal/symbol\");\nconst diag = diag_1.DiagAPI.instance();\n/**\n * Create a new Baggage with optional entries\n *\n * @param entries An array of baggage entries the new baggage should contain\n */\nfunction createBaggage(entries = {}) {\n return new baggage_impl_1.BaggageImpl(new Map(Object.entries(entries)));\n}\nexports.createBaggage = createBaggage;\n/**\n * Create a serializable BaggageEntryMetadata object from a string.\n *\n * @param str string metadata. Format is currently not defined by the spec and has no special meaning.\n *\n */\nfunction baggageEntryMetadataFromString(str) {\n if (typeof str !== 'string') {\n diag.error(`Cannot create baggage metadata from unknown type: ${typeof str}`);\n str = '';\n }\n return {\n __TYPE__: symbol_1.baggageEntryMetadataSymbol,\n toString() {\n return str;\n },\n };\n}\nexports.baggageEntryMetadataFromString = baggageEntryMetadataFromString;\n//# sourceMappingURL=utils.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.context = void 0;\n// Split module-level variable definition into separate files to allow\n// tree-shaking on each api instance.\nconst context_1 = require(\"./api/context\");\n/** Entrypoint for context API */\nexports.context = context_1.ContextAPI.getInstance();\n//# sourceMappingURL=context-api.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.NoopContextManager = void 0;\nconst context_1 = require(\"./context\");\nclass NoopContextManager {\n active() {\n return context_1.ROOT_CONTEXT;\n }\n with(_context, fn, thisArg, ...args) {\n return fn.call(thisArg, ...args);\n }\n bind(_context, target) {\n return target;\n }\n enable() {\n return this;\n }\n disable() {\n return this;\n }\n}\nexports.NoopContextManager = NoopContextManager;\n//# sourceMappingURL=NoopContextManager.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ROOT_CONTEXT = exports.createContextKey = void 0;\n/** Get a key to uniquely identify a context value */\nfunction createContextKey(description) {\n // The specification states that for the same input, multiple calls should\n // return different keys. Due to the nature of the JS dependency management\n // system, this creates problems where multiple versions of some package\n // could hold different keys for the same property.\n //\n // Therefore, we use Symbol.for which returns the same key for the same input.\n return Symbol.for(description);\n}\nexports.createContextKey = createContextKey;\nclass BaseContext {\n /**\n * Construct a new context which inherits values from an optional parent context.\n *\n * @param parentContext a context from which to inherit values\n */\n constructor(parentContext) {\n // for minification\n const self = this;\n self._currentContext = parentContext ? new Map(parentContext) : new Map();\n self.getValue = (key) => self._currentContext.get(key);\n self.setValue = (key, value) => {\n const context = new BaseContext(self._currentContext);\n context._currentContext.set(key, value);\n return context;\n };\n self.deleteValue = (key) => {\n const context = new BaseContext(self._currentContext);\n context._currentContext.delete(key);\n return context;\n };\n }\n}\n/** The root context is used as the default parent context when there is no active context */\nexports.ROOT_CONTEXT = new BaseContext();\n//# sourceMappingURL=context.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.diag = void 0;\n// Split module-level variable definition into separate files to allow\n// tree-shaking on each api instance.\nconst diag_1 = require(\"./api/diag\");\n/**\n * Entrypoint for Diag API.\n * Defines Diagnostic handler used for internal diagnostic logging operations.\n * The default provides a Noop DiagLogger implementation which may be changed via the\n * diag.setLogger(logger: DiagLogger) function.\n */\nexports.diag = diag_1.DiagAPI.instance();\n//# sourceMappingURL=diag-api.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.DiagComponentLogger = void 0;\nconst global_utils_1 = require(\"../internal/global-utils\");\n/**\n * Component Logger which is meant to be used as part of any component which\n * will add automatically additional namespace in front of the log message.\n * It will then forward all message to global diag logger\n * @example\n * const cLogger = diag.createComponentLogger({ namespace: '@opentelemetry/instrumentation-http' });\n * cLogger.debug('test');\n * // @opentelemetry/instrumentation-http test\n */\nclass DiagComponentLogger {\n constructor(props) {\n this._namespace = props.namespace || 'DiagComponentLogger';\n }\n debug(...args) {\n return logProxy('debug', this._namespace, args);\n }\n error(...args) {\n return logProxy('error', this._namespace, args);\n }\n info(...args) {\n return logProxy('info', this._namespace, args);\n }\n warn(...args) {\n return logProxy('warn', this._namespace, args);\n }\n verbose(...args) {\n return logProxy('verbose', this._namespace, args);\n }\n}\nexports.DiagComponentLogger = DiagComponentLogger;\nfunction logProxy(funcName, namespace, args) {\n const logger = (0, global_utils_1.getGlobal)('diag');\n // shortcut if logger not set\n if (!logger) {\n return;\n }\n args.unshift(namespace);\n return logger[funcName](...args);\n}\n//# sourceMappingURL=ComponentLogger.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.DiagConsoleLogger = void 0;\nconst consoleMap = [\n { n: 'error', c: 'error' },\n { n: 'warn', c: 'warn' },\n { n: 'info', c: 'info' },\n { n: 'debug', c: 'debug' },\n { n: 'verbose', c: 'trace' },\n];\n/**\n * A simple Immutable Console based diagnostic logger which will output any messages to the Console.\n * If you want to limit the amount of logging to a specific level or lower use the\n * {@link createLogLevelDiagLogger}\n */\nclass DiagConsoleLogger {\n constructor() {\n function _consoleFunc(funcName) {\n return function (...args) {\n if (console) {\n // Some environments only expose the console when the F12 developer console is open\n // eslint-disable-next-line no-console\n let theFunc = console[funcName];\n if (typeof theFunc !== 'function') {\n // Not all environments support all functions\n // eslint-disable-next-line no-console\n theFunc = console.log;\n }\n // One last final check\n if (typeof theFunc === 'function') {\n return theFunc.apply(console, args);\n }\n }\n };\n }\n for (let i = 0; i < consoleMap.length; i++) {\n this[consoleMap[i].n] = _consoleFunc(consoleMap[i].c);\n }\n }\n}\nexports.DiagConsoleLogger = DiagConsoleLogger;\n//# sourceMappingURL=consoleLogger.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.createLogLevelDiagLogger = void 0;\nconst types_1 = require(\"../types\");\nfunction createLogLevelDiagLogger(maxLevel, logger) {\n if (maxLevel < types_1.DiagLogLevel.NONE) {\n maxLevel = types_1.DiagLogLevel.NONE;\n }\n else if (maxLevel > types_1.DiagLogLevel.ALL) {\n maxLevel = types_1.DiagLogLevel.ALL;\n }\n // In case the logger is null or undefined\n logger = logger || {};\n function _filterFunc(funcName, theLevel) {\n const theFunc = logger[funcName];\n if (typeof theFunc === 'function' && maxLevel >= theLevel) {\n return theFunc.bind(logger);\n }\n return function () { };\n }\n return {\n error: _filterFunc('error', types_1.DiagLogLevel.ERROR),\n warn: _filterFunc('warn', types_1.DiagLogLevel.WARN),\n info: _filterFunc('info', types_1.DiagLogLevel.INFO),\n debug: _filterFunc('debug', types_1.DiagLogLevel.DEBUG),\n verbose: _filterFunc('verbose', types_1.DiagLogLevel.VERBOSE),\n };\n}\nexports.createLogLevelDiagLogger = createLogLevelDiagLogger;\n//# sourceMappingURL=logLevelLogger.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.DiagLogLevel = void 0;\n/**\n * Defines the available internal logging levels for the diagnostic logger, the numeric values\n * of the levels are defined to match the original values from the initial LogLevel to avoid\n * compatibility/migration issues for any implementation that assume the numeric ordering.\n */\nvar DiagLogLevel;\n(function (DiagLogLevel) {\n /** Diagnostic Logging level setting to disable all logging (except and forced logs) */\n DiagLogLevel[DiagLogLevel[\"NONE\"] = 0] = \"NONE\";\n /** Identifies an error scenario */\n DiagLogLevel[DiagLogLevel[\"ERROR\"] = 30] = \"ERROR\";\n /** Identifies a warning scenario */\n DiagLogLevel[DiagLogLevel[\"WARN\"] = 50] = \"WARN\";\n /** General informational log message */\n DiagLogLevel[DiagLogLevel[\"INFO\"] = 60] = \"INFO\";\n /** General debug log message */\n DiagLogLevel[DiagLogLevel[\"DEBUG\"] = 70] = \"DEBUG\";\n /**\n * Detailed trace level logging should only be used for development, should only be set\n * in a development environment.\n */\n DiagLogLevel[DiagLogLevel[\"VERBOSE\"] = 80] = \"VERBOSE\";\n /** Used to set the logging level to include all logging */\n DiagLogLevel[DiagLogLevel[\"ALL\"] = 9999] = \"ALL\";\n})(DiagLogLevel = exports.DiagLogLevel || (exports.DiagLogLevel = {}));\n//# sourceMappingURL=types.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.trace = exports.propagation = exports.metrics = exports.diag = exports.context = exports.INVALID_SPAN_CONTEXT = exports.INVALID_TRACEID = exports.INVALID_SPANID = exports.isValidSpanId = exports.isValidTraceId = exports.isSpanContextValid = exports.createTraceState = exports.TraceFlags = exports.SpanStatusCode = exports.SpanKind = exports.SamplingDecision = exports.ProxyTracerProvider = exports.ProxyTracer = exports.defaultTextMapSetter = exports.defaultTextMapGetter = exports.ValueType = exports.createNoopMeter = exports.DiagLogLevel = exports.DiagConsoleLogger = exports.ROOT_CONTEXT = exports.createContextKey = exports.baggageEntryMetadataFromString = void 0;\nvar utils_1 = require(\"./baggage/utils\");\nObject.defineProperty(exports, \"baggageEntryMetadataFromString\", { enumerable: true, get: function () { return utils_1.baggageEntryMetadataFromString; } });\n// Context APIs\nvar context_1 = require(\"./context/context\");\nObject.defineProperty(exports, \"createContextKey\", { enumerable: true, get: function () { return context_1.createContextKey; } });\nObject.defineProperty(exports, \"ROOT_CONTEXT\", { enumerable: true, get: function () { return context_1.ROOT_CONTEXT; } });\n// Diag APIs\nvar consoleLogger_1 = require(\"./diag/consoleLogger\");\nObject.defineProperty(exports, \"DiagConsoleLogger\", { enumerable: true, get: function () { return consoleLogger_1.DiagConsoleLogger; } });\nvar types_1 = require(\"./diag/types\");\nObject.defineProperty(exports, \"DiagLogLevel\", { enumerable: true, get: function () { return types_1.DiagLogLevel; } });\n// Metrics APIs\nvar NoopMeter_1 = require(\"./metrics/NoopMeter\");\nObject.defineProperty(exports, \"createNoopMeter\", { enumerable: true, get: function () { return NoopMeter_1.createNoopMeter; } });\nvar Metric_1 = require(\"./metrics/Metric\");\nObject.defineProperty(exports, \"ValueType\", { enumerable: true, get: function () { return Metric_1.ValueType; } });\n// Propagation APIs\nvar TextMapPropagator_1 = require(\"./propagation/TextMapPropagator\");\nObject.defineProperty(exports, \"defaultTextMapGetter\", { enumerable: true, get: function () { return TextMapPropagator_1.defaultTextMapGetter; } });\nObject.defineProperty(exports, \"defaultTextMapSetter\", { enumerable: true, get: function () { return TextMapPropagator_1.defaultTextMapSetter; } });\nvar ProxyTracer_1 = require(\"./trace/ProxyTracer\");\nObject.defineProperty(exports, \"ProxyTracer\", { enumerable: true, get: function () { return ProxyTracer_1.ProxyTracer; } });\nvar ProxyTracerProvider_1 = require(\"./trace/ProxyTracerProvider\");\nObject.defineProperty(exports, \"ProxyTracerProvider\", { enumerable: true, get: function () { return ProxyTracerProvider_1.ProxyTracerProvider; } });\nvar SamplingResult_1 = require(\"./trace/SamplingResult\");\nObject.defineProperty(exports, \"SamplingDecision\", { enumerable: true, get: function () { return SamplingResult_1.SamplingDecision; } });\nvar span_kind_1 = require(\"./trace/span_kind\");\nObject.defineProperty(exports, \"SpanKind\", { enumerable: true, get: function () { return span_kind_1.SpanKind; } });\nvar status_1 = require(\"./trace/status\");\nObject.defineProperty(exports, \"SpanStatusCode\", { enumerable: true, get: function () { return status_1.SpanStatusCode; } });\nvar trace_flags_1 = require(\"./trace/trace_flags\");\nObject.defineProperty(exports, \"TraceFlags\", { enumerable: true, get: function () { return trace_flags_1.TraceFlags; } });\nvar utils_2 = require(\"./trace/internal/utils\");\nObject.defineProperty(exports, \"createTraceState\", { enumerable: true, get: function () { return utils_2.createTraceState; } });\nvar spancontext_utils_1 = require(\"./trace/spancontext-utils\");\nObject.defineProperty(exports, \"isSpanContextValid\", { enumerable: true, get: function () { return spancontext_utils_1.isSpanContextValid; } });\nObject.defineProperty(exports, \"isValidTraceId\", { enumerable: true, get: function () { return spancontext_utils_1.isValidTraceId; } });\nObject.defineProperty(exports, \"isValidSpanId\", { enumerable: true, get: function () { return spancontext_utils_1.isValidSpanId; } });\nvar invalid_span_constants_1 = require(\"./trace/invalid-span-constants\");\nObject.defineProperty(exports, \"INVALID_SPANID\", { enumerable: true, get: function () { return invalid_span_constants_1.INVALID_SPANID; } });\nObject.defineProperty(exports, \"INVALID_TRACEID\", { enumerable: true, get: function () { return invalid_span_constants_1.INVALID_TRACEID; } });\nObject.defineProperty(exports, \"INVALID_SPAN_CONTEXT\", { enumerable: true, get: function () { return invalid_span_constants_1.INVALID_SPAN_CONTEXT; } });\n// Split module-level variable definition into separate files to allow\n// tree-shaking on each api instance.\nconst context_api_1 = require(\"./context-api\");\nObject.defineProperty(exports, \"context\", { enumerable: true, get: function () { return context_api_1.context; } });\nconst diag_api_1 = require(\"./diag-api\");\nObject.defineProperty(exports, \"diag\", { enumerable: true, get: function () { return diag_api_1.diag; } });\nconst metrics_api_1 = require(\"./metrics-api\");\nObject.defineProperty(exports, \"metrics\", { enumerable: true, get: function () { return metrics_api_1.metrics; } });\nconst propagation_api_1 = require(\"./propagation-api\");\nObject.defineProperty(exports, \"propagation\", { enumerable: true, get: function () { return propagation_api_1.propagation; } });\nconst trace_api_1 = require(\"./trace-api\");\nObject.defineProperty(exports, \"trace\", { enumerable: true, get: function () { return trace_api_1.trace; } });\n// Default export.\nexports.default = {\n context: context_api_1.context,\n diag: diag_api_1.diag,\n metrics: metrics_api_1.metrics,\n propagation: propagation_api_1.propagation,\n trace: trace_api_1.trace,\n};\n//# sourceMappingURL=index.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.unregisterGlobal = exports.getGlobal = exports.registerGlobal = void 0;\nconst platform_1 = require(\"../platform\");\nconst version_1 = require(\"../version\");\nconst semver_1 = require(\"./semver\");\nconst major = version_1.VERSION.split('.')[0];\nconst GLOBAL_OPENTELEMETRY_API_KEY = Symbol.for(`opentelemetry.js.api.${major}`);\nconst _global = platform_1._globalThis;\nfunction registerGlobal(type, instance, diag, allowOverride = false) {\n var _a;\n const api = (_global[GLOBAL_OPENTELEMETRY_API_KEY] = (_a = _global[GLOBAL_OPENTELEMETRY_API_KEY]) !== null && _a !== void 0 ? _a : {\n version: version_1.VERSION,\n });\n if (!allowOverride && api[type]) {\n // already registered an API of this type\n const err = new Error(`@opentelemetry/api: Attempted duplicate registration of API: ${type}`);\n diag.error(err.stack || err.message);\n return false;\n }\n if (api.version !== version_1.VERSION) {\n // All registered APIs must be of the same version exactly\n const err = new Error('@opentelemetry/api: All API registration versions must match');\n diag.error(err.stack || err.message);\n return false;\n }\n api[type] = instance;\n diag.debug(`@opentelemetry/api: Registered a global for ${type} v${version_1.VERSION}.`);\n return true;\n}\nexports.registerGlobal = registerGlobal;\nfunction getGlobal(type) {\n var _a, _b;\n const globalVersion = (_a = _global[GLOBAL_OPENTELEMETRY_API_KEY]) === null || _a === void 0 ? void 0 : _a.version;\n if (!globalVersion || !(0, semver_1.isCompatible)(globalVersion)) {\n return;\n }\n return (_b = _global[GLOBAL_OPENTELEMETRY_API_KEY]) === null || _b === void 0 ? void 0 : _b[type];\n}\nexports.getGlobal = getGlobal;\nfunction unregisterGlobal(type, diag) {\n diag.debug(`@opentelemetry/api: Unregistering a global for ${type} v${version_1.VERSION}.`);\n const api = _global[GLOBAL_OPENTELEMETRY_API_KEY];\n if (api) {\n delete api[type];\n }\n}\nexports.unregisterGlobal = unregisterGlobal;\n//# sourceMappingURL=global-utils.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isCompatible = exports._makeCompatibilityCheck = void 0;\nconst version_1 = require(\"../version\");\nconst re = /^(\\d+)\\.(\\d+)\\.(\\d+)(-(.+))?$/;\n/**\n * Create a function to test an API version to see if it is compatible with the provided ownVersion.\n *\n * The returned function has the following semantics:\n * - Exact match is always compatible\n * - Major versions must match exactly\n * - 1.x package cannot use global 2.x package\n * - 2.x package cannot use global 1.x package\n * - The minor version of the API module requesting access to the global API must be less than or equal to the minor version of this API\n * - 1.3 package may use 1.4 global because the later global contains all functions 1.3 expects\n * - 1.4 package may NOT use 1.3 global because it may try to call functions which don't exist on 1.3\n * - If the major version is 0, the minor version is treated as the major and the patch is treated as the minor\n * - Patch and build tag differences are not considered at this time\n *\n * @param ownVersion version which should be checked against\n */\nfunction _makeCompatibilityCheck(ownVersion) {\n const acceptedVersions = new Set([ownVersion]);\n const rejectedVersions = new Set();\n const myVersionMatch = ownVersion.match(re);\n if (!myVersionMatch) {\n // we cannot guarantee compatibility so we always return noop\n return () => false;\n }\n const ownVersionParsed = {\n major: +myVersionMatch[1],\n minor: +myVersionMatch[2],\n patch: +myVersionMatch[3],\n prerelease: myVersionMatch[4],\n };\n // if ownVersion has a prerelease tag, versions must match exactly\n if (ownVersionParsed.prerelease != null) {\n return function isExactmatch(globalVersion) {\n return globalVersion === ownVersion;\n };\n }\n function _reject(v) {\n rejectedVersions.add(v);\n return false;\n }\n function _accept(v) {\n acceptedVersions.add(v);\n return true;\n }\n return function isCompatible(globalVersion) {\n if (acceptedVersions.has(globalVersion)) {\n return true;\n }\n if (rejectedVersions.has(globalVersion)) {\n return false;\n }\n const globalVersionMatch = globalVersion.match(re);\n if (!globalVersionMatch) {\n // cannot parse other version\n // we cannot guarantee compatibility so we always noop\n return _reject(globalVersion);\n }\n const globalVersionParsed = {\n major: +globalVersionMatch[1],\n minor: +globalVersionMatch[2],\n patch: +globalVersionMatch[3],\n prerelease: globalVersionMatch[4],\n };\n // if globalVersion has a prerelease tag, versions must match exactly\n if (globalVersionParsed.prerelease != null) {\n return _reject(globalVersion);\n }\n // major versions must match\n if (ownVersionParsed.major !== globalVersionParsed.major) {\n return _reject(globalVersion);\n }\n if (ownVersionParsed.major === 0) {\n if (ownVersionParsed.minor === globalVersionParsed.minor &&\n ownVersionParsed.patch <= globalVersionParsed.patch) {\n return _accept(globalVersion);\n }\n return _reject(globalVersion);\n }\n if (ownVersionParsed.minor <= globalVersionParsed.minor) {\n return _accept(globalVersion);\n }\n return _reject(globalVersion);\n };\n}\nexports._makeCompatibilityCheck = _makeCompatibilityCheck;\n/**\n * Test an API version to see if it is compatible with this API.\n *\n * - Exact match is always compatible\n * - Major versions must match exactly\n * - 1.x package cannot use global 2.x package\n * - 2.x package cannot use global 1.x package\n * - The minor version of the API module requesting access to the global API must be less than or equal to the minor version of this API\n * - 1.3 package may use 1.4 global because the later global contains all functions 1.3 expects\n * - 1.4 package may NOT use 1.3 global because it may try to call functions which don't exist on 1.3\n * - If the major version is 0, the minor version is treated as the major and the patch is treated as the minor\n * - Patch and build tag differences are not considered at this time\n *\n * @param version version of the API requesting an instance of the global API\n */\nexports.isCompatible = _makeCompatibilityCheck(version_1.VERSION);\n//# sourceMappingURL=semver.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.metrics = void 0;\n// Split module-level variable definition into separate files to allow\n// tree-shaking on each api instance.\nconst metrics_1 = require(\"./api/metrics\");\n/** Entrypoint for metrics API */\nexports.metrics = metrics_1.MetricsAPI.getInstance();\n//# sourceMappingURL=metrics-api.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ValueType = void 0;\n/** The Type of value. It describes how the data is reported. */\nvar ValueType;\n(function (ValueType) {\n ValueType[ValueType[\"INT\"] = 0] = \"INT\";\n ValueType[ValueType[\"DOUBLE\"] = 1] = \"DOUBLE\";\n})(ValueType = exports.ValueType || (exports.ValueType = {}));\n//# sourceMappingURL=Metric.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.createNoopMeter = exports.NOOP_OBSERVABLE_UP_DOWN_COUNTER_METRIC = exports.NOOP_OBSERVABLE_GAUGE_METRIC = exports.NOOP_OBSERVABLE_COUNTER_METRIC = exports.NOOP_UP_DOWN_COUNTER_METRIC = exports.NOOP_HISTOGRAM_METRIC = exports.NOOP_COUNTER_METRIC = exports.NOOP_METER = exports.NoopObservableUpDownCounterMetric = exports.NoopObservableGaugeMetric = exports.NoopObservableCounterMetric = exports.NoopObservableMetric = exports.NoopHistogramMetric = exports.NoopUpDownCounterMetric = exports.NoopCounterMetric = exports.NoopMetric = exports.NoopMeter = void 0;\n/**\n * NoopMeter is a noop implementation of the {@link Meter} interface. It reuses\n * constant NoopMetrics for all of its methods.\n */\nclass NoopMeter {\n constructor() { }\n /**\n * @see {@link Meter.createHistogram}\n */\n createHistogram(_name, _options) {\n return exports.NOOP_HISTOGRAM_METRIC;\n }\n /**\n * @see {@link Meter.createCounter}\n */\n createCounter(_name, _options) {\n return exports.NOOP_COUNTER_METRIC;\n }\n /**\n * @see {@link Meter.createUpDownCounter}\n */\n createUpDownCounter(_name, _options) {\n return exports.NOOP_UP_DOWN_COUNTER_METRIC;\n }\n /**\n * @see {@link Meter.createObservableGauge}\n */\n createObservableGauge(_name, _options) {\n return exports.NOOP_OBSERVABLE_GAUGE_METRIC;\n }\n /**\n * @see {@link Meter.createObservableCounter}\n */\n createObservableCounter(_name, _options) {\n return exports.NOOP_OBSERVABLE_COUNTER_METRIC;\n }\n /**\n * @see {@link Meter.createObservableUpDownCounter}\n */\n createObservableUpDownCounter(_name, _options) {\n return exports.NOOP_OBSERVABLE_UP_DOWN_COUNTER_METRIC;\n }\n /**\n * @see {@link Meter.addBatchObservableCallback}\n */\n addBatchObservableCallback(_callback, _observables) { }\n /**\n * @see {@link Meter.removeBatchObservableCallback}\n */\n removeBatchObservableCallback(_callback) { }\n}\nexports.NoopMeter = NoopMeter;\nclass NoopMetric {\n}\nexports.NoopMetric = NoopMetric;\nclass NoopCounterMetric extends NoopMetric {\n add(_value, _attributes) { }\n}\nexports.NoopCounterMetric = NoopCounterMetric;\nclass NoopUpDownCounterMetric extends NoopMetric {\n add(_value, _attributes) { }\n}\nexports.NoopUpDownCounterMetric = NoopUpDownCounterMetric;\nclass NoopHistogramMetric extends NoopMetric {\n record(_value, _attributes) { }\n}\nexports.NoopHistogramMetric = NoopHistogramMetric;\nclass NoopObservableMetric {\n addCallback(_callback) { }\n removeCallback(_callback) { }\n}\nexports.NoopObservableMetric = NoopObservableMetric;\nclass NoopObservableCounterMetric extends NoopObservableMetric {\n}\nexports.NoopObservableCounterMetric = NoopObservableCounterMetric;\nclass NoopObservableGaugeMetric extends NoopObservableMetric {\n}\nexports.NoopObservableGaugeMetric = NoopObservableGaugeMetric;\nclass NoopObservableUpDownCounterMetric extends NoopObservableMetric {\n}\nexports.NoopObservableUpDownCounterMetric = NoopObservableUpDownCounterMetric;\nexports.NOOP_METER = new NoopMeter();\n// Synchronous instruments\nexports.NOOP_COUNTER_METRIC = new NoopCounterMetric();\nexports.NOOP_HISTOGRAM_METRIC = new NoopHistogramMetric();\nexports.NOOP_UP_DOWN_COUNTER_METRIC = new NoopUpDownCounterMetric();\n// Asynchronous instruments\nexports.NOOP_OBSERVABLE_COUNTER_METRIC = new NoopObservableCounterMetric();\nexports.NOOP_OBSERVABLE_GAUGE_METRIC = new NoopObservableGaugeMetric();\nexports.NOOP_OBSERVABLE_UP_DOWN_COUNTER_METRIC = new NoopObservableUpDownCounterMetric();\n/**\n * Create a no-op Meter\n */\nfunction createNoopMeter() {\n return exports.NOOP_METER;\n}\nexports.createNoopMeter = createNoopMeter;\n//# sourceMappingURL=NoopMeter.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.NOOP_METER_PROVIDER = exports.NoopMeterProvider = void 0;\nconst NoopMeter_1 = require(\"./NoopMeter\");\n/**\n * An implementation of the {@link MeterProvider} which returns an impotent Meter\n * for all calls to `getMeter`\n */\nclass NoopMeterProvider {\n getMeter(_name, _version, _options) {\n return NoopMeter_1.NOOP_METER;\n }\n}\nexports.NoopMeterProvider = NoopMeterProvider;\nexports.NOOP_METER_PROVIDER = new NoopMeterProvider();\n//# sourceMappingURL=NoopMeterProvider.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n__exportStar(require(\"./node\"), exports);\n//# sourceMappingURL=index.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports._globalThis = void 0;\n/** only globals that common to node and browsers are allowed */\n// eslint-disable-next-line node/no-unsupported-features/es-builtins\nexports._globalThis = typeof globalThis === 'object' ? globalThis : global;\n//# sourceMappingURL=globalThis.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n__exportStar(require(\"./globalThis\"), exports);\n//# sourceMappingURL=index.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.propagation = void 0;\n// Split module-level variable definition into separate files to allow\n// tree-shaking on each api instance.\nconst propagation_1 = require(\"./api/propagation\");\n/** Entrypoint for propagation API */\nexports.propagation = propagation_1.PropagationAPI.getInstance();\n//# sourceMappingURL=propagation-api.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.NoopTextMapPropagator = void 0;\n/**\n * No-op implementations of {@link TextMapPropagator}.\n */\nclass NoopTextMapPropagator {\n /** Noop inject function does nothing */\n inject(_context, _carrier) { }\n /** Noop extract function does nothing and returns the input context */\n extract(context, _carrier) {\n return context;\n }\n fields() {\n return [];\n }\n}\nexports.NoopTextMapPropagator = NoopTextMapPropagator;\n//# sourceMappingURL=NoopTextMapPropagator.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.defaultTextMapSetter = exports.defaultTextMapGetter = void 0;\nexports.defaultTextMapGetter = {\n get(carrier, key) {\n if (carrier == null) {\n return undefined;\n }\n return carrier[key];\n },\n keys(carrier) {\n if (carrier == null) {\n return [];\n }\n return Object.keys(carrier);\n },\n};\nexports.defaultTextMapSetter = {\n set(carrier, key, value) {\n if (carrier == null) {\n return;\n }\n carrier[key] = value;\n },\n};\n//# sourceMappingURL=TextMapPropagator.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.trace = void 0;\n// Split module-level variable definition into separate files to allow\n// tree-shaking on each api instance.\nconst trace_1 = require(\"./api/trace\");\n/** Entrypoint for trace API */\nexports.trace = trace_1.TraceAPI.getInstance();\n//# sourceMappingURL=trace-api.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.NonRecordingSpan = void 0;\nconst invalid_span_constants_1 = require(\"./invalid-span-constants\");\n/**\n * The NonRecordingSpan is the default {@link Span} that is used when no Span\n * implementation is available. All operations are no-op including context\n * propagation.\n */\nclass NonRecordingSpan {\n constructor(_spanContext = invalid_span_constants_1.INVALID_SPAN_CONTEXT) {\n this._spanContext = _spanContext;\n }\n // Returns a SpanContext.\n spanContext() {\n return this._spanContext;\n }\n // By default does nothing\n setAttribute(_key, _value) {\n return this;\n }\n // By default does nothing\n setAttributes(_attributes) {\n return this;\n }\n // By default does nothing\n addEvent(_name, _attributes) {\n return this;\n }\n // By default does nothing\n setStatus(_status) {\n return this;\n }\n // By default does nothing\n updateName(_name) {\n return this;\n }\n // By default does nothing\n end(_endTime) { }\n // isRecording always returns false for NonRecordingSpan.\n isRecording() {\n return false;\n }\n // By default does nothing\n recordException(_exception, _time) { }\n}\nexports.NonRecordingSpan = NonRecordingSpan;\n//# sourceMappingURL=NonRecordingSpan.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.NoopTracer = void 0;\nconst context_1 = require(\"../api/context\");\nconst context_utils_1 = require(\"../trace/context-utils\");\nconst NonRecordingSpan_1 = require(\"./NonRecordingSpan\");\nconst spancontext_utils_1 = require(\"./spancontext-utils\");\nconst contextApi = context_1.ContextAPI.getInstance();\n/**\n * No-op implementations of {@link Tracer}.\n */\nclass NoopTracer {\n // startSpan starts a noop span.\n startSpan(name, options, context = contextApi.active()) {\n const root = Boolean(options === null || options === void 0 ? void 0 : options.root);\n if (root) {\n return new NonRecordingSpan_1.NonRecordingSpan();\n }\n const parentFromContext = context && (0, context_utils_1.getSpanContext)(context);\n if (isSpanContext(parentFromContext) &&\n (0, spancontext_utils_1.isSpanContextValid)(parentFromContext)) {\n return new NonRecordingSpan_1.NonRecordingSpan(parentFromContext);\n }\n else {\n return new NonRecordingSpan_1.NonRecordingSpan();\n }\n }\n startActiveSpan(name, arg2, arg3, arg4) {\n let opts;\n let ctx;\n let fn;\n if (arguments.length < 2) {\n return;\n }\n else if (arguments.length === 2) {\n fn = arg2;\n }\n else if (arguments.length === 3) {\n opts = arg2;\n fn = arg3;\n }\n else {\n opts = arg2;\n ctx = arg3;\n fn = arg4;\n }\n const parentContext = ctx !== null && ctx !== void 0 ? ctx : contextApi.active();\n const span = this.startSpan(name, opts, parentContext);\n const contextWithSpanSet = (0, context_utils_1.setSpan)(parentContext, span);\n return contextApi.with(contextWithSpanSet, fn, undefined, span);\n }\n}\nexports.NoopTracer = NoopTracer;\nfunction isSpanContext(spanContext) {\n return (typeof spanContext === 'object' &&\n typeof spanContext['spanId'] === 'string' &&\n typeof spanContext['traceId'] === 'string' &&\n typeof spanContext['traceFlags'] === 'number');\n}\n//# sourceMappingURL=NoopTracer.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.NoopTracerProvider = void 0;\nconst NoopTracer_1 = require(\"./NoopTracer\");\n/**\n * An implementation of the {@link TracerProvider} which returns an impotent\n * Tracer for all calls to `getTracer`.\n *\n * All operations are no-op.\n */\nclass NoopTracerProvider {\n getTracer(_name, _version, _options) {\n return new NoopTracer_1.NoopTracer();\n }\n}\nexports.NoopTracerProvider = NoopTracerProvider;\n//# sourceMappingURL=NoopTracerProvider.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ProxyTracer = void 0;\nconst NoopTracer_1 = require(\"./NoopTracer\");\nconst NOOP_TRACER = new NoopTracer_1.NoopTracer();\n/**\n * Proxy tracer provided by the proxy tracer provider\n */\nclass ProxyTracer {\n constructor(_provider, name, version, options) {\n this._provider = _provider;\n this.name = name;\n this.version = version;\n this.options = options;\n }\n startSpan(name, options, context) {\n return this._getTracer().startSpan(name, options, context);\n }\n startActiveSpan(_name, _options, _context, _fn) {\n const tracer = this._getTracer();\n return Reflect.apply(tracer.startActiveSpan, tracer, arguments);\n }\n /**\n * Try to get a tracer from the proxy tracer provider.\n * If the proxy tracer provider has no delegate, return a noop tracer.\n */\n _getTracer() {\n if (this._delegate) {\n return this._delegate;\n }\n const tracer = this._provider.getDelegateTracer(this.name, this.version, this.options);\n if (!tracer) {\n return NOOP_TRACER;\n }\n this._delegate = tracer;\n return this._delegate;\n }\n}\nexports.ProxyTracer = ProxyTracer;\n//# sourceMappingURL=ProxyTracer.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ProxyTracerProvider = void 0;\nconst ProxyTracer_1 = require(\"./ProxyTracer\");\nconst NoopTracerProvider_1 = require(\"./NoopTracerProvider\");\nconst NOOP_TRACER_PROVIDER = new NoopTracerProvider_1.NoopTracerProvider();\n/**\n * Tracer provider which provides {@link ProxyTracer}s.\n *\n * Before a delegate is set, tracers provided are NoOp.\n * When a delegate is set, traces are provided from the delegate.\n * When a delegate is set after tracers have already been provided,\n * all tracers already provided will use the provided delegate implementation.\n */\nclass ProxyTracerProvider {\n /**\n * Get a {@link ProxyTracer}\n */\n getTracer(name, version, options) {\n var _a;\n return ((_a = this.getDelegateTracer(name, version, options)) !== null && _a !== void 0 ? _a : new ProxyTracer_1.ProxyTracer(this, name, version, options));\n }\n getDelegate() {\n var _a;\n return (_a = this._delegate) !== null && _a !== void 0 ? _a : NOOP_TRACER_PROVIDER;\n }\n /**\n * Set the delegate tracer provider\n */\n setDelegate(delegate) {\n this._delegate = delegate;\n }\n getDelegateTracer(name, version, options) {\n var _a;\n return (_a = this._delegate) === null || _a === void 0 ? void 0 : _a.getTracer(name, version, options);\n }\n}\nexports.ProxyTracerProvider = ProxyTracerProvider;\n//# sourceMappingURL=ProxyTracerProvider.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.SamplingDecision = void 0;\n/**\n * @deprecated use the one declared in @opentelemetry/sdk-trace-base instead.\n * A sampling decision that determines how a {@link Span} will be recorded\n * and collected.\n */\nvar SamplingDecision;\n(function (SamplingDecision) {\n /**\n * `Span.isRecording() === false`, span will not be recorded and all events\n * and attributes will be dropped.\n */\n SamplingDecision[SamplingDecision[\"NOT_RECORD\"] = 0] = \"NOT_RECORD\";\n /**\n * `Span.isRecording() === true`, but `Sampled` flag in {@link TraceFlags}\n * MUST NOT be set.\n */\n SamplingDecision[SamplingDecision[\"RECORD\"] = 1] = \"RECORD\";\n /**\n * `Span.isRecording() === true` AND `Sampled` flag in {@link TraceFlags}\n * MUST be set.\n */\n SamplingDecision[SamplingDecision[\"RECORD_AND_SAMPLED\"] = 2] = \"RECORD_AND_SAMPLED\";\n})(SamplingDecision = exports.SamplingDecision || (exports.SamplingDecision = {}));\n//# sourceMappingURL=SamplingResult.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getSpanContext = exports.setSpanContext = exports.deleteSpan = exports.setSpan = exports.getActiveSpan = exports.getSpan = void 0;\nconst context_1 = require(\"../context/context\");\nconst NonRecordingSpan_1 = require(\"./NonRecordingSpan\");\nconst context_2 = require(\"../api/context\");\n/**\n * span key\n */\nconst SPAN_KEY = (0, context_1.createContextKey)('OpenTelemetry Context Key SPAN');\n/**\n * Return the span if one exists\n *\n * @param context context to get span from\n */\nfunction getSpan(context) {\n return context.getValue(SPAN_KEY) || undefined;\n}\nexports.getSpan = getSpan;\n/**\n * Gets the span from the current context, if one exists.\n */\nfunction getActiveSpan() {\n return getSpan(context_2.ContextAPI.getInstance().active());\n}\nexports.getActiveSpan = getActiveSpan;\n/**\n * Set the span on a context\n *\n * @param context context to use as parent\n * @param span span to set active\n */\nfunction setSpan(context, span) {\n return context.setValue(SPAN_KEY, span);\n}\nexports.setSpan = setSpan;\n/**\n * Remove current span stored in the context\n *\n * @param context context to delete span from\n */\nfunction deleteSpan(context) {\n return context.deleteValue(SPAN_KEY);\n}\nexports.deleteSpan = deleteSpan;\n/**\n * Wrap span context in a NoopSpan and set as span in a new\n * context\n *\n * @param context context to set active span on\n * @param spanContext span context to be wrapped\n */\nfunction setSpanContext(context, spanContext) {\n return setSpan(context, new NonRecordingSpan_1.NonRecordingSpan(spanContext));\n}\nexports.setSpanContext = setSpanContext;\n/**\n * Get the span context of the span if it exists.\n *\n * @param context context to get values from\n */\nfunction getSpanContext(context) {\n var _a;\n return (_a = getSpan(context)) === null || _a === void 0 ? void 0 : _a.spanContext();\n}\nexports.getSpanContext = getSpanContext;\n//# sourceMappingURL=context-utils.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.TraceStateImpl = void 0;\nconst tracestate_validators_1 = require(\"./tracestate-validators\");\nconst MAX_TRACE_STATE_ITEMS = 32;\nconst MAX_TRACE_STATE_LEN = 512;\nconst LIST_MEMBERS_SEPARATOR = ',';\nconst LIST_MEMBER_KEY_VALUE_SPLITTER = '=';\n/**\n * TraceState must be a class and not a simple object type because of the spec\n * requirement (https://www.w3.org/TR/trace-context/#tracestate-field).\n *\n * Here is the list of allowed mutations:\n * - New key-value pair should be added into the beginning of the list\n * - The value of any key can be updated. Modified keys MUST be moved to the\n * beginning of the list.\n */\nclass TraceStateImpl {\n constructor(rawTraceState) {\n this._internalState = new Map();\n if (rawTraceState)\n this._parse(rawTraceState);\n }\n set(key, value) {\n // TODO: Benchmark the different approaches(map vs list) and\n // use the faster one.\n const traceState = this._clone();\n if (traceState._internalState.has(key)) {\n traceState._internalState.delete(key);\n }\n traceState._internalState.set(key, value);\n return traceState;\n }\n unset(key) {\n const traceState = this._clone();\n traceState._internalState.delete(key);\n return traceState;\n }\n get(key) {\n return this._internalState.get(key);\n }\n serialize() {\n return this._keys()\n .reduce((agg, key) => {\n agg.push(key + LIST_MEMBER_KEY_VALUE_SPLITTER + this.get(key));\n return agg;\n }, [])\n .join(LIST_MEMBERS_SEPARATOR);\n }\n _parse(rawTraceState) {\n if (rawTraceState.length > MAX_TRACE_STATE_LEN)\n return;\n this._internalState = rawTraceState\n .split(LIST_MEMBERS_SEPARATOR)\n .reverse() // Store in reverse so new keys (.set(...)) will be placed at the beginning\n .reduce((agg, part) => {\n const listMember = part.trim(); // Optional Whitespace (OWS) handling\n const i = listMember.indexOf(LIST_MEMBER_KEY_VALUE_SPLITTER);\n if (i !== -1) {\n const key = listMember.slice(0, i);\n const value = listMember.slice(i + 1, part.length);\n if ((0, tracestate_validators_1.validateKey)(key) && (0, tracestate_validators_1.validateValue)(value)) {\n agg.set(key, value);\n }\n else {\n // TODO: Consider to add warning log\n }\n }\n return agg;\n }, new Map());\n // Because of the reverse() requirement, trunc must be done after map is created\n if (this._internalState.size > MAX_TRACE_STATE_ITEMS) {\n this._internalState = new Map(Array.from(this._internalState.entries())\n .reverse() // Use reverse same as original tracestate parse chain\n .slice(0, MAX_TRACE_STATE_ITEMS));\n }\n }\n _keys() {\n return Array.from(this._internalState.keys()).reverse();\n }\n _clone() {\n const traceState = new TraceStateImpl();\n traceState._internalState = new Map(this._internalState);\n return traceState;\n }\n}\nexports.TraceStateImpl = TraceStateImpl;\n//# sourceMappingURL=tracestate-impl.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.validateValue = exports.validateKey = void 0;\nconst VALID_KEY_CHAR_RANGE = '[_0-9a-z-*/]';\nconst VALID_KEY = `[a-z]${VALID_KEY_CHAR_RANGE}{0,255}`;\nconst VALID_VENDOR_KEY = `[a-z0-9]${VALID_KEY_CHAR_RANGE}{0,240}@[a-z]${VALID_KEY_CHAR_RANGE}{0,13}`;\nconst VALID_KEY_REGEX = new RegExp(`^(?:${VALID_KEY}|${VALID_VENDOR_KEY})$`);\nconst VALID_VALUE_BASE_REGEX = /^[ -~]{0,255}[!-~]$/;\nconst INVALID_VALUE_COMMA_EQUAL_REGEX = /,|=/;\n/**\n * Key is opaque string up to 256 characters printable. It MUST begin with a\n * lowercase letter, and can only contain lowercase letters a-z, digits 0-9,\n * underscores _, dashes -, asterisks *, and forward slashes /.\n * For multi-tenant vendor scenarios, an at sign (@) can be used to prefix the\n * vendor name. Vendors SHOULD set the tenant ID at the beginning of the key.\n * see https://www.w3.org/TR/trace-context/#key\n */\nfunction validateKey(key) {\n return VALID_KEY_REGEX.test(key);\n}\nexports.validateKey = validateKey;\n/**\n * Value is opaque string up to 256 characters printable ASCII RFC0020\n * characters (i.e., the range 0x20 to 0x7E) except comma , and =.\n */\nfunction validateValue(value) {\n return (VALID_VALUE_BASE_REGEX.test(value) &&\n !INVALID_VALUE_COMMA_EQUAL_REGEX.test(value));\n}\nexports.validateValue = validateValue;\n//# sourceMappingURL=tracestate-validators.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.createTraceState = void 0;\nconst tracestate_impl_1 = require(\"./tracestate-impl\");\nfunction createTraceState(rawTraceState) {\n return new tracestate_impl_1.TraceStateImpl(rawTraceState);\n}\nexports.createTraceState = createTraceState;\n//# sourceMappingURL=utils.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.INVALID_SPAN_CONTEXT = exports.INVALID_TRACEID = exports.INVALID_SPANID = void 0;\nconst trace_flags_1 = require(\"./trace_flags\");\nexports.INVALID_SPANID = '0000000000000000';\nexports.INVALID_TRACEID = '00000000000000000000000000000000';\nexports.INVALID_SPAN_CONTEXT = {\n traceId: exports.INVALID_TRACEID,\n spanId: exports.INVALID_SPANID,\n traceFlags: trace_flags_1.TraceFlags.NONE,\n};\n//# sourceMappingURL=invalid-span-constants.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.SpanKind = void 0;\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nvar SpanKind;\n(function (SpanKind) {\n /** Default value. Indicates that the span is used internally. */\n SpanKind[SpanKind[\"INTERNAL\"] = 0] = \"INTERNAL\";\n /**\n * Indicates that the span covers server-side handling of an RPC or other\n * remote request.\n */\n SpanKind[SpanKind[\"SERVER\"] = 1] = \"SERVER\";\n /**\n * Indicates that the span covers the client-side wrapper around an RPC or\n * other remote request.\n */\n SpanKind[SpanKind[\"CLIENT\"] = 2] = \"CLIENT\";\n /**\n * Indicates that the span describes producer sending a message to a\n * broker. Unlike client and server, there is no direct critical path latency\n * relationship between producer and consumer spans.\n */\n SpanKind[SpanKind[\"PRODUCER\"] = 3] = \"PRODUCER\";\n /**\n * Indicates that the span describes consumer receiving a message from a\n * broker. Unlike client and server, there is no direct critical path latency\n * relationship between producer and consumer spans.\n */\n SpanKind[SpanKind[\"CONSUMER\"] = 4] = \"CONSUMER\";\n})(SpanKind = exports.SpanKind || (exports.SpanKind = {}));\n//# sourceMappingURL=span_kind.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.wrapSpanContext = exports.isSpanContextValid = exports.isValidSpanId = exports.isValidTraceId = void 0;\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nconst invalid_span_constants_1 = require(\"./invalid-span-constants\");\nconst NonRecordingSpan_1 = require(\"./NonRecordingSpan\");\nconst VALID_TRACEID_REGEX = /^([0-9a-f]{32})$/i;\nconst VALID_SPANID_REGEX = /^[0-9a-f]{16}$/i;\nfunction isValidTraceId(traceId) {\n return VALID_TRACEID_REGEX.test(traceId) && traceId !== invalid_span_constants_1.INVALID_TRACEID;\n}\nexports.isValidTraceId = isValidTraceId;\nfunction isValidSpanId(spanId) {\n return VALID_SPANID_REGEX.test(spanId) && spanId !== invalid_span_constants_1.INVALID_SPANID;\n}\nexports.isValidSpanId = isValidSpanId;\n/**\n * Returns true if this {@link SpanContext} is valid.\n * @return true if this {@link SpanContext} is valid.\n */\nfunction isSpanContextValid(spanContext) {\n return (isValidTraceId(spanContext.traceId) && isValidSpanId(spanContext.spanId));\n}\nexports.isSpanContextValid = isSpanContextValid;\n/**\n * Wrap the given {@link SpanContext} in a new non-recording {@link Span}\n *\n * @param spanContext span context to be wrapped\n * @returns a new non-recording {@link Span} with the provided context\n */\nfunction wrapSpanContext(spanContext) {\n return new NonRecordingSpan_1.NonRecordingSpan(spanContext);\n}\nexports.wrapSpanContext = wrapSpanContext;\n//# sourceMappingURL=spancontext-utils.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.SpanStatusCode = void 0;\n/**\n * An enumeration of status codes.\n */\nvar SpanStatusCode;\n(function (SpanStatusCode) {\n /**\n * The default status.\n */\n SpanStatusCode[SpanStatusCode[\"UNSET\"] = 0] = \"UNSET\";\n /**\n * The operation has been validated by an Application developer or\n * Operator to have completed successfully.\n */\n SpanStatusCode[SpanStatusCode[\"OK\"] = 1] = \"OK\";\n /**\n * The operation contains an error.\n */\n SpanStatusCode[SpanStatusCode[\"ERROR\"] = 2] = \"ERROR\";\n})(SpanStatusCode = exports.SpanStatusCode || (exports.SpanStatusCode = {}));\n//# sourceMappingURL=status.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.TraceFlags = void 0;\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nvar TraceFlags;\n(function (TraceFlags) {\n /** Represents no flag set. */\n TraceFlags[TraceFlags[\"NONE\"] = 0] = \"NONE\";\n /** Bit to represent whether trace is sampled in trace flags. */\n TraceFlags[TraceFlags[\"SAMPLED\"] = 1] = \"SAMPLED\";\n})(TraceFlags = exports.TraceFlags || (exports.TraceFlags = {}));\n//# sourceMappingURL=trace_flags.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.VERSION = void 0;\n// this is autogenerated file, see scripts/version-update.js\nexports.VERSION = '1.4.0';\n//# sourceMappingURL=version.js.map","const { define } = require('./asn1/api')\nconst base = require('./asn1/base')\nconst constants = require('./asn1/constants')\nconst decoders = require('./asn1/decoders')\nconst encoders = require('./asn1/encoders')\n\nmodule.exports = {\n base,\n constants,\n decoders,\n define,\n encoders\n}\n","const { inherits } = require('util')\nconst encoders = require('./encoders')\nconst decoders = require('./decoders')\n\nmodule.exports.define = function define (name, body) {\n return new Entity(name, body)\n}\n\nfunction Entity (name, body) {\n this.name = name\n this.body = body\n\n this.decoders = {}\n this.encoders = {}\n}\n\nEntity.prototype._createNamed = function createNamed (Base) {\n const name = this.name\n\n function Generated (entity) {\n this._initNamed(entity, name)\n }\n inherits(Generated, Base)\n Generated.prototype._initNamed = function _initNamed (entity, name) {\n Base.call(this, entity, name)\n }\n\n return new Generated(this)\n}\n\nEntity.prototype._getDecoder = function _getDecoder (enc) {\n enc = enc || 'der'\n // Lazily create decoder\n if (!Object.prototype.hasOwnProperty.call(this.decoders, enc)) { this.decoders[enc] = this._createNamed(decoders[enc]) }\n return this.decoders[enc]\n}\n\nEntity.prototype.decode = function decode (data, enc, options) {\n return this._getDecoder(enc).decode(data, options)\n}\n\nEntity.prototype._getEncoder = function _getEncoder (enc) {\n enc = enc || 'der'\n // Lazily create encoder\n if (!Object.prototype.hasOwnProperty.call(this.encoders, enc)) { this.encoders[enc] = this._createNamed(encoders[enc]) }\n return this.encoders[enc]\n}\n\nEntity.prototype.encode = function encode (data, enc, /* internal */ reporter) {\n return this._getEncoder(enc).encode(data, reporter)\n}\n","const { inherits } = require('util')\n\nconst { Reporter } = require('../base/reporter')\n\nfunction DecoderBuffer (base, options) {\n Reporter.call(this, options)\n if (!Buffer.isBuffer(base)) {\n this.error('Input not Buffer')\n return\n }\n\n this.base = base\n this.offset = 0\n this.length = base.length\n}\ninherits(DecoderBuffer, Reporter)\n\nDecoderBuffer.isDecoderBuffer = function isDecoderBuffer (data) {\n if (data instanceof DecoderBuffer) {\n return true\n }\n\n // Or accept compatible API\n const isCompatible = typeof data === 'object' &&\n Buffer.isBuffer(data.base) &&\n data.constructor.name === 'DecoderBuffer' &&\n typeof data.offset === 'number' &&\n typeof data.length === 'number' &&\n typeof data.save === 'function' &&\n typeof data.restore === 'function' &&\n typeof data.isEmpty === 'function' &&\n typeof data.readUInt8 === 'function' &&\n typeof data.skip === 'function' &&\n typeof data.raw === 'function'\n\n return isCompatible\n}\n\nDecoderBuffer.prototype.save = function save () {\n return { offset: this.offset, reporter: Reporter.prototype.save.call(this) }\n}\n\nDecoderBuffer.prototype.restore = function restore (save) {\n // Return skipped data\n const res = new DecoderBuffer(this.base)\n res.offset = save.offset\n res.length = this.offset\n\n this.offset = save.offset\n Reporter.prototype.restore.call(this, save.reporter)\n\n return res\n}\n\nDecoderBuffer.prototype.isEmpty = function isEmpty () {\n return this.offset === this.length\n}\n\nDecoderBuffer.prototype.readUInt8 = function readUInt8 (fail) {\n if (this.offset + 1 <= this.length) { return this.base.readUInt8(this.offset++, true) } else { return this.error(fail || 'DecoderBuffer overrun') }\n}\n\nDecoderBuffer.prototype.skip = function skip (bytes, fail) {\n if (!(this.offset + bytes <= this.length)) { return this.error(fail || 'DecoderBuffer overrun') }\n\n const res = new DecoderBuffer(this.base)\n\n // Share reporter state\n res._reporterState = this._reporterState\n\n res.offset = this.offset\n res.length = this.offset + bytes\n this.offset += bytes\n return res\n}\n\nDecoderBuffer.prototype.raw = function raw (save) {\n return this.base.slice(save ? save.offset : this.offset, this.length)\n}\n\nfunction EncoderBuffer (value, reporter) {\n if (Array.isArray(value)) {\n this.length = 0\n this.value = value.map(function (item) {\n if (!EncoderBuffer.isEncoderBuffer(item)) { item = new EncoderBuffer(item, reporter) }\n this.length += item.length\n return item\n }, this)\n } else if (typeof value === 'number') {\n if (!(value >= 0 && value <= 0xff)) { return reporter.error('non-byte EncoderBuffer value') }\n this.value = value\n this.length = 1\n } else if (typeof value === 'string') {\n this.value = value\n this.length = Buffer.byteLength(value)\n } else if (Buffer.isBuffer(value)) {\n this.value = value\n this.length = value.length\n } else {\n return reporter.error(`Unsupported type: ${typeof value}`)\n }\n}\n\nEncoderBuffer.isEncoderBuffer = function isEncoderBuffer (data) {\n if (data instanceof EncoderBuffer) {\n return true\n }\n\n // Or accept compatible API\n const isCompatible = typeof data === 'object' &&\n data.constructor.name === 'EncoderBuffer' &&\n typeof data.length === 'number' &&\n typeof data.join === 'function'\n\n return isCompatible\n}\n\nEncoderBuffer.prototype.join = function join (out, offset) {\n if (!out) { out = Buffer.alloc(this.length) }\n if (!offset) { offset = 0 }\n\n if (this.length === 0) { return out }\n\n if (Array.isArray(this.value)) {\n this.value.forEach(function (item) {\n item.join(out, offset)\n offset += item.length\n })\n } else {\n if (typeof this.value === 'number') { out[offset] = this.value } else if (typeof this.value === 'string') { out.write(this.value, offset) } else if (Buffer.isBuffer(this.value)) { this.value.copy(out, offset) }\n offset += this.length\n }\n\n return out\n}\n\nmodule.exports = {\n DecoderBuffer,\n EncoderBuffer\n}\n","const { Reporter } = require('./reporter')\nconst { DecoderBuffer, EncoderBuffer } = require('./buffer')\nconst Node = require('./node')\n\nmodule.exports = {\n DecoderBuffer,\n EncoderBuffer,\n Node,\n Reporter\n}\n","const { strict: assert } = require('assert')\n\nconst { Reporter } = require('../base/reporter')\nconst { DecoderBuffer, EncoderBuffer } = require('../base/buffer')\n\n// Supported tags\nconst tags = [\n 'seq', 'seqof', 'set', 'setof', 'objid', 'bool',\n 'gentime', 'utctime', 'null_', 'enum', 'int', 'objDesc',\n 'bitstr', 'bmpstr', 'charstr', 'genstr', 'graphstr', 'ia5str', 'iso646str',\n 'numstr', 'octstr', 'printstr', 't61str', 'unistr', 'utf8str', 'videostr'\n]\n\n// Public methods list\nconst methods = [\n 'key', 'obj', 'use', 'optional', 'explicit', 'implicit', 'def', 'choice',\n 'any', 'contains'\n].concat(tags)\n\n// Overrided methods list\nconst overrided = [\n '_peekTag', '_decodeTag', '_use',\n '_decodeStr', '_decodeObjid', '_decodeTime',\n '_decodeNull', '_decodeInt', '_decodeBool', '_decodeList',\n\n '_encodeComposite', '_encodeStr', '_encodeObjid', '_encodeTime',\n '_encodeNull', '_encodeInt', '_encodeBool'\n]\n\nfunction Node (enc, parent, name) {\n const state = {}\n this._baseState = state\n\n state.name = name\n state.enc = enc\n\n state.parent = parent || null\n state.children = null\n\n // State\n state.tag = null\n state.args = null\n state.reverseArgs = null\n state.choice = null\n state.optional = false\n state.any = false\n state.obj = false\n state.use = null\n state.useDecoder = null\n state.key = null\n state.default = null\n state.explicit = null\n state.implicit = null\n state.contains = null\n\n // Should create new instance on each method\n if (!state.parent) {\n state.children = []\n this._wrap()\n }\n}\n\nconst stateProps = [\n 'enc', 'parent', 'children', 'tag', 'args', 'reverseArgs', 'choice',\n 'optional', 'any', 'obj', 'use', 'alteredUse', 'key', 'default', 'explicit',\n 'implicit', 'contains'\n]\n\nNode.prototype.clone = function clone () {\n const state = this._baseState\n const cstate = {}\n stateProps.forEach(function (prop) {\n cstate[prop] = state[prop]\n })\n const res = new this.constructor(cstate.parent)\n res._baseState = cstate\n return res\n}\n\nNode.prototype._wrap = function wrap () {\n const state = this._baseState\n methods.forEach(function (method) {\n this[method] = function _wrappedMethod () {\n const clone = new this.constructor(this)\n state.children.push(clone)\n return clone[method].apply(clone, arguments)\n }\n }, this)\n}\n\nNode.prototype._init = function init (body) {\n const state = this._baseState\n\n assert(state.parent === null)\n body.call(this)\n\n // Filter children\n state.children = state.children.filter(function (child) {\n return child._baseState.parent === this\n }, this)\n assert.equal(state.children.length, 1, 'Root node can have only one child')\n}\n\nNode.prototype._useArgs = function useArgs (args) {\n const state = this._baseState\n\n // Filter children and args\n const children = args.filter(function (arg) {\n return arg instanceof this.constructor\n }, this)\n args = args.filter(function (arg) {\n return !(arg instanceof this.constructor)\n }, this)\n\n if (children.length !== 0) {\n assert(state.children === null)\n state.children = children\n\n // Replace parent to maintain backward link\n children.forEach(function (child) {\n child._baseState.parent = this\n }, this)\n }\n if (args.length !== 0) {\n assert(state.args === null)\n state.args = args\n state.reverseArgs = args.map(function (arg) {\n if (typeof arg !== 'object' || arg.constructor !== Object) { return arg }\n\n const res = {}\n Object.keys(arg).forEach(function (key) {\n if (key == (key | 0)) { key |= 0 } // eslint-disable-line eqeqeq\n const value = arg[key]\n res[value] = key\n })\n return res\n })\n }\n}\n\n//\n// Overrided methods\n//\n\noverrided.forEach(function (method) {\n Node.prototype[method] = function _overrided () {\n const state = this._baseState\n throw new Error(`${method} not implemented for encoding: ${state.enc}`)\n }\n})\n\n//\n// Public methods\n//\n\ntags.forEach(function (tag) {\n Node.prototype[tag] = function _tagMethod () {\n const state = this._baseState\n const args = Array.prototype.slice.call(arguments)\n\n assert(state.tag === null)\n state.tag = tag\n\n this._useArgs(args)\n\n return this\n }\n})\n\nNode.prototype.use = function use (item) {\n assert(item)\n const state = this._baseState\n\n assert(state.use === null)\n state.use = item\n\n return this\n}\n\nNode.prototype.optional = function optional () {\n const state = this._baseState\n\n state.optional = true\n\n return this\n}\n\nNode.prototype.def = function def (val) {\n const state = this._baseState\n\n assert(state.default === null)\n state.default = val\n state.optional = true\n\n return this\n}\n\nNode.prototype.explicit = function explicit (num) {\n const state = this._baseState\n\n assert(state.explicit === null && state.implicit === null)\n state.explicit = num\n\n return this\n}\n\nNode.prototype.implicit = function implicit (num) {\n const state = this._baseState\n\n assert(state.explicit === null && state.implicit === null)\n state.implicit = num\n\n return this\n}\n\nNode.prototype.obj = function obj () {\n const state = this._baseState\n const args = Array.prototype.slice.call(arguments)\n\n state.obj = true\n\n if (args.length !== 0) { this._useArgs(args) }\n\n return this\n}\n\nNode.prototype.key = function key (newKey) {\n const state = this._baseState\n\n assert(state.key === null)\n state.key = newKey\n\n return this\n}\n\nNode.prototype.any = function any () {\n const state = this._baseState\n\n state.any = true\n\n return this\n}\n\nNode.prototype.choice = function choice (obj) {\n const state = this._baseState\n\n assert(state.choice === null)\n state.choice = obj\n this._useArgs(Object.keys(obj).map(function (key) {\n return obj[key]\n }))\n\n return this\n}\n\nNode.prototype.contains = function contains (item) {\n const state = this._baseState\n\n assert(state.use === null)\n state.contains = item\n\n return this\n}\n\n//\n// Decoding\n//\n\nNode.prototype._decode = function decode (input, options) {\n const state = this._baseState\n\n // Decode root node\n if (state.parent === null) { return input.wrapResult(state.children[0]._decode(input, options)) }\n\n let result = state.default\n let present = true\n\n let prevKey = null\n if (state.key !== null) { prevKey = input.enterKey(state.key) }\n\n // Check if tag is there\n if (state.optional) {\n let tag = null\n if (state.explicit !== null) { tag = state.explicit } else if (state.implicit !== null) { tag = state.implicit } else if (state.tag !== null) { tag = state.tag }\n\n if (tag === null && !state.any) {\n // Trial and Error\n const save = input.save()\n try {\n if (state.choice === null) { this._decodeGeneric(state.tag, input, options) } else { this._decodeChoice(input, options) }\n present = true\n } catch (e) {\n present = false\n }\n input.restore(save)\n } else {\n present = this._peekTag(input, tag, state.any)\n\n if (input.isError(present)) { return present }\n }\n }\n\n // Push object on stack\n let prevObj\n if (state.obj && present) { prevObj = input.enterObject() }\n\n if (present) {\n // Unwrap explicit values\n if (state.explicit !== null) {\n const explicit = this._decodeTag(input, state.explicit)\n if (input.isError(explicit)) { return explicit }\n input = explicit\n }\n\n const start = input.offset\n\n // Unwrap implicit and normal values\n if (state.use === null && state.choice === null) {\n let save\n if (state.any) { save = input.save() }\n const body = this._decodeTag(\n input,\n state.implicit !== null ? state.implicit : state.tag,\n state.any\n )\n if (input.isError(body)) { return body }\n\n if (state.any) { result = input.raw(save) } else { input = body }\n }\n\n if (options && options.track && state.tag !== null) { options.track(input.path(), start, input.length, 'tagged') }\n\n if (options && options.track && state.tag !== null) { options.track(input.path(), input.offset, input.length, 'content') }\n\n // Select proper method for tag\n if (state.any) {\n // no-op\n } else if (state.choice === null) {\n result = this._decodeGeneric(state.tag, input, options)\n } else {\n result = this._decodeChoice(input, options)\n }\n\n if (input.isError(result)) { return result }\n\n // Decode children\n if (!state.any && state.choice === null && state.children !== null) {\n state.children.forEach(function decodeChildren (child) {\n // NOTE: We are ignoring errors here, to let parser continue with other\n // parts of encoded data\n child._decode(input, options)\n })\n }\n\n // Decode contained/encoded by schema, only in bit or octet strings\n if (state.contains && (state.tag === 'octstr' || state.tag === 'bitstr')) {\n const data = new DecoderBuffer(result)\n result = this._getUse(state.contains, input._reporterState.obj)\n ._decode(data, options)\n }\n }\n\n // Pop object\n if (state.obj && present) { result = input.leaveObject(prevObj) }\n\n // Set key\n if (state.key !== null && (result !== null || present === true)) { input.leaveKey(prevKey, state.key, result) } else if (prevKey !== null) { input.exitKey(prevKey) }\n\n return result\n}\n\nNode.prototype._decodeGeneric = function decodeGeneric (tag, input, options) {\n const state = this._baseState\n\n if (tag === 'seq' || tag === 'set') { return null }\n if (tag === 'seqof' || tag === 'setof') { return this._decodeList(input, tag, state.args[0], options) } else if (/str$/.test(tag)) { return this._decodeStr(input, tag, options) } else if (tag === 'objid' && state.args) { return this._decodeObjid(input, state.args[0], state.args[1], options) } else if (tag === 'objid') { return this._decodeObjid(input, null, null, options) } else if (tag === 'gentime' || tag === 'utctime') { return this._decodeTime(input, tag, options) } else if (tag === 'null_') { return this._decodeNull(input, options) } else if (tag === 'bool') { return this._decodeBool(input, options) } else if (tag === 'objDesc') { return this._decodeStr(input, tag, options) } else if (tag === 'int' || tag === 'enum') { return this._decodeInt(input, state.args && state.args[0], options) }\n\n if (state.use !== null) {\n return this._getUse(state.use, input._reporterState.obj)\n ._decode(input, options)\n } else {\n return input.error(`unknown tag: ${tag}`)\n }\n}\n\nNode.prototype._getUse = function _getUse (entity, obj) {\n const state = this._baseState\n // Create altered use decoder if implicit is set\n state.useDecoder = this._use(entity, obj)\n assert(state.useDecoder._baseState.parent === null)\n state.useDecoder = state.useDecoder._baseState.children[0]\n if (state.implicit !== state.useDecoder._baseState.implicit) {\n state.useDecoder = state.useDecoder.clone()\n state.useDecoder._baseState.implicit = state.implicit\n }\n return state.useDecoder\n}\n\nNode.prototype._decodeChoice = function decodeChoice (input, options) {\n const state = this._baseState\n let result = null\n let match = false\n\n Object.keys(state.choice).some(function (key) {\n const save = input.save()\n const node = state.choice[key]\n try {\n const value = node._decode(input, options)\n if (input.isError(value)) { return false }\n\n result = { type: key, value: value }\n match = true\n } catch (e) {\n input.restore(save)\n return false\n }\n return true\n }, this)\n\n if (!match) { return input.error('Choice not matched') }\n\n return result\n}\n\n//\n// Encoding\n//\n\nNode.prototype._createEncoderBuffer = function createEncoderBuffer (data) {\n return new EncoderBuffer(data, this.reporter)\n}\n\nNode.prototype._encode = function encode (data, reporter, parent) {\n const state = this._baseState\n if (state.default !== null && state.default === data) { return }\n\n const result = this._encodeValue(data, reporter, parent)\n if (result === undefined) { return }\n\n if (this._skipDefault(result, reporter, parent)) { return }\n\n return result\n}\n\nNode.prototype._encodeValue = function encode (data, reporter, parent) {\n const state = this._baseState\n\n // Decode root node\n if (state.parent === null) { return state.children[0]._encode(data, reporter || new Reporter()) }\n\n let result = null\n\n // Set reporter to share it with a child class\n this.reporter = reporter\n\n // Check if data is there\n if (state.optional && data === undefined) {\n if (state.default !== null) { data = state.default } else { return }\n }\n\n // Encode children first\n let content = null\n let primitive = false\n if (state.any) {\n // Anything that was given is translated to buffer\n result = this._createEncoderBuffer(data)\n } else if (state.choice) {\n result = this._encodeChoice(data, reporter)\n } else if (state.contains) {\n content = this._getUse(state.contains, parent)._encode(data, reporter)\n primitive = true\n } else if (state.children) {\n content = state.children.map(function (child) {\n if (child._baseState.tag === 'null_') { return child._encode(null, reporter, data) }\n\n if (child._baseState.key === null) { return reporter.error('Child should have a key') }\n const prevKey = reporter.enterKey(child._baseState.key)\n\n if (typeof data !== 'object') { return reporter.error('Child expected, but input is not object') }\n\n const res = child._encode(data[child._baseState.key], reporter, data)\n reporter.leaveKey(prevKey)\n\n return res\n }, this).filter(function (child) {\n return child\n })\n content = this._createEncoderBuffer(content)\n } else {\n if (state.tag === 'seqof' || state.tag === 'setof') {\n if (!(state.args && state.args.length === 1)) { return reporter.error(`Too many args for: ${state.tag}`) }\n\n if (!Array.isArray(data)) { return reporter.error('seqof/setof, but data is not Array') }\n\n const child = this.clone()\n child._baseState.implicit = null\n content = this._createEncoderBuffer(data.map(function (item) {\n const state = this._baseState\n\n return this._getUse(state.args[0], data)._encode(item, reporter)\n }, child))\n } else if (state.use !== null) {\n result = this._getUse(state.use, parent)._encode(data, reporter)\n } else {\n content = this._encodePrimitive(state.tag, data)\n primitive = true\n }\n }\n\n // Encode data itself\n if (!state.any && state.choice === null) {\n const tag = state.implicit !== null ? state.implicit : state.tag\n const cls = state.implicit === null ? 'universal' : 'context'\n\n if (tag === null) {\n if (state.use === null) { reporter.error('Tag could be omitted only for .use()') }\n } else {\n if (state.use === null) { result = this._encodeComposite(tag, primitive, cls, content) }\n }\n }\n\n // Wrap in explicit\n if (state.explicit !== null) { result = this._encodeComposite(state.explicit, false, 'context', result) }\n\n return result\n}\n\nNode.prototype._encodeChoice = function encodeChoice (data, reporter) {\n const state = this._baseState\n\n const node = state.choice[data.type]\n if (!node) {\n assert(\n false,\n `${data.type} not found in ${JSON.stringify(Object.keys(state.choice))}`\n )\n }\n return node._encode(data.value, reporter)\n}\n\nNode.prototype._encodePrimitive = function encodePrimitive (tag, data) {\n const state = this._baseState\n\n if (/str$/.test(tag)) { return this._encodeStr(data, tag) } else if (tag === 'objid' && state.args) { return this._encodeObjid(data, state.reverseArgs[0], state.args[1]) } else if (tag === 'objid') { return this._encodeObjid(data, null, null) } else if (tag === 'gentime' || tag === 'utctime') { return this._encodeTime(data, tag) } else if (tag === 'null_') { return this._encodeNull() } else if (tag === 'int' || tag === 'enum') { return this._encodeInt(data, state.args && state.reverseArgs[0]) } else if (tag === 'bool') { return this._encodeBool(data) } else if (tag === 'objDesc') { return this._encodeStr(data, tag) } else { throw new Error(`Unsupported tag: ${tag}`) }\n}\n\nNode.prototype._isNumstr = function isNumstr (str) {\n return /^[0-9 ]*$/.test(str)\n}\n\nNode.prototype._isPrintstr = function isPrintstr (str) {\n return /^[A-Za-z0-9 '()+,-./:=?]*$/.test(str)\n}\n\nmodule.exports = Node\n","const { inherits } = require('util')\n\nfunction Reporter (options) {\n this._reporterState = {\n obj: null,\n path: [],\n options: options || {},\n errors: []\n }\n}\n\nReporter.prototype.isError = function isError (obj) {\n return obj instanceof ReporterError\n}\n\nReporter.prototype.save = function save () {\n const state = this._reporterState\n\n return { obj: state.obj, pathLen: state.path.length }\n}\n\nReporter.prototype.restore = function restore (data) {\n const state = this._reporterState\n\n state.obj = data.obj\n state.path = state.path.slice(0, data.pathLen)\n}\n\nReporter.prototype.enterKey = function enterKey (key) {\n return this._reporterState.path.push(key)\n}\n\nReporter.prototype.exitKey = function exitKey (index) {\n const state = this._reporterState\n\n state.path = state.path.slice(0, index - 1)\n}\n\nReporter.prototype.leaveKey = function leaveKey (index, key, value) {\n const state = this._reporterState\n\n this.exitKey(index)\n if (state.obj !== null) { state.obj[key] = value }\n}\n\nReporter.prototype.path = function path () {\n return this._reporterState.path.join('/')\n}\n\nReporter.prototype.enterObject = function enterObject () {\n const state = this._reporterState\n\n const prev = state.obj\n state.obj = {}\n return prev\n}\n\nReporter.prototype.leaveObject = function leaveObject (prev) {\n const state = this._reporterState\n\n const now = state.obj\n state.obj = prev\n return now\n}\n\nReporter.prototype.error = function error (msg) {\n let err\n const state = this._reporterState\n\n const inherited = msg instanceof ReporterError\n if (inherited) {\n err = msg\n } else {\n err = new ReporterError(state.path.map(function (elem) {\n return `[${JSON.stringify(elem)}]`\n }).join(''), msg.message || msg, msg.stack)\n }\n\n if (!state.options.partial) { throw err }\n\n if (!inherited) { state.errors.push(err) }\n\n return err\n}\n\nReporter.prototype.wrapResult = function wrapResult (result) {\n const state = this._reporterState\n if (!state.options.partial) { return result }\n\n return {\n result: this.isError(result) ? null : result,\n errors: state.errors\n }\n}\n\nfunction ReporterError (path, msg) {\n this.path = path\n this.rethrow(msg)\n}\ninherits(ReporterError, Error)\n\nReporterError.prototype.rethrow = function rethrow (msg) {\n this.message = `${msg} at: ${this.path || '(shallow)'}`\n if (Error.captureStackTrace) { Error.captureStackTrace(this, ReporterError) }\n\n if (!this.stack) {\n try {\n // IE only adds stack when thrown\n throw new Error(this.message)\n } catch (e) {\n this.stack = e.stack\n }\n }\n return this\n}\n\nexports.Reporter = Reporter\n","// Helper\nfunction reverse (map) {\n const res = {}\n\n Object.keys(map).forEach(function (key) {\n // Convert key to integer if it is stringified\n if ((key | 0) == key) { key = key | 0 } // eslint-disable-line eqeqeq\n\n const value = map[key]\n res[value] = key\n })\n\n return res\n}\n\nexports.tagClass = {\n 0: 'universal',\n 1: 'application',\n 2: 'context',\n 3: 'private'\n}\nexports.tagClassByName = reverse(exports.tagClass)\n\nexports.tag = {\n 0x00: 'end',\n 0x01: 'bool',\n 0x02: 'int',\n 0x03: 'bitstr',\n 0x04: 'octstr',\n 0x05: 'null_',\n 0x06: 'objid',\n 0x07: 'objDesc',\n 0x08: 'external',\n 0x09: 'real',\n 0x0a: 'enum',\n 0x0b: 'embed',\n 0x0c: 'utf8str',\n 0x0d: 'relativeOid',\n 0x10: 'seq',\n 0x11: 'set',\n 0x12: 'numstr',\n 0x13: 'printstr',\n 0x14: 't61str',\n 0x15: 'videostr',\n 0x16: 'ia5str',\n 0x17: 'utctime',\n 0x18: 'gentime',\n 0x19: 'graphstr',\n 0x1a: 'iso646str',\n 0x1b: 'genstr',\n 0x1c: 'unistr',\n 0x1d: 'charstr',\n 0x1e: 'bmpstr'\n}\nexports.tagByName = reverse(exports.tag)\n","module.exports = {\n der: require('./der')\n}\n","/* global BigInt */\nconst { inherits } = require('util')\n\nconst { DecoderBuffer } = require('../base/buffer')\nconst Node = require('../base/node')\n\n// Import DER constants\nconst der = require('../constants/der')\n\nfunction DERDecoder (entity) {\n this.enc = 'der'\n this.name = entity.name\n this.entity = entity\n\n // Construct base tree\n this.tree = new DERNode()\n this.tree._init(entity.body)\n}\n\nDERDecoder.prototype.decode = function decode (data, options) {\n if (!DecoderBuffer.isDecoderBuffer(data)) {\n data = new DecoderBuffer(data, options)\n }\n\n return this.tree._decode(data, options)\n}\n\n// Tree methods\n\nfunction DERNode (parent) {\n Node.call(this, 'der', parent)\n}\ninherits(DERNode, Node)\n\nDERNode.prototype._peekTag = function peekTag (buffer, tag, any) {\n if (buffer.isEmpty()) { return false }\n\n const state = buffer.save()\n const decodedTag = derDecodeTag(buffer, `Failed to peek tag: \"${tag}\"`)\n if (buffer.isError(decodedTag)) { return decodedTag }\n\n buffer.restore(state)\n\n return decodedTag.tag === tag || decodedTag.tagStr === tag || (decodedTag.tagStr + 'of') === tag || any\n}\n\nDERNode.prototype._decodeTag = function decodeTag (buffer, tag, any) {\n const decodedTag = derDecodeTag(buffer,\n `Failed to decode tag of \"${tag}\"`)\n if (buffer.isError(decodedTag)) { return decodedTag }\n\n let len = derDecodeLen(buffer,\n decodedTag.primitive,\n `Failed to get length of \"${tag}\"`)\n\n // Failure\n if (buffer.isError(len)) { return len }\n\n if (!any &&\n decodedTag.tag !== tag &&\n decodedTag.tagStr !== tag &&\n decodedTag.tagStr + 'of' !== tag) {\n return buffer.error(`Failed to match tag: \"${tag}\"`)\n }\n\n if (decodedTag.primitive || len !== null) { return buffer.skip(len, `Failed to match body of: \"${tag}\"`) }\n\n // Indefinite length... find END tag\n const state = buffer.save()\n const res = this._skipUntilEnd(\n buffer,\n `Failed to skip indefinite length body: \"${this.tag}\"`)\n if (buffer.isError(res)) { return res }\n\n len = buffer.offset - state.offset\n buffer.restore(state)\n return buffer.skip(len, `Failed to match body of: \"${tag}\"`)\n}\n\nDERNode.prototype._skipUntilEnd = function skipUntilEnd (buffer, fail) {\n for (;;) {\n const tag = derDecodeTag(buffer, fail)\n if (buffer.isError(tag)) { return tag }\n const len = derDecodeLen(buffer, tag.primitive, fail)\n if (buffer.isError(len)) { return len }\n\n let res\n if (tag.primitive || len !== null) { res = buffer.skip(len) } else { res = this._skipUntilEnd(buffer, fail) }\n\n // Failure\n if (buffer.isError(res)) { return res }\n\n if (tag.tagStr === 'end') { break }\n }\n}\n\nDERNode.prototype._decodeList = function decodeList (buffer, tag, decoder,\n options) {\n const result = []\n while (!buffer.isEmpty()) {\n const possibleEnd = this._peekTag(buffer, 'end')\n if (buffer.isError(possibleEnd)) { return possibleEnd }\n\n const res = decoder.decode(buffer, 'der', options)\n if (buffer.isError(res) && possibleEnd) { break }\n result.push(res)\n }\n return result\n}\n\nDERNode.prototype._decodeStr = function decodeStr (buffer, tag) {\n if (tag === 'bitstr') {\n const unused = buffer.readUInt8()\n if (buffer.isError(unused)) { return unused }\n return { unused: unused, data: buffer.raw() }\n } else if (tag === 'bmpstr') {\n const raw = buffer.raw()\n if (raw.length % 2 === 1) { return buffer.error('Decoding of string type: bmpstr length mismatch') }\n\n let str = ''\n for (let i = 0; i < raw.length / 2; i++) {\n str += String.fromCharCode(raw.readUInt16BE(i * 2))\n }\n return str\n } else if (tag === 'numstr') {\n const numstr = buffer.raw().toString('ascii')\n if (!this._isNumstr(numstr)) {\n return buffer.error('Decoding of string type: numstr unsupported characters')\n }\n return numstr\n } else if (tag === 'octstr') {\n return buffer.raw()\n } else if (tag === 'objDesc') {\n return buffer.raw()\n } else if (tag === 'printstr') {\n const printstr = buffer.raw().toString('ascii')\n if (!this._isPrintstr(printstr)) {\n return buffer.error('Decoding of string type: printstr unsupported characters')\n }\n return printstr\n } else if (/str$/.test(tag)) {\n return buffer.raw().toString()\n } else {\n return buffer.error(`Decoding of string type: ${tag} unsupported`)\n }\n}\n\nDERNode.prototype._decodeObjid = function decodeObjid (buffer, values, relative) {\n let result\n const identifiers = []\n let ident = 0\n let subident = 0\n while (!buffer.isEmpty()) {\n subident = buffer.readUInt8()\n ident <<= 7\n ident |= subident & 0x7f\n if ((subident & 0x80) === 0) {\n identifiers.push(ident)\n ident = 0\n }\n }\n if (subident & 0x80) { identifiers.push(ident) }\n\n const first = (identifiers[0] / 40) | 0\n const second = identifiers[0] % 40\n\n if (relative) { result = identifiers } else { result = [first, second].concat(identifiers.slice(1)) }\n\n if (values) {\n let tmp = values[result.join(' ')]\n if (tmp === undefined) { tmp = values[result.join('.')] }\n if (tmp !== undefined) { result = tmp }\n }\n\n return result\n}\n\nDERNode.prototype._decodeTime = function decodeTime (buffer, tag) {\n const str = buffer.raw().toString()\n\n let year\n let mon\n let day\n let hour\n let min\n let sec\n if (tag === 'gentime') {\n year = str.slice(0, 4) | 0\n mon = str.slice(4, 6) | 0\n day = str.slice(6, 8) | 0\n hour = str.slice(8, 10) | 0\n min = str.slice(10, 12) | 0\n sec = str.slice(12, 14) | 0\n } else if (tag === 'utctime') {\n year = str.slice(0, 2) | 0\n mon = str.slice(2, 4) | 0\n day = str.slice(4, 6) | 0\n hour = str.slice(6, 8) | 0\n min = str.slice(8, 10) | 0\n sec = str.slice(10, 12) | 0\n if (year < 70) { year = 2000 + year } else { year = 1900 + year }\n } else {\n return buffer.error(`Decoding ${tag} time is not supported yet`)\n }\n\n return Date.UTC(year, mon - 1, day, hour, min, sec, 0)\n}\n\nDERNode.prototype._decodeNull = function decodeNull () {\n return null\n}\n\nDERNode.prototype._decodeBool = function decodeBool (buffer) {\n const res = buffer.readUInt8()\n if (buffer.isError(res)) { return res } else { return res !== 0 }\n}\n\nDERNode.prototype._decodeInt = function decodeInt (buffer, values) {\n // Bigint, return as it is (assume big endian)\n const raw = buffer.raw()\n let res = BigInt(`0x${raw.toString('hex')}`)\n\n if (values) {\n res = values[res.toString(10)] || res\n }\n\n return res\n}\n\nDERNode.prototype._use = function use (entity, obj) {\n if (typeof entity === 'function') { entity = entity(obj) }\n return entity._getDecoder('der').tree\n}\n\n// Utility methods\n\nfunction derDecodeTag (buf, fail) {\n let tag = buf.readUInt8(fail)\n if (buf.isError(tag)) { return tag }\n\n const cls = der.tagClass[tag >> 6]\n const primitive = (tag & 0x20) === 0\n\n // Multi-octet tag - load\n if ((tag & 0x1f) === 0x1f) {\n let oct = tag\n tag = 0\n while ((oct & 0x80) === 0x80) {\n oct = buf.readUInt8(fail)\n if (buf.isError(oct)) { return oct }\n\n tag <<= 7\n tag |= oct & 0x7f\n }\n } else {\n tag &= 0x1f\n }\n const tagStr = der.tag[tag]\n\n return {\n cls: cls,\n primitive: primitive,\n tag: tag,\n tagStr: tagStr\n }\n}\n\nfunction derDecodeLen (buf, primitive, fail) {\n let len = buf.readUInt8(fail)\n if (buf.isError(len)) { return len }\n\n // Indefinite form\n if (!primitive && len === 0x80) { return null }\n\n // Definite form\n if ((len & 0x80) === 0) {\n // Short form\n return len\n }\n\n // Long form\n const num = len & 0x7f\n if (num > 4) { return buf.error('length octect is too long') }\n\n len = 0\n for (let i = 0; i < num; i++) {\n len <<= 8\n const j = buf.readUInt8(fail)\n if (buf.isError(j)) { return j }\n len |= j\n }\n\n return len\n}\n\nmodule.exports = DERDecoder\n","module.exports = {\n der: require('./der'),\n pem: require('./pem')\n}\n","const { inherits } = require('util')\n\nconst DERDecoder = require('./der')\n\nfunction PEMDecoder (entity) {\n DERDecoder.call(this, entity)\n this.enc = 'pem'\n}\ninherits(PEMDecoder, DERDecoder)\n\nPEMDecoder.prototype.decode = function decode (data, options) {\n const lines = data.toString().split(/[\\r\\n]+/g)\n\n const label = options.label.toUpperCase()\n\n const re = /^-----(BEGIN|END) ([^-]+)-----$/\n let start = -1\n let end = -1\n for (let i = 0; i < lines.length; i++) {\n const match = lines[i].match(re)\n if (match === null) { continue }\n\n if (match[2] !== label) { continue }\n\n if (start === -1) {\n if (match[1] !== 'BEGIN') { break }\n start = i\n } else {\n if (match[1] !== 'END') { break }\n end = i\n break\n }\n }\n if (start === -1 || end === -1) { throw new Error(`PEM section not found for: ${label}`) }\n\n const base64 = lines.slice(start + 1, end).join('')\n // Remove excessive symbols\n base64.replace(/[^a-z0-9+/=]+/gi, '')\n\n const input = Buffer.from(base64, 'base64')\n return DERDecoder.prototype.decode.call(this, input, options)\n}\n\nmodule.exports = PEMDecoder\n","/* global BigInt */\nconst { inherits } = require('util')\n\nconst Node = require('../base/node')\nconst der = require('../constants/der')\n\nfunction DEREncoder (entity) {\n this.enc = 'der'\n this.name = entity.name\n this.entity = entity\n\n // Construct base tree\n this.tree = new DERNode()\n this.tree._init(entity.body)\n}\n\nDEREncoder.prototype.encode = function encode (data, reporter) {\n return this.tree._encode(data, reporter).join()\n}\n\n// Tree methods\n\nfunction DERNode (parent) {\n Node.call(this, 'der', parent)\n}\ninherits(DERNode, Node)\n\nDERNode.prototype._encodeComposite = function encodeComposite (tag,\n primitive,\n cls,\n content) {\n const encodedTag = encodeTag(tag, primitive, cls, this.reporter)\n\n // Short form\n if (content.length < 0x80) {\n const header = Buffer.alloc(2)\n header[0] = encodedTag\n header[1] = content.length\n return this._createEncoderBuffer([header, content])\n }\n\n // Long form\n // Count octets required to store length\n let lenOctets = 1\n for (let i = content.length; i >= 0x100; i >>= 8) { lenOctets++ }\n\n const header = Buffer.alloc(1 + 1 + lenOctets)\n header[0] = encodedTag\n header[1] = 0x80 | lenOctets\n\n for (let i = 1 + lenOctets, j = content.length; j > 0; i--, j >>= 8) { header[i] = j & 0xff }\n\n return this._createEncoderBuffer([header, content])\n}\n\nDERNode.prototype._encodeStr = function encodeStr (str, tag) {\n if (tag === 'bitstr') {\n return this._createEncoderBuffer([str.unused | 0, str.data])\n } else if (tag === 'bmpstr') {\n const buf = Buffer.alloc(str.length * 2)\n for (let i = 0; i < str.length; i++) {\n buf.writeUInt16BE(str.charCodeAt(i), i * 2)\n }\n return this._createEncoderBuffer(buf)\n } else if (tag === 'numstr') {\n if (!this._isNumstr(str)) {\n return this.reporter.error('Encoding of string type: numstr supports only digits and space')\n }\n return this._createEncoderBuffer(str)\n } else if (tag === 'printstr') {\n if (!this._isPrintstr(str)) {\n return this.reporter.error('Encoding of string type: printstr supports only latin upper and lower case letters, digits, space, apostrophe, left and rigth parenthesis, plus sign, comma, hyphen, dot, slash, colon, equal sign, question mark')\n }\n return this._createEncoderBuffer(str)\n } else if (/str$/.test(tag)) {\n return this._createEncoderBuffer(str)\n } else if (tag === 'objDesc') {\n return this._createEncoderBuffer(str)\n } else {\n return this.reporter.error(`Encoding of string type: ${tag} unsupported`)\n }\n}\n\nDERNode.prototype._encodeObjid = function encodeObjid (id, values, relative) {\n if (typeof id === 'string') {\n if (!values) { return this.reporter.error('string objid given, but no values map found') }\n if (!Object.prototype.hasOwnProperty.call(values, id)) { return this.reporter.error('objid not found in values map') }\n id = values[id].split(/[\\s.]+/g)\n for (let i = 0; i < id.length; i++) { id[i] |= 0 }\n } else if (Array.isArray(id)) {\n id = id.slice()\n for (let i = 0; i < id.length; i++) { id[i] |= 0 }\n }\n\n if (!Array.isArray(id)) {\n return this.reporter.error(`objid() should be either array or string, got: ${JSON.stringify(id)}`)\n }\n\n if (!relative) {\n if (id[1] >= 40) { return this.reporter.error('Second objid identifier OOB') }\n id.splice(0, 2, id[0] * 40 + id[1])\n }\n\n // Count number of octets\n let size = 0\n for (let i = 0; i < id.length; i++) {\n let ident = id[i]\n for (size++; ident >= 0x80; ident >>= 7) { size++ }\n }\n\n const objid = Buffer.alloc(size)\n let offset = objid.length - 1\n for (let i = id.length - 1; i >= 0; i--) {\n let ident = id[i]\n objid[offset--] = ident & 0x7f\n while ((ident >>= 7) > 0) { objid[offset--] = 0x80 | (ident & 0x7f) }\n }\n\n return this._createEncoderBuffer(objid)\n}\n\nfunction two (num) {\n if (num < 10) { return `0${num}` } else { return num }\n}\n\nDERNode.prototype._encodeTime = function encodeTime (time, tag) {\n let str\n const date = new Date(time)\n\n if (tag === 'gentime') {\n str = [\n two(date.getUTCFullYear()),\n two(date.getUTCMonth() + 1),\n two(date.getUTCDate()),\n two(date.getUTCHours()),\n two(date.getUTCMinutes()),\n two(date.getUTCSeconds()),\n 'Z'\n ].join('')\n } else if (tag === 'utctime') {\n str = [\n two(date.getUTCFullYear() % 100),\n two(date.getUTCMonth() + 1),\n two(date.getUTCDate()),\n two(date.getUTCHours()),\n two(date.getUTCMinutes()),\n two(date.getUTCSeconds()),\n 'Z'\n ].join('')\n } else {\n this.reporter.error(`Encoding ${tag} time is not supported yet`)\n }\n\n return this._encodeStr(str, 'octstr')\n}\n\nDERNode.prototype._encodeNull = function encodeNull () {\n return this._createEncoderBuffer('')\n}\n\nfunction bnToBuf (bn) {\n var hex = BigInt(bn).toString(16)\n if (hex.length % 2) { hex = '0' + hex }\n\n var len = hex.length / 2\n var u8 = new Uint8Array(len)\n\n var i = 0\n var j = 0\n while (i < len) {\n u8[i] = parseInt(hex.slice(j, j + 2), 16)\n i += 1\n j += 2\n }\n\n return u8\n}\n\nDERNode.prototype._encodeInt = function encodeInt (num, values) {\n if (typeof num === 'string') {\n if (!values) { return this.reporter.error('String int or enum given, but no values map') }\n if (!Object.prototype.hasOwnProperty.call(values, num)) {\n return this.reporter.error(`Values map doesn't contain: ${JSON.stringify(num)}`)\n }\n num = values[num]\n }\n\n if (typeof num === 'bigint') {\n const numArray = [...bnToBuf(num)]\n if (numArray[0] & 0x80) {\n numArray.unshift(0)\n }\n num = Buffer.from(numArray)\n }\n\n if (Buffer.isBuffer(num)) {\n let size = num.length\n if (num.length === 0) { size++ }\n\n const out = Buffer.alloc(size)\n num.copy(out)\n if (num.length === 0) { out[0] = 0 }\n return this._createEncoderBuffer(out)\n }\n\n if (num < 0x80) { return this._createEncoderBuffer(num) }\n\n if (num < 0x100) { return this._createEncoderBuffer([0, num]) }\n\n let size = 1\n for (let i = num; i >= 0x100; i >>= 8) { size++ }\n\n const out = new Array(size)\n for (let i = out.length - 1; i >= 0; i--) {\n out[i] = num & 0xff\n num >>= 8\n }\n if (out[0] & 0x80) {\n out.unshift(0)\n }\n\n return this._createEncoderBuffer(Buffer.from(out))\n}\n\nDERNode.prototype._encodeBool = function encodeBool (value) {\n return this._createEncoderBuffer(value ? 0xff : 0)\n}\n\nDERNode.prototype._use = function use (entity, obj) {\n if (typeof entity === 'function') { entity = entity(obj) }\n return entity._getEncoder('der').tree\n}\n\nDERNode.prototype._skipDefault = function skipDefault (dataBuffer, reporter, parent) {\n const state = this._baseState\n let i\n if (state.default === null) { return false }\n\n const data = dataBuffer.join()\n if (state.defaultBuffer === undefined) { state.defaultBuffer = this._encodeValue(state.default, reporter, parent).join() }\n\n if (data.length !== state.defaultBuffer.length) { return false }\n\n for (i = 0; i < data.length; i++) {\n if (data[i] !== state.defaultBuffer[i]) { return false }\n }\n\n return true\n}\n\n// Utility methods\n\nfunction encodeTag (tag, primitive, cls, reporter) {\n let res\n\n if (tag === 'seqof') { tag = 'seq' } else if (tag === 'setof') { tag = 'set' }\n\n if (Object.prototype.hasOwnProperty.call(der.tagByName, tag)) { res = der.tagByName[tag] } else if (typeof tag === 'number' && (tag | 0) === tag) { res = tag } else { return reporter.error(`Unknown tag: ${tag}`) }\n\n if (res >= 0x1f) { return reporter.error('Multi-octet tag encoding unsupported') }\n\n if (!primitive) { res |= 0x20 }\n\n res |= (der.tagClassByName[cls || 'universal'] << 6)\n\n return res\n}\n\nmodule.exports = DEREncoder\n","module.exports = {\n der: require('./der'),\n pem: require('./pem')\n}\n","const { inherits } = require('util')\n\nconst DEREncoder = require('./der')\n\nfunction PEMEncoder (entity) {\n DEREncoder.call(this, entity)\n this.enc = 'pem'\n}\ninherits(PEMEncoder, DEREncoder)\n\nPEMEncoder.prototype.encode = function encode (data, options) {\n const buf = DEREncoder.prototype.encode.call(this, data)\n\n const p = buf.toString('base64')\n const out = [`-----BEGIN ${options.label}-----`]\n for (let i = 0; i < p.length; i += 64) { out.push(p.slice(i, i + 64)) }\n out.push(`-----END ${options.label}-----`)\n return out.join('\\n')\n}\n\nmodule.exports = PEMEncoder\n","'use strict';\nconst indentString = require('indent-string');\nconst cleanStack = require('clean-stack');\n\nconst cleanInternalStack = stack => stack.replace(/\\s+at .*aggregate-error\\/index.js:\\d+:\\d+\\)?/g, '');\n\nclass AggregateError extends Error {\n\tconstructor(errors) {\n\t\tif (!Array.isArray(errors)) {\n\t\t\tthrow new TypeError(`Expected input to be an Array, got ${typeof errors}`);\n\t\t}\n\n\t\terrors = [...errors].map(error => {\n\t\t\tif (error instanceof Error) {\n\t\t\t\treturn error;\n\t\t\t}\n\n\t\t\tif (error !== null && typeof error === 'object') {\n\t\t\t\t// Handle plain error objects with message property and/or possibly other metadata\n\t\t\t\treturn Object.assign(new Error(error.message), error);\n\t\t\t}\n\n\t\t\treturn new Error(error);\n\t\t});\n\n\t\tlet message = errors\n\t\t\t.map(error => {\n\t\t\t\t// The `stack` property is not standardized, so we can't assume it exists\n\t\t\t\treturn typeof error.stack === 'string' ? cleanInternalStack(cleanStack(error.stack)) : String(error);\n\t\t\t})\n\t\t\t.join('\\n');\n\t\tmessage = '\\n' + indentString(message, 4);\n\t\tsuper(message);\n\n\t\tthis.name = 'AggregateError';\n\n\t\tObject.defineProperty(this, '_errors', {value: errors});\n\t}\n\n\t* [Symbol.iterator]() {\n\t\tfor (const error of this._errors) {\n\t\t\tyield error;\n\t\t}\n\t}\n}\n\nmodule.exports = AggregateError;\n","'use strict';\n\nvar compileSchema = require('./compile')\n , resolve = require('./compile/resolve')\n , Cache = require('./cache')\n , SchemaObject = require('./compile/schema_obj')\n , stableStringify = require('fast-json-stable-stringify')\n , formats = require('./compile/formats')\n , rules = require('./compile/rules')\n , $dataMetaSchema = require('./data')\n , util = require('./compile/util');\n\nmodule.exports = Ajv;\n\nAjv.prototype.validate = validate;\nAjv.prototype.compile = compile;\nAjv.prototype.addSchema = addSchema;\nAjv.prototype.addMetaSchema = addMetaSchema;\nAjv.prototype.validateSchema = validateSchema;\nAjv.prototype.getSchema = getSchema;\nAjv.prototype.removeSchema = removeSchema;\nAjv.prototype.addFormat = addFormat;\nAjv.prototype.errorsText = errorsText;\n\nAjv.prototype._addSchema = _addSchema;\nAjv.prototype._compile = _compile;\n\nAjv.prototype.compileAsync = require('./compile/async');\nvar customKeyword = require('./keyword');\nAjv.prototype.addKeyword = customKeyword.add;\nAjv.prototype.getKeyword = customKeyword.get;\nAjv.prototype.removeKeyword = customKeyword.remove;\nAjv.prototype.validateKeyword = customKeyword.validate;\n\nvar errorClasses = require('./compile/error_classes');\nAjv.ValidationError = errorClasses.Validation;\nAjv.MissingRefError = errorClasses.MissingRef;\nAjv.$dataMetaSchema = $dataMetaSchema;\n\nvar META_SCHEMA_ID = 'http://json-schema.org/draft-07/schema';\n\nvar META_IGNORE_OPTIONS = [ 'removeAdditional', 'useDefaults', 'coerceTypes', 'strictDefaults' ];\nvar META_SUPPORT_DATA = ['/properties'];\n\n/**\n * Creates validator instance.\n * Usage: `Ajv(opts)`\n * @param {Object} opts optional options\n * @return {Object} ajv instance\n */\nfunction Ajv(opts) {\n if (!(this instanceof Ajv)) return new Ajv(opts);\n opts = this._opts = util.copy(opts) || {};\n setLogger(this);\n this._schemas = {};\n this._refs = {};\n this._fragments = {};\n this._formats = formats(opts.format);\n\n this._cache = opts.cache || new Cache;\n this._loadingSchemas = {};\n this._compilations = [];\n this.RULES = rules();\n this._getId = chooseGetId(opts);\n\n opts.loopRequired = opts.loopRequired || Infinity;\n if (opts.errorDataPath == 'property') opts._errorDataPathProperty = true;\n if (opts.serialize === undefined) opts.serialize = stableStringify;\n this._metaOpts = getMetaSchemaOptions(this);\n\n if (opts.formats) addInitialFormats(this);\n if (opts.keywords) addInitialKeywords(this);\n addDefaultMetaSchema(this);\n if (typeof opts.meta == 'object') this.addMetaSchema(opts.meta);\n if (opts.nullable) this.addKeyword('nullable', {metaSchema: {type: 'boolean'}});\n addInitialSchemas(this);\n}\n\n\n\n/**\n * Validate data using schema\n * Schema will be compiled and cached (using serialized JSON as key. [fast-json-stable-stringify](https://github.com/epoberezkin/fast-json-stable-stringify) is used to serialize.\n * @this Ajv\n * @param {String|Object} schemaKeyRef key, ref or schema object\n * @param {Any} data to be validated\n * @return {Boolean} validation result. Errors from the last validation will be available in `ajv.errors` (and also in compiled schema: `schema.errors`).\n */\nfunction validate(schemaKeyRef, data) {\n var v;\n if (typeof schemaKeyRef == 'string') {\n v = this.getSchema(schemaKeyRef);\n if (!v) throw new Error('no schema with key or ref \"' + schemaKeyRef + '\"');\n } else {\n var schemaObj = this._addSchema(schemaKeyRef);\n v = schemaObj.validate || this._compile(schemaObj);\n }\n\n var valid = v(data);\n if (v.$async !== true) this.errors = v.errors;\n return valid;\n}\n\n\n/**\n * Create validating function for passed schema.\n * @this Ajv\n * @param {Object} schema schema object\n * @param {Boolean} _meta true if schema is a meta-schema. Used internally to compile meta schemas of custom keywords.\n * @return {Function} validating function\n */\nfunction compile(schema, _meta) {\n var schemaObj = this._addSchema(schema, undefined, _meta);\n return schemaObj.validate || this._compile(schemaObj);\n}\n\n\n/**\n * Adds schema to the instance.\n * @this Ajv\n * @param {Object|Array} schema schema or array of schemas. If array is passed, `key` and other parameters will be ignored.\n * @param {String} key Optional schema key. Can be passed to `validate` method instead of schema object or id/ref. One schema per instance can have empty `id` and `key`.\n * @param {Boolean} _skipValidation true to skip schema validation. Used internally, option validateSchema should be used instead.\n * @param {Boolean} _meta true if schema is a meta-schema. Used internally, addMetaSchema should be used instead.\n * @return {Ajv} this for method chaining\n */\nfunction addSchema(schema, key, _skipValidation, _meta) {\n if (Array.isArray(schema)){\n for (var i=0; i} errors optional array of validation errors, if not passed errors from the instance are used.\n * @param {Object} options optional options with properties `separator` and `dataVar`.\n * @return {String} human readable string with all errors descriptions\n */\nfunction errorsText(errors, options) {\n errors = errors || this.errors;\n if (!errors) return 'No errors';\n options = options || {};\n var separator = options.separator === undefined ? ', ' : options.separator;\n var dataVar = options.dataVar === undefined ? 'data' : options.dataVar;\n\n var text = '';\n for (var i=0; i%\\\\^`{|}]|%[0-9a-f]{2})|\\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\\*)?)*\\})*$/i;\n// For the source: https://gist.github.com/dperini/729294\n// For test cases: https://mathiasbynens.be/demo/url-regex\n// @todo Delete current URL in favour of the commented out URL rule when this issue is fixed https://github.com/eslint/eslint/issues/7983.\n// var URL = /^(?:(?:https?|ftp):\\/\\/)(?:\\S+(?::\\S*)?@)?(?:(?!10(?:\\.\\d{1,3}){3})(?!127(?:\\.\\d{1,3}){3})(?!169\\.254(?:\\.\\d{1,3}){2})(?!192\\.168(?:\\.\\d{1,3}){2})(?!172\\.(?:1[6-9]|2\\d|3[0-1])(?:\\.\\d{1,3}){2})(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[1-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-z\\u{00a1}-\\u{ffff}0-9]+-)*[a-z\\u{00a1}-\\u{ffff}0-9]+)(?:\\.(?:[a-z\\u{00a1}-\\u{ffff}0-9]+-)*[a-z\\u{00a1}-\\u{ffff}0-9]+)*(?:\\.(?:[a-z\\u{00a1}-\\u{ffff}]{2,})))(?::\\d{2,5})?(?:\\/[^\\s]*)?$/iu;\nvar URL = /^(?:(?:http[s\\u017F]?|ftp):\\/\\/)(?:(?:[\\0-\\x08\\x0E-\\x1F!-\\x9F\\xA1-\\u167F\\u1681-\\u1FFF\\u200B-\\u2027\\u202A-\\u202E\\u2030-\\u205E\\u2060-\\u2FFF\\u3001-\\uD7FF\\uE000-\\uFEFE\\uFF00-\\uFFFF]|[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[\\uD800-\\uDBFF](?![\\uDC00-\\uDFFF])|(?:[^\\uD800-\\uDBFF]|^)[\\uDC00-\\uDFFF])+(?::(?:[\\0-\\x08\\x0E-\\x1F!-\\x9F\\xA1-\\u167F\\u1681-\\u1FFF\\u200B-\\u2027\\u202A-\\u202E\\u2030-\\u205E\\u2060-\\u2FFF\\u3001-\\uD7FF\\uE000-\\uFEFE\\uFF00-\\uFFFF]|[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[\\uD800-\\uDBFF](?![\\uDC00-\\uDFFF])|(?:[^\\uD800-\\uDBFF]|^)[\\uDC00-\\uDFFF])*)?@)?(?:(?!10(?:\\.[0-9]{1,3}){3})(?!127(?:\\.[0-9]{1,3}){3})(?!169\\.254(?:\\.[0-9]{1,3}){2})(?!192\\.168(?:\\.[0-9]{1,3}){2})(?!172\\.(?:1[6-9]|2[0-9]|3[01])(?:\\.[0-9]{1,3}){2})(?:[1-9][0-9]?|1[0-9][0-9]|2[01][0-9]|22[0-3])(?:\\.(?:1?[0-9]{1,2}|2[0-4][0-9]|25[0-5])){2}(?:\\.(?:[1-9][0-9]?|1[0-9][0-9]|2[0-4][0-9]|25[0-4]))|(?:(?:(?:[0-9a-z\\xA1-\\uD7FF\\uE000-\\uFFFF]|[\\uD800-\\uDBFF](?![\\uDC00-\\uDFFF])|(?:[^\\uD800-\\uDBFF]|^)[\\uDC00-\\uDFFF])+-)*(?:[0-9a-z\\xA1-\\uD7FF\\uE000-\\uFFFF]|[\\uD800-\\uDBFF](?![\\uDC00-\\uDFFF])|(?:[^\\uD800-\\uDBFF]|^)[\\uDC00-\\uDFFF])+)(?:\\.(?:(?:[0-9a-z\\xA1-\\uD7FF\\uE000-\\uFFFF]|[\\uD800-\\uDBFF](?![\\uDC00-\\uDFFF])|(?:[^\\uD800-\\uDBFF]|^)[\\uDC00-\\uDFFF])+-)*(?:[0-9a-z\\xA1-\\uD7FF\\uE000-\\uFFFF]|[\\uD800-\\uDBFF](?![\\uDC00-\\uDFFF])|(?:[^\\uD800-\\uDBFF]|^)[\\uDC00-\\uDFFF])+)*(?:\\.(?:(?:[a-z\\xA1-\\uD7FF\\uE000-\\uFFFF]|[\\uD800-\\uDBFF](?![\\uDC00-\\uDFFF])|(?:[^\\uD800-\\uDBFF]|^)[\\uDC00-\\uDFFF]){2,})))(?::[0-9]{2,5})?(?:\\/(?:[\\0-\\x08\\x0E-\\x1F!-\\x9F\\xA1-\\u167F\\u1681-\\u1FFF\\u200B-\\u2027\\u202A-\\u202E\\u2030-\\u205E\\u2060-\\u2FFF\\u3001-\\uD7FF\\uE000-\\uFEFE\\uFF00-\\uFFFF]|[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]|[\\uD800-\\uDBFF](?![\\uDC00-\\uDFFF])|(?:[^\\uD800-\\uDBFF]|^)[\\uDC00-\\uDFFF])*)?$/i;\nvar UUID = /^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i;\nvar JSON_POINTER = /^(?:\\/(?:[^~/]|~0|~1)*)*$/;\nvar JSON_POINTER_URI_FRAGMENT = /^#(?:\\/(?:[a-z0-9_\\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i;\nvar RELATIVE_JSON_POINTER = /^(?:0|[1-9][0-9]*)(?:#|(?:\\/(?:[^~/]|~0|~1)*)*)$/;\n\n\nmodule.exports = formats;\n\nfunction formats(mode) {\n mode = mode == 'full' ? 'full' : 'fast';\n return util.copy(formats[mode]);\n}\n\n\nformats.fast = {\n // date: http://tools.ietf.org/html/rfc3339#section-5.6\n date: /^\\d\\d\\d\\d-[0-1]\\d-[0-3]\\d$/,\n // date-time: http://tools.ietf.org/html/rfc3339#section-5.6\n time: /^(?:[0-2]\\d:[0-5]\\d:[0-5]\\d|23:59:60)(?:\\.\\d+)?(?:z|[+-]\\d\\d(?::?\\d\\d)?)?$/i,\n 'date-time': /^\\d\\d\\d\\d-[0-1]\\d-[0-3]\\d[t\\s](?:[0-2]\\d:[0-5]\\d:[0-5]\\d|23:59:60)(?:\\.\\d+)?(?:z|[+-]\\d\\d(?::?\\d\\d)?)$/i,\n // uri: https://github.com/mafintosh/is-my-json-valid/blob/master/formats.js\n uri: /^(?:[a-z][a-z0-9+\\-.]*:)(?:\\/?\\/)?[^\\s]*$/i,\n 'uri-reference': /^(?:(?:[a-z][a-z0-9+\\-.]*:)?\\/?\\/)?(?:[^\\\\\\s#][^\\s#]*)?(?:#[^\\\\\\s]*)?$/i,\n 'uri-template': URITEMPLATE,\n url: URL,\n // email (sources from jsen validator):\n // http://stackoverflow.com/questions/201323/using-a-regular-expression-to-validate-an-email-address#answer-8829363\n // http://www.w3.org/TR/html5/forms.html#valid-e-mail-address (search for 'willful violation')\n email: /^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i,\n hostname: HOSTNAME,\n // optimized https://www.safaribooksonline.com/library/view/regular-expressions-cookbook/9780596802837/ch07s16.html\n ipv4: /^(?:(?:25[0-5]|2[0-4]\\d|[01]?\\d\\d?)\\.){3}(?:25[0-5]|2[0-4]\\d|[01]?\\d\\d?)$/,\n // optimized http://stackoverflow.com/questions/53497/regular-expression-that-matches-valid-ipv6-addresses\n ipv6: /^\\s*(?:(?:(?:[0-9a-f]{1,4}:){7}(?:[0-9a-f]{1,4}|:))|(?:(?:[0-9a-f]{1,4}:){6}(?::[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){5}(?:(?:(?::[0-9a-f]{1,4}){1,2})|:(?:(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){4}(?:(?:(?::[0-9a-f]{1,4}){1,3})|(?:(?::[0-9a-f]{1,4})?:(?:(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){3}(?:(?:(?::[0-9a-f]{1,4}){1,4})|(?:(?::[0-9a-f]{1,4}){0,2}:(?:(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){2}(?:(?:(?::[0-9a-f]{1,4}){1,5})|(?:(?::[0-9a-f]{1,4}){0,3}:(?:(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:)))(?:%.+)?\\s*$/i,\n regex: regex,\n // uuid: http://tools.ietf.org/html/rfc4122\n uuid: UUID,\n // JSON-pointer: https://tools.ietf.org/html/rfc6901\n // uri fragment: https://tools.ietf.org/html/rfc3986#appendix-A\n 'json-pointer': JSON_POINTER,\n 'json-pointer-uri-fragment': JSON_POINTER_URI_FRAGMENT,\n // relative JSON-pointer: http://tools.ietf.org/html/draft-luff-relative-json-pointer-00\n 'relative-json-pointer': RELATIVE_JSON_POINTER\n};\n\n\nformats.full = {\n date: date,\n time: time,\n 'date-time': date_time,\n uri: uri,\n 'uri-reference': URIREF,\n 'uri-template': URITEMPLATE,\n url: URL,\n email: /^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,\n hostname: HOSTNAME,\n ipv4: /^(?:(?:25[0-5]|2[0-4]\\d|[01]?\\d\\d?)\\.){3}(?:25[0-5]|2[0-4]\\d|[01]?\\d\\d?)$/,\n ipv6: /^\\s*(?:(?:(?:[0-9a-f]{1,4}:){7}(?:[0-9a-f]{1,4}|:))|(?:(?:[0-9a-f]{1,4}:){6}(?::[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){5}(?:(?:(?::[0-9a-f]{1,4}){1,2})|:(?:(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){4}(?:(?:(?::[0-9a-f]{1,4}){1,3})|(?:(?::[0-9a-f]{1,4})?:(?:(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){3}(?:(?:(?::[0-9a-f]{1,4}){1,4})|(?:(?::[0-9a-f]{1,4}){0,2}:(?:(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){2}(?:(?:(?::[0-9a-f]{1,4}){1,5})|(?:(?::[0-9a-f]{1,4}){0,3}:(?:(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:)))(?:%.+)?\\s*$/i,\n regex: regex,\n uuid: UUID,\n 'json-pointer': JSON_POINTER,\n 'json-pointer-uri-fragment': JSON_POINTER_URI_FRAGMENT,\n 'relative-json-pointer': RELATIVE_JSON_POINTER\n};\n\n\nfunction isLeapYear(year) {\n // https://tools.ietf.org/html/rfc3339#appendix-C\n return year % 4 === 0 && (year % 100 !== 0 || year % 400 === 0);\n}\n\n\nfunction date(str) {\n // full-date from http://tools.ietf.org/html/rfc3339#section-5.6\n var matches = str.match(DATE);\n if (!matches) return false;\n\n var year = +matches[1];\n var month = +matches[2];\n var day = +matches[3];\n\n return month >= 1 && month <= 12 && day >= 1 &&\n day <= (month == 2 && isLeapYear(year) ? 29 : DAYS[month]);\n}\n\n\nfunction time(str, full) {\n var matches = str.match(TIME);\n if (!matches) return false;\n\n var hour = matches[1];\n var minute = matches[2];\n var second = matches[3];\n var timeZone = matches[5];\n return ((hour <= 23 && minute <= 59 && second <= 59) ||\n (hour == 23 && minute == 59 && second == 60)) &&\n (!full || timeZone);\n}\n\n\nvar DATE_TIME_SEPARATOR = /t|\\s/i;\nfunction date_time(str) {\n // http://tools.ietf.org/html/rfc3339#section-5.6\n var dateTime = str.split(DATE_TIME_SEPARATOR);\n return dateTime.length == 2 && date(dateTime[0]) && time(dateTime[1], true);\n}\n\n\nvar NOT_URI_FRAGMENT = /\\/|:/;\nfunction uri(str) {\n // http://jmrware.com/articles/2009/uri_regexp/URI_regex.html + optional protocol + required \".\"\n return NOT_URI_FRAGMENT.test(str) && URI.test(str);\n}\n\n\nvar Z_ANCHOR = /[^\\\\]\\\\Z/;\nfunction regex(str) {\n if (Z_ANCHOR.test(str)) return false;\n try {\n new RegExp(str);\n return true;\n } catch(e) {\n return false;\n }\n}\n","'use strict';\n\nvar resolve = require('./resolve')\n , util = require('./util')\n , errorClasses = require('./error_classes')\n , stableStringify = require('fast-json-stable-stringify');\n\nvar validateGenerator = require('../dotjs/validate');\n\n/**\n * Functions below are used inside compiled validations function\n */\n\nvar ucs2length = util.ucs2length;\nvar equal = require('fast-deep-equal');\n\n// this error is thrown by async schemas to return validation errors via exception\nvar ValidationError = errorClasses.Validation;\n\nmodule.exports = compile;\n\n\n/**\n * Compiles schema to validation function\n * @this Ajv\n * @param {Object} schema schema object\n * @param {Object} root object with information about the root schema for this schema\n * @param {Object} localRefs the hash of local references inside the schema (created by resolve.id), used for inline resolution\n * @param {String} baseId base ID for IDs in the schema\n * @return {Function} validation function\n */\nfunction compile(schema, root, localRefs, baseId) {\n /* jshint validthis: true, evil: true */\n /* eslint no-shadow: 0 */\n var self = this\n , opts = this._opts\n , refVal = [ undefined ]\n , refs = {}\n , patterns = []\n , patternsHash = {}\n , defaults = []\n , defaultsHash = {}\n , customRules = [];\n\n root = root || { schema: schema, refVal: refVal, refs: refs };\n\n var c = checkCompiling.call(this, schema, root, baseId);\n var compilation = this._compilations[c.index];\n if (c.compiling) return (compilation.callValidate = callValidate);\n\n var formats = this._formats;\n var RULES = this.RULES;\n\n try {\n var v = localCompile(schema, root, localRefs, baseId);\n compilation.validate = v;\n var cv = compilation.callValidate;\n if (cv) {\n cv.schema = v.schema;\n cv.errors = null;\n cv.refs = v.refs;\n cv.refVal = v.refVal;\n cv.root = v.root;\n cv.$async = v.$async;\n if (opts.sourceCode) cv.source = v.source;\n }\n return v;\n } finally {\n endCompiling.call(this, schema, root, baseId);\n }\n\n /* @this {*} - custom context, see passContext option */\n function callValidate() {\n /* jshint validthis: true */\n var validate = compilation.validate;\n var result = validate.apply(this, arguments);\n callValidate.errors = validate.errors;\n return result;\n }\n\n function localCompile(_schema, _root, localRefs, baseId) {\n var isRoot = !_root || (_root && _root.schema == _schema);\n if (_root.schema != root.schema)\n return compile.call(self, _schema, _root, localRefs, baseId);\n\n var $async = _schema.$async === true;\n\n var sourceCode = validateGenerator({\n isTop: true,\n schema: _schema,\n isRoot: isRoot,\n baseId: baseId,\n root: _root,\n schemaPath: '',\n errSchemaPath: '#',\n errorPath: '\"\"',\n MissingRefError: errorClasses.MissingRef,\n RULES: RULES,\n validate: validateGenerator,\n util: util,\n resolve: resolve,\n resolveRef: resolveRef,\n usePattern: usePattern,\n useDefault: useDefault,\n useCustomRule: useCustomRule,\n opts: opts,\n formats: formats,\n logger: self.logger,\n self: self\n });\n\n sourceCode = vars(refVal, refValCode) + vars(patterns, patternCode)\n + vars(defaults, defaultCode) + vars(customRules, customRuleCode)\n + sourceCode;\n\n if (opts.processCode) sourceCode = opts.processCode(sourceCode, _schema);\n // console.log('\\n\\n\\n *** \\n', JSON.stringify(sourceCode));\n var validate;\n try {\n var makeValidate = new Function(\n 'self',\n 'RULES',\n 'formats',\n 'root',\n 'refVal',\n 'defaults',\n 'customRules',\n 'equal',\n 'ucs2length',\n 'ValidationError',\n sourceCode\n );\n\n validate = makeValidate(\n self,\n RULES,\n formats,\n root,\n refVal,\n defaults,\n customRules,\n equal,\n ucs2length,\n ValidationError\n );\n\n refVal[0] = validate;\n } catch(e) {\n self.logger.error('Error compiling schema, function code:', sourceCode);\n throw e;\n }\n\n validate.schema = _schema;\n validate.errors = null;\n validate.refs = refs;\n validate.refVal = refVal;\n validate.root = isRoot ? validate : _root;\n if ($async) validate.$async = true;\n if (opts.sourceCode === true) {\n validate.source = {\n code: sourceCode,\n patterns: patterns,\n defaults: defaults\n };\n }\n\n return validate;\n }\n\n function resolveRef(baseId, ref, isRoot) {\n ref = resolve.url(baseId, ref);\n var refIndex = refs[ref];\n var _refVal, refCode;\n if (refIndex !== undefined) {\n _refVal = refVal[refIndex];\n refCode = 'refVal[' + refIndex + ']';\n return resolvedRef(_refVal, refCode);\n }\n if (!isRoot && root.refs) {\n var rootRefId = root.refs[ref];\n if (rootRefId !== undefined) {\n _refVal = root.refVal[rootRefId];\n refCode = addLocalRef(ref, _refVal);\n return resolvedRef(_refVal, refCode);\n }\n }\n\n refCode = addLocalRef(ref);\n var v = resolve.call(self, localCompile, root, ref);\n if (v === undefined) {\n var localSchema = localRefs && localRefs[ref];\n if (localSchema) {\n v = resolve.inlineRef(localSchema, opts.inlineRefs)\n ? localSchema\n : compile.call(self, localSchema, root, localRefs, baseId);\n }\n }\n\n if (v === undefined) {\n removeLocalRef(ref);\n } else {\n replaceLocalRef(ref, v);\n return resolvedRef(v, refCode);\n }\n }\n\n function addLocalRef(ref, v) {\n var refId = refVal.length;\n refVal[refId] = v;\n refs[ref] = refId;\n return 'refVal' + refId;\n }\n\n function removeLocalRef(ref) {\n delete refs[ref];\n }\n\n function replaceLocalRef(ref, v) {\n var refId = refs[ref];\n refVal[refId] = v;\n }\n\n function resolvedRef(refVal, code) {\n return typeof refVal == 'object' || typeof refVal == 'boolean'\n ? { code: code, schema: refVal, inline: true }\n : { code: code, $async: refVal && !!refVal.$async };\n }\n\n function usePattern(regexStr) {\n var index = patternsHash[regexStr];\n if (index === undefined) {\n index = patternsHash[regexStr] = patterns.length;\n patterns[index] = regexStr;\n }\n return 'pattern' + index;\n }\n\n function useDefault(value) {\n switch (typeof value) {\n case 'boolean':\n case 'number':\n return '' + value;\n case 'string':\n return util.toQuotedString(value);\n case 'object':\n if (value === null) return 'null';\n var valueStr = stableStringify(value);\n var index = defaultsHash[valueStr];\n if (index === undefined) {\n index = defaultsHash[valueStr] = defaults.length;\n defaults[index] = value;\n }\n return 'default' + index;\n }\n }\n\n function useCustomRule(rule, schema, parentSchema, it) {\n if (self._opts.validateSchema !== false) {\n var deps = rule.definition.dependencies;\n if (deps && !deps.every(function(keyword) {\n return Object.prototype.hasOwnProperty.call(parentSchema, keyword);\n }))\n throw new Error('parent schema must have all required keywords: ' + deps.join(','));\n\n var validateSchema = rule.definition.validateSchema;\n if (validateSchema) {\n var valid = validateSchema(schema);\n if (!valid) {\n var message = 'keyword schema is invalid: ' + self.errorsText(validateSchema.errors);\n if (self._opts.validateSchema == 'log') self.logger.error(message);\n else throw new Error(message);\n }\n }\n }\n\n var compile = rule.definition.compile\n , inline = rule.definition.inline\n , macro = rule.definition.macro;\n\n var validate;\n if (compile) {\n validate = compile.call(self, schema, parentSchema, it);\n } else if (macro) {\n validate = macro.call(self, schema, parentSchema, it);\n if (opts.validateSchema !== false) self.validateSchema(validate, true);\n } else if (inline) {\n validate = inline.call(self, it, rule.keyword, schema, parentSchema);\n } else {\n validate = rule.definition.validate;\n if (!validate) return;\n }\n\n if (validate === undefined)\n throw new Error('custom keyword \"' + rule.keyword + '\"failed to compile');\n\n var index = customRules.length;\n customRules[index] = validate;\n\n return {\n code: 'customRule' + index,\n validate: validate\n };\n }\n}\n\n\n/**\n * Checks if the schema is currently compiled\n * @this Ajv\n * @param {Object} schema schema to compile\n * @param {Object} root root object\n * @param {String} baseId base schema ID\n * @return {Object} object with properties \"index\" (compilation index) and \"compiling\" (boolean)\n */\nfunction checkCompiling(schema, root, baseId) {\n /* jshint validthis: true */\n var index = compIndex.call(this, schema, root, baseId);\n if (index >= 0) return { index: index, compiling: true };\n index = this._compilations.length;\n this._compilations[index] = {\n schema: schema,\n root: root,\n baseId: baseId\n };\n return { index: index, compiling: false };\n}\n\n\n/**\n * Removes the schema from the currently compiled list\n * @this Ajv\n * @param {Object} schema schema to compile\n * @param {Object} root root object\n * @param {String} baseId base schema ID\n */\nfunction endCompiling(schema, root, baseId) {\n /* jshint validthis: true */\n var i = compIndex.call(this, schema, root, baseId);\n if (i >= 0) this._compilations.splice(i, 1);\n}\n\n\n/**\n * Index of schema compilation in the currently compiled list\n * @this Ajv\n * @param {Object} schema schema to compile\n * @param {Object} root root object\n * @param {String} baseId base schema ID\n * @return {Integer} compilation index\n */\nfunction compIndex(schema, root, baseId) {\n /* jshint validthis: true */\n for (var i=0; i= 0xD800 && value <= 0xDBFF && pos < len) {\n // high surrogate, and there is a next character\n value = str.charCodeAt(pos);\n if ((value & 0xFC00) == 0xDC00) pos++; // low surrogate\n }\n }\n return length;\n};\n","'use strict';\n\n\nmodule.exports = {\n copy: copy,\n checkDataType: checkDataType,\n checkDataTypes: checkDataTypes,\n coerceToTypes: coerceToTypes,\n toHash: toHash,\n getProperty: getProperty,\n escapeQuotes: escapeQuotes,\n equal: require('fast-deep-equal'),\n ucs2length: require('./ucs2length'),\n varOccurences: varOccurences,\n varReplace: varReplace,\n schemaHasRules: schemaHasRules,\n schemaHasRulesExcept: schemaHasRulesExcept,\n schemaUnknownRules: schemaUnknownRules,\n toQuotedString: toQuotedString,\n getPathExpr: getPathExpr,\n getPath: getPath,\n getData: getData,\n unescapeFragment: unescapeFragment,\n unescapeJsonPointer: unescapeJsonPointer,\n escapeFragment: escapeFragment,\n escapeJsonPointer: escapeJsonPointer\n};\n\n\nfunction copy(o, to) {\n to = to || {};\n for (var key in o) to[key] = o[key];\n return to;\n}\n\n\nfunction checkDataType(dataType, data, strictNumbers, negate) {\n var EQUAL = negate ? ' !== ' : ' === '\n , AND = negate ? ' || ' : ' && '\n , OK = negate ? '!' : ''\n , NOT = negate ? '' : '!';\n switch (dataType) {\n case 'null': return data + EQUAL + 'null';\n case 'array': return OK + 'Array.isArray(' + data + ')';\n case 'object': return '(' + OK + data + AND +\n 'typeof ' + data + EQUAL + '\"object\"' + AND +\n NOT + 'Array.isArray(' + data + '))';\n case 'integer': return '(typeof ' + data + EQUAL + '\"number\"' + AND +\n NOT + '(' + data + ' % 1)' +\n AND + data + EQUAL + data +\n (strictNumbers ? (AND + OK + 'isFinite(' + data + ')') : '') + ')';\n case 'number': return '(typeof ' + data + EQUAL + '\"' + dataType + '\"' +\n (strictNumbers ? (AND + OK + 'isFinite(' + data + ')') : '') + ')';\n default: return 'typeof ' + data + EQUAL + '\"' + dataType + '\"';\n }\n}\n\n\nfunction checkDataTypes(dataTypes, data, strictNumbers) {\n switch (dataTypes.length) {\n case 1: return checkDataType(dataTypes[0], data, strictNumbers, true);\n default:\n var code = '';\n var types = toHash(dataTypes);\n if (types.array && types.object) {\n code = types.null ? '(': '(!' + data + ' || ';\n code += 'typeof ' + data + ' !== \"object\")';\n delete types.null;\n delete types.array;\n delete types.object;\n }\n if (types.number) delete types.integer;\n for (var t in types)\n code += (code ? ' && ' : '' ) + checkDataType(t, data, strictNumbers, true);\n\n return code;\n }\n}\n\n\nvar COERCE_TO_TYPES = toHash([ 'string', 'number', 'integer', 'boolean', 'null' ]);\nfunction coerceToTypes(optionCoerceTypes, dataTypes) {\n if (Array.isArray(dataTypes)) {\n var types = [];\n for (var i=0; i= lvl) throw new Error('Cannot access property/index ' + up + ' levels up, current level is ' + lvl);\n return paths[lvl - up];\n }\n\n if (up > lvl) throw new Error('Cannot access data ' + up + ' levels up, current level is ' + lvl);\n data = 'data' + ((lvl - up) || '');\n if (!jsonPointer) return data;\n }\n\n var expr = data;\n var segments = jsonPointer.split('/');\n for (var i=0; i',\n $notOp = $isMax ? '>' : '<',\n $errorKeyword = undefined;\n if (!($isData || typeof $schema == 'number' || $schema === undefined)) {\n throw new Error($keyword + ' must be number');\n }\n if (!($isDataExcl || $schemaExcl === undefined || typeof $schemaExcl == 'number' || typeof $schemaExcl == 'boolean')) {\n throw new Error($exclusiveKeyword + ' must be number or boolean');\n }\n if ($isDataExcl) {\n var $schemaValueExcl = it.util.getData($schemaExcl.$data, $dataLvl, it.dataPathArr),\n $exclusive = 'exclusive' + $lvl,\n $exclType = 'exclType' + $lvl,\n $exclIsNumber = 'exclIsNumber' + $lvl,\n $opExpr = 'op' + $lvl,\n $opStr = '\\' + ' + $opExpr + ' + \\'';\n out += ' var schemaExcl' + ($lvl) + ' = ' + ($schemaValueExcl) + '; ';\n $schemaValueExcl = 'schemaExcl' + $lvl;\n out += ' var ' + ($exclusive) + '; var ' + ($exclType) + ' = typeof ' + ($schemaValueExcl) + '; if (' + ($exclType) + ' != \\'boolean\\' && ' + ($exclType) + ' != \\'undefined\\' && ' + ($exclType) + ' != \\'number\\') { ';\n var $errorKeyword = $exclusiveKeyword;\n var $$outStack = $$outStack || [];\n $$outStack.push(out);\n out = ''; /* istanbul ignore else */\n if (it.createErrors !== false) {\n out += ' { keyword: \\'' + ($errorKeyword || '_exclusiveLimit') + '\\' , dataPath: (dataPath || \\'\\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} ';\n if (it.opts.messages !== false) {\n out += ' , message: \\'' + ($exclusiveKeyword) + ' should be boolean\\' ';\n }\n if (it.opts.verbose) {\n out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';\n }\n out += ' } ';\n } else {\n out += ' {} ';\n }\n var __err = out;\n out = $$outStack.pop();\n if (!it.compositeRule && $breakOnError) {\n /* istanbul ignore if */\n if (it.async) {\n out += ' throw new ValidationError([' + (__err) + ']); ';\n } else {\n out += ' validate.errors = [' + (__err) + ']; return false; ';\n }\n } else {\n out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';\n }\n out += ' } else if ( ';\n if ($isData) {\n out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \\'number\\') || ';\n }\n out += ' ' + ($exclType) + ' == \\'number\\' ? ( (' + ($exclusive) + ' = ' + ($schemaValue) + ' === undefined || ' + ($schemaValueExcl) + ' ' + ($op) + '= ' + ($schemaValue) + ') ? ' + ($data) + ' ' + ($notOp) + '= ' + ($schemaValueExcl) + ' : ' + ($data) + ' ' + ($notOp) + ' ' + ($schemaValue) + ' ) : ( (' + ($exclusive) + ' = ' + ($schemaValueExcl) + ' === true) ? ' + ($data) + ' ' + ($notOp) + '= ' + ($schemaValue) + ' : ' + ($data) + ' ' + ($notOp) + ' ' + ($schemaValue) + ' ) || ' + ($data) + ' !== ' + ($data) + ') { var op' + ($lvl) + ' = ' + ($exclusive) + ' ? \\'' + ($op) + '\\' : \\'' + ($op) + '=\\'; ';\n if ($schema === undefined) {\n $errorKeyword = $exclusiveKeyword;\n $errSchemaPath = it.errSchemaPath + '/' + $exclusiveKeyword;\n $schemaValue = $schemaValueExcl;\n $isData = $isDataExcl;\n }\n } else {\n var $exclIsNumber = typeof $schemaExcl == 'number',\n $opStr = $op;\n if ($exclIsNumber && $isData) {\n var $opExpr = '\\'' + $opStr + '\\'';\n out += ' if ( ';\n if ($isData) {\n out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \\'number\\') || ';\n }\n out += ' ( ' + ($schemaValue) + ' === undefined || ' + ($schemaExcl) + ' ' + ($op) + '= ' + ($schemaValue) + ' ? ' + ($data) + ' ' + ($notOp) + '= ' + ($schemaExcl) + ' : ' + ($data) + ' ' + ($notOp) + ' ' + ($schemaValue) + ' ) || ' + ($data) + ' !== ' + ($data) + ') { ';\n } else {\n if ($exclIsNumber && $schema === undefined) {\n $exclusive = true;\n $errorKeyword = $exclusiveKeyword;\n $errSchemaPath = it.errSchemaPath + '/' + $exclusiveKeyword;\n $schemaValue = $schemaExcl;\n $notOp += '=';\n } else {\n if ($exclIsNumber) $schemaValue = Math[$isMax ? 'min' : 'max']($schemaExcl, $schema);\n if ($schemaExcl === ($exclIsNumber ? $schemaValue : true)) {\n $exclusive = true;\n $errorKeyword = $exclusiveKeyword;\n $errSchemaPath = it.errSchemaPath + '/' + $exclusiveKeyword;\n $notOp += '=';\n } else {\n $exclusive = false;\n $opStr += '=';\n }\n }\n var $opExpr = '\\'' + $opStr + '\\'';\n out += ' if ( ';\n if ($isData) {\n out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \\'number\\') || ';\n }\n out += ' ' + ($data) + ' ' + ($notOp) + ' ' + ($schemaValue) + ' || ' + ($data) + ' !== ' + ($data) + ') { ';\n }\n }\n $errorKeyword = $errorKeyword || $keyword;\n var $$outStack = $$outStack || [];\n $$outStack.push(out);\n out = ''; /* istanbul ignore else */\n if (it.createErrors !== false) {\n out += ' { keyword: \\'' + ($errorKeyword || '_limit') + '\\' , dataPath: (dataPath || \\'\\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { comparison: ' + ($opExpr) + ', limit: ' + ($schemaValue) + ', exclusive: ' + ($exclusive) + ' } ';\n if (it.opts.messages !== false) {\n out += ' , message: \\'should be ' + ($opStr) + ' ';\n if ($isData) {\n out += '\\' + ' + ($schemaValue);\n } else {\n out += '' + ($schemaValue) + '\\'';\n }\n }\n if (it.opts.verbose) {\n out += ' , schema: ';\n if ($isData) {\n out += 'validate.schema' + ($schemaPath);\n } else {\n out += '' + ($schema);\n }\n out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';\n }\n out += ' } ';\n } else {\n out += ' {} ';\n }\n var __err = out;\n out = $$outStack.pop();\n if (!it.compositeRule && $breakOnError) {\n /* istanbul ignore if */\n if (it.async) {\n out += ' throw new ValidationError([' + (__err) + ']); ';\n } else {\n out += ' validate.errors = [' + (__err) + ']; return false; ';\n }\n } else {\n out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';\n }\n out += ' } ';\n if ($breakOnError) {\n out += ' else { ';\n }\n return out;\n}\n","'use strict';\nmodule.exports = function generate__limitItems(it, $keyword, $ruleType) {\n var out = ' ';\n var $lvl = it.level;\n var $dataLvl = it.dataLevel;\n var $schema = it.schema[$keyword];\n var $schemaPath = it.schemaPath + it.util.getProperty($keyword);\n var $errSchemaPath = it.errSchemaPath + '/' + $keyword;\n var $breakOnError = !it.opts.allErrors;\n var $errorKeyword;\n var $data = 'data' + ($dataLvl || '');\n var $isData = it.opts.$data && $schema && $schema.$data,\n $schemaValue;\n if ($isData) {\n out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; ';\n $schemaValue = 'schema' + $lvl;\n } else {\n $schemaValue = $schema;\n }\n if (!($isData || typeof $schema == 'number')) {\n throw new Error($keyword + ' must be number');\n }\n var $op = $keyword == 'maxItems' ? '>' : '<';\n out += 'if ( ';\n if ($isData) {\n out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \\'number\\') || ';\n }\n out += ' ' + ($data) + '.length ' + ($op) + ' ' + ($schemaValue) + ') { ';\n var $errorKeyword = $keyword;\n var $$outStack = $$outStack || [];\n $$outStack.push(out);\n out = ''; /* istanbul ignore else */\n if (it.createErrors !== false) {\n out += ' { keyword: \\'' + ($errorKeyword || '_limitItems') + '\\' , dataPath: (dataPath || \\'\\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { limit: ' + ($schemaValue) + ' } ';\n if (it.opts.messages !== false) {\n out += ' , message: \\'should NOT have ';\n if ($keyword == 'maxItems') {\n out += 'more';\n } else {\n out += 'fewer';\n }\n out += ' than ';\n if ($isData) {\n out += '\\' + ' + ($schemaValue) + ' + \\'';\n } else {\n out += '' + ($schema);\n }\n out += ' items\\' ';\n }\n if (it.opts.verbose) {\n out += ' , schema: ';\n if ($isData) {\n out += 'validate.schema' + ($schemaPath);\n } else {\n out += '' + ($schema);\n }\n out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';\n }\n out += ' } ';\n } else {\n out += ' {} ';\n }\n var __err = out;\n out = $$outStack.pop();\n if (!it.compositeRule && $breakOnError) {\n /* istanbul ignore if */\n if (it.async) {\n out += ' throw new ValidationError([' + (__err) + ']); ';\n } else {\n out += ' validate.errors = [' + (__err) + ']; return false; ';\n }\n } else {\n out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';\n }\n out += '} ';\n if ($breakOnError) {\n out += ' else { ';\n }\n return out;\n}\n","'use strict';\nmodule.exports = function generate__limitLength(it, $keyword, $ruleType) {\n var out = ' ';\n var $lvl = it.level;\n var $dataLvl = it.dataLevel;\n var $schema = it.schema[$keyword];\n var $schemaPath = it.schemaPath + it.util.getProperty($keyword);\n var $errSchemaPath = it.errSchemaPath + '/' + $keyword;\n var $breakOnError = !it.opts.allErrors;\n var $errorKeyword;\n var $data = 'data' + ($dataLvl || '');\n var $isData = it.opts.$data && $schema && $schema.$data,\n $schemaValue;\n if ($isData) {\n out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; ';\n $schemaValue = 'schema' + $lvl;\n } else {\n $schemaValue = $schema;\n }\n if (!($isData || typeof $schema == 'number')) {\n throw new Error($keyword + ' must be number');\n }\n var $op = $keyword == 'maxLength' ? '>' : '<';\n out += 'if ( ';\n if ($isData) {\n out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \\'number\\') || ';\n }\n if (it.opts.unicode === false) {\n out += ' ' + ($data) + '.length ';\n } else {\n out += ' ucs2length(' + ($data) + ') ';\n }\n out += ' ' + ($op) + ' ' + ($schemaValue) + ') { ';\n var $errorKeyword = $keyword;\n var $$outStack = $$outStack || [];\n $$outStack.push(out);\n out = ''; /* istanbul ignore else */\n if (it.createErrors !== false) {\n out += ' { keyword: \\'' + ($errorKeyword || '_limitLength') + '\\' , dataPath: (dataPath || \\'\\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { limit: ' + ($schemaValue) + ' } ';\n if (it.opts.messages !== false) {\n out += ' , message: \\'should NOT be ';\n if ($keyword == 'maxLength') {\n out += 'longer';\n } else {\n out += 'shorter';\n }\n out += ' than ';\n if ($isData) {\n out += '\\' + ' + ($schemaValue) + ' + \\'';\n } else {\n out += '' + ($schema);\n }\n out += ' characters\\' ';\n }\n if (it.opts.verbose) {\n out += ' , schema: ';\n if ($isData) {\n out += 'validate.schema' + ($schemaPath);\n } else {\n out += '' + ($schema);\n }\n out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';\n }\n out += ' } ';\n } else {\n out += ' {} ';\n }\n var __err = out;\n out = $$outStack.pop();\n if (!it.compositeRule && $breakOnError) {\n /* istanbul ignore if */\n if (it.async) {\n out += ' throw new ValidationError([' + (__err) + ']); ';\n } else {\n out += ' validate.errors = [' + (__err) + ']; return false; ';\n }\n } else {\n out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';\n }\n out += '} ';\n if ($breakOnError) {\n out += ' else { ';\n }\n return out;\n}\n","'use strict';\nmodule.exports = function generate__limitProperties(it, $keyword, $ruleType) {\n var out = ' ';\n var $lvl = it.level;\n var $dataLvl = it.dataLevel;\n var $schema = it.schema[$keyword];\n var $schemaPath = it.schemaPath + it.util.getProperty($keyword);\n var $errSchemaPath = it.errSchemaPath + '/' + $keyword;\n var $breakOnError = !it.opts.allErrors;\n var $errorKeyword;\n var $data = 'data' + ($dataLvl || '');\n var $isData = it.opts.$data && $schema && $schema.$data,\n $schemaValue;\n if ($isData) {\n out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; ';\n $schemaValue = 'schema' + $lvl;\n } else {\n $schemaValue = $schema;\n }\n if (!($isData || typeof $schema == 'number')) {\n throw new Error($keyword + ' must be number');\n }\n var $op = $keyword == 'maxProperties' ? '>' : '<';\n out += 'if ( ';\n if ($isData) {\n out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \\'number\\') || ';\n }\n out += ' Object.keys(' + ($data) + ').length ' + ($op) + ' ' + ($schemaValue) + ') { ';\n var $errorKeyword = $keyword;\n var $$outStack = $$outStack || [];\n $$outStack.push(out);\n out = ''; /* istanbul ignore else */\n if (it.createErrors !== false) {\n out += ' { keyword: \\'' + ($errorKeyword || '_limitProperties') + '\\' , dataPath: (dataPath || \\'\\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { limit: ' + ($schemaValue) + ' } ';\n if (it.opts.messages !== false) {\n out += ' , message: \\'should NOT have ';\n if ($keyword == 'maxProperties') {\n out += 'more';\n } else {\n out += 'fewer';\n }\n out += ' than ';\n if ($isData) {\n out += '\\' + ' + ($schemaValue) + ' + \\'';\n } else {\n out += '' + ($schema);\n }\n out += ' properties\\' ';\n }\n if (it.opts.verbose) {\n out += ' , schema: ';\n if ($isData) {\n out += 'validate.schema' + ($schemaPath);\n } else {\n out += '' + ($schema);\n }\n out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';\n }\n out += ' } ';\n } else {\n out += ' {} ';\n }\n var __err = out;\n out = $$outStack.pop();\n if (!it.compositeRule && $breakOnError) {\n /* istanbul ignore if */\n if (it.async) {\n out += ' throw new ValidationError([' + (__err) + ']); ';\n } else {\n out += ' validate.errors = [' + (__err) + ']; return false; ';\n }\n } else {\n out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';\n }\n out += '} ';\n if ($breakOnError) {\n out += ' else { ';\n }\n return out;\n}\n","'use strict';\nmodule.exports = function generate_allOf(it, $keyword, $ruleType) {\n var out = ' ';\n var $schema = it.schema[$keyword];\n var $schemaPath = it.schemaPath + it.util.getProperty($keyword);\n var $errSchemaPath = it.errSchemaPath + '/' + $keyword;\n var $breakOnError = !it.opts.allErrors;\n var $it = it.util.copy(it);\n var $closingBraces = '';\n $it.level++;\n var $nextValid = 'valid' + $it.level;\n var $currentBaseId = $it.baseId,\n $allSchemasEmpty = true;\n var arr1 = $schema;\n if (arr1) {\n var $sch, $i = -1,\n l1 = arr1.length - 1;\n while ($i < l1) {\n $sch = arr1[$i += 1];\n if ((it.opts.strictKeywords ? (typeof $sch == 'object' && Object.keys($sch).length > 0) || $sch === false : it.util.schemaHasRules($sch, it.RULES.all))) {\n $allSchemasEmpty = false;\n $it.schema = $sch;\n $it.schemaPath = $schemaPath + '[' + $i + ']';\n $it.errSchemaPath = $errSchemaPath + '/' + $i;\n out += ' ' + (it.validate($it)) + ' ';\n $it.baseId = $currentBaseId;\n if ($breakOnError) {\n out += ' if (' + ($nextValid) + ') { ';\n $closingBraces += '}';\n }\n }\n }\n }\n if ($breakOnError) {\n if ($allSchemasEmpty) {\n out += ' if (true) { ';\n } else {\n out += ' ' + ($closingBraces.slice(0, -1)) + ' ';\n }\n }\n return out;\n}\n","'use strict';\nmodule.exports = function generate_anyOf(it, $keyword, $ruleType) {\n var out = ' ';\n var $lvl = it.level;\n var $dataLvl = it.dataLevel;\n var $schema = it.schema[$keyword];\n var $schemaPath = it.schemaPath + it.util.getProperty($keyword);\n var $errSchemaPath = it.errSchemaPath + '/' + $keyword;\n var $breakOnError = !it.opts.allErrors;\n var $data = 'data' + ($dataLvl || '');\n var $valid = 'valid' + $lvl;\n var $errs = 'errs__' + $lvl;\n var $it = it.util.copy(it);\n var $closingBraces = '';\n $it.level++;\n var $nextValid = 'valid' + $it.level;\n var $noEmptySchema = $schema.every(function($sch) {\n return (it.opts.strictKeywords ? (typeof $sch == 'object' && Object.keys($sch).length > 0) || $sch === false : it.util.schemaHasRules($sch, it.RULES.all));\n });\n if ($noEmptySchema) {\n var $currentBaseId = $it.baseId;\n out += ' var ' + ($errs) + ' = errors; var ' + ($valid) + ' = false; ';\n var $wasComposite = it.compositeRule;\n it.compositeRule = $it.compositeRule = true;\n var arr1 = $schema;\n if (arr1) {\n var $sch, $i = -1,\n l1 = arr1.length - 1;\n while ($i < l1) {\n $sch = arr1[$i += 1];\n $it.schema = $sch;\n $it.schemaPath = $schemaPath + '[' + $i + ']';\n $it.errSchemaPath = $errSchemaPath + '/' + $i;\n out += ' ' + (it.validate($it)) + ' ';\n $it.baseId = $currentBaseId;\n out += ' ' + ($valid) + ' = ' + ($valid) + ' || ' + ($nextValid) + '; if (!' + ($valid) + ') { ';\n $closingBraces += '}';\n }\n }\n it.compositeRule = $it.compositeRule = $wasComposite;\n out += ' ' + ($closingBraces) + ' if (!' + ($valid) + ') { var err = '; /* istanbul ignore else */\n if (it.createErrors !== false) {\n out += ' { keyword: \\'' + ('anyOf') + '\\' , dataPath: (dataPath || \\'\\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} ';\n if (it.opts.messages !== false) {\n out += ' , message: \\'should match some schema in anyOf\\' ';\n }\n if (it.opts.verbose) {\n out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';\n }\n out += ' } ';\n } else {\n out += ' {} ';\n }\n out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';\n if (!it.compositeRule && $breakOnError) {\n /* istanbul ignore if */\n if (it.async) {\n out += ' throw new ValidationError(vErrors); ';\n } else {\n out += ' validate.errors = vErrors; return false; ';\n }\n }\n out += ' } else { errors = ' + ($errs) + '; if (vErrors !== null) { if (' + ($errs) + ') vErrors.length = ' + ($errs) + '; else vErrors = null; } ';\n if (it.opts.allErrors) {\n out += ' } ';\n }\n } else {\n if ($breakOnError) {\n out += ' if (true) { ';\n }\n }\n return out;\n}\n","'use strict';\nmodule.exports = function generate_comment(it, $keyword, $ruleType) {\n var out = ' ';\n var $schema = it.schema[$keyword];\n var $errSchemaPath = it.errSchemaPath + '/' + $keyword;\n var $breakOnError = !it.opts.allErrors;\n var $comment = it.util.toQuotedString($schema);\n if (it.opts.$comment === true) {\n out += ' console.log(' + ($comment) + ');';\n } else if (typeof it.opts.$comment == 'function') {\n out += ' self._opts.$comment(' + ($comment) + ', ' + (it.util.toQuotedString($errSchemaPath)) + ', validate.root.schema);';\n }\n return out;\n}\n","'use strict';\nmodule.exports = function generate_const(it, $keyword, $ruleType) {\n var out = ' ';\n var $lvl = it.level;\n var $dataLvl = it.dataLevel;\n var $schema = it.schema[$keyword];\n var $schemaPath = it.schemaPath + it.util.getProperty($keyword);\n var $errSchemaPath = it.errSchemaPath + '/' + $keyword;\n var $breakOnError = !it.opts.allErrors;\n var $data = 'data' + ($dataLvl || '');\n var $valid = 'valid' + $lvl;\n var $isData = it.opts.$data && $schema && $schema.$data,\n $schemaValue;\n if ($isData) {\n out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; ';\n $schemaValue = 'schema' + $lvl;\n } else {\n $schemaValue = $schema;\n }\n if (!$isData) {\n out += ' var schema' + ($lvl) + ' = validate.schema' + ($schemaPath) + ';';\n }\n out += 'var ' + ($valid) + ' = equal(' + ($data) + ', schema' + ($lvl) + '); if (!' + ($valid) + ') { ';\n var $$outStack = $$outStack || [];\n $$outStack.push(out);\n out = ''; /* istanbul ignore else */\n if (it.createErrors !== false) {\n out += ' { keyword: \\'' + ('const') + '\\' , dataPath: (dataPath || \\'\\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { allowedValue: schema' + ($lvl) + ' } ';\n if (it.opts.messages !== false) {\n out += ' , message: \\'should be equal to constant\\' ';\n }\n if (it.opts.verbose) {\n out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';\n }\n out += ' } ';\n } else {\n out += ' {} ';\n }\n var __err = out;\n out = $$outStack.pop();\n if (!it.compositeRule && $breakOnError) {\n /* istanbul ignore if */\n if (it.async) {\n out += ' throw new ValidationError([' + (__err) + ']); ';\n } else {\n out += ' validate.errors = [' + (__err) + ']; return false; ';\n }\n } else {\n out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';\n }\n out += ' }';\n if ($breakOnError) {\n out += ' else { ';\n }\n return out;\n}\n","'use strict';\nmodule.exports = function generate_contains(it, $keyword, $ruleType) {\n var out = ' ';\n var $lvl = it.level;\n var $dataLvl = it.dataLevel;\n var $schema = it.schema[$keyword];\n var $schemaPath = it.schemaPath + it.util.getProperty($keyword);\n var $errSchemaPath = it.errSchemaPath + '/' + $keyword;\n var $breakOnError = !it.opts.allErrors;\n var $data = 'data' + ($dataLvl || '');\n var $valid = 'valid' + $lvl;\n var $errs = 'errs__' + $lvl;\n var $it = it.util.copy(it);\n var $closingBraces = '';\n $it.level++;\n var $nextValid = 'valid' + $it.level;\n var $idx = 'i' + $lvl,\n $dataNxt = $it.dataLevel = it.dataLevel + 1,\n $nextData = 'data' + $dataNxt,\n $currentBaseId = it.baseId,\n $nonEmptySchema = (it.opts.strictKeywords ? (typeof $schema == 'object' && Object.keys($schema).length > 0) || $schema === false : it.util.schemaHasRules($schema, it.RULES.all));\n out += 'var ' + ($errs) + ' = errors;var ' + ($valid) + ';';\n if ($nonEmptySchema) {\n var $wasComposite = it.compositeRule;\n it.compositeRule = $it.compositeRule = true;\n $it.schema = $schema;\n $it.schemaPath = $schemaPath;\n $it.errSchemaPath = $errSchemaPath;\n out += ' var ' + ($nextValid) + ' = false; for (var ' + ($idx) + ' = 0; ' + ($idx) + ' < ' + ($data) + '.length; ' + ($idx) + '++) { ';\n $it.errorPath = it.util.getPathExpr(it.errorPath, $idx, it.opts.jsonPointers, true);\n var $passData = $data + '[' + $idx + ']';\n $it.dataPathArr[$dataNxt] = $idx;\n var $code = it.validate($it);\n $it.baseId = $currentBaseId;\n if (it.util.varOccurences($code, $nextData) < 2) {\n out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' ';\n } else {\n out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' ';\n }\n out += ' if (' + ($nextValid) + ') break; } ';\n it.compositeRule = $it.compositeRule = $wasComposite;\n out += ' ' + ($closingBraces) + ' if (!' + ($nextValid) + ') {';\n } else {\n out += ' if (' + ($data) + '.length == 0) {';\n }\n var $$outStack = $$outStack || [];\n $$outStack.push(out);\n out = ''; /* istanbul ignore else */\n if (it.createErrors !== false) {\n out += ' { keyword: \\'' + ('contains') + '\\' , dataPath: (dataPath || \\'\\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} ';\n if (it.opts.messages !== false) {\n out += ' , message: \\'should contain a valid item\\' ';\n }\n if (it.opts.verbose) {\n out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';\n }\n out += ' } ';\n } else {\n out += ' {} ';\n }\n var __err = out;\n out = $$outStack.pop();\n if (!it.compositeRule && $breakOnError) {\n /* istanbul ignore if */\n if (it.async) {\n out += ' throw new ValidationError([' + (__err) + ']); ';\n } else {\n out += ' validate.errors = [' + (__err) + ']; return false; ';\n }\n } else {\n out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';\n }\n out += ' } else { ';\n if ($nonEmptySchema) {\n out += ' errors = ' + ($errs) + '; if (vErrors !== null) { if (' + ($errs) + ') vErrors.length = ' + ($errs) + '; else vErrors = null; } ';\n }\n if (it.opts.allErrors) {\n out += ' } ';\n }\n return out;\n}\n","'use strict';\nmodule.exports = function generate_custom(it, $keyword, $ruleType) {\n var out = ' ';\n var $lvl = it.level;\n var $dataLvl = it.dataLevel;\n var $schema = it.schema[$keyword];\n var $schemaPath = it.schemaPath + it.util.getProperty($keyword);\n var $errSchemaPath = it.errSchemaPath + '/' + $keyword;\n var $breakOnError = !it.opts.allErrors;\n var $errorKeyword;\n var $data = 'data' + ($dataLvl || '');\n var $valid = 'valid' + $lvl;\n var $errs = 'errs__' + $lvl;\n var $isData = it.opts.$data && $schema && $schema.$data,\n $schemaValue;\n if ($isData) {\n out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; ';\n $schemaValue = 'schema' + $lvl;\n } else {\n $schemaValue = $schema;\n }\n var $rule = this,\n $definition = 'definition' + $lvl,\n $rDef = $rule.definition,\n $closingBraces = '';\n var $compile, $inline, $macro, $ruleValidate, $validateCode;\n if ($isData && $rDef.$data) {\n $validateCode = 'keywordValidate' + $lvl;\n var $validateSchema = $rDef.validateSchema;\n out += ' var ' + ($definition) + ' = RULES.custom[\\'' + ($keyword) + '\\'].definition; var ' + ($validateCode) + ' = ' + ($definition) + '.validate;';\n } else {\n $ruleValidate = it.useCustomRule($rule, $schema, it.schema, it);\n if (!$ruleValidate) return;\n $schemaValue = 'validate.schema' + $schemaPath;\n $validateCode = $ruleValidate.code;\n $compile = $rDef.compile;\n $inline = $rDef.inline;\n $macro = $rDef.macro;\n }\n var $ruleErrs = $validateCode + '.errors',\n $i = 'i' + $lvl,\n $ruleErr = 'ruleErr' + $lvl,\n $asyncKeyword = $rDef.async;\n if ($asyncKeyword && !it.async) throw new Error('async keyword in sync schema');\n if (!($inline || $macro)) {\n out += '' + ($ruleErrs) + ' = null;';\n }\n out += 'var ' + ($errs) + ' = errors;var ' + ($valid) + ';';\n if ($isData && $rDef.$data) {\n $closingBraces += '}';\n out += ' if (' + ($schemaValue) + ' === undefined) { ' + ($valid) + ' = true; } else { ';\n if ($validateSchema) {\n $closingBraces += '}';\n out += ' ' + ($valid) + ' = ' + ($definition) + '.validateSchema(' + ($schemaValue) + '); if (' + ($valid) + ') { ';\n }\n }\n if ($inline) {\n if ($rDef.statements) {\n out += ' ' + ($ruleValidate.validate) + ' ';\n } else {\n out += ' ' + ($valid) + ' = ' + ($ruleValidate.validate) + '; ';\n }\n } else if ($macro) {\n var $it = it.util.copy(it);\n var $closingBraces = '';\n $it.level++;\n var $nextValid = 'valid' + $it.level;\n $it.schema = $ruleValidate.validate;\n $it.schemaPath = '';\n var $wasComposite = it.compositeRule;\n it.compositeRule = $it.compositeRule = true;\n var $code = it.validate($it).replace(/validate\\.schema/g, $validateCode);\n it.compositeRule = $it.compositeRule = $wasComposite;\n out += ' ' + ($code);\n } else {\n var $$outStack = $$outStack || [];\n $$outStack.push(out);\n out = '';\n out += ' ' + ($validateCode) + '.call( ';\n if (it.opts.passContext) {\n out += 'this';\n } else {\n out += 'self';\n }\n if ($compile || $rDef.schema === false) {\n out += ' , ' + ($data) + ' ';\n } else {\n out += ' , ' + ($schemaValue) + ' , ' + ($data) + ' , validate.schema' + (it.schemaPath) + ' ';\n }\n out += ' , (dataPath || \\'\\')';\n if (it.errorPath != '\"\"') {\n out += ' + ' + (it.errorPath);\n }\n var $parentData = $dataLvl ? 'data' + (($dataLvl - 1) || '') : 'parentData',\n $parentDataProperty = $dataLvl ? it.dataPathArr[$dataLvl] : 'parentDataProperty';\n out += ' , ' + ($parentData) + ' , ' + ($parentDataProperty) + ' , rootData ) ';\n var def_callRuleValidate = out;\n out = $$outStack.pop();\n if ($rDef.errors === false) {\n out += ' ' + ($valid) + ' = ';\n if ($asyncKeyword) {\n out += 'await ';\n }\n out += '' + (def_callRuleValidate) + '; ';\n } else {\n if ($asyncKeyword) {\n $ruleErrs = 'customErrors' + $lvl;\n out += ' var ' + ($ruleErrs) + ' = null; try { ' + ($valid) + ' = await ' + (def_callRuleValidate) + '; } catch (e) { ' + ($valid) + ' = false; if (e instanceof ValidationError) ' + ($ruleErrs) + ' = e.errors; else throw e; } ';\n } else {\n out += ' ' + ($ruleErrs) + ' = null; ' + ($valid) + ' = ' + (def_callRuleValidate) + '; ';\n }\n }\n }\n if ($rDef.modifying) {\n out += ' if (' + ($parentData) + ') ' + ($data) + ' = ' + ($parentData) + '[' + ($parentDataProperty) + '];';\n }\n out += '' + ($closingBraces);\n if ($rDef.valid) {\n if ($breakOnError) {\n out += ' if (true) { ';\n }\n } else {\n out += ' if ( ';\n if ($rDef.valid === undefined) {\n out += ' !';\n if ($macro) {\n out += '' + ($nextValid);\n } else {\n out += '' + ($valid);\n }\n } else {\n out += ' ' + (!$rDef.valid) + ' ';\n }\n out += ') { ';\n $errorKeyword = $rule.keyword;\n var $$outStack = $$outStack || [];\n $$outStack.push(out);\n out = '';\n var $$outStack = $$outStack || [];\n $$outStack.push(out);\n out = ''; /* istanbul ignore else */\n if (it.createErrors !== false) {\n out += ' { keyword: \\'' + ($errorKeyword || 'custom') + '\\' , dataPath: (dataPath || \\'\\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { keyword: \\'' + ($rule.keyword) + '\\' } ';\n if (it.opts.messages !== false) {\n out += ' , message: \\'should pass \"' + ($rule.keyword) + '\" keyword validation\\' ';\n }\n if (it.opts.verbose) {\n out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';\n }\n out += ' } ';\n } else {\n out += ' {} ';\n }\n var __err = out;\n out = $$outStack.pop();\n if (!it.compositeRule && $breakOnError) {\n /* istanbul ignore if */\n if (it.async) {\n out += ' throw new ValidationError([' + (__err) + ']); ';\n } else {\n out += ' validate.errors = [' + (__err) + ']; return false; ';\n }\n } else {\n out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';\n }\n var def_customError = out;\n out = $$outStack.pop();\n if ($inline) {\n if ($rDef.errors) {\n if ($rDef.errors != 'full') {\n out += ' for (var ' + ($i) + '=' + ($errs) + '; ' + ($i) + ' 0) || $sch === false : it.util.schemaHasRules($sch, it.RULES.all))) {\n out += ' ' + ($nextValid) + ' = true; if ( ' + ($data) + (it.util.getProperty($property)) + ' !== undefined ';\n if ($ownProperties) {\n out += ' && Object.prototype.hasOwnProperty.call(' + ($data) + ', \\'' + (it.util.escapeQuotes($property)) + '\\') ';\n }\n out += ') { ';\n $it.schema = $sch;\n $it.schemaPath = $schemaPath + it.util.getProperty($property);\n $it.errSchemaPath = $errSchemaPath + '/' + it.util.escapeFragment($property);\n out += ' ' + (it.validate($it)) + ' ';\n $it.baseId = $currentBaseId;\n out += ' } ';\n if ($breakOnError) {\n out += ' if (' + ($nextValid) + ') { ';\n $closingBraces += '}';\n }\n }\n }\n if ($breakOnError) {\n out += ' ' + ($closingBraces) + ' if (' + ($errs) + ' == errors) {';\n }\n return out;\n}\n","'use strict';\nmodule.exports = function generate_enum(it, $keyword, $ruleType) {\n var out = ' ';\n var $lvl = it.level;\n var $dataLvl = it.dataLevel;\n var $schema = it.schema[$keyword];\n var $schemaPath = it.schemaPath + it.util.getProperty($keyword);\n var $errSchemaPath = it.errSchemaPath + '/' + $keyword;\n var $breakOnError = !it.opts.allErrors;\n var $data = 'data' + ($dataLvl || '');\n var $valid = 'valid' + $lvl;\n var $isData = it.opts.$data && $schema && $schema.$data,\n $schemaValue;\n if ($isData) {\n out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; ';\n $schemaValue = 'schema' + $lvl;\n } else {\n $schemaValue = $schema;\n }\n var $i = 'i' + $lvl,\n $vSchema = 'schema' + $lvl;\n if (!$isData) {\n out += ' var ' + ($vSchema) + ' = validate.schema' + ($schemaPath) + ';';\n }\n out += 'var ' + ($valid) + ';';\n if ($isData) {\n out += ' if (schema' + ($lvl) + ' === undefined) ' + ($valid) + ' = true; else if (!Array.isArray(schema' + ($lvl) + ')) ' + ($valid) + ' = false; else {';\n }\n out += '' + ($valid) + ' = false;for (var ' + ($i) + '=0; ' + ($i) + '<' + ($vSchema) + '.length; ' + ($i) + '++) if (equal(' + ($data) + ', ' + ($vSchema) + '[' + ($i) + '])) { ' + ($valid) + ' = true; break; }';\n if ($isData) {\n out += ' } ';\n }\n out += ' if (!' + ($valid) + ') { ';\n var $$outStack = $$outStack || [];\n $$outStack.push(out);\n out = ''; /* istanbul ignore else */\n if (it.createErrors !== false) {\n out += ' { keyword: \\'' + ('enum') + '\\' , dataPath: (dataPath || \\'\\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { allowedValues: schema' + ($lvl) + ' } ';\n if (it.opts.messages !== false) {\n out += ' , message: \\'should be equal to one of the allowed values\\' ';\n }\n if (it.opts.verbose) {\n out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';\n }\n out += ' } ';\n } else {\n out += ' {} ';\n }\n var __err = out;\n out = $$outStack.pop();\n if (!it.compositeRule && $breakOnError) {\n /* istanbul ignore if */\n if (it.async) {\n out += ' throw new ValidationError([' + (__err) + ']); ';\n } else {\n out += ' validate.errors = [' + (__err) + ']; return false; ';\n }\n } else {\n out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';\n }\n out += ' }';\n if ($breakOnError) {\n out += ' else { ';\n }\n return out;\n}\n","'use strict';\nmodule.exports = function generate_format(it, $keyword, $ruleType) {\n var out = ' ';\n var $lvl = it.level;\n var $dataLvl = it.dataLevel;\n var $schema = it.schema[$keyword];\n var $schemaPath = it.schemaPath + it.util.getProperty($keyword);\n var $errSchemaPath = it.errSchemaPath + '/' + $keyword;\n var $breakOnError = !it.opts.allErrors;\n var $data = 'data' + ($dataLvl || '');\n if (it.opts.format === false) {\n if ($breakOnError) {\n out += ' if (true) { ';\n }\n return out;\n }\n var $isData = it.opts.$data && $schema && $schema.$data,\n $schemaValue;\n if ($isData) {\n out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; ';\n $schemaValue = 'schema' + $lvl;\n } else {\n $schemaValue = $schema;\n }\n var $unknownFormats = it.opts.unknownFormats,\n $allowUnknown = Array.isArray($unknownFormats);\n if ($isData) {\n var $format = 'format' + $lvl,\n $isObject = 'isObject' + $lvl,\n $formatType = 'formatType' + $lvl;\n out += ' var ' + ($format) + ' = formats[' + ($schemaValue) + ']; var ' + ($isObject) + ' = typeof ' + ($format) + ' == \\'object\\' && !(' + ($format) + ' instanceof RegExp) && ' + ($format) + '.validate; var ' + ($formatType) + ' = ' + ($isObject) + ' && ' + ($format) + '.type || \\'string\\'; if (' + ($isObject) + ') { ';\n if (it.async) {\n out += ' var async' + ($lvl) + ' = ' + ($format) + '.async; ';\n }\n out += ' ' + ($format) + ' = ' + ($format) + '.validate; } if ( ';\n if ($isData) {\n out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \\'string\\') || ';\n }\n out += ' (';\n if ($unknownFormats != 'ignore') {\n out += ' (' + ($schemaValue) + ' && !' + ($format) + ' ';\n if ($allowUnknown) {\n out += ' && self._opts.unknownFormats.indexOf(' + ($schemaValue) + ') == -1 ';\n }\n out += ') || ';\n }\n out += ' (' + ($format) + ' && ' + ($formatType) + ' == \\'' + ($ruleType) + '\\' && !(typeof ' + ($format) + ' == \\'function\\' ? ';\n if (it.async) {\n out += ' (async' + ($lvl) + ' ? await ' + ($format) + '(' + ($data) + ') : ' + ($format) + '(' + ($data) + ')) ';\n } else {\n out += ' ' + ($format) + '(' + ($data) + ') ';\n }\n out += ' : ' + ($format) + '.test(' + ($data) + '))))) {';\n } else {\n var $format = it.formats[$schema];\n if (!$format) {\n if ($unknownFormats == 'ignore') {\n it.logger.warn('unknown format \"' + $schema + '\" ignored in schema at path \"' + it.errSchemaPath + '\"');\n if ($breakOnError) {\n out += ' if (true) { ';\n }\n return out;\n } else if ($allowUnknown && $unknownFormats.indexOf($schema) >= 0) {\n if ($breakOnError) {\n out += ' if (true) { ';\n }\n return out;\n } else {\n throw new Error('unknown format \"' + $schema + '\" is used in schema at path \"' + it.errSchemaPath + '\"');\n }\n }\n var $isObject = typeof $format == 'object' && !($format instanceof RegExp) && $format.validate;\n var $formatType = $isObject && $format.type || 'string';\n if ($isObject) {\n var $async = $format.async === true;\n $format = $format.validate;\n }\n if ($formatType != $ruleType) {\n if ($breakOnError) {\n out += ' if (true) { ';\n }\n return out;\n }\n if ($async) {\n if (!it.async) throw new Error('async format in sync schema');\n var $formatRef = 'formats' + it.util.getProperty($schema) + '.validate';\n out += ' if (!(await ' + ($formatRef) + '(' + ($data) + '))) { ';\n } else {\n out += ' if (! ';\n var $formatRef = 'formats' + it.util.getProperty($schema);\n if ($isObject) $formatRef += '.validate';\n if (typeof $format == 'function') {\n out += ' ' + ($formatRef) + '(' + ($data) + ') ';\n } else {\n out += ' ' + ($formatRef) + '.test(' + ($data) + ') ';\n }\n out += ') { ';\n }\n }\n var $$outStack = $$outStack || [];\n $$outStack.push(out);\n out = ''; /* istanbul ignore else */\n if (it.createErrors !== false) {\n out += ' { keyword: \\'' + ('format') + '\\' , dataPath: (dataPath || \\'\\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { format: ';\n if ($isData) {\n out += '' + ($schemaValue);\n } else {\n out += '' + (it.util.toQuotedString($schema));\n }\n out += ' } ';\n if (it.opts.messages !== false) {\n out += ' , message: \\'should match format \"';\n if ($isData) {\n out += '\\' + ' + ($schemaValue) + ' + \\'';\n } else {\n out += '' + (it.util.escapeQuotes($schema));\n }\n out += '\"\\' ';\n }\n if (it.opts.verbose) {\n out += ' , schema: ';\n if ($isData) {\n out += 'validate.schema' + ($schemaPath);\n } else {\n out += '' + (it.util.toQuotedString($schema));\n }\n out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';\n }\n out += ' } ';\n } else {\n out += ' {} ';\n }\n var __err = out;\n out = $$outStack.pop();\n if (!it.compositeRule && $breakOnError) {\n /* istanbul ignore if */\n if (it.async) {\n out += ' throw new ValidationError([' + (__err) + ']); ';\n } else {\n out += ' validate.errors = [' + (__err) + ']; return false; ';\n }\n } else {\n out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';\n }\n out += ' } ';\n if ($breakOnError) {\n out += ' else { ';\n }\n return out;\n}\n","'use strict';\nmodule.exports = function generate_if(it, $keyword, $ruleType) {\n var out = ' ';\n var $lvl = it.level;\n var $dataLvl = it.dataLevel;\n var $schema = it.schema[$keyword];\n var $schemaPath = it.schemaPath + it.util.getProperty($keyword);\n var $errSchemaPath = it.errSchemaPath + '/' + $keyword;\n var $breakOnError = !it.opts.allErrors;\n var $data = 'data' + ($dataLvl || '');\n var $valid = 'valid' + $lvl;\n var $errs = 'errs__' + $lvl;\n var $it = it.util.copy(it);\n $it.level++;\n var $nextValid = 'valid' + $it.level;\n var $thenSch = it.schema['then'],\n $elseSch = it.schema['else'],\n $thenPresent = $thenSch !== undefined && (it.opts.strictKeywords ? (typeof $thenSch == 'object' && Object.keys($thenSch).length > 0) || $thenSch === false : it.util.schemaHasRules($thenSch, it.RULES.all)),\n $elsePresent = $elseSch !== undefined && (it.opts.strictKeywords ? (typeof $elseSch == 'object' && Object.keys($elseSch).length > 0) || $elseSch === false : it.util.schemaHasRules($elseSch, it.RULES.all)),\n $currentBaseId = $it.baseId;\n if ($thenPresent || $elsePresent) {\n var $ifClause;\n $it.createErrors = false;\n $it.schema = $schema;\n $it.schemaPath = $schemaPath;\n $it.errSchemaPath = $errSchemaPath;\n out += ' var ' + ($errs) + ' = errors; var ' + ($valid) + ' = true; ';\n var $wasComposite = it.compositeRule;\n it.compositeRule = $it.compositeRule = true;\n out += ' ' + (it.validate($it)) + ' ';\n $it.baseId = $currentBaseId;\n $it.createErrors = true;\n out += ' errors = ' + ($errs) + '; if (vErrors !== null) { if (' + ($errs) + ') vErrors.length = ' + ($errs) + '; else vErrors = null; } ';\n it.compositeRule = $it.compositeRule = $wasComposite;\n if ($thenPresent) {\n out += ' if (' + ($nextValid) + ') { ';\n $it.schema = it.schema['then'];\n $it.schemaPath = it.schemaPath + '.then';\n $it.errSchemaPath = it.errSchemaPath + '/then';\n out += ' ' + (it.validate($it)) + ' ';\n $it.baseId = $currentBaseId;\n out += ' ' + ($valid) + ' = ' + ($nextValid) + '; ';\n if ($thenPresent && $elsePresent) {\n $ifClause = 'ifClause' + $lvl;\n out += ' var ' + ($ifClause) + ' = \\'then\\'; ';\n } else {\n $ifClause = '\\'then\\'';\n }\n out += ' } ';\n if ($elsePresent) {\n out += ' else { ';\n }\n } else {\n out += ' if (!' + ($nextValid) + ') { ';\n }\n if ($elsePresent) {\n $it.schema = it.schema['else'];\n $it.schemaPath = it.schemaPath + '.else';\n $it.errSchemaPath = it.errSchemaPath + '/else';\n out += ' ' + (it.validate($it)) + ' ';\n $it.baseId = $currentBaseId;\n out += ' ' + ($valid) + ' = ' + ($nextValid) + '; ';\n if ($thenPresent && $elsePresent) {\n $ifClause = 'ifClause' + $lvl;\n out += ' var ' + ($ifClause) + ' = \\'else\\'; ';\n } else {\n $ifClause = '\\'else\\'';\n }\n out += ' } ';\n }\n out += ' if (!' + ($valid) + ') { var err = '; /* istanbul ignore else */\n if (it.createErrors !== false) {\n out += ' { keyword: \\'' + ('if') + '\\' , dataPath: (dataPath || \\'\\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { failingKeyword: ' + ($ifClause) + ' } ';\n if (it.opts.messages !== false) {\n out += ' , message: \\'should match \"\\' + ' + ($ifClause) + ' + \\'\" schema\\' ';\n }\n if (it.opts.verbose) {\n out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';\n }\n out += ' } ';\n } else {\n out += ' {} ';\n }\n out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';\n if (!it.compositeRule && $breakOnError) {\n /* istanbul ignore if */\n if (it.async) {\n out += ' throw new ValidationError(vErrors); ';\n } else {\n out += ' validate.errors = vErrors; return false; ';\n }\n }\n out += ' } ';\n if ($breakOnError) {\n out += ' else { ';\n }\n } else {\n if ($breakOnError) {\n out += ' if (true) { ';\n }\n }\n return out;\n}\n","'use strict';\n\n//all requires must be explicit because browserify won't work with dynamic requires\nmodule.exports = {\n '$ref': require('./ref'),\n allOf: require('./allOf'),\n anyOf: require('./anyOf'),\n '$comment': require('./comment'),\n const: require('./const'),\n contains: require('./contains'),\n dependencies: require('./dependencies'),\n 'enum': require('./enum'),\n format: require('./format'),\n 'if': require('./if'),\n items: require('./items'),\n maximum: require('./_limit'),\n minimum: require('./_limit'),\n maxItems: require('./_limitItems'),\n minItems: require('./_limitItems'),\n maxLength: require('./_limitLength'),\n minLength: require('./_limitLength'),\n maxProperties: require('./_limitProperties'),\n minProperties: require('./_limitProperties'),\n multipleOf: require('./multipleOf'),\n not: require('./not'),\n oneOf: require('./oneOf'),\n pattern: require('./pattern'),\n properties: require('./properties'),\n propertyNames: require('./propertyNames'),\n required: require('./required'),\n uniqueItems: require('./uniqueItems'),\n validate: require('./validate')\n};\n","'use strict';\nmodule.exports = function generate_items(it, $keyword, $ruleType) {\n var out = ' ';\n var $lvl = it.level;\n var $dataLvl = it.dataLevel;\n var $schema = it.schema[$keyword];\n var $schemaPath = it.schemaPath + it.util.getProperty($keyword);\n var $errSchemaPath = it.errSchemaPath + '/' + $keyword;\n var $breakOnError = !it.opts.allErrors;\n var $data = 'data' + ($dataLvl || '');\n var $valid = 'valid' + $lvl;\n var $errs = 'errs__' + $lvl;\n var $it = it.util.copy(it);\n var $closingBraces = '';\n $it.level++;\n var $nextValid = 'valid' + $it.level;\n var $idx = 'i' + $lvl,\n $dataNxt = $it.dataLevel = it.dataLevel + 1,\n $nextData = 'data' + $dataNxt,\n $currentBaseId = it.baseId;\n out += 'var ' + ($errs) + ' = errors;var ' + ($valid) + ';';\n if (Array.isArray($schema)) {\n var $additionalItems = it.schema.additionalItems;\n if ($additionalItems === false) {\n out += ' ' + ($valid) + ' = ' + ($data) + '.length <= ' + ($schema.length) + '; ';\n var $currErrSchemaPath = $errSchemaPath;\n $errSchemaPath = it.errSchemaPath + '/additionalItems';\n out += ' if (!' + ($valid) + ') { ';\n var $$outStack = $$outStack || [];\n $$outStack.push(out);\n out = ''; /* istanbul ignore else */\n if (it.createErrors !== false) {\n out += ' { keyword: \\'' + ('additionalItems') + '\\' , dataPath: (dataPath || \\'\\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { limit: ' + ($schema.length) + ' } ';\n if (it.opts.messages !== false) {\n out += ' , message: \\'should NOT have more than ' + ($schema.length) + ' items\\' ';\n }\n if (it.opts.verbose) {\n out += ' , schema: false , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';\n }\n out += ' } ';\n } else {\n out += ' {} ';\n }\n var __err = out;\n out = $$outStack.pop();\n if (!it.compositeRule && $breakOnError) {\n /* istanbul ignore if */\n if (it.async) {\n out += ' throw new ValidationError([' + (__err) + ']); ';\n } else {\n out += ' validate.errors = [' + (__err) + ']; return false; ';\n }\n } else {\n out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';\n }\n out += ' } ';\n $errSchemaPath = $currErrSchemaPath;\n if ($breakOnError) {\n $closingBraces += '}';\n out += ' else { ';\n }\n }\n var arr1 = $schema;\n if (arr1) {\n var $sch, $i = -1,\n l1 = arr1.length - 1;\n while ($i < l1) {\n $sch = arr1[$i += 1];\n if ((it.opts.strictKeywords ? (typeof $sch == 'object' && Object.keys($sch).length > 0) || $sch === false : it.util.schemaHasRules($sch, it.RULES.all))) {\n out += ' ' + ($nextValid) + ' = true; if (' + ($data) + '.length > ' + ($i) + ') { ';\n var $passData = $data + '[' + $i + ']';\n $it.schema = $sch;\n $it.schemaPath = $schemaPath + '[' + $i + ']';\n $it.errSchemaPath = $errSchemaPath + '/' + $i;\n $it.errorPath = it.util.getPathExpr(it.errorPath, $i, it.opts.jsonPointers, true);\n $it.dataPathArr[$dataNxt] = $i;\n var $code = it.validate($it);\n $it.baseId = $currentBaseId;\n if (it.util.varOccurences($code, $nextData) < 2) {\n out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' ';\n } else {\n out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' ';\n }\n out += ' } ';\n if ($breakOnError) {\n out += ' if (' + ($nextValid) + ') { ';\n $closingBraces += '}';\n }\n }\n }\n }\n if (typeof $additionalItems == 'object' && (it.opts.strictKeywords ? (typeof $additionalItems == 'object' && Object.keys($additionalItems).length > 0) || $additionalItems === false : it.util.schemaHasRules($additionalItems, it.RULES.all))) {\n $it.schema = $additionalItems;\n $it.schemaPath = it.schemaPath + '.additionalItems';\n $it.errSchemaPath = it.errSchemaPath + '/additionalItems';\n out += ' ' + ($nextValid) + ' = true; if (' + ($data) + '.length > ' + ($schema.length) + ') { for (var ' + ($idx) + ' = ' + ($schema.length) + '; ' + ($idx) + ' < ' + ($data) + '.length; ' + ($idx) + '++) { ';\n $it.errorPath = it.util.getPathExpr(it.errorPath, $idx, it.opts.jsonPointers, true);\n var $passData = $data + '[' + $idx + ']';\n $it.dataPathArr[$dataNxt] = $idx;\n var $code = it.validate($it);\n $it.baseId = $currentBaseId;\n if (it.util.varOccurences($code, $nextData) < 2) {\n out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' ';\n } else {\n out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' ';\n }\n if ($breakOnError) {\n out += ' if (!' + ($nextValid) + ') break; ';\n }\n out += ' } } ';\n if ($breakOnError) {\n out += ' if (' + ($nextValid) + ') { ';\n $closingBraces += '}';\n }\n }\n } else if ((it.opts.strictKeywords ? (typeof $schema == 'object' && Object.keys($schema).length > 0) || $schema === false : it.util.schemaHasRules($schema, it.RULES.all))) {\n $it.schema = $schema;\n $it.schemaPath = $schemaPath;\n $it.errSchemaPath = $errSchemaPath;\n out += ' for (var ' + ($idx) + ' = ' + (0) + '; ' + ($idx) + ' < ' + ($data) + '.length; ' + ($idx) + '++) { ';\n $it.errorPath = it.util.getPathExpr(it.errorPath, $idx, it.opts.jsonPointers, true);\n var $passData = $data + '[' + $idx + ']';\n $it.dataPathArr[$dataNxt] = $idx;\n var $code = it.validate($it);\n $it.baseId = $currentBaseId;\n if (it.util.varOccurences($code, $nextData) < 2) {\n out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' ';\n } else {\n out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' ';\n }\n if ($breakOnError) {\n out += ' if (!' + ($nextValid) + ') break; ';\n }\n out += ' }';\n }\n if ($breakOnError) {\n out += ' ' + ($closingBraces) + ' if (' + ($errs) + ' == errors) {';\n }\n return out;\n}\n","'use strict';\nmodule.exports = function generate_multipleOf(it, $keyword, $ruleType) {\n var out = ' ';\n var $lvl = it.level;\n var $dataLvl = it.dataLevel;\n var $schema = it.schema[$keyword];\n var $schemaPath = it.schemaPath + it.util.getProperty($keyword);\n var $errSchemaPath = it.errSchemaPath + '/' + $keyword;\n var $breakOnError = !it.opts.allErrors;\n var $data = 'data' + ($dataLvl || '');\n var $isData = it.opts.$data && $schema && $schema.$data,\n $schemaValue;\n if ($isData) {\n out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; ';\n $schemaValue = 'schema' + $lvl;\n } else {\n $schemaValue = $schema;\n }\n if (!($isData || typeof $schema == 'number')) {\n throw new Error($keyword + ' must be number');\n }\n out += 'var division' + ($lvl) + ';if (';\n if ($isData) {\n out += ' ' + ($schemaValue) + ' !== undefined && ( typeof ' + ($schemaValue) + ' != \\'number\\' || ';\n }\n out += ' (division' + ($lvl) + ' = ' + ($data) + ' / ' + ($schemaValue) + ', ';\n if (it.opts.multipleOfPrecision) {\n out += ' Math.abs(Math.round(division' + ($lvl) + ') - division' + ($lvl) + ') > 1e-' + (it.opts.multipleOfPrecision) + ' ';\n } else {\n out += ' division' + ($lvl) + ' !== parseInt(division' + ($lvl) + ') ';\n }\n out += ' ) ';\n if ($isData) {\n out += ' ) ';\n }\n out += ' ) { ';\n var $$outStack = $$outStack || [];\n $$outStack.push(out);\n out = ''; /* istanbul ignore else */\n if (it.createErrors !== false) {\n out += ' { keyword: \\'' + ('multipleOf') + '\\' , dataPath: (dataPath || \\'\\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { multipleOf: ' + ($schemaValue) + ' } ';\n if (it.opts.messages !== false) {\n out += ' , message: \\'should be multiple of ';\n if ($isData) {\n out += '\\' + ' + ($schemaValue);\n } else {\n out += '' + ($schemaValue) + '\\'';\n }\n }\n if (it.opts.verbose) {\n out += ' , schema: ';\n if ($isData) {\n out += 'validate.schema' + ($schemaPath);\n } else {\n out += '' + ($schema);\n }\n out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';\n }\n out += ' } ';\n } else {\n out += ' {} ';\n }\n var __err = out;\n out = $$outStack.pop();\n if (!it.compositeRule && $breakOnError) {\n /* istanbul ignore if */\n if (it.async) {\n out += ' throw new ValidationError([' + (__err) + ']); ';\n } else {\n out += ' validate.errors = [' + (__err) + ']; return false; ';\n }\n } else {\n out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';\n }\n out += '} ';\n if ($breakOnError) {\n out += ' else { ';\n }\n return out;\n}\n","'use strict';\nmodule.exports = function generate_not(it, $keyword, $ruleType) {\n var out = ' ';\n var $lvl = it.level;\n var $dataLvl = it.dataLevel;\n var $schema = it.schema[$keyword];\n var $schemaPath = it.schemaPath + it.util.getProperty($keyword);\n var $errSchemaPath = it.errSchemaPath + '/' + $keyword;\n var $breakOnError = !it.opts.allErrors;\n var $data = 'data' + ($dataLvl || '');\n var $errs = 'errs__' + $lvl;\n var $it = it.util.copy(it);\n $it.level++;\n var $nextValid = 'valid' + $it.level;\n if ((it.opts.strictKeywords ? (typeof $schema == 'object' && Object.keys($schema).length > 0) || $schema === false : it.util.schemaHasRules($schema, it.RULES.all))) {\n $it.schema = $schema;\n $it.schemaPath = $schemaPath;\n $it.errSchemaPath = $errSchemaPath;\n out += ' var ' + ($errs) + ' = errors; ';\n var $wasComposite = it.compositeRule;\n it.compositeRule = $it.compositeRule = true;\n $it.createErrors = false;\n var $allErrorsOption;\n if ($it.opts.allErrors) {\n $allErrorsOption = $it.opts.allErrors;\n $it.opts.allErrors = false;\n }\n out += ' ' + (it.validate($it)) + ' ';\n $it.createErrors = true;\n if ($allErrorsOption) $it.opts.allErrors = $allErrorsOption;\n it.compositeRule = $it.compositeRule = $wasComposite;\n out += ' if (' + ($nextValid) + ') { ';\n var $$outStack = $$outStack || [];\n $$outStack.push(out);\n out = ''; /* istanbul ignore else */\n if (it.createErrors !== false) {\n out += ' { keyword: \\'' + ('not') + '\\' , dataPath: (dataPath || \\'\\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} ';\n if (it.opts.messages !== false) {\n out += ' , message: \\'should NOT be valid\\' ';\n }\n if (it.opts.verbose) {\n out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';\n }\n out += ' } ';\n } else {\n out += ' {} ';\n }\n var __err = out;\n out = $$outStack.pop();\n if (!it.compositeRule && $breakOnError) {\n /* istanbul ignore if */\n if (it.async) {\n out += ' throw new ValidationError([' + (__err) + ']); ';\n } else {\n out += ' validate.errors = [' + (__err) + ']; return false; ';\n }\n } else {\n out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';\n }\n out += ' } else { errors = ' + ($errs) + '; if (vErrors !== null) { if (' + ($errs) + ') vErrors.length = ' + ($errs) + '; else vErrors = null; } ';\n if (it.opts.allErrors) {\n out += ' } ';\n }\n } else {\n out += ' var err = '; /* istanbul ignore else */\n if (it.createErrors !== false) {\n out += ' { keyword: \\'' + ('not') + '\\' , dataPath: (dataPath || \\'\\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} ';\n if (it.opts.messages !== false) {\n out += ' , message: \\'should NOT be valid\\' ';\n }\n if (it.opts.verbose) {\n out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';\n }\n out += ' } ';\n } else {\n out += ' {} ';\n }\n out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';\n if ($breakOnError) {\n out += ' if (false) { ';\n }\n }\n return out;\n}\n","'use strict';\nmodule.exports = function generate_oneOf(it, $keyword, $ruleType) {\n var out = ' ';\n var $lvl = it.level;\n var $dataLvl = it.dataLevel;\n var $schema = it.schema[$keyword];\n var $schemaPath = it.schemaPath + it.util.getProperty($keyword);\n var $errSchemaPath = it.errSchemaPath + '/' + $keyword;\n var $breakOnError = !it.opts.allErrors;\n var $data = 'data' + ($dataLvl || '');\n var $valid = 'valid' + $lvl;\n var $errs = 'errs__' + $lvl;\n var $it = it.util.copy(it);\n var $closingBraces = '';\n $it.level++;\n var $nextValid = 'valid' + $it.level;\n var $currentBaseId = $it.baseId,\n $prevValid = 'prevValid' + $lvl,\n $passingSchemas = 'passingSchemas' + $lvl;\n out += 'var ' + ($errs) + ' = errors , ' + ($prevValid) + ' = false , ' + ($valid) + ' = false , ' + ($passingSchemas) + ' = null; ';\n var $wasComposite = it.compositeRule;\n it.compositeRule = $it.compositeRule = true;\n var arr1 = $schema;\n if (arr1) {\n var $sch, $i = -1,\n l1 = arr1.length - 1;\n while ($i < l1) {\n $sch = arr1[$i += 1];\n if ((it.opts.strictKeywords ? (typeof $sch == 'object' && Object.keys($sch).length > 0) || $sch === false : it.util.schemaHasRules($sch, it.RULES.all))) {\n $it.schema = $sch;\n $it.schemaPath = $schemaPath + '[' + $i + ']';\n $it.errSchemaPath = $errSchemaPath + '/' + $i;\n out += ' ' + (it.validate($it)) + ' ';\n $it.baseId = $currentBaseId;\n } else {\n out += ' var ' + ($nextValid) + ' = true; ';\n }\n if ($i) {\n out += ' if (' + ($nextValid) + ' && ' + ($prevValid) + ') { ' + ($valid) + ' = false; ' + ($passingSchemas) + ' = [' + ($passingSchemas) + ', ' + ($i) + ']; } else { ';\n $closingBraces += '}';\n }\n out += ' if (' + ($nextValid) + ') { ' + ($valid) + ' = ' + ($prevValid) + ' = true; ' + ($passingSchemas) + ' = ' + ($i) + '; }';\n }\n }\n it.compositeRule = $it.compositeRule = $wasComposite;\n out += '' + ($closingBraces) + 'if (!' + ($valid) + ') { var err = '; /* istanbul ignore else */\n if (it.createErrors !== false) {\n out += ' { keyword: \\'' + ('oneOf') + '\\' , dataPath: (dataPath || \\'\\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { passingSchemas: ' + ($passingSchemas) + ' } ';\n if (it.opts.messages !== false) {\n out += ' , message: \\'should match exactly one schema in oneOf\\' ';\n }\n if (it.opts.verbose) {\n out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';\n }\n out += ' } ';\n } else {\n out += ' {} ';\n }\n out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';\n if (!it.compositeRule && $breakOnError) {\n /* istanbul ignore if */\n if (it.async) {\n out += ' throw new ValidationError(vErrors); ';\n } else {\n out += ' validate.errors = vErrors; return false; ';\n }\n }\n out += '} else { errors = ' + ($errs) + '; if (vErrors !== null) { if (' + ($errs) + ') vErrors.length = ' + ($errs) + '; else vErrors = null; }';\n if (it.opts.allErrors) {\n out += ' } ';\n }\n return out;\n}\n","'use strict';\nmodule.exports = function generate_pattern(it, $keyword, $ruleType) {\n var out = ' ';\n var $lvl = it.level;\n var $dataLvl = it.dataLevel;\n var $schema = it.schema[$keyword];\n var $schemaPath = it.schemaPath + it.util.getProperty($keyword);\n var $errSchemaPath = it.errSchemaPath + '/' + $keyword;\n var $breakOnError = !it.opts.allErrors;\n var $data = 'data' + ($dataLvl || '');\n var $isData = it.opts.$data && $schema && $schema.$data,\n $schemaValue;\n if ($isData) {\n out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; ';\n $schemaValue = 'schema' + $lvl;\n } else {\n $schemaValue = $schema;\n }\n var $regexp = $isData ? '(new RegExp(' + $schemaValue + '))' : it.usePattern($schema);\n out += 'if ( ';\n if ($isData) {\n out += ' (' + ($schemaValue) + ' !== undefined && typeof ' + ($schemaValue) + ' != \\'string\\') || ';\n }\n out += ' !' + ($regexp) + '.test(' + ($data) + ') ) { ';\n var $$outStack = $$outStack || [];\n $$outStack.push(out);\n out = ''; /* istanbul ignore else */\n if (it.createErrors !== false) {\n out += ' { keyword: \\'' + ('pattern') + '\\' , dataPath: (dataPath || \\'\\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { pattern: ';\n if ($isData) {\n out += '' + ($schemaValue);\n } else {\n out += '' + (it.util.toQuotedString($schema));\n }\n out += ' } ';\n if (it.opts.messages !== false) {\n out += ' , message: \\'should match pattern \"';\n if ($isData) {\n out += '\\' + ' + ($schemaValue) + ' + \\'';\n } else {\n out += '' + (it.util.escapeQuotes($schema));\n }\n out += '\"\\' ';\n }\n if (it.opts.verbose) {\n out += ' , schema: ';\n if ($isData) {\n out += 'validate.schema' + ($schemaPath);\n } else {\n out += '' + (it.util.toQuotedString($schema));\n }\n out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';\n }\n out += ' } ';\n } else {\n out += ' {} ';\n }\n var __err = out;\n out = $$outStack.pop();\n if (!it.compositeRule && $breakOnError) {\n /* istanbul ignore if */\n if (it.async) {\n out += ' throw new ValidationError([' + (__err) + ']); ';\n } else {\n out += ' validate.errors = [' + (__err) + ']; return false; ';\n }\n } else {\n out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';\n }\n out += '} ';\n if ($breakOnError) {\n out += ' else { ';\n }\n return out;\n}\n","'use strict';\nmodule.exports = function generate_properties(it, $keyword, $ruleType) {\n var out = ' ';\n var $lvl = it.level;\n var $dataLvl = it.dataLevel;\n var $schema = it.schema[$keyword];\n var $schemaPath = it.schemaPath + it.util.getProperty($keyword);\n var $errSchemaPath = it.errSchemaPath + '/' + $keyword;\n var $breakOnError = !it.opts.allErrors;\n var $data = 'data' + ($dataLvl || '');\n var $errs = 'errs__' + $lvl;\n var $it = it.util.copy(it);\n var $closingBraces = '';\n $it.level++;\n var $nextValid = 'valid' + $it.level;\n var $key = 'key' + $lvl,\n $idx = 'idx' + $lvl,\n $dataNxt = $it.dataLevel = it.dataLevel + 1,\n $nextData = 'data' + $dataNxt,\n $dataProperties = 'dataProperties' + $lvl;\n var $schemaKeys = Object.keys($schema || {}).filter(notProto),\n $pProperties = it.schema.patternProperties || {},\n $pPropertyKeys = Object.keys($pProperties).filter(notProto),\n $aProperties = it.schema.additionalProperties,\n $someProperties = $schemaKeys.length || $pPropertyKeys.length,\n $noAdditional = $aProperties === false,\n $additionalIsSchema = typeof $aProperties == 'object' && Object.keys($aProperties).length,\n $removeAdditional = it.opts.removeAdditional,\n $checkAdditional = $noAdditional || $additionalIsSchema || $removeAdditional,\n $ownProperties = it.opts.ownProperties,\n $currentBaseId = it.baseId;\n var $required = it.schema.required;\n if ($required && !(it.opts.$data && $required.$data) && $required.length < it.opts.loopRequired) {\n var $requiredHash = it.util.toHash($required);\n }\n\n function notProto(p) {\n return p !== '__proto__';\n }\n out += 'var ' + ($errs) + ' = errors;var ' + ($nextValid) + ' = true;';\n if ($ownProperties) {\n out += ' var ' + ($dataProperties) + ' = undefined;';\n }\n if ($checkAdditional) {\n if ($ownProperties) {\n out += ' ' + ($dataProperties) + ' = ' + ($dataProperties) + ' || Object.keys(' + ($data) + '); for (var ' + ($idx) + '=0; ' + ($idx) + '<' + ($dataProperties) + '.length; ' + ($idx) + '++) { var ' + ($key) + ' = ' + ($dataProperties) + '[' + ($idx) + ']; ';\n } else {\n out += ' for (var ' + ($key) + ' in ' + ($data) + ') { ';\n }\n if ($someProperties) {\n out += ' var isAdditional' + ($lvl) + ' = !(false ';\n if ($schemaKeys.length) {\n if ($schemaKeys.length > 8) {\n out += ' || validate.schema' + ($schemaPath) + '.hasOwnProperty(' + ($key) + ') ';\n } else {\n var arr1 = $schemaKeys;\n if (arr1) {\n var $propertyKey, i1 = -1,\n l1 = arr1.length - 1;\n while (i1 < l1) {\n $propertyKey = arr1[i1 += 1];\n out += ' || ' + ($key) + ' == ' + (it.util.toQuotedString($propertyKey)) + ' ';\n }\n }\n }\n }\n if ($pPropertyKeys.length) {\n var arr2 = $pPropertyKeys;\n if (arr2) {\n var $pProperty, $i = -1,\n l2 = arr2.length - 1;\n while ($i < l2) {\n $pProperty = arr2[$i += 1];\n out += ' || ' + (it.usePattern($pProperty)) + '.test(' + ($key) + ') ';\n }\n }\n }\n out += ' ); if (isAdditional' + ($lvl) + ') { ';\n }\n if ($removeAdditional == 'all') {\n out += ' delete ' + ($data) + '[' + ($key) + ']; ';\n } else {\n var $currentErrorPath = it.errorPath;\n var $additionalProperty = '\\' + ' + $key + ' + \\'';\n if (it.opts._errorDataPathProperty) {\n it.errorPath = it.util.getPathExpr(it.errorPath, $key, it.opts.jsonPointers);\n }\n if ($noAdditional) {\n if ($removeAdditional) {\n out += ' delete ' + ($data) + '[' + ($key) + ']; ';\n } else {\n out += ' ' + ($nextValid) + ' = false; ';\n var $currErrSchemaPath = $errSchemaPath;\n $errSchemaPath = it.errSchemaPath + '/additionalProperties';\n var $$outStack = $$outStack || [];\n $$outStack.push(out);\n out = ''; /* istanbul ignore else */\n if (it.createErrors !== false) {\n out += ' { keyword: \\'' + ('additionalProperties') + '\\' , dataPath: (dataPath || \\'\\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { additionalProperty: \\'' + ($additionalProperty) + '\\' } ';\n if (it.opts.messages !== false) {\n out += ' , message: \\'';\n if (it.opts._errorDataPathProperty) {\n out += 'is an invalid additional property';\n } else {\n out += 'should NOT have additional properties';\n }\n out += '\\' ';\n }\n if (it.opts.verbose) {\n out += ' , schema: false , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';\n }\n out += ' } ';\n } else {\n out += ' {} ';\n }\n var __err = out;\n out = $$outStack.pop();\n if (!it.compositeRule && $breakOnError) {\n /* istanbul ignore if */\n if (it.async) {\n out += ' throw new ValidationError([' + (__err) + ']); ';\n } else {\n out += ' validate.errors = [' + (__err) + ']; return false; ';\n }\n } else {\n out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';\n }\n $errSchemaPath = $currErrSchemaPath;\n if ($breakOnError) {\n out += ' break; ';\n }\n }\n } else if ($additionalIsSchema) {\n if ($removeAdditional == 'failing') {\n out += ' var ' + ($errs) + ' = errors; ';\n var $wasComposite = it.compositeRule;\n it.compositeRule = $it.compositeRule = true;\n $it.schema = $aProperties;\n $it.schemaPath = it.schemaPath + '.additionalProperties';\n $it.errSchemaPath = it.errSchemaPath + '/additionalProperties';\n $it.errorPath = it.opts._errorDataPathProperty ? it.errorPath : it.util.getPathExpr(it.errorPath, $key, it.opts.jsonPointers);\n var $passData = $data + '[' + $key + ']';\n $it.dataPathArr[$dataNxt] = $key;\n var $code = it.validate($it);\n $it.baseId = $currentBaseId;\n if (it.util.varOccurences($code, $nextData) < 2) {\n out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' ';\n } else {\n out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' ';\n }\n out += ' if (!' + ($nextValid) + ') { errors = ' + ($errs) + '; if (validate.errors !== null) { if (errors) validate.errors.length = errors; else validate.errors = null; } delete ' + ($data) + '[' + ($key) + ']; } ';\n it.compositeRule = $it.compositeRule = $wasComposite;\n } else {\n $it.schema = $aProperties;\n $it.schemaPath = it.schemaPath + '.additionalProperties';\n $it.errSchemaPath = it.errSchemaPath + '/additionalProperties';\n $it.errorPath = it.opts._errorDataPathProperty ? it.errorPath : it.util.getPathExpr(it.errorPath, $key, it.opts.jsonPointers);\n var $passData = $data + '[' + $key + ']';\n $it.dataPathArr[$dataNxt] = $key;\n var $code = it.validate($it);\n $it.baseId = $currentBaseId;\n if (it.util.varOccurences($code, $nextData) < 2) {\n out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' ';\n } else {\n out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' ';\n }\n if ($breakOnError) {\n out += ' if (!' + ($nextValid) + ') break; ';\n }\n }\n }\n it.errorPath = $currentErrorPath;\n }\n if ($someProperties) {\n out += ' } ';\n }\n out += ' } ';\n if ($breakOnError) {\n out += ' if (' + ($nextValid) + ') { ';\n $closingBraces += '}';\n }\n }\n var $useDefaults = it.opts.useDefaults && !it.compositeRule;\n if ($schemaKeys.length) {\n var arr3 = $schemaKeys;\n if (arr3) {\n var $propertyKey, i3 = -1,\n l3 = arr3.length - 1;\n while (i3 < l3) {\n $propertyKey = arr3[i3 += 1];\n var $sch = $schema[$propertyKey];\n if ((it.opts.strictKeywords ? (typeof $sch == 'object' && Object.keys($sch).length > 0) || $sch === false : it.util.schemaHasRules($sch, it.RULES.all))) {\n var $prop = it.util.getProperty($propertyKey),\n $passData = $data + $prop,\n $hasDefault = $useDefaults && $sch.default !== undefined;\n $it.schema = $sch;\n $it.schemaPath = $schemaPath + $prop;\n $it.errSchemaPath = $errSchemaPath + '/' + it.util.escapeFragment($propertyKey);\n $it.errorPath = it.util.getPath(it.errorPath, $propertyKey, it.opts.jsonPointers);\n $it.dataPathArr[$dataNxt] = it.util.toQuotedString($propertyKey);\n var $code = it.validate($it);\n $it.baseId = $currentBaseId;\n if (it.util.varOccurences($code, $nextData) < 2) {\n $code = it.util.varReplace($code, $nextData, $passData);\n var $useData = $passData;\n } else {\n var $useData = $nextData;\n out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ';\n }\n if ($hasDefault) {\n out += ' ' + ($code) + ' ';\n } else {\n if ($requiredHash && $requiredHash[$propertyKey]) {\n out += ' if ( ' + ($useData) + ' === undefined ';\n if ($ownProperties) {\n out += ' || ! Object.prototype.hasOwnProperty.call(' + ($data) + ', \\'' + (it.util.escapeQuotes($propertyKey)) + '\\') ';\n }\n out += ') { ' + ($nextValid) + ' = false; ';\n var $currentErrorPath = it.errorPath,\n $currErrSchemaPath = $errSchemaPath,\n $missingProperty = it.util.escapeQuotes($propertyKey);\n if (it.opts._errorDataPathProperty) {\n it.errorPath = it.util.getPath($currentErrorPath, $propertyKey, it.opts.jsonPointers);\n }\n $errSchemaPath = it.errSchemaPath + '/required';\n var $$outStack = $$outStack || [];\n $$outStack.push(out);\n out = ''; /* istanbul ignore else */\n if (it.createErrors !== false) {\n out += ' { keyword: \\'' + ('required') + '\\' , dataPath: (dataPath || \\'\\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \\'' + ($missingProperty) + '\\' } ';\n if (it.opts.messages !== false) {\n out += ' , message: \\'';\n if (it.opts._errorDataPathProperty) {\n out += 'is a required property';\n } else {\n out += 'should have required property \\\\\\'' + ($missingProperty) + '\\\\\\'';\n }\n out += '\\' ';\n }\n if (it.opts.verbose) {\n out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';\n }\n out += ' } ';\n } else {\n out += ' {} ';\n }\n var __err = out;\n out = $$outStack.pop();\n if (!it.compositeRule && $breakOnError) {\n /* istanbul ignore if */\n if (it.async) {\n out += ' throw new ValidationError([' + (__err) + ']); ';\n } else {\n out += ' validate.errors = [' + (__err) + ']; return false; ';\n }\n } else {\n out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';\n }\n $errSchemaPath = $currErrSchemaPath;\n it.errorPath = $currentErrorPath;\n out += ' } else { ';\n } else {\n if ($breakOnError) {\n out += ' if ( ' + ($useData) + ' === undefined ';\n if ($ownProperties) {\n out += ' || ! Object.prototype.hasOwnProperty.call(' + ($data) + ', \\'' + (it.util.escapeQuotes($propertyKey)) + '\\') ';\n }\n out += ') { ' + ($nextValid) + ' = true; } else { ';\n } else {\n out += ' if (' + ($useData) + ' !== undefined ';\n if ($ownProperties) {\n out += ' && Object.prototype.hasOwnProperty.call(' + ($data) + ', \\'' + (it.util.escapeQuotes($propertyKey)) + '\\') ';\n }\n out += ' ) { ';\n }\n }\n out += ' ' + ($code) + ' } ';\n }\n }\n if ($breakOnError) {\n out += ' if (' + ($nextValid) + ') { ';\n $closingBraces += '}';\n }\n }\n }\n }\n if ($pPropertyKeys.length) {\n var arr4 = $pPropertyKeys;\n if (arr4) {\n var $pProperty, i4 = -1,\n l4 = arr4.length - 1;\n while (i4 < l4) {\n $pProperty = arr4[i4 += 1];\n var $sch = $pProperties[$pProperty];\n if ((it.opts.strictKeywords ? (typeof $sch == 'object' && Object.keys($sch).length > 0) || $sch === false : it.util.schemaHasRules($sch, it.RULES.all))) {\n $it.schema = $sch;\n $it.schemaPath = it.schemaPath + '.patternProperties' + it.util.getProperty($pProperty);\n $it.errSchemaPath = it.errSchemaPath + '/patternProperties/' + it.util.escapeFragment($pProperty);\n if ($ownProperties) {\n out += ' ' + ($dataProperties) + ' = ' + ($dataProperties) + ' || Object.keys(' + ($data) + '); for (var ' + ($idx) + '=0; ' + ($idx) + '<' + ($dataProperties) + '.length; ' + ($idx) + '++) { var ' + ($key) + ' = ' + ($dataProperties) + '[' + ($idx) + ']; ';\n } else {\n out += ' for (var ' + ($key) + ' in ' + ($data) + ') { ';\n }\n out += ' if (' + (it.usePattern($pProperty)) + '.test(' + ($key) + ')) { ';\n $it.errorPath = it.util.getPathExpr(it.errorPath, $key, it.opts.jsonPointers);\n var $passData = $data + '[' + $key + ']';\n $it.dataPathArr[$dataNxt] = $key;\n var $code = it.validate($it);\n $it.baseId = $currentBaseId;\n if (it.util.varOccurences($code, $nextData) < 2) {\n out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' ';\n } else {\n out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' ';\n }\n if ($breakOnError) {\n out += ' if (!' + ($nextValid) + ') break; ';\n }\n out += ' } ';\n if ($breakOnError) {\n out += ' else ' + ($nextValid) + ' = true; ';\n }\n out += ' } ';\n if ($breakOnError) {\n out += ' if (' + ($nextValid) + ') { ';\n $closingBraces += '}';\n }\n }\n }\n }\n }\n if ($breakOnError) {\n out += ' ' + ($closingBraces) + ' if (' + ($errs) + ' == errors) {';\n }\n return out;\n}\n","'use strict';\nmodule.exports = function generate_propertyNames(it, $keyword, $ruleType) {\n var out = ' ';\n var $lvl = it.level;\n var $dataLvl = it.dataLevel;\n var $schema = it.schema[$keyword];\n var $schemaPath = it.schemaPath + it.util.getProperty($keyword);\n var $errSchemaPath = it.errSchemaPath + '/' + $keyword;\n var $breakOnError = !it.opts.allErrors;\n var $data = 'data' + ($dataLvl || '');\n var $errs = 'errs__' + $lvl;\n var $it = it.util.copy(it);\n var $closingBraces = '';\n $it.level++;\n var $nextValid = 'valid' + $it.level;\n out += 'var ' + ($errs) + ' = errors;';\n if ((it.opts.strictKeywords ? (typeof $schema == 'object' && Object.keys($schema).length > 0) || $schema === false : it.util.schemaHasRules($schema, it.RULES.all))) {\n $it.schema = $schema;\n $it.schemaPath = $schemaPath;\n $it.errSchemaPath = $errSchemaPath;\n var $key = 'key' + $lvl,\n $idx = 'idx' + $lvl,\n $i = 'i' + $lvl,\n $invalidName = '\\' + ' + $key + ' + \\'',\n $dataNxt = $it.dataLevel = it.dataLevel + 1,\n $nextData = 'data' + $dataNxt,\n $dataProperties = 'dataProperties' + $lvl,\n $ownProperties = it.opts.ownProperties,\n $currentBaseId = it.baseId;\n if ($ownProperties) {\n out += ' var ' + ($dataProperties) + ' = undefined; ';\n }\n if ($ownProperties) {\n out += ' ' + ($dataProperties) + ' = ' + ($dataProperties) + ' || Object.keys(' + ($data) + '); for (var ' + ($idx) + '=0; ' + ($idx) + '<' + ($dataProperties) + '.length; ' + ($idx) + '++) { var ' + ($key) + ' = ' + ($dataProperties) + '[' + ($idx) + ']; ';\n } else {\n out += ' for (var ' + ($key) + ' in ' + ($data) + ') { ';\n }\n out += ' var startErrs' + ($lvl) + ' = errors; ';\n var $passData = $key;\n var $wasComposite = it.compositeRule;\n it.compositeRule = $it.compositeRule = true;\n var $code = it.validate($it);\n $it.baseId = $currentBaseId;\n if (it.util.varOccurences($code, $nextData) < 2) {\n out += ' ' + (it.util.varReplace($code, $nextData, $passData)) + ' ';\n } else {\n out += ' var ' + ($nextData) + ' = ' + ($passData) + '; ' + ($code) + ' ';\n }\n it.compositeRule = $it.compositeRule = $wasComposite;\n out += ' if (!' + ($nextValid) + ') { for (var ' + ($i) + '=startErrs' + ($lvl) + '; ' + ($i) + ' 0) || $propertySch === false : it.util.schemaHasRules($propertySch, it.RULES.all)))) {\n $required[$required.length] = $property;\n }\n }\n }\n } else {\n var $required = $schema;\n }\n }\n if ($isData || $required.length) {\n var $currentErrorPath = it.errorPath,\n $loopRequired = $isData || $required.length >= it.opts.loopRequired,\n $ownProperties = it.opts.ownProperties;\n if ($breakOnError) {\n out += ' var missing' + ($lvl) + '; ';\n if ($loopRequired) {\n if (!$isData) {\n out += ' var ' + ($vSchema) + ' = validate.schema' + ($schemaPath) + '; ';\n }\n var $i = 'i' + $lvl,\n $propertyPath = 'schema' + $lvl + '[' + $i + ']',\n $missingProperty = '\\' + ' + $propertyPath + ' + \\'';\n if (it.opts._errorDataPathProperty) {\n it.errorPath = it.util.getPathExpr($currentErrorPath, $propertyPath, it.opts.jsonPointers);\n }\n out += ' var ' + ($valid) + ' = true; ';\n if ($isData) {\n out += ' if (schema' + ($lvl) + ' === undefined) ' + ($valid) + ' = true; else if (!Array.isArray(schema' + ($lvl) + ')) ' + ($valid) + ' = false; else {';\n }\n out += ' for (var ' + ($i) + ' = 0; ' + ($i) + ' < ' + ($vSchema) + '.length; ' + ($i) + '++) { ' + ($valid) + ' = ' + ($data) + '[' + ($vSchema) + '[' + ($i) + ']] !== undefined ';\n if ($ownProperties) {\n out += ' && Object.prototype.hasOwnProperty.call(' + ($data) + ', ' + ($vSchema) + '[' + ($i) + ']) ';\n }\n out += '; if (!' + ($valid) + ') break; } ';\n if ($isData) {\n out += ' } ';\n }\n out += ' if (!' + ($valid) + ') { ';\n var $$outStack = $$outStack || [];\n $$outStack.push(out);\n out = ''; /* istanbul ignore else */\n if (it.createErrors !== false) {\n out += ' { keyword: \\'' + ('required') + '\\' , dataPath: (dataPath || \\'\\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \\'' + ($missingProperty) + '\\' } ';\n if (it.opts.messages !== false) {\n out += ' , message: \\'';\n if (it.opts._errorDataPathProperty) {\n out += 'is a required property';\n } else {\n out += 'should have required property \\\\\\'' + ($missingProperty) + '\\\\\\'';\n }\n out += '\\' ';\n }\n if (it.opts.verbose) {\n out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';\n }\n out += ' } ';\n } else {\n out += ' {} ';\n }\n var __err = out;\n out = $$outStack.pop();\n if (!it.compositeRule && $breakOnError) {\n /* istanbul ignore if */\n if (it.async) {\n out += ' throw new ValidationError([' + (__err) + ']); ';\n } else {\n out += ' validate.errors = [' + (__err) + ']; return false; ';\n }\n } else {\n out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';\n }\n out += ' } else { ';\n } else {\n out += ' if ( ';\n var arr2 = $required;\n if (arr2) {\n var $propertyKey, $i = -1,\n l2 = arr2.length - 1;\n while ($i < l2) {\n $propertyKey = arr2[$i += 1];\n if ($i) {\n out += ' || ';\n }\n var $prop = it.util.getProperty($propertyKey),\n $useData = $data + $prop;\n out += ' ( ( ' + ($useData) + ' === undefined ';\n if ($ownProperties) {\n out += ' || ! Object.prototype.hasOwnProperty.call(' + ($data) + ', \\'' + (it.util.escapeQuotes($propertyKey)) + '\\') ';\n }\n out += ') && (missing' + ($lvl) + ' = ' + (it.util.toQuotedString(it.opts.jsonPointers ? $propertyKey : $prop)) + ') ) ';\n }\n }\n out += ') { ';\n var $propertyPath = 'missing' + $lvl,\n $missingProperty = '\\' + ' + $propertyPath + ' + \\'';\n if (it.opts._errorDataPathProperty) {\n it.errorPath = it.opts.jsonPointers ? it.util.getPathExpr($currentErrorPath, $propertyPath, true) : $currentErrorPath + ' + ' + $propertyPath;\n }\n var $$outStack = $$outStack || [];\n $$outStack.push(out);\n out = ''; /* istanbul ignore else */\n if (it.createErrors !== false) {\n out += ' { keyword: \\'' + ('required') + '\\' , dataPath: (dataPath || \\'\\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \\'' + ($missingProperty) + '\\' } ';\n if (it.opts.messages !== false) {\n out += ' , message: \\'';\n if (it.opts._errorDataPathProperty) {\n out += 'is a required property';\n } else {\n out += 'should have required property \\\\\\'' + ($missingProperty) + '\\\\\\'';\n }\n out += '\\' ';\n }\n if (it.opts.verbose) {\n out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';\n }\n out += ' } ';\n } else {\n out += ' {} ';\n }\n var __err = out;\n out = $$outStack.pop();\n if (!it.compositeRule && $breakOnError) {\n /* istanbul ignore if */\n if (it.async) {\n out += ' throw new ValidationError([' + (__err) + ']); ';\n } else {\n out += ' validate.errors = [' + (__err) + ']; return false; ';\n }\n } else {\n out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';\n }\n out += ' } else { ';\n }\n } else {\n if ($loopRequired) {\n if (!$isData) {\n out += ' var ' + ($vSchema) + ' = validate.schema' + ($schemaPath) + '; ';\n }\n var $i = 'i' + $lvl,\n $propertyPath = 'schema' + $lvl + '[' + $i + ']',\n $missingProperty = '\\' + ' + $propertyPath + ' + \\'';\n if (it.opts._errorDataPathProperty) {\n it.errorPath = it.util.getPathExpr($currentErrorPath, $propertyPath, it.opts.jsonPointers);\n }\n if ($isData) {\n out += ' if (' + ($vSchema) + ' && !Array.isArray(' + ($vSchema) + ')) { var err = '; /* istanbul ignore else */\n if (it.createErrors !== false) {\n out += ' { keyword: \\'' + ('required') + '\\' , dataPath: (dataPath || \\'\\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \\'' + ($missingProperty) + '\\' } ';\n if (it.opts.messages !== false) {\n out += ' , message: \\'';\n if (it.opts._errorDataPathProperty) {\n out += 'is a required property';\n } else {\n out += 'should have required property \\\\\\'' + ($missingProperty) + '\\\\\\'';\n }\n out += '\\' ';\n }\n if (it.opts.verbose) {\n out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';\n }\n out += ' } ';\n } else {\n out += ' {} ';\n }\n out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } else if (' + ($vSchema) + ' !== undefined) { ';\n }\n out += ' for (var ' + ($i) + ' = 0; ' + ($i) + ' < ' + ($vSchema) + '.length; ' + ($i) + '++) { if (' + ($data) + '[' + ($vSchema) + '[' + ($i) + ']] === undefined ';\n if ($ownProperties) {\n out += ' || ! Object.prototype.hasOwnProperty.call(' + ($data) + ', ' + ($vSchema) + '[' + ($i) + ']) ';\n }\n out += ') { var err = '; /* istanbul ignore else */\n if (it.createErrors !== false) {\n out += ' { keyword: \\'' + ('required') + '\\' , dataPath: (dataPath || \\'\\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \\'' + ($missingProperty) + '\\' } ';\n if (it.opts.messages !== false) {\n out += ' , message: \\'';\n if (it.opts._errorDataPathProperty) {\n out += 'is a required property';\n } else {\n out += 'should have required property \\\\\\'' + ($missingProperty) + '\\\\\\'';\n }\n out += '\\' ';\n }\n if (it.opts.verbose) {\n out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';\n }\n out += ' } ';\n } else {\n out += ' {} ';\n }\n out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } } ';\n if ($isData) {\n out += ' } ';\n }\n } else {\n var arr3 = $required;\n if (arr3) {\n var $propertyKey, i3 = -1,\n l3 = arr3.length - 1;\n while (i3 < l3) {\n $propertyKey = arr3[i3 += 1];\n var $prop = it.util.getProperty($propertyKey),\n $missingProperty = it.util.escapeQuotes($propertyKey),\n $useData = $data + $prop;\n if (it.opts._errorDataPathProperty) {\n it.errorPath = it.util.getPath($currentErrorPath, $propertyKey, it.opts.jsonPointers);\n }\n out += ' if ( ' + ($useData) + ' === undefined ';\n if ($ownProperties) {\n out += ' || ! Object.prototype.hasOwnProperty.call(' + ($data) + ', \\'' + (it.util.escapeQuotes($propertyKey)) + '\\') ';\n }\n out += ') { var err = '; /* istanbul ignore else */\n if (it.createErrors !== false) {\n out += ' { keyword: \\'' + ('required') + '\\' , dataPath: (dataPath || \\'\\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { missingProperty: \\'' + ($missingProperty) + '\\' } ';\n if (it.opts.messages !== false) {\n out += ' , message: \\'';\n if (it.opts._errorDataPathProperty) {\n out += 'is a required property';\n } else {\n out += 'should have required property \\\\\\'' + ($missingProperty) + '\\\\\\'';\n }\n out += '\\' ';\n }\n if (it.opts.verbose) {\n out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';\n }\n out += ' } ';\n } else {\n out += ' {} ';\n }\n out += '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } ';\n }\n }\n }\n }\n it.errorPath = $currentErrorPath;\n } else if ($breakOnError) {\n out += ' if (true) {';\n }\n return out;\n}\n","'use strict';\nmodule.exports = function generate_uniqueItems(it, $keyword, $ruleType) {\n var out = ' ';\n var $lvl = it.level;\n var $dataLvl = it.dataLevel;\n var $schema = it.schema[$keyword];\n var $schemaPath = it.schemaPath + it.util.getProperty($keyword);\n var $errSchemaPath = it.errSchemaPath + '/' + $keyword;\n var $breakOnError = !it.opts.allErrors;\n var $data = 'data' + ($dataLvl || '');\n var $valid = 'valid' + $lvl;\n var $isData = it.opts.$data && $schema && $schema.$data,\n $schemaValue;\n if ($isData) {\n out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; ';\n $schemaValue = 'schema' + $lvl;\n } else {\n $schemaValue = $schema;\n }\n if (($schema || $isData) && it.opts.uniqueItems !== false) {\n if ($isData) {\n out += ' var ' + ($valid) + '; if (' + ($schemaValue) + ' === false || ' + ($schemaValue) + ' === undefined) ' + ($valid) + ' = true; else if (typeof ' + ($schemaValue) + ' != \\'boolean\\') ' + ($valid) + ' = false; else { ';\n }\n out += ' var i = ' + ($data) + '.length , ' + ($valid) + ' = true , j; if (i > 1) { ';\n var $itemType = it.schema.items && it.schema.items.type,\n $typeIsArray = Array.isArray($itemType);\n if (!$itemType || $itemType == 'object' || $itemType == 'array' || ($typeIsArray && ($itemType.indexOf('object') >= 0 || $itemType.indexOf('array') >= 0))) {\n out += ' outer: for (;i--;) { for (j = i; j--;) { if (equal(' + ($data) + '[i], ' + ($data) + '[j])) { ' + ($valid) + ' = false; break outer; } } } ';\n } else {\n out += ' var itemIndices = {}, item; for (;i--;) { var item = ' + ($data) + '[i]; ';\n var $method = 'checkDataType' + ($typeIsArray ? 's' : '');\n out += ' if (' + (it.util[$method]($itemType, 'item', it.opts.strictNumbers, true)) + ') continue; ';\n if ($typeIsArray) {\n out += ' if (typeof item == \\'string\\') item = \\'\"\\' + item; ';\n }\n out += ' if (typeof itemIndices[item] == \\'number\\') { ' + ($valid) + ' = false; j = itemIndices[item]; break; } itemIndices[item] = i; } ';\n }\n out += ' } ';\n if ($isData) {\n out += ' } ';\n }\n out += ' if (!' + ($valid) + ') { ';\n var $$outStack = $$outStack || [];\n $$outStack.push(out);\n out = ''; /* istanbul ignore else */\n if (it.createErrors !== false) {\n out += ' { keyword: \\'' + ('uniqueItems') + '\\' , dataPath: (dataPath || \\'\\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { i: i, j: j } ';\n if (it.opts.messages !== false) {\n out += ' , message: \\'should NOT have duplicate items (items ## \\' + j + \\' and \\' + i + \\' are identical)\\' ';\n }\n if (it.opts.verbose) {\n out += ' , schema: ';\n if ($isData) {\n out += 'validate.schema' + ($schemaPath);\n } else {\n out += '' + ($schema);\n }\n out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';\n }\n out += ' } ';\n } else {\n out += ' {} ';\n }\n var __err = out;\n out = $$outStack.pop();\n if (!it.compositeRule && $breakOnError) {\n /* istanbul ignore if */\n if (it.async) {\n out += ' throw new ValidationError([' + (__err) + ']); ';\n } else {\n out += ' validate.errors = [' + (__err) + ']; return false; ';\n }\n } else {\n out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';\n }\n out += ' } ';\n if ($breakOnError) {\n out += ' else { ';\n }\n } else {\n if ($breakOnError) {\n out += ' if (true) { ';\n }\n }\n return out;\n}\n","'use strict';\nmodule.exports = function generate_validate(it, $keyword, $ruleType) {\n var out = '';\n var $async = it.schema.$async === true,\n $refKeywords = it.util.schemaHasRulesExcept(it.schema, it.RULES.all, '$ref'),\n $id = it.self._getId(it.schema);\n if (it.opts.strictKeywords) {\n var $unknownKwd = it.util.schemaUnknownRules(it.schema, it.RULES.keywords);\n if ($unknownKwd) {\n var $keywordsMsg = 'unknown keyword: ' + $unknownKwd;\n if (it.opts.strictKeywords === 'log') it.logger.warn($keywordsMsg);\n else throw new Error($keywordsMsg);\n }\n }\n if (it.isTop) {\n out += ' var validate = ';\n if ($async) {\n it.async = true;\n out += 'async ';\n }\n out += 'function(data, dataPath, parentData, parentDataProperty, rootData) { \\'use strict\\'; ';\n if ($id && (it.opts.sourceCode || it.opts.processCode)) {\n out += ' ' + ('/\\*# sourceURL=' + $id + ' */') + ' ';\n }\n }\n if (typeof it.schema == 'boolean' || !($refKeywords || it.schema.$ref)) {\n var $keyword = 'false schema';\n var $lvl = it.level;\n var $dataLvl = it.dataLevel;\n var $schema = it.schema[$keyword];\n var $schemaPath = it.schemaPath + it.util.getProperty($keyword);\n var $errSchemaPath = it.errSchemaPath + '/' + $keyword;\n var $breakOnError = !it.opts.allErrors;\n var $errorKeyword;\n var $data = 'data' + ($dataLvl || '');\n var $valid = 'valid' + $lvl;\n if (it.schema === false) {\n if (it.isTop) {\n $breakOnError = true;\n } else {\n out += ' var ' + ($valid) + ' = false; ';\n }\n var $$outStack = $$outStack || [];\n $$outStack.push(out);\n out = ''; /* istanbul ignore else */\n if (it.createErrors !== false) {\n out += ' { keyword: \\'' + ($errorKeyword || 'false schema') + '\\' , dataPath: (dataPath || \\'\\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: {} ';\n if (it.opts.messages !== false) {\n out += ' , message: \\'boolean schema is false\\' ';\n }\n if (it.opts.verbose) {\n out += ' , schema: false , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';\n }\n out += ' } ';\n } else {\n out += ' {} ';\n }\n var __err = out;\n out = $$outStack.pop();\n if (!it.compositeRule && $breakOnError) {\n /* istanbul ignore if */\n if (it.async) {\n out += ' throw new ValidationError([' + (__err) + ']); ';\n } else {\n out += ' validate.errors = [' + (__err) + ']; return false; ';\n }\n } else {\n out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';\n }\n } else {\n if (it.isTop) {\n if ($async) {\n out += ' return data; ';\n } else {\n out += ' validate.errors = null; return true; ';\n }\n } else {\n out += ' var ' + ($valid) + ' = true; ';\n }\n }\n if (it.isTop) {\n out += ' }; return validate; ';\n }\n return out;\n }\n if (it.isTop) {\n var $top = it.isTop,\n $lvl = it.level = 0,\n $dataLvl = it.dataLevel = 0,\n $data = 'data';\n it.rootId = it.resolve.fullPath(it.self._getId(it.root.schema));\n it.baseId = it.baseId || it.rootId;\n delete it.isTop;\n it.dataPathArr = [\"\"];\n if (it.schema.default !== undefined && it.opts.useDefaults && it.opts.strictDefaults) {\n var $defaultMsg = 'default is ignored in the schema root';\n if (it.opts.strictDefaults === 'log') it.logger.warn($defaultMsg);\n else throw new Error($defaultMsg);\n }\n out += ' var vErrors = null; ';\n out += ' var errors = 0; ';\n out += ' if (rootData === undefined) rootData = data; ';\n } else {\n var $lvl = it.level,\n $dataLvl = it.dataLevel,\n $data = 'data' + ($dataLvl || '');\n if ($id) it.baseId = it.resolve.url(it.baseId, $id);\n if ($async && !it.async) throw new Error('async schema in sync schema');\n out += ' var errs_' + ($lvl) + ' = errors;';\n }\n var $valid = 'valid' + $lvl,\n $breakOnError = !it.opts.allErrors,\n $closingBraces1 = '',\n $closingBraces2 = '';\n var $errorKeyword;\n var $typeSchema = it.schema.type,\n $typeIsArray = Array.isArray($typeSchema);\n if ($typeSchema && it.opts.nullable && it.schema.nullable === true) {\n if ($typeIsArray) {\n if ($typeSchema.indexOf('null') == -1) $typeSchema = $typeSchema.concat('null');\n } else if ($typeSchema != 'null') {\n $typeSchema = [$typeSchema, 'null'];\n $typeIsArray = true;\n }\n }\n if ($typeIsArray && $typeSchema.length == 1) {\n $typeSchema = $typeSchema[0];\n $typeIsArray = false;\n }\n if (it.schema.$ref && $refKeywords) {\n if (it.opts.extendRefs == 'fail') {\n throw new Error('$ref: validation keywords used in schema at path \"' + it.errSchemaPath + '\" (see option extendRefs)');\n } else if (it.opts.extendRefs !== true) {\n $refKeywords = false;\n it.logger.warn('$ref: keywords ignored in schema at path \"' + it.errSchemaPath + '\"');\n }\n }\n if (it.schema.$comment && it.opts.$comment) {\n out += ' ' + (it.RULES.all.$comment.code(it, '$comment'));\n }\n if ($typeSchema) {\n if (it.opts.coerceTypes) {\n var $coerceToTypes = it.util.coerceToTypes(it.opts.coerceTypes, $typeSchema);\n }\n var $rulesGroup = it.RULES.types[$typeSchema];\n if ($coerceToTypes || $typeIsArray || $rulesGroup === true || ($rulesGroup && !$shouldUseGroup($rulesGroup))) {\n var $schemaPath = it.schemaPath + '.type',\n $errSchemaPath = it.errSchemaPath + '/type';\n var $schemaPath = it.schemaPath + '.type',\n $errSchemaPath = it.errSchemaPath + '/type',\n $method = $typeIsArray ? 'checkDataTypes' : 'checkDataType';\n out += ' if (' + (it.util[$method]($typeSchema, $data, it.opts.strictNumbers, true)) + ') { ';\n if ($coerceToTypes) {\n var $dataType = 'dataType' + $lvl,\n $coerced = 'coerced' + $lvl;\n out += ' var ' + ($dataType) + ' = typeof ' + ($data) + '; var ' + ($coerced) + ' = undefined; ';\n if (it.opts.coerceTypes == 'array') {\n out += ' if (' + ($dataType) + ' == \\'object\\' && Array.isArray(' + ($data) + ') && ' + ($data) + '.length == 1) { ' + ($data) + ' = ' + ($data) + '[0]; ' + ($dataType) + ' = typeof ' + ($data) + '; if (' + (it.util.checkDataType(it.schema.type, $data, it.opts.strictNumbers)) + ') ' + ($coerced) + ' = ' + ($data) + '; } ';\n }\n out += ' if (' + ($coerced) + ' !== undefined) ; ';\n var arr1 = $coerceToTypes;\n if (arr1) {\n var $type, $i = -1,\n l1 = arr1.length - 1;\n while ($i < l1) {\n $type = arr1[$i += 1];\n if ($type == 'string') {\n out += ' else if (' + ($dataType) + ' == \\'number\\' || ' + ($dataType) + ' == \\'boolean\\') ' + ($coerced) + ' = \\'\\' + ' + ($data) + '; else if (' + ($data) + ' === null) ' + ($coerced) + ' = \\'\\'; ';\n } else if ($type == 'number' || $type == 'integer') {\n out += ' else if (' + ($dataType) + ' == \\'boolean\\' || ' + ($data) + ' === null || (' + ($dataType) + ' == \\'string\\' && ' + ($data) + ' && ' + ($data) + ' == +' + ($data) + ' ';\n if ($type == 'integer') {\n out += ' && !(' + ($data) + ' % 1)';\n }\n out += ')) ' + ($coerced) + ' = +' + ($data) + '; ';\n } else if ($type == 'boolean') {\n out += ' else if (' + ($data) + ' === \\'false\\' || ' + ($data) + ' === 0 || ' + ($data) + ' === null) ' + ($coerced) + ' = false; else if (' + ($data) + ' === \\'true\\' || ' + ($data) + ' === 1) ' + ($coerced) + ' = true; ';\n } else if ($type == 'null') {\n out += ' else if (' + ($data) + ' === \\'\\' || ' + ($data) + ' === 0 || ' + ($data) + ' === false) ' + ($coerced) + ' = null; ';\n } else if (it.opts.coerceTypes == 'array' && $type == 'array') {\n out += ' else if (' + ($dataType) + ' == \\'string\\' || ' + ($dataType) + ' == \\'number\\' || ' + ($dataType) + ' == \\'boolean\\' || ' + ($data) + ' == null) ' + ($coerced) + ' = [' + ($data) + ']; ';\n }\n }\n }\n out += ' else { ';\n var $$outStack = $$outStack || [];\n $$outStack.push(out);\n out = ''; /* istanbul ignore else */\n if (it.createErrors !== false) {\n out += ' { keyword: \\'' + ($errorKeyword || 'type') + '\\' , dataPath: (dataPath || \\'\\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { type: \\'';\n if ($typeIsArray) {\n out += '' + ($typeSchema.join(\",\"));\n } else {\n out += '' + ($typeSchema);\n }\n out += '\\' } ';\n if (it.opts.messages !== false) {\n out += ' , message: \\'should be ';\n if ($typeIsArray) {\n out += '' + ($typeSchema.join(\",\"));\n } else {\n out += '' + ($typeSchema);\n }\n out += '\\' ';\n }\n if (it.opts.verbose) {\n out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';\n }\n out += ' } ';\n } else {\n out += ' {} ';\n }\n var __err = out;\n out = $$outStack.pop();\n if (!it.compositeRule && $breakOnError) {\n /* istanbul ignore if */\n if (it.async) {\n out += ' throw new ValidationError([' + (__err) + ']); ';\n } else {\n out += ' validate.errors = [' + (__err) + ']; return false; ';\n }\n } else {\n out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';\n }\n out += ' } if (' + ($coerced) + ' !== undefined) { ';\n var $parentData = $dataLvl ? 'data' + (($dataLvl - 1) || '') : 'parentData',\n $parentDataProperty = $dataLvl ? it.dataPathArr[$dataLvl] : 'parentDataProperty';\n out += ' ' + ($data) + ' = ' + ($coerced) + '; ';\n if (!$dataLvl) {\n out += 'if (' + ($parentData) + ' !== undefined)';\n }\n out += ' ' + ($parentData) + '[' + ($parentDataProperty) + '] = ' + ($coerced) + '; } ';\n } else {\n var $$outStack = $$outStack || [];\n $$outStack.push(out);\n out = ''; /* istanbul ignore else */\n if (it.createErrors !== false) {\n out += ' { keyword: \\'' + ($errorKeyword || 'type') + '\\' , dataPath: (dataPath || \\'\\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { type: \\'';\n if ($typeIsArray) {\n out += '' + ($typeSchema.join(\",\"));\n } else {\n out += '' + ($typeSchema);\n }\n out += '\\' } ';\n if (it.opts.messages !== false) {\n out += ' , message: \\'should be ';\n if ($typeIsArray) {\n out += '' + ($typeSchema.join(\",\"));\n } else {\n out += '' + ($typeSchema);\n }\n out += '\\' ';\n }\n if (it.opts.verbose) {\n out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';\n }\n out += ' } ';\n } else {\n out += ' {} ';\n }\n var __err = out;\n out = $$outStack.pop();\n if (!it.compositeRule && $breakOnError) {\n /* istanbul ignore if */\n if (it.async) {\n out += ' throw new ValidationError([' + (__err) + ']); ';\n } else {\n out += ' validate.errors = [' + (__err) + ']; return false; ';\n }\n } else {\n out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';\n }\n }\n out += ' } ';\n }\n }\n if (it.schema.$ref && !$refKeywords) {\n out += ' ' + (it.RULES.all.$ref.code(it, '$ref')) + ' ';\n if ($breakOnError) {\n out += ' } if (errors === ';\n if ($top) {\n out += '0';\n } else {\n out += 'errs_' + ($lvl);\n }\n out += ') { ';\n $closingBraces2 += '}';\n }\n } else {\n var arr2 = it.RULES;\n if (arr2) {\n var $rulesGroup, i2 = -1,\n l2 = arr2.length - 1;\n while (i2 < l2) {\n $rulesGroup = arr2[i2 += 1];\n if ($shouldUseGroup($rulesGroup)) {\n if ($rulesGroup.type) {\n out += ' if (' + (it.util.checkDataType($rulesGroup.type, $data, it.opts.strictNumbers)) + ') { ';\n }\n if (it.opts.useDefaults) {\n if ($rulesGroup.type == 'object' && it.schema.properties) {\n var $schema = it.schema.properties,\n $schemaKeys = Object.keys($schema);\n var arr3 = $schemaKeys;\n if (arr3) {\n var $propertyKey, i3 = -1,\n l3 = arr3.length - 1;\n while (i3 < l3) {\n $propertyKey = arr3[i3 += 1];\n var $sch = $schema[$propertyKey];\n if ($sch.default !== undefined) {\n var $passData = $data + it.util.getProperty($propertyKey);\n if (it.compositeRule) {\n if (it.opts.strictDefaults) {\n var $defaultMsg = 'default is ignored for: ' + $passData;\n if (it.opts.strictDefaults === 'log') it.logger.warn($defaultMsg);\n else throw new Error($defaultMsg);\n }\n } else {\n out += ' if (' + ($passData) + ' === undefined ';\n if (it.opts.useDefaults == 'empty') {\n out += ' || ' + ($passData) + ' === null || ' + ($passData) + ' === \\'\\' ';\n }\n out += ' ) ' + ($passData) + ' = ';\n if (it.opts.useDefaults == 'shared') {\n out += ' ' + (it.useDefault($sch.default)) + ' ';\n } else {\n out += ' ' + (JSON.stringify($sch.default)) + ' ';\n }\n out += '; ';\n }\n }\n }\n }\n } else if ($rulesGroup.type == 'array' && Array.isArray(it.schema.items)) {\n var arr4 = it.schema.items;\n if (arr4) {\n var $sch, $i = -1,\n l4 = arr4.length - 1;\n while ($i < l4) {\n $sch = arr4[$i += 1];\n if ($sch.default !== undefined) {\n var $passData = $data + '[' + $i + ']';\n if (it.compositeRule) {\n if (it.opts.strictDefaults) {\n var $defaultMsg = 'default is ignored for: ' + $passData;\n if (it.opts.strictDefaults === 'log') it.logger.warn($defaultMsg);\n else throw new Error($defaultMsg);\n }\n } else {\n out += ' if (' + ($passData) + ' === undefined ';\n if (it.opts.useDefaults == 'empty') {\n out += ' || ' + ($passData) + ' === null || ' + ($passData) + ' === \\'\\' ';\n }\n out += ' ) ' + ($passData) + ' = ';\n if (it.opts.useDefaults == 'shared') {\n out += ' ' + (it.useDefault($sch.default)) + ' ';\n } else {\n out += ' ' + (JSON.stringify($sch.default)) + ' ';\n }\n out += '; ';\n }\n }\n }\n }\n }\n }\n var arr5 = $rulesGroup.rules;\n if (arr5) {\n var $rule, i5 = -1,\n l5 = arr5.length - 1;\n while (i5 < l5) {\n $rule = arr5[i5 += 1];\n if ($shouldUseRule($rule)) {\n var $code = $rule.code(it, $rule.keyword, $rulesGroup.type);\n if ($code) {\n out += ' ' + ($code) + ' ';\n if ($breakOnError) {\n $closingBraces1 += '}';\n }\n }\n }\n }\n }\n if ($breakOnError) {\n out += ' ' + ($closingBraces1) + ' ';\n $closingBraces1 = '';\n }\n if ($rulesGroup.type) {\n out += ' } ';\n if ($typeSchema && $typeSchema === $rulesGroup.type && !$coerceToTypes) {\n out += ' else { ';\n var $schemaPath = it.schemaPath + '.type',\n $errSchemaPath = it.errSchemaPath + '/type';\n var $$outStack = $$outStack || [];\n $$outStack.push(out);\n out = ''; /* istanbul ignore else */\n if (it.createErrors !== false) {\n out += ' { keyword: \\'' + ($errorKeyword || 'type') + '\\' , dataPath: (dataPath || \\'\\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { type: \\'';\n if ($typeIsArray) {\n out += '' + ($typeSchema.join(\",\"));\n } else {\n out += '' + ($typeSchema);\n }\n out += '\\' } ';\n if (it.opts.messages !== false) {\n out += ' , message: \\'should be ';\n if ($typeIsArray) {\n out += '' + ($typeSchema.join(\",\"));\n } else {\n out += '' + ($typeSchema);\n }\n out += '\\' ';\n }\n if (it.opts.verbose) {\n out += ' , schema: validate.schema' + ($schemaPath) + ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';\n }\n out += ' } ';\n } else {\n out += ' {} ';\n }\n var __err = out;\n out = $$outStack.pop();\n if (!it.compositeRule && $breakOnError) {\n /* istanbul ignore if */\n if (it.async) {\n out += ' throw new ValidationError([' + (__err) + ']); ';\n } else {\n out += ' validate.errors = [' + (__err) + ']; return false; ';\n }\n } else {\n out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';\n }\n out += ' } ';\n }\n }\n if ($breakOnError) {\n out += ' if (errors === ';\n if ($top) {\n out += '0';\n } else {\n out += 'errs_' + ($lvl);\n }\n out += ') { ';\n $closingBraces2 += '}';\n }\n }\n }\n }\n }\n if ($breakOnError) {\n out += ' ' + ($closingBraces2) + ' ';\n }\n if ($top) {\n if ($async) {\n out += ' if (errors === 0) return data; ';\n out += ' else throw new ValidationError(vErrors); ';\n } else {\n out += ' validate.errors = vErrors; ';\n out += ' return errors === 0; ';\n }\n out += ' }; return validate;';\n } else {\n out += ' var ' + ($valid) + ' = errors === errs_' + ($lvl) + ';';\n }\n\n function $shouldUseGroup($rulesGroup) {\n var rules = $rulesGroup.rules;\n for (var i = 0; i < rules.length; i++)\n if ($shouldUseRule(rules[i])) return true;\n }\n\n function $shouldUseRule($rule) {\n return it.schema[$rule.keyword] !== undefined || ($rule.implements && $ruleImplementsSomeKeyword($rule));\n }\n\n function $ruleImplementsSomeKeyword($rule) {\n var impl = $rule.implements;\n for (var i = 0; i < impl.length; i++)\n if (it.schema[impl[i]] !== undefined) return true;\n }\n return out;\n}\n","'use strict';\n\nvar IDENTIFIER = /^[a-z_$][a-z0-9_$-]*$/i;\nvar customRuleCode = require('./dotjs/custom');\nvar definitionSchema = require('./definition_schema');\n\nmodule.exports = {\n add: addKeyword,\n get: getKeyword,\n remove: removeKeyword,\n validate: validateKeyword\n};\n\n\n/**\n * Define custom keyword\n * @this Ajv\n * @param {String} keyword custom keyword, should be unique (including different from all standard, custom and macro keywords).\n * @param {Object} definition keyword definition object with properties `type` (type(s) which the keyword applies to), `validate` or `compile`.\n * @return {Ajv} this for method chaining\n */\nfunction addKeyword(keyword, definition) {\n /* jshint validthis: true */\n /* eslint no-shadow: 0 */\n var RULES = this.RULES;\n if (RULES.keywords[keyword])\n throw new Error('Keyword ' + keyword + ' is already defined');\n\n if (!IDENTIFIER.test(keyword))\n throw new Error('Keyword ' + keyword + ' is not a valid identifier');\n\n if (definition) {\n this.validateKeyword(definition, true);\n\n var dataType = definition.type;\n if (Array.isArray(dataType)) {\n for (var i=0; i All rights reserved.\n\n\nmodule.exports = {\n\n newInvalidAsn1Error: function (msg) {\n var e = new Error();\n e.name = 'InvalidAsn1Error';\n e.message = msg || '';\n return e;\n }\n\n};\n","// Copyright 2011 Mark Cavage All rights reserved.\n\nvar errors = require('./errors');\nvar types = require('./types');\n\nvar Reader = require('./reader');\nvar Writer = require('./writer');\n\n\n// --- Exports\n\nmodule.exports = {\n\n Reader: Reader,\n\n Writer: Writer\n\n};\n\nfor (var t in types) {\n if (types.hasOwnProperty(t))\n module.exports[t] = types[t];\n}\nfor (var e in errors) {\n if (errors.hasOwnProperty(e))\n module.exports[e] = errors[e];\n}\n","// Copyright 2011 Mark Cavage All rights reserved.\n\nvar assert = require('assert');\nvar Buffer = require('safer-buffer').Buffer;\n\nvar ASN1 = require('./types');\nvar errors = require('./errors');\n\n\n// --- Globals\n\nvar newInvalidAsn1Error = errors.newInvalidAsn1Error;\n\n\n\n// --- API\n\nfunction Reader(data) {\n if (!data || !Buffer.isBuffer(data))\n throw new TypeError('data must be a node Buffer');\n\n this._buf = data;\n this._size = data.length;\n\n // These hold the \"current\" state\n this._len = 0;\n this._offset = 0;\n}\n\nObject.defineProperty(Reader.prototype, 'length', {\n enumerable: true,\n get: function () { return (this._len); }\n});\n\nObject.defineProperty(Reader.prototype, 'offset', {\n enumerable: true,\n get: function () { return (this._offset); }\n});\n\nObject.defineProperty(Reader.prototype, 'remain', {\n get: function () { return (this._size - this._offset); }\n});\n\nObject.defineProperty(Reader.prototype, 'buffer', {\n get: function () { return (this._buf.slice(this._offset)); }\n});\n\n\n/**\n * Reads a single byte and advances offset; you can pass in `true` to make this\n * a \"peek\" operation (i.e., get the byte, but don't advance the offset).\n *\n * @param {Boolean} peek true means don't move offset.\n * @return {Number} the next byte, null if not enough data.\n */\nReader.prototype.readByte = function (peek) {\n if (this._size - this._offset < 1)\n return null;\n\n var b = this._buf[this._offset] & 0xff;\n\n if (!peek)\n this._offset += 1;\n\n return b;\n};\n\n\nReader.prototype.peek = function () {\n return this.readByte(true);\n};\n\n\n/**\n * Reads a (potentially) variable length off the BER buffer. This call is\n * not really meant to be called directly, as callers have to manipulate\n * the internal buffer afterwards.\n *\n * As a result of this call, you can call `Reader.length`, until the\n * next thing called that does a readLength.\n *\n * @return {Number} the amount of offset to advance the buffer.\n * @throws {InvalidAsn1Error} on bad ASN.1\n */\nReader.prototype.readLength = function (offset) {\n if (offset === undefined)\n offset = this._offset;\n\n if (offset >= this._size)\n return null;\n\n var lenB = this._buf[offset++] & 0xff;\n if (lenB === null)\n return null;\n\n if ((lenB & 0x80) === 0x80) {\n lenB &= 0x7f;\n\n if (lenB === 0)\n throw newInvalidAsn1Error('Indefinite length not supported');\n\n if (lenB > 4)\n throw newInvalidAsn1Error('encoding too long');\n\n if (this._size - offset < lenB)\n return null;\n\n this._len = 0;\n for (var i = 0; i < lenB; i++)\n this._len = (this._len << 8) + (this._buf[offset++] & 0xff);\n\n } else {\n // Wasn't a variable length\n this._len = lenB;\n }\n\n return offset;\n};\n\n\n/**\n * Parses the next sequence in this BER buffer.\n *\n * To get the length of the sequence, call `Reader.length`.\n *\n * @return {Number} the sequence's tag.\n */\nReader.prototype.readSequence = function (tag) {\n var seq = this.peek();\n if (seq === null)\n return null;\n if (tag !== undefined && tag !== seq)\n throw newInvalidAsn1Error('Expected 0x' + tag.toString(16) +\n ': got 0x' + seq.toString(16));\n\n var o = this.readLength(this._offset + 1); // stored in `length`\n if (o === null)\n return null;\n\n this._offset = o;\n return seq;\n};\n\n\nReader.prototype.readInt = function () {\n return this._readTag(ASN1.Integer);\n};\n\n\nReader.prototype.readBoolean = function () {\n return (this._readTag(ASN1.Boolean) === 0 ? false : true);\n};\n\n\nReader.prototype.readEnumeration = function () {\n return this._readTag(ASN1.Enumeration);\n};\n\n\nReader.prototype.readString = function (tag, retbuf) {\n if (!tag)\n tag = ASN1.OctetString;\n\n var b = this.peek();\n if (b === null)\n return null;\n\n if (b !== tag)\n throw newInvalidAsn1Error('Expected 0x' + tag.toString(16) +\n ': got 0x' + b.toString(16));\n\n var o = this.readLength(this._offset + 1); // stored in `length`\n\n if (o === null)\n return null;\n\n if (this.length > this._size - o)\n return null;\n\n this._offset = o;\n\n if (this.length === 0)\n return retbuf ? Buffer.alloc(0) : '';\n\n var str = this._buf.slice(this._offset, this._offset + this.length);\n this._offset += this.length;\n\n return retbuf ? str : str.toString('utf8');\n};\n\nReader.prototype.readOID = function (tag) {\n if (!tag)\n tag = ASN1.OID;\n\n var b = this.readString(tag, true);\n if (b === null)\n return null;\n\n var values = [];\n var value = 0;\n\n for (var i = 0; i < b.length; i++) {\n var byte = b[i] & 0xff;\n\n value <<= 7;\n value += byte & 0x7f;\n if ((byte & 0x80) === 0) {\n values.push(value);\n value = 0;\n }\n }\n\n value = values.shift();\n values.unshift(value % 40);\n values.unshift((value / 40) >> 0);\n\n return values.join('.');\n};\n\n\nReader.prototype._readTag = function (tag) {\n assert.ok(tag !== undefined);\n\n var b = this.peek();\n\n if (b === null)\n return null;\n\n if (b !== tag)\n throw newInvalidAsn1Error('Expected 0x' + tag.toString(16) +\n ': got 0x' + b.toString(16));\n\n var o = this.readLength(this._offset + 1); // stored in `length`\n if (o === null)\n return null;\n\n if (this.length > 4)\n throw newInvalidAsn1Error('Integer too long: ' + this.length);\n\n if (this.length > this._size - o)\n return null;\n this._offset = o;\n\n var fb = this._buf[this._offset];\n var value = 0;\n\n for (var i = 0; i < this.length; i++) {\n value <<= 8;\n value |= (this._buf[this._offset++] & 0xff);\n }\n\n if ((fb & 0x80) === 0x80 && i !== 4)\n value -= (1 << (i * 8));\n\n return value >> 0;\n};\n\n\n\n// --- Exported API\n\nmodule.exports = Reader;\n","// Copyright 2011 Mark Cavage All rights reserved.\n\n\nmodule.exports = {\n EOC: 0,\n Boolean: 1,\n Integer: 2,\n BitString: 3,\n OctetString: 4,\n Null: 5,\n OID: 6,\n ObjectDescriptor: 7,\n External: 8,\n Real: 9, // float\n Enumeration: 10,\n PDV: 11,\n Utf8String: 12,\n RelativeOID: 13,\n Sequence: 16,\n Set: 17,\n NumericString: 18,\n PrintableString: 19,\n T61String: 20,\n VideotexString: 21,\n IA5String: 22,\n UTCTime: 23,\n GeneralizedTime: 24,\n GraphicString: 25,\n VisibleString: 26,\n GeneralString: 28,\n UniversalString: 29,\n CharacterString: 30,\n BMPString: 31,\n Constructor: 32,\n Context: 128\n};\n","// Copyright 2011 Mark Cavage All rights reserved.\n\nvar assert = require('assert');\nvar Buffer = require('safer-buffer').Buffer;\nvar ASN1 = require('./types');\nvar errors = require('./errors');\n\n\n// --- Globals\n\nvar newInvalidAsn1Error = errors.newInvalidAsn1Error;\n\nvar DEFAULT_OPTS = {\n size: 1024,\n growthFactor: 8\n};\n\n\n// --- Helpers\n\nfunction merge(from, to) {\n assert.ok(from);\n assert.equal(typeof (from), 'object');\n assert.ok(to);\n assert.equal(typeof (to), 'object');\n\n var keys = Object.getOwnPropertyNames(from);\n keys.forEach(function (key) {\n if (to[key])\n return;\n\n var value = Object.getOwnPropertyDescriptor(from, key);\n Object.defineProperty(to, key, value);\n });\n\n return to;\n}\n\n\n\n// --- API\n\nfunction Writer(options) {\n options = merge(DEFAULT_OPTS, options || {});\n\n this._buf = Buffer.alloc(options.size || 1024);\n this._size = this._buf.length;\n this._offset = 0;\n this._options = options;\n\n // A list of offsets in the buffer where we need to insert\n // sequence tag/len pairs.\n this._seq = [];\n}\n\nObject.defineProperty(Writer.prototype, 'buffer', {\n get: function () {\n if (this._seq.length)\n throw newInvalidAsn1Error(this._seq.length + ' unended sequence(s)');\n\n return (this._buf.slice(0, this._offset));\n }\n});\n\nWriter.prototype.writeByte = function (b) {\n if (typeof (b) !== 'number')\n throw new TypeError('argument must be a Number');\n\n this._ensure(1);\n this._buf[this._offset++] = b;\n};\n\n\nWriter.prototype.writeInt = function (i, tag) {\n if (typeof (i) !== 'number')\n throw new TypeError('argument must be a Number');\n if (typeof (tag) !== 'number')\n tag = ASN1.Integer;\n\n var sz = 4;\n\n while ((((i & 0xff800000) === 0) || ((i & 0xff800000) === 0xff800000 >> 0)) &&\n (sz > 1)) {\n sz--;\n i <<= 8;\n }\n\n if (sz > 4)\n throw newInvalidAsn1Error('BER ints cannot be > 0xffffffff');\n\n this._ensure(2 + sz);\n this._buf[this._offset++] = tag;\n this._buf[this._offset++] = sz;\n\n while (sz-- > 0) {\n this._buf[this._offset++] = ((i & 0xff000000) >>> 24);\n i <<= 8;\n }\n\n};\n\n\nWriter.prototype.writeNull = function () {\n this.writeByte(ASN1.Null);\n this.writeByte(0x00);\n};\n\n\nWriter.prototype.writeEnumeration = function (i, tag) {\n if (typeof (i) !== 'number')\n throw new TypeError('argument must be a Number');\n if (typeof (tag) !== 'number')\n tag = ASN1.Enumeration;\n\n return this.writeInt(i, tag);\n};\n\n\nWriter.prototype.writeBoolean = function (b, tag) {\n if (typeof (b) !== 'boolean')\n throw new TypeError('argument must be a Boolean');\n if (typeof (tag) !== 'number')\n tag = ASN1.Boolean;\n\n this._ensure(3);\n this._buf[this._offset++] = tag;\n this._buf[this._offset++] = 0x01;\n this._buf[this._offset++] = b ? 0xff : 0x00;\n};\n\n\nWriter.prototype.writeString = function (s, tag) {\n if (typeof (s) !== 'string')\n throw new TypeError('argument must be a string (was: ' + typeof (s) + ')');\n if (typeof (tag) !== 'number')\n tag = ASN1.OctetString;\n\n var len = Buffer.byteLength(s);\n this.writeByte(tag);\n this.writeLength(len);\n if (len) {\n this._ensure(len);\n this._buf.write(s, this._offset);\n this._offset += len;\n }\n};\n\n\nWriter.prototype.writeBuffer = function (buf, tag) {\n if (typeof (tag) !== 'number')\n throw new TypeError('tag must be a number');\n if (!Buffer.isBuffer(buf))\n throw new TypeError('argument must be a buffer');\n\n this.writeByte(tag);\n this.writeLength(buf.length);\n this._ensure(buf.length);\n buf.copy(this._buf, this._offset, 0, buf.length);\n this._offset += buf.length;\n};\n\n\nWriter.prototype.writeStringArray = function (strings) {\n if ((!strings instanceof Array))\n throw new TypeError('argument must be an Array[String]');\n\n var self = this;\n strings.forEach(function (s) {\n self.writeString(s);\n });\n};\n\n// This is really to solve DER cases, but whatever for now\nWriter.prototype.writeOID = function (s, tag) {\n if (typeof (s) !== 'string')\n throw new TypeError('argument must be a string');\n if (typeof (tag) !== 'number')\n tag = ASN1.OID;\n\n if (!/^([0-9]+\\.){3,}[0-9]+$/.test(s))\n throw new Error('argument is not a valid OID string');\n\n function encodeOctet(bytes, octet) {\n if (octet < 128) {\n bytes.push(octet);\n } else if (octet < 16384) {\n bytes.push((octet >>> 7) | 0x80);\n bytes.push(octet & 0x7F);\n } else if (octet < 2097152) {\n bytes.push((octet >>> 14) | 0x80);\n bytes.push(((octet >>> 7) | 0x80) & 0xFF);\n bytes.push(octet & 0x7F);\n } else if (octet < 268435456) {\n bytes.push((octet >>> 21) | 0x80);\n bytes.push(((octet >>> 14) | 0x80) & 0xFF);\n bytes.push(((octet >>> 7) | 0x80) & 0xFF);\n bytes.push(octet & 0x7F);\n } else {\n bytes.push(((octet >>> 28) | 0x80) & 0xFF);\n bytes.push(((octet >>> 21) | 0x80) & 0xFF);\n bytes.push(((octet >>> 14) | 0x80) & 0xFF);\n bytes.push(((octet >>> 7) | 0x80) & 0xFF);\n bytes.push(octet & 0x7F);\n }\n }\n\n var tmp = s.split('.');\n var bytes = [];\n bytes.push(parseInt(tmp[0], 10) * 40 + parseInt(tmp[1], 10));\n tmp.slice(2).forEach(function (b) {\n encodeOctet(bytes, parseInt(b, 10));\n });\n\n var self = this;\n this._ensure(2 + bytes.length);\n this.writeByte(tag);\n this.writeLength(bytes.length);\n bytes.forEach(function (b) {\n self.writeByte(b);\n });\n};\n\n\nWriter.prototype.writeLength = function (len) {\n if (typeof (len) !== 'number')\n throw new TypeError('argument must be a Number');\n\n this._ensure(4);\n\n if (len <= 0x7f) {\n this._buf[this._offset++] = len;\n } else if (len <= 0xff) {\n this._buf[this._offset++] = 0x81;\n this._buf[this._offset++] = len;\n } else if (len <= 0xffff) {\n this._buf[this._offset++] = 0x82;\n this._buf[this._offset++] = len >> 8;\n this._buf[this._offset++] = len;\n } else if (len <= 0xffffff) {\n this._buf[this._offset++] = 0x83;\n this._buf[this._offset++] = len >> 16;\n this._buf[this._offset++] = len >> 8;\n this._buf[this._offset++] = len;\n } else {\n throw newInvalidAsn1Error('Length too long (> 4 bytes)');\n }\n};\n\nWriter.prototype.startSequence = function (tag) {\n if (typeof (tag) !== 'number')\n tag = ASN1.Sequence | ASN1.Constructor;\n\n this.writeByte(tag);\n this._seq.push(this._offset);\n this._ensure(3);\n this._offset += 3;\n};\n\n\nWriter.prototype.endSequence = function () {\n var seq = this._seq.pop();\n var start = seq + 3;\n var len = this._offset - start;\n\n if (len <= 0x7f) {\n this._shift(start, len, -2);\n this._buf[seq] = len;\n } else if (len <= 0xff) {\n this._shift(start, len, -1);\n this._buf[seq] = 0x81;\n this._buf[seq + 1] = len;\n } else if (len <= 0xffff) {\n this._buf[seq] = 0x82;\n this._buf[seq + 1] = len >> 8;\n this._buf[seq + 2] = len;\n } else if (len <= 0xffffff) {\n this._shift(start, len, 1);\n this._buf[seq] = 0x83;\n this._buf[seq + 1] = len >> 16;\n this._buf[seq + 2] = len >> 8;\n this._buf[seq + 3] = len;\n } else {\n throw newInvalidAsn1Error('Sequence too long');\n }\n};\n\n\nWriter.prototype._shift = function (start, len, shift) {\n assert.ok(start !== undefined);\n assert.ok(len !== undefined);\n assert.ok(shift);\n\n this._buf.copy(this._buf, start + shift, start, start + len);\n this._offset += shift;\n};\n\nWriter.prototype._ensure = function (len) {\n assert.ok(len);\n\n if (this._size - this._offset < len) {\n var sz = this._size * this._options.growthFactor;\n if (sz - this._offset < len)\n sz += len;\n\n var buf = Buffer.alloc(sz);\n\n this._buf.copy(buf, 0, 0, this._offset);\n this._buf = buf;\n this._size = sz;\n }\n};\n\n\n\n// --- Exported API\n\nmodule.exports = Writer;\n","// Copyright 2011 Mark Cavage All rights reserved.\n\n// If you have no idea what ASN.1 or BER is, see this:\n// ftp://ftp.rsa.com/pub/pkcs/ascii/layman.asc\n\nvar Ber = require('./ber/index');\n\n\n\n// --- Exported API\n\nmodule.exports = {\n\n Ber: Ber,\n\n BerReader: Ber.Reader,\n\n BerWriter: Ber.Writer\n\n};\n","// Copyright (c) 2012, Mark Cavage. All rights reserved.\n// Copyright 2015 Joyent, Inc.\n\nvar assert = require('assert');\nvar Stream = require('stream').Stream;\nvar util = require('util');\n\n\n///--- Globals\n\n/* JSSTYLED */\nvar UUID_REGEXP = /^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/;\n\n\n///--- Internal\n\nfunction _capitalize(str) {\n return (str.charAt(0).toUpperCase() + str.slice(1));\n}\n\nfunction _toss(name, expected, oper, arg, actual) {\n throw new assert.AssertionError({\n message: util.format('%s (%s) is required', name, expected),\n actual: (actual === undefined) ? typeof (arg) : actual(arg),\n expected: expected,\n operator: oper || '===',\n stackStartFunction: _toss.caller\n });\n}\n\nfunction _getClass(arg) {\n return (Object.prototype.toString.call(arg).slice(8, -1));\n}\n\nfunction noop() {\n // Why even bother with asserts?\n}\n\n\n///--- Exports\n\nvar types = {\n bool: {\n check: function (arg) { return typeof (arg) === 'boolean'; }\n },\n func: {\n check: function (arg) { return typeof (arg) === 'function'; }\n },\n string: {\n check: function (arg) { return typeof (arg) === 'string'; }\n },\n object: {\n check: function (arg) {\n return typeof (arg) === 'object' && arg !== null;\n }\n },\n number: {\n check: function (arg) {\n return typeof (arg) === 'number' && !isNaN(arg);\n }\n },\n finite: {\n check: function (arg) {\n return typeof (arg) === 'number' && !isNaN(arg) && isFinite(arg);\n }\n },\n buffer: {\n check: function (arg) { return Buffer.isBuffer(arg); },\n operator: 'Buffer.isBuffer'\n },\n array: {\n check: function (arg) { return Array.isArray(arg); },\n operator: 'Array.isArray'\n },\n stream: {\n check: function (arg) { return arg instanceof Stream; },\n operator: 'instanceof',\n actual: _getClass\n },\n date: {\n check: function (arg) { return arg instanceof Date; },\n operator: 'instanceof',\n actual: _getClass\n },\n regexp: {\n check: function (arg) { return arg instanceof RegExp; },\n operator: 'instanceof',\n actual: _getClass\n },\n uuid: {\n check: function (arg) {\n return typeof (arg) === 'string' && UUID_REGEXP.test(arg);\n },\n operator: 'isUUID'\n }\n};\n\nfunction _setExports(ndebug) {\n var keys = Object.keys(types);\n var out;\n\n /* re-export standard assert */\n if (process.env.NODE_NDEBUG) {\n out = noop;\n } else {\n out = function (arg, msg) {\n if (!arg) {\n _toss(msg, 'true', arg);\n }\n };\n }\n\n /* standard checks */\n keys.forEach(function (k) {\n if (ndebug) {\n out[k] = noop;\n return;\n }\n var type = types[k];\n out[k] = function (arg, msg) {\n if (!type.check(arg)) {\n _toss(msg, k, type.operator, arg, type.actual);\n }\n };\n });\n\n /* optional checks */\n keys.forEach(function (k) {\n var name = 'optional' + _capitalize(k);\n if (ndebug) {\n out[name] = noop;\n return;\n }\n var type = types[k];\n out[name] = function (arg, msg) {\n if (arg === undefined || arg === null) {\n return;\n }\n if (!type.check(arg)) {\n _toss(msg, k, type.operator, arg, type.actual);\n }\n };\n });\n\n /* arrayOf checks */\n keys.forEach(function (k) {\n var name = 'arrayOf' + _capitalize(k);\n if (ndebug) {\n out[name] = noop;\n return;\n }\n var type = types[k];\n var expected = '[' + k + ']';\n out[name] = function (arg, msg) {\n if (!Array.isArray(arg)) {\n _toss(msg, expected, type.operator, arg, type.actual);\n }\n var i;\n for (i = 0; i < arg.length; i++) {\n if (!type.check(arg[i])) {\n _toss(msg, expected, type.operator, arg, type.actual);\n }\n }\n };\n });\n\n /* optionalArrayOf checks */\n keys.forEach(function (k) {\n var name = 'optionalArrayOf' + _capitalize(k);\n if (ndebug) {\n out[name] = noop;\n return;\n }\n var type = types[k];\n var expected = '[' + k + ']';\n out[name] = function (arg, msg) {\n if (arg === undefined || arg === null) {\n return;\n }\n if (!Array.isArray(arg)) {\n _toss(msg, expected, type.operator, arg, type.actual);\n }\n var i;\n for (i = 0; i < arg.length; i++) {\n if (!type.check(arg[i])) {\n _toss(msg, expected, type.operator, arg, type.actual);\n }\n }\n };\n });\n\n /* re-export built-in assertions */\n Object.keys(assert).forEach(function (k) {\n if (k === 'AssertionError') {\n out[k] = assert[k];\n return;\n }\n if (ndebug) {\n out[k] = noop;\n return;\n }\n out[k] = assert[k];\n });\n\n /* export ourselves (for unit tests _only_) */\n out._setExports = _setExports;\n\n return out;\n}\n\nmodule.exports = _setExports(process.env.NODE_NDEBUG);\n","!function(e,t){\"object\"==typeof exports&&\"undefined\"!=typeof module?t(exports):\"function\"==typeof define&&define.amd?define([\"exports\"],t):t((e=\"undefined\"!=typeof globalThis?globalThis:e||self)[\"async-wait-until\"]={})}(this,(function(e){\"use strict\";class t extends Error{constructor(e){super(null!=e?`Timed out after waiting for ${e} ms`:\"Timed out\"),Object.setPrototypeOf(this,t.prototype)}}const o=(e,t)=>new Promise(((o,n)=>{try{e.schedule(o,t)}catch(e){n(e)}})),n={schedule:(e,t)=>{let o;const n=e=>{null!=e&&clearTimeout(e),o=void 0};return o=setTimeout((()=>{n(o),e()}),t),{cancel:()=>n(o)}}},i=Number.POSITIVE_INFINITY,r=(e,r,l)=>{var u,s;const c=null!==(u=\"number\"==typeof r?r:null==r?void 0:r.timeout)&&void 0!==u?u:5e3,d=null!==(s=\"number\"==typeof r?l:null==r?void 0:r.intervalBetweenAttempts)&&void 0!==s?s:50;let a=!1;const f=()=>new Promise(((t,i)=>{const r=()=>{a||new Promise(((t,o)=>{try{t(e())}catch(e){o(e)}})).then((e=>{e?t(e):o(n,d).then(r).catch(i)})).catch(i)};r()})),T=c!==i?()=>o(n,c).then((()=>{throw a=!0,new t(c)})):void 0;return null!=T?Promise.race([f(),T()]):f()};e.DEFAULT_INTERVAL_BETWEEN_ATTEMPTS_IN_MS=50,e.DEFAULT_TIMEOUT_IN_MS=5e3,e.TimeoutError=t,e.WAIT_FOREVER=i,e.default=r,e.waitUntil=r,Object.defineProperty(e,\"__esModule\",{value:!0})}));//# sourceMappingURL=index.js.map\n","module.exports =\n{\n parallel : require('./parallel.js'),\n serial : require('./serial.js'),\n serialOrdered : require('./serialOrdered.js')\n};\n","// API\nmodule.exports = abort;\n\n/**\n * Aborts leftover active jobs\n *\n * @param {object} state - current state object\n */\nfunction abort(state)\n{\n Object.keys(state.jobs).forEach(clean.bind(state));\n\n // reset leftover jobs\n state.jobs = {};\n}\n\n/**\n * Cleans up leftover job by invoking abort function for the provided job id\n *\n * @this state\n * @param {string|number} key - job id to abort\n */\nfunction clean(key)\n{\n if (typeof this.jobs[key] == 'function')\n {\n this.jobs[key]();\n }\n}\n","var defer = require('./defer.js');\n\n// API\nmodule.exports = async;\n\n/**\n * Runs provided callback asynchronously\n * even if callback itself is not\n *\n * @param {function} callback - callback to invoke\n * @returns {function} - augmented callback\n */\nfunction async(callback)\n{\n var isAsync = false;\n\n // check if async happened\n defer(function() { isAsync = true; });\n\n return function async_callback(err, result)\n {\n if (isAsync)\n {\n callback(err, result);\n }\n else\n {\n defer(function nextTick_callback()\n {\n callback(err, result);\n });\n }\n };\n}\n","module.exports = defer;\n\n/**\n * Runs provided function on next iteration of the event loop\n *\n * @param {function} fn - function to run\n */\nfunction defer(fn)\n{\n var nextTick = typeof setImmediate == 'function'\n ? setImmediate\n : (\n typeof process == 'object' && typeof process.nextTick == 'function'\n ? process.nextTick\n : null\n );\n\n if (nextTick)\n {\n nextTick(fn);\n }\n else\n {\n setTimeout(fn, 0);\n }\n}\n","var async = require('./async.js')\n , abort = require('./abort.js')\n ;\n\n// API\nmodule.exports = iterate;\n\n/**\n * Iterates over each job object\n *\n * @param {array|object} list - array or object (named list) to iterate over\n * @param {function} iterator - iterator to run\n * @param {object} state - current job status\n * @param {function} callback - invoked when all elements processed\n */\nfunction iterate(list, iterator, state, callback)\n{\n // store current index\n var key = state['keyedList'] ? state['keyedList'][state.index] : state.index;\n\n state.jobs[key] = runJob(iterator, key, list[key], function(error, output)\n {\n // don't repeat yourself\n // skip secondary callbacks\n if (!(key in state.jobs))\n {\n return;\n }\n\n // clean up jobs\n delete state.jobs[key];\n\n if (error)\n {\n // don't process rest of the results\n // stop still active jobs\n // and reset the list\n abort(state);\n }\n else\n {\n state.results[key] = output;\n }\n\n // return salvaged results\n callback(error, state.results);\n });\n}\n\n/**\n * Runs iterator over provided job element\n *\n * @param {function} iterator - iterator to invoke\n * @param {string|number} key - key/index of the element in the list of jobs\n * @param {mixed} item - job description\n * @param {function} callback - invoked after iterator is done with the job\n * @returns {function|mixed} - job abort function or something else\n */\nfunction runJob(iterator, key, item, callback)\n{\n var aborter;\n\n // allow shortcut if iterator expects only two arguments\n if (iterator.length == 2)\n {\n aborter = iterator(item, async(callback));\n }\n // otherwise go with full three arguments\n else\n {\n aborter = iterator(item, key, async(callback));\n }\n\n return aborter;\n}\n","// API\nmodule.exports = state;\n\n/**\n * Creates initial state object\n * for iteration over list\n *\n * @param {array|object} list - list to iterate over\n * @param {function|null} sortMethod - function to use for keys sort,\n * or `null` to keep them as is\n * @returns {object} - initial state object\n */\nfunction state(list, sortMethod)\n{\n var isNamedList = !Array.isArray(list)\n , initState =\n {\n index : 0,\n keyedList: isNamedList || sortMethod ? Object.keys(list) : null,\n jobs : {},\n results : isNamedList ? {} : [],\n size : isNamedList ? Object.keys(list).length : list.length\n }\n ;\n\n if (sortMethod)\n {\n // sort array keys based on it's values\n // sort object's keys just on own merit\n initState.keyedList.sort(isNamedList ? sortMethod : function(a, b)\n {\n return sortMethod(list[a], list[b]);\n });\n }\n\n return initState;\n}\n","var abort = require('./abort.js')\n , async = require('./async.js')\n ;\n\n// API\nmodule.exports = terminator;\n\n/**\n * Terminates jobs in the attached state context\n *\n * @this AsyncKitState#\n * @param {function} callback - final callback to invoke after termination\n */\nfunction terminator(callback)\n{\n if (!Object.keys(this.jobs).length)\n {\n return;\n }\n\n // fast forward iteration index\n this.index = this.size;\n\n // abort jobs\n abort(this);\n\n // send back results we have so far\n async(callback)(null, this.results);\n}\n","var iterate = require('./lib/iterate.js')\n , initState = require('./lib/state.js')\n , terminator = require('./lib/terminator.js')\n ;\n\n// Public API\nmodule.exports = parallel;\n\n/**\n * Runs iterator over provided array elements in parallel\n *\n * @param {array|object} list - array or object (named list) to iterate over\n * @param {function} iterator - iterator to run\n * @param {function} callback - invoked when all elements processed\n * @returns {function} - jobs terminator\n */\nfunction parallel(list, iterator, callback)\n{\n var state = initState(list);\n\n while (state.index < (state['keyedList'] || list).length)\n {\n iterate(list, iterator, state, function(error, result)\n {\n if (error)\n {\n callback(error, result);\n return;\n }\n\n // looks like it's the last one\n if (Object.keys(state.jobs).length === 0)\n {\n callback(null, state.results);\n return;\n }\n });\n\n state.index++;\n }\n\n return terminator.bind(state, callback);\n}\n","var serialOrdered = require('./serialOrdered.js');\n\n// Public API\nmodule.exports = serial;\n\n/**\n * Runs iterator over provided array elements in series\n *\n * @param {array|object} list - array or object (named list) to iterate over\n * @param {function} iterator - iterator to run\n * @param {function} callback - invoked when all elements processed\n * @returns {function} - jobs terminator\n */\nfunction serial(list, iterator, callback)\n{\n return serialOrdered(list, iterator, null, callback);\n}\n","var iterate = require('./lib/iterate.js')\n , initState = require('./lib/state.js')\n , terminator = require('./lib/terminator.js')\n ;\n\n// Public API\nmodule.exports = serialOrdered;\n// sorting helpers\nmodule.exports.ascending = ascending;\nmodule.exports.descending = descending;\n\n/**\n * Runs iterator over provided sorted array elements in series\n *\n * @param {array|object} list - array or object (named list) to iterate over\n * @param {function} iterator - iterator to run\n * @param {function} sortMethod - custom sort function\n * @param {function} callback - invoked when all elements processed\n * @returns {function} - jobs terminator\n */\nfunction serialOrdered(list, iterator, sortMethod, callback)\n{\n var state = initState(list, sortMethod);\n\n iterate(list, iterator, state, function iteratorHandler(error, result)\n {\n if (error)\n {\n callback(error, result);\n return;\n }\n\n state.index++;\n\n // are we there yet?\n if (state.index < (state['keyedList'] || list).length)\n {\n iterate(list, iterator, state, iteratorHandler);\n return;\n }\n\n // done here\n callback(null, state.results);\n });\n\n return terminator.bind(state, callback);\n}\n\n/*\n * -- Sort methods\n */\n\n/**\n * sort helper to sort array elements in ascending order\n *\n * @param {mixed} a - an item to compare\n * @param {mixed} b - an item to compare\n * @returns {number} - comparison result\n */\nfunction ascending(a, b)\n{\n return a < b ? -1 : a > b ? 1 : 0;\n}\n\n/**\n * sort helper to sort array elements in descending order\n *\n * @param {mixed} a - an item to compare\n * @param {mixed} b - an item to compare\n * @returns {number} - comparison result\n */\nfunction descending(a, b)\n{\n return -1 * ascending(a, b);\n}\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['accessanalyzer'] = {};\nAWS.AccessAnalyzer = Service.defineService('accessanalyzer', ['2019-11-01']);\nObject.defineProperty(apiLoader.services['accessanalyzer'], '2019-11-01', {\n get: function get() {\n var model = require('../apis/accessanalyzer-2019-11-01.min.json');\n model.paginators = require('../apis/accessanalyzer-2019-11-01.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.AccessAnalyzer;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['account'] = {};\nAWS.Account = Service.defineService('account', ['2021-02-01']);\nObject.defineProperty(apiLoader.services['account'], '2021-02-01', {\n get: function get() {\n var model = require('../apis/account-2021-02-01.min.json');\n model.paginators = require('../apis/account-2021-02-01.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.Account;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['acm'] = {};\nAWS.ACM = Service.defineService('acm', ['2015-12-08']);\nObject.defineProperty(apiLoader.services['acm'], '2015-12-08', {\n get: function get() {\n var model = require('../apis/acm-2015-12-08.min.json');\n model.paginators = require('../apis/acm-2015-12-08.paginators.json').pagination;\n model.waiters = require('../apis/acm-2015-12-08.waiters2.json').waiters;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.ACM;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['acmpca'] = {};\nAWS.ACMPCA = Service.defineService('acmpca', ['2017-08-22']);\nObject.defineProperty(apiLoader.services['acmpca'], '2017-08-22', {\n get: function get() {\n var model = require('../apis/acm-pca-2017-08-22.min.json');\n model.paginators = require('../apis/acm-pca-2017-08-22.paginators.json').pagination;\n model.waiters = require('../apis/acm-pca-2017-08-22.waiters2.json').waiters;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.ACMPCA;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['alexaforbusiness'] = {};\nAWS.AlexaForBusiness = Service.defineService('alexaforbusiness', ['2017-11-09']);\nObject.defineProperty(apiLoader.services['alexaforbusiness'], '2017-11-09', {\n get: function get() {\n var model = require('../apis/alexaforbusiness-2017-11-09.min.json');\n model.paginators = require('../apis/alexaforbusiness-2017-11-09.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.AlexaForBusiness;\n","require('../lib/node_loader');\nmodule.exports = {\n ACM: require('./acm'),\n APIGateway: require('./apigateway'),\n ApplicationAutoScaling: require('./applicationautoscaling'),\n AppStream: require('./appstream'),\n AutoScaling: require('./autoscaling'),\n Batch: require('./batch'),\n Budgets: require('./budgets'),\n CloudDirectory: require('./clouddirectory'),\n CloudFormation: require('./cloudformation'),\n CloudFront: require('./cloudfront'),\n CloudHSM: require('./cloudhsm'),\n CloudSearch: require('./cloudsearch'),\n CloudSearchDomain: require('./cloudsearchdomain'),\n CloudTrail: require('./cloudtrail'),\n CloudWatch: require('./cloudwatch'),\n CloudWatchEvents: require('./cloudwatchevents'),\n CloudWatchLogs: require('./cloudwatchlogs'),\n CodeBuild: require('./codebuild'),\n CodeCommit: require('./codecommit'),\n CodeDeploy: require('./codedeploy'),\n CodePipeline: require('./codepipeline'),\n CognitoIdentity: require('./cognitoidentity'),\n CognitoIdentityServiceProvider: require('./cognitoidentityserviceprovider'),\n CognitoSync: require('./cognitosync'),\n ConfigService: require('./configservice'),\n CUR: require('./cur'),\n DataPipeline: require('./datapipeline'),\n DeviceFarm: require('./devicefarm'),\n DirectConnect: require('./directconnect'),\n DirectoryService: require('./directoryservice'),\n Discovery: require('./discovery'),\n DMS: require('./dms'),\n DynamoDB: require('./dynamodb'),\n DynamoDBStreams: require('./dynamodbstreams'),\n EC2: require('./ec2'),\n ECR: require('./ecr'),\n ECS: require('./ecs'),\n EFS: require('./efs'),\n ElastiCache: require('./elasticache'),\n ElasticBeanstalk: require('./elasticbeanstalk'),\n ELB: require('./elb'),\n ELBv2: require('./elbv2'),\n EMR: require('./emr'),\n ES: require('./es'),\n ElasticTranscoder: require('./elastictranscoder'),\n Firehose: require('./firehose'),\n GameLift: require('./gamelift'),\n Glacier: require('./glacier'),\n Health: require('./health'),\n IAM: require('./iam'),\n ImportExport: require('./importexport'),\n Inspector: require('./inspector'),\n Iot: require('./iot'),\n IotData: require('./iotdata'),\n Kinesis: require('./kinesis'),\n KinesisAnalytics: require('./kinesisanalytics'),\n KMS: require('./kms'),\n Lambda: require('./lambda'),\n LexRuntime: require('./lexruntime'),\n Lightsail: require('./lightsail'),\n MachineLearning: require('./machinelearning'),\n MarketplaceCommerceAnalytics: require('./marketplacecommerceanalytics'),\n MarketplaceMetering: require('./marketplacemetering'),\n MTurk: require('./mturk'),\n MobileAnalytics: require('./mobileanalytics'),\n OpsWorks: require('./opsworks'),\n OpsWorksCM: require('./opsworkscm'),\n Organizations: require('./organizations'),\n Pinpoint: require('./pinpoint'),\n Polly: require('./polly'),\n RDS: require('./rds'),\n Redshift: require('./redshift'),\n Rekognition: require('./rekognition'),\n ResourceGroupsTaggingAPI: require('./resourcegroupstaggingapi'),\n Route53: require('./route53'),\n Route53Domains: require('./route53domains'),\n S3: require('./s3'),\n S3Control: require('./s3control'),\n ServiceCatalog: require('./servicecatalog'),\n SES: require('./ses'),\n Shield: require('./shield'),\n SimpleDB: require('./simpledb'),\n SMS: require('./sms'),\n Snowball: require('./snowball'),\n SNS: require('./sns'),\n SQS: require('./sqs'),\n SSM: require('./ssm'),\n StorageGateway: require('./storagegateway'),\n StepFunctions: require('./stepfunctions'),\n STS: require('./sts'),\n Support: require('./support'),\n SWF: require('./swf'),\n XRay: require('./xray'),\n WAF: require('./waf'),\n WAFRegional: require('./wafregional'),\n WorkDocs: require('./workdocs'),\n WorkSpaces: require('./workspaces'),\n CodeStar: require('./codestar'),\n LexModelBuildingService: require('./lexmodelbuildingservice'),\n MarketplaceEntitlementService: require('./marketplaceentitlementservice'),\n Athena: require('./athena'),\n Greengrass: require('./greengrass'),\n DAX: require('./dax'),\n MigrationHub: require('./migrationhub'),\n CloudHSMV2: require('./cloudhsmv2'),\n Glue: require('./glue'),\n Mobile: require('./mobile'),\n Pricing: require('./pricing'),\n CostExplorer: require('./costexplorer'),\n MediaConvert: require('./mediaconvert'),\n MediaLive: require('./medialive'),\n MediaPackage: require('./mediapackage'),\n MediaStore: require('./mediastore'),\n MediaStoreData: require('./mediastoredata'),\n AppSync: require('./appsync'),\n GuardDuty: require('./guardduty'),\n MQ: require('./mq'),\n Comprehend: require('./comprehend'),\n IoTJobsDataPlane: require('./iotjobsdataplane'),\n KinesisVideoArchivedMedia: require('./kinesisvideoarchivedmedia'),\n KinesisVideoMedia: require('./kinesisvideomedia'),\n KinesisVideo: require('./kinesisvideo'),\n SageMakerRuntime: require('./sagemakerruntime'),\n SageMaker: require('./sagemaker'),\n Translate: require('./translate'),\n ResourceGroups: require('./resourcegroups'),\n AlexaForBusiness: require('./alexaforbusiness'),\n Cloud9: require('./cloud9'),\n ServerlessApplicationRepository: require('./serverlessapplicationrepository'),\n ServiceDiscovery: require('./servicediscovery'),\n WorkMail: require('./workmail'),\n AutoScalingPlans: require('./autoscalingplans'),\n TranscribeService: require('./transcribeservice'),\n Connect: require('./connect'),\n ACMPCA: require('./acmpca'),\n FMS: require('./fms'),\n SecretsManager: require('./secretsmanager'),\n IoTAnalytics: require('./iotanalytics'),\n IoT1ClickDevicesService: require('./iot1clickdevicesservice'),\n IoT1ClickProjects: require('./iot1clickprojects'),\n PI: require('./pi'),\n Neptune: require('./neptune'),\n MediaTailor: require('./mediatailor'),\n EKS: require('./eks'),\n Macie: require('./macie'),\n DLM: require('./dlm'),\n Signer: require('./signer'),\n Chime: require('./chime'),\n PinpointEmail: require('./pinpointemail'),\n RAM: require('./ram'),\n Route53Resolver: require('./route53resolver'),\n PinpointSMSVoice: require('./pinpointsmsvoice'),\n QuickSight: require('./quicksight'),\n RDSDataService: require('./rdsdataservice'),\n Amplify: require('./amplify'),\n DataSync: require('./datasync'),\n RoboMaker: require('./robomaker'),\n Transfer: require('./transfer'),\n GlobalAccelerator: require('./globalaccelerator'),\n ComprehendMedical: require('./comprehendmedical'),\n KinesisAnalyticsV2: require('./kinesisanalyticsv2'),\n MediaConnect: require('./mediaconnect'),\n FSx: require('./fsx'),\n SecurityHub: require('./securityhub'),\n AppMesh: require('./appmesh'),\n LicenseManager: require('./licensemanager'),\n Kafka: require('./kafka'),\n ApiGatewayManagementApi: require('./apigatewaymanagementapi'),\n ApiGatewayV2: require('./apigatewayv2'),\n DocDB: require('./docdb'),\n Backup: require('./backup'),\n WorkLink: require('./worklink'),\n Textract: require('./textract'),\n ManagedBlockchain: require('./managedblockchain'),\n MediaPackageVod: require('./mediapackagevod'),\n GroundStation: require('./groundstation'),\n IoTThingsGraph: require('./iotthingsgraph'),\n IoTEvents: require('./iotevents'),\n IoTEventsData: require('./ioteventsdata'),\n Personalize: require('./personalize'),\n PersonalizeEvents: require('./personalizeevents'),\n PersonalizeRuntime: require('./personalizeruntime'),\n ApplicationInsights: require('./applicationinsights'),\n ServiceQuotas: require('./servicequotas'),\n EC2InstanceConnect: require('./ec2instanceconnect'),\n EventBridge: require('./eventbridge'),\n LakeFormation: require('./lakeformation'),\n ForecastService: require('./forecastservice'),\n ForecastQueryService: require('./forecastqueryservice'),\n QLDB: require('./qldb'),\n QLDBSession: require('./qldbsession'),\n WorkMailMessageFlow: require('./workmailmessageflow'),\n CodeStarNotifications: require('./codestarnotifications'),\n SavingsPlans: require('./savingsplans'),\n SSO: require('./sso'),\n SSOOIDC: require('./ssooidc'),\n MarketplaceCatalog: require('./marketplacecatalog'),\n DataExchange: require('./dataexchange'),\n SESV2: require('./sesv2'),\n MigrationHubConfig: require('./migrationhubconfig'),\n ConnectParticipant: require('./connectparticipant'),\n AppConfig: require('./appconfig'),\n IoTSecureTunneling: require('./iotsecuretunneling'),\n WAFV2: require('./wafv2'),\n ElasticInference: require('./elasticinference'),\n Imagebuilder: require('./imagebuilder'),\n Schemas: require('./schemas'),\n AccessAnalyzer: require('./accessanalyzer'),\n CodeGuruReviewer: require('./codegurureviewer'),\n CodeGuruProfiler: require('./codeguruprofiler'),\n ComputeOptimizer: require('./computeoptimizer'),\n FraudDetector: require('./frauddetector'),\n Kendra: require('./kendra'),\n NetworkManager: require('./networkmanager'),\n Outposts: require('./outposts'),\n AugmentedAIRuntime: require('./augmentedairuntime'),\n EBS: require('./ebs'),\n KinesisVideoSignalingChannels: require('./kinesisvideosignalingchannels'),\n Detective: require('./detective'),\n CodeStarconnections: require('./codestarconnections'),\n Synthetics: require('./synthetics'),\n IoTSiteWise: require('./iotsitewise'),\n Macie2: require('./macie2'),\n CodeArtifact: require('./codeartifact'),\n Honeycode: require('./honeycode'),\n IVS: require('./ivs'),\n Braket: require('./braket'),\n IdentityStore: require('./identitystore'),\n Appflow: require('./appflow'),\n RedshiftData: require('./redshiftdata'),\n SSOAdmin: require('./ssoadmin'),\n TimestreamQuery: require('./timestreamquery'),\n TimestreamWrite: require('./timestreamwrite'),\n S3Outposts: require('./s3outposts'),\n DataBrew: require('./databrew'),\n ServiceCatalogAppRegistry: require('./servicecatalogappregistry'),\n NetworkFirewall: require('./networkfirewall'),\n MWAA: require('./mwaa'),\n AmplifyBackend: require('./amplifybackend'),\n AppIntegrations: require('./appintegrations'),\n ConnectContactLens: require('./connectcontactlens'),\n DevOpsGuru: require('./devopsguru'),\n ECRPUBLIC: require('./ecrpublic'),\n LookoutVision: require('./lookoutvision'),\n SageMakerFeatureStoreRuntime: require('./sagemakerfeaturestoreruntime'),\n CustomerProfiles: require('./customerprofiles'),\n AuditManager: require('./auditmanager'),\n EMRcontainers: require('./emrcontainers'),\n HealthLake: require('./healthlake'),\n SagemakerEdge: require('./sagemakeredge'),\n Amp: require('./amp'),\n GreengrassV2: require('./greengrassv2'),\n IotDeviceAdvisor: require('./iotdeviceadvisor'),\n IoTFleetHub: require('./iotfleethub'),\n IoTWireless: require('./iotwireless'),\n Location: require('./location'),\n WellArchitected: require('./wellarchitected'),\n LexModelsV2: require('./lexmodelsv2'),\n LexRuntimeV2: require('./lexruntimev2'),\n Fis: require('./fis'),\n LookoutMetrics: require('./lookoutmetrics'),\n Mgn: require('./mgn'),\n LookoutEquipment: require('./lookoutequipment'),\n Nimble: require('./nimble'),\n Finspace: require('./finspace'),\n Finspacedata: require('./finspacedata'),\n SSMContacts: require('./ssmcontacts'),\n SSMIncidents: require('./ssmincidents'),\n ApplicationCostProfiler: require('./applicationcostprofiler'),\n AppRunner: require('./apprunner'),\n Proton: require('./proton'),\n Route53RecoveryCluster: require('./route53recoverycluster'),\n Route53RecoveryControlConfig: require('./route53recoverycontrolconfig'),\n Route53RecoveryReadiness: require('./route53recoveryreadiness'),\n ChimeSDKIdentity: require('./chimesdkidentity'),\n ChimeSDKMessaging: require('./chimesdkmessaging'),\n SnowDeviceManagement: require('./snowdevicemanagement'),\n MemoryDB: require('./memorydb'),\n OpenSearch: require('./opensearch'),\n KafkaConnect: require('./kafkaconnect'),\n VoiceID: require('./voiceid'),\n Wisdom: require('./wisdom'),\n Account: require('./account'),\n CloudControl: require('./cloudcontrol'),\n Grafana: require('./grafana'),\n Panorama: require('./panorama'),\n ChimeSDKMeetings: require('./chimesdkmeetings'),\n Resiliencehub: require('./resiliencehub'),\n MigrationHubStrategy: require('./migrationhubstrategy'),\n AppConfigData: require('./appconfigdata'),\n Drs: require('./drs'),\n MigrationHubRefactorSpaces: require('./migrationhubrefactorspaces'),\n Evidently: require('./evidently'),\n Inspector2: require('./inspector2'),\n Rbin: require('./rbin'),\n RUM: require('./rum'),\n BackupGateway: require('./backupgateway'),\n IoTTwinMaker: require('./iottwinmaker'),\n WorkSpacesWeb: require('./workspacesweb'),\n AmplifyUIBuilder: require('./amplifyuibuilder')\n};","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['amp'] = {};\nAWS.Amp = Service.defineService('amp', ['2020-08-01']);\nObject.defineProperty(apiLoader.services['amp'], '2020-08-01', {\n get: function get() {\n var model = require('../apis/amp-2020-08-01.min.json');\n model.paginators = require('../apis/amp-2020-08-01.paginators.json').pagination;\n model.waiters = require('../apis/amp-2020-08-01.waiters2.json').waiters;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.Amp;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['amplify'] = {};\nAWS.Amplify = Service.defineService('amplify', ['2017-07-25']);\nObject.defineProperty(apiLoader.services['amplify'], '2017-07-25', {\n get: function get() {\n var model = require('../apis/amplify-2017-07-25.min.json');\n model.paginators = require('../apis/amplify-2017-07-25.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.Amplify;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['amplifybackend'] = {};\nAWS.AmplifyBackend = Service.defineService('amplifybackend', ['2020-08-11']);\nObject.defineProperty(apiLoader.services['amplifybackend'], '2020-08-11', {\n get: function get() {\n var model = require('../apis/amplifybackend-2020-08-11.min.json');\n model.paginators = require('../apis/amplifybackend-2020-08-11.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.AmplifyBackend;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['amplifyuibuilder'] = {};\nAWS.AmplifyUIBuilder = Service.defineService('amplifyuibuilder', ['2021-08-11']);\nObject.defineProperty(apiLoader.services['amplifyuibuilder'], '2021-08-11', {\n get: function get() {\n var model = require('../apis/amplifyuibuilder-2021-08-11.min.json');\n model.paginators = require('../apis/amplifyuibuilder-2021-08-11.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.AmplifyUIBuilder;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['apigateway'] = {};\nAWS.APIGateway = Service.defineService('apigateway', ['2015-07-09']);\nrequire('../lib/services/apigateway');\nObject.defineProperty(apiLoader.services['apigateway'], '2015-07-09', {\n get: function get() {\n var model = require('../apis/apigateway-2015-07-09.min.json');\n model.paginators = require('../apis/apigateway-2015-07-09.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.APIGateway;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['apigatewaymanagementapi'] = {};\nAWS.ApiGatewayManagementApi = Service.defineService('apigatewaymanagementapi', ['2018-11-29']);\nObject.defineProperty(apiLoader.services['apigatewaymanagementapi'], '2018-11-29', {\n get: function get() {\n var model = require('../apis/apigatewaymanagementapi-2018-11-29.min.json');\n model.paginators = require('../apis/apigatewaymanagementapi-2018-11-29.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.ApiGatewayManagementApi;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['apigatewayv2'] = {};\nAWS.ApiGatewayV2 = Service.defineService('apigatewayv2', ['2018-11-29']);\nObject.defineProperty(apiLoader.services['apigatewayv2'], '2018-11-29', {\n get: function get() {\n var model = require('../apis/apigatewayv2-2018-11-29.min.json');\n model.paginators = require('../apis/apigatewayv2-2018-11-29.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.ApiGatewayV2;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['appconfig'] = {};\nAWS.AppConfig = Service.defineService('appconfig', ['2019-10-09']);\nObject.defineProperty(apiLoader.services['appconfig'], '2019-10-09', {\n get: function get() {\n var model = require('../apis/appconfig-2019-10-09.min.json');\n model.paginators = require('../apis/appconfig-2019-10-09.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.AppConfig;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['appconfigdata'] = {};\nAWS.AppConfigData = Service.defineService('appconfigdata', ['2021-11-11']);\nObject.defineProperty(apiLoader.services['appconfigdata'], '2021-11-11', {\n get: function get() {\n var model = require('../apis/appconfigdata-2021-11-11.min.json');\n model.paginators = require('../apis/appconfigdata-2021-11-11.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.AppConfigData;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['appflow'] = {};\nAWS.Appflow = Service.defineService('appflow', ['2020-08-23']);\nObject.defineProperty(apiLoader.services['appflow'], '2020-08-23', {\n get: function get() {\n var model = require('../apis/appflow-2020-08-23.min.json');\n model.paginators = require('../apis/appflow-2020-08-23.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.Appflow;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['appintegrations'] = {};\nAWS.AppIntegrations = Service.defineService('appintegrations', ['2020-07-29']);\nObject.defineProperty(apiLoader.services['appintegrations'], '2020-07-29', {\n get: function get() {\n var model = require('../apis/appintegrations-2020-07-29.min.json');\n model.paginators = require('../apis/appintegrations-2020-07-29.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.AppIntegrations;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['applicationautoscaling'] = {};\nAWS.ApplicationAutoScaling = Service.defineService('applicationautoscaling', ['2016-02-06']);\nObject.defineProperty(apiLoader.services['applicationautoscaling'], '2016-02-06', {\n get: function get() {\n var model = require('../apis/application-autoscaling-2016-02-06.min.json');\n model.paginators = require('../apis/application-autoscaling-2016-02-06.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.ApplicationAutoScaling;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['applicationcostprofiler'] = {};\nAWS.ApplicationCostProfiler = Service.defineService('applicationcostprofiler', ['2020-09-10']);\nObject.defineProperty(apiLoader.services['applicationcostprofiler'], '2020-09-10', {\n get: function get() {\n var model = require('../apis/applicationcostprofiler-2020-09-10.min.json');\n model.paginators = require('../apis/applicationcostprofiler-2020-09-10.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.ApplicationCostProfiler;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['applicationinsights'] = {};\nAWS.ApplicationInsights = Service.defineService('applicationinsights', ['2018-11-25']);\nObject.defineProperty(apiLoader.services['applicationinsights'], '2018-11-25', {\n get: function get() {\n var model = require('../apis/application-insights-2018-11-25.min.json');\n model.paginators = require('../apis/application-insights-2018-11-25.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.ApplicationInsights;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['appmesh'] = {};\nAWS.AppMesh = Service.defineService('appmesh', ['2018-10-01', '2018-10-01*', '2019-01-25']);\nObject.defineProperty(apiLoader.services['appmesh'], '2018-10-01', {\n get: function get() {\n var model = require('../apis/appmesh-2018-10-01.min.json');\n model.paginators = require('../apis/appmesh-2018-10-01.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\nObject.defineProperty(apiLoader.services['appmesh'], '2019-01-25', {\n get: function get() {\n var model = require('../apis/appmesh-2019-01-25.min.json');\n model.paginators = require('../apis/appmesh-2019-01-25.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.AppMesh;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['apprunner'] = {};\nAWS.AppRunner = Service.defineService('apprunner', ['2020-05-15']);\nObject.defineProperty(apiLoader.services['apprunner'], '2020-05-15', {\n get: function get() {\n var model = require('../apis/apprunner-2020-05-15.min.json');\n model.paginators = require('../apis/apprunner-2020-05-15.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.AppRunner;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['appstream'] = {};\nAWS.AppStream = Service.defineService('appstream', ['2016-12-01']);\nObject.defineProperty(apiLoader.services['appstream'], '2016-12-01', {\n get: function get() {\n var model = require('../apis/appstream-2016-12-01.min.json');\n model.paginators = require('../apis/appstream-2016-12-01.paginators.json').pagination;\n model.waiters = require('../apis/appstream-2016-12-01.waiters2.json').waiters;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.AppStream;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['appsync'] = {};\nAWS.AppSync = Service.defineService('appsync', ['2017-07-25']);\nObject.defineProperty(apiLoader.services['appsync'], '2017-07-25', {\n get: function get() {\n var model = require('../apis/appsync-2017-07-25.min.json');\n model.paginators = require('../apis/appsync-2017-07-25.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.AppSync;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['athena'] = {};\nAWS.Athena = Service.defineService('athena', ['2017-05-18']);\nObject.defineProperty(apiLoader.services['athena'], '2017-05-18', {\n get: function get() {\n var model = require('../apis/athena-2017-05-18.min.json');\n model.paginators = require('../apis/athena-2017-05-18.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.Athena;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['auditmanager'] = {};\nAWS.AuditManager = Service.defineService('auditmanager', ['2017-07-25']);\nObject.defineProperty(apiLoader.services['auditmanager'], '2017-07-25', {\n get: function get() {\n var model = require('../apis/auditmanager-2017-07-25.min.json');\n model.paginators = require('../apis/auditmanager-2017-07-25.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.AuditManager;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['augmentedairuntime'] = {};\nAWS.AugmentedAIRuntime = Service.defineService('augmentedairuntime', ['2019-11-07']);\nObject.defineProperty(apiLoader.services['augmentedairuntime'], '2019-11-07', {\n get: function get() {\n var model = require('../apis/sagemaker-a2i-runtime-2019-11-07.min.json');\n model.paginators = require('../apis/sagemaker-a2i-runtime-2019-11-07.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.AugmentedAIRuntime;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['autoscaling'] = {};\nAWS.AutoScaling = Service.defineService('autoscaling', ['2011-01-01']);\nObject.defineProperty(apiLoader.services['autoscaling'], '2011-01-01', {\n get: function get() {\n var model = require('../apis/autoscaling-2011-01-01.min.json');\n model.paginators = require('../apis/autoscaling-2011-01-01.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.AutoScaling;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['autoscalingplans'] = {};\nAWS.AutoScalingPlans = Service.defineService('autoscalingplans', ['2018-01-06']);\nObject.defineProperty(apiLoader.services['autoscalingplans'], '2018-01-06', {\n get: function get() {\n var model = require('../apis/autoscaling-plans-2018-01-06.min.json');\n model.paginators = require('../apis/autoscaling-plans-2018-01-06.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.AutoScalingPlans;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['backup'] = {};\nAWS.Backup = Service.defineService('backup', ['2018-11-15']);\nObject.defineProperty(apiLoader.services['backup'], '2018-11-15', {\n get: function get() {\n var model = require('../apis/backup-2018-11-15.min.json');\n model.paginators = require('../apis/backup-2018-11-15.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.Backup;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['backupgateway'] = {};\nAWS.BackupGateway = Service.defineService('backupgateway', ['2021-01-01']);\nObject.defineProperty(apiLoader.services['backupgateway'], '2021-01-01', {\n get: function get() {\n var model = require('../apis/backup-gateway-2021-01-01.min.json');\n model.paginators = require('../apis/backup-gateway-2021-01-01.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.BackupGateway;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['batch'] = {};\nAWS.Batch = Service.defineService('batch', ['2016-08-10']);\nObject.defineProperty(apiLoader.services['batch'], '2016-08-10', {\n get: function get() {\n var model = require('../apis/batch-2016-08-10.min.json');\n model.paginators = require('../apis/batch-2016-08-10.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.Batch;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['braket'] = {};\nAWS.Braket = Service.defineService('braket', ['2019-09-01']);\nObject.defineProperty(apiLoader.services['braket'], '2019-09-01', {\n get: function get() {\n var model = require('../apis/braket-2019-09-01.min.json');\n model.paginators = require('../apis/braket-2019-09-01.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.Braket;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['budgets'] = {};\nAWS.Budgets = Service.defineService('budgets', ['2016-10-20']);\nObject.defineProperty(apiLoader.services['budgets'], '2016-10-20', {\n get: function get() {\n var model = require('../apis/budgets-2016-10-20.min.json');\n model.paginators = require('../apis/budgets-2016-10-20.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.Budgets;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['chime'] = {};\nAWS.Chime = Service.defineService('chime', ['2018-05-01']);\nObject.defineProperty(apiLoader.services['chime'], '2018-05-01', {\n get: function get() {\n var model = require('../apis/chime-2018-05-01.min.json');\n model.paginators = require('../apis/chime-2018-05-01.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.Chime;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['chimesdkidentity'] = {};\nAWS.ChimeSDKIdentity = Service.defineService('chimesdkidentity', ['2021-04-20']);\nObject.defineProperty(apiLoader.services['chimesdkidentity'], '2021-04-20', {\n get: function get() {\n var model = require('../apis/chime-sdk-identity-2021-04-20.min.json');\n model.paginators = require('../apis/chime-sdk-identity-2021-04-20.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.ChimeSDKIdentity;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['chimesdkmeetings'] = {};\nAWS.ChimeSDKMeetings = Service.defineService('chimesdkmeetings', ['2021-07-15']);\nObject.defineProperty(apiLoader.services['chimesdkmeetings'], '2021-07-15', {\n get: function get() {\n var model = require('../apis/chime-sdk-meetings-2021-07-15.min.json');\n model.paginators = require('../apis/chime-sdk-meetings-2021-07-15.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.ChimeSDKMeetings;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['chimesdkmessaging'] = {};\nAWS.ChimeSDKMessaging = Service.defineService('chimesdkmessaging', ['2021-05-15']);\nObject.defineProperty(apiLoader.services['chimesdkmessaging'], '2021-05-15', {\n get: function get() {\n var model = require('../apis/chime-sdk-messaging-2021-05-15.min.json');\n model.paginators = require('../apis/chime-sdk-messaging-2021-05-15.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.ChimeSDKMessaging;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['cloud9'] = {};\nAWS.Cloud9 = Service.defineService('cloud9', ['2017-09-23']);\nObject.defineProperty(apiLoader.services['cloud9'], '2017-09-23', {\n get: function get() {\n var model = require('../apis/cloud9-2017-09-23.min.json');\n model.paginators = require('../apis/cloud9-2017-09-23.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.Cloud9;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['cloudcontrol'] = {};\nAWS.CloudControl = Service.defineService('cloudcontrol', ['2021-09-30']);\nObject.defineProperty(apiLoader.services['cloudcontrol'], '2021-09-30', {\n get: function get() {\n var model = require('../apis/cloudcontrol-2021-09-30.min.json');\n model.paginators = require('../apis/cloudcontrol-2021-09-30.paginators.json').pagination;\n model.waiters = require('../apis/cloudcontrol-2021-09-30.waiters2.json').waiters;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.CloudControl;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['clouddirectory'] = {};\nAWS.CloudDirectory = Service.defineService('clouddirectory', ['2016-05-10', '2016-05-10*', '2017-01-11']);\nObject.defineProperty(apiLoader.services['clouddirectory'], '2016-05-10', {\n get: function get() {\n var model = require('../apis/clouddirectory-2016-05-10.min.json');\n model.paginators = require('../apis/clouddirectory-2016-05-10.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\nObject.defineProperty(apiLoader.services['clouddirectory'], '2017-01-11', {\n get: function get() {\n var model = require('../apis/clouddirectory-2017-01-11.min.json');\n model.paginators = require('../apis/clouddirectory-2017-01-11.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.CloudDirectory;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['cloudformation'] = {};\nAWS.CloudFormation = Service.defineService('cloudformation', ['2010-05-15']);\nObject.defineProperty(apiLoader.services['cloudformation'], '2010-05-15', {\n get: function get() {\n var model = require('../apis/cloudformation-2010-05-15.min.json');\n model.paginators = require('../apis/cloudformation-2010-05-15.paginators.json').pagination;\n model.waiters = require('../apis/cloudformation-2010-05-15.waiters2.json').waiters;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.CloudFormation;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['cloudfront'] = {};\nAWS.CloudFront = Service.defineService('cloudfront', ['2013-05-12*', '2013-11-11*', '2014-05-31*', '2014-10-21*', '2014-11-06*', '2015-04-17*', '2015-07-27*', '2015-09-17*', '2016-01-13*', '2016-01-28*', '2016-08-01*', '2016-08-20*', '2016-09-07*', '2016-09-29*', '2016-11-25', '2016-11-25*', '2017-03-25', '2017-03-25*', '2017-10-30', '2017-10-30*', '2018-06-18', '2018-06-18*', '2018-11-05', '2018-11-05*', '2019-03-26', '2019-03-26*', '2020-05-31']);\nrequire('../lib/services/cloudfront');\nObject.defineProperty(apiLoader.services['cloudfront'], '2016-11-25', {\n get: function get() {\n var model = require('../apis/cloudfront-2016-11-25.min.json');\n model.paginators = require('../apis/cloudfront-2016-11-25.paginators.json').pagination;\n model.waiters = require('../apis/cloudfront-2016-11-25.waiters2.json').waiters;\n return model;\n },\n enumerable: true,\n configurable: true\n});\nObject.defineProperty(apiLoader.services['cloudfront'], '2017-03-25', {\n get: function get() {\n var model = require('../apis/cloudfront-2017-03-25.min.json');\n model.paginators = require('../apis/cloudfront-2017-03-25.paginators.json').pagination;\n model.waiters = require('../apis/cloudfront-2017-03-25.waiters2.json').waiters;\n return model;\n },\n enumerable: true,\n configurable: true\n});\nObject.defineProperty(apiLoader.services['cloudfront'], '2017-10-30', {\n get: function get() {\n var model = require('../apis/cloudfront-2017-10-30.min.json');\n model.paginators = require('../apis/cloudfront-2017-10-30.paginators.json').pagination;\n model.waiters = require('../apis/cloudfront-2017-10-30.waiters2.json').waiters;\n return model;\n },\n enumerable: true,\n configurable: true\n});\nObject.defineProperty(apiLoader.services['cloudfront'], '2018-06-18', {\n get: function get() {\n var model = require('../apis/cloudfront-2018-06-18.min.json');\n model.paginators = require('../apis/cloudfront-2018-06-18.paginators.json').pagination;\n model.waiters = require('../apis/cloudfront-2018-06-18.waiters2.json').waiters;\n return model;\n },\n enumerable: true,\n configurable: true\n});\nObject.defineProperty(apiLoader.services['cloudfront'], '2018-11-05', {\n get: function get() {\n var model = require('../apis/cloudfront-2018-11-05.min.json');\n model.paginators = require('../apis/cloudfront-2018-11-05.paginators.json').pagination;\n model.waiters = require('../apis/cloudfront-2018-11-05.waiters2.json').waiters;\n return model;\n },\n enumerable: true,\n configurable: true\n});\nObject.defineProperty(apiLoader.services['cloudfront'], '2019-03-26', {\n get: function get() {\n var model = require('../apis/cloudfront-2019-03-26.min.json');\n model.paginators = require('../apis/cloudfront-2019-03-26.paginators.json').pagination;\n model.waiters = require('../apis/cloudfront-2019-03-26.waiters2.json').waiters;\n return model;\n },\n enumerable: true,\n configurable: true\n});\nObject.defineProperty(apiLoader.services['cloudfront'], '2020-05-31', {\n get: function get() {\n var model = require('../apis/cloudfront-2020-05-31.min.json');\n model.paginators = require('../apis/cloudfront-2020-05-31.paginators.json').pagination;\n model.waiters = require('../apis/cloudfront-2020-05-31.waiters2.json').waiters;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.CloudFront;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['cloudhsm'] = {};\nAWS.CloudHSM = Service.defineService('cloudhsm', ['2014-05-30']);\nObject.defineProperty(apiLoader.services['cloudhsm'], '2014-05-30', {\n get: function get() {\n var model = require('../apis/cloudhsm-2014-05-30.min.json');\n model.paginators = require('../apis/cloudhsm-2014-05-30.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.CloudHSM;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['cloudhsmv2'] = {};\nAWS.CloudHSMV2 = Service.defineService('cloudhsmv2', ['2017-04-28']);\nObject.defineProperty(apiLoader.services['cloudhsmv2'], '2017-04-28', {\n get: function get() {\n var model = require('../apis/cloudhsmv2-2017-04-28.min.json');\n model.paginators = require('../apis/cloudhsmv2-2017-04-28.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.CloudHSMV2;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['cloudsearch'] = {};\nAWS.CloudSearch = Service.defineService('cloudsearch', ['2011-02-01', '2013-01-01']);\nObject.defineProperty(apiLoader.services['cloudsearch'], '2011-02-01', {\n get: function get() {\n var model = require('../apis/cloudsearch-2011-02-01.min.json');\n model.paginators = require('../apis/cloudsearch-2011-02-01.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\nObject.defineProperty(apiLoader.services['cloudsearch'], '2013-01-01', {\n get: function get() {\n var model = require('../apis/cloudsearch-2013-01-01.min.json');\n model.paginators = require('../apis/cloudsearch-2013-01-01.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.CloudSearch;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['cloudsearchdomain'] = {};\nAWS.CloudSearchDomain = Service.defineService('cloudsearchdomain', ['2013-01-01']);\nrequire('../lib/services/cloudsearchdomain');\nObject.defineProperty(apiLoader.services['cloudsearchdomain'], '2013-01-01', {\n get: function get() {\n var model = require('../apis/cloudsearchdomain-2013-01-01.min.json');\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.CloudSearchDomain;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['cloudtrail'] = {};\nAWS.CloudTrail = Service.defineService('cloudtrail', ['2013-11-01']);\nObject.defineProperty(apiLoader.services['cloudtrail'], '2013-11-01', {\n get: function get() {\n var model = require('../apis/cloudtrail-2013-11-01.min.json');\n model.paginators = require('../apis/cloudtrail-2013-11-01.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.CloudTrail;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['cloudwatch'] = {};\nAWS.CloudWatch = Service.defineService('cloudwatch', ['2010-08-01']);\nObject.defineProperty(apiLoader.services['cloudwatch'], '2010-08-01', {\n get: function get() {\n var model = require('../apis/monitoring-2010-08-01.min.json');\n model.paginators = require('../apis/monitoring-2010-08-01.paginators.json').pagination;\n model.waiters = require('../apis/monitoring-2010-08-01.waiters2.json').waiters;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.CloudWatch;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['cloudwatchevents'] = {};\nAWS.CloudWatchEvents = Service.defineService('cloudwatchevents', ['2014-02-03*', '2015-10-07']);\nObject.defineProperty(apiLoader.services['cloudwatchevents'], '2015-10-07', {\n get: function get() {\n var model = require('../apis/events-2015-10-07.min.json');\n model.paginators = require('../apis/events-2015-10-07.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.CloudWatchEvents;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['cloudwatchlogs'] = {};\nAWS.CloudWatchLogs = Service.defineService('cloudwatchlogs', ['2014-03-28']);\nObject.defineProperty(apiLoader.services['cloudwatchlogs'], '2014-03-28', {\n get: function get() {\n var model = require('../apis/logs-2014-03-28.min.json');\n model.paginators = require('../apis/logs-2014-03-28.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.CloudWatchLogs;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['codeartifact'] = {};\nAWS.CodeArtifact = Service.defineService('codeartifact', ['2018-09-22']);\nObject.defineProperty(apiLoader.services['codeartifact'], '2018-09-22', {\n get: function get() {\n var model = require('../apis/codeartifact-2018-09-22.min.json');\n model.paginators = require('../apis/codeartifact-2018-09-22.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.CodeArtifact;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['codebuild'] = {};\nAWS.CodeBuild = Service.defineService('codebuild', ['2016-10-06']);\nObject.defineProperty(apiLoader.services['codebuild'], '2016-10-06', {\n get: function get() {\n var model = require('../apis/codebuild-2016-10-06.min.json');\n model.paginators = require('../apis/codebuild-2016-10-06.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.CodeBuild;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['codecommit'] = {};\nAWS.CodeCommit = Service.defineService('codecommit', ['2015-04-13']);\nObject.defineProperty(apiLoader.services['codecommit'], '2015-04-13', {\n get: function get() {\n var model = require('../apis/codecommit-2015-04-13.min.json');\n model.paginators = require('../apis/codecommit-2015-04-13.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.CodeCommit;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['codedeploy'] = {};\nAWS.CodeDeploy = Service.defineService('codedeploy', ['2014-10-06']);\nObject.defineProperty(apiLoader.services['codedeploy'], '2014-10-06', {\n get: function get() {\n var model = require('../apis/codedeploy-2014-10-06.min.json');\n model.paginators = require('../apis/codedeploy-2014-10-06.paginators.json').pagination;\n model.waiters = require('../apis/codedeploy-2014-10-06.waiters2.json').waiters;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.CodeDeploy;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['codeguruprofiler'] = {};\nAWS.CodeGuruProfiler = Service.defineService('codeguruprofiler', ['2019-07-18']);\nObject.defineProperty(apiLoader.services['codeguruprofiler'], '2019-07-18', {\n get: function get() {\n var model = require('../apis/codeguruprofiler-2019-07-18.min.json');\n model.paginators = require('../apis/codeguruprofiler-2019-07-18.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.CodeGuruProfiler;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['codegurureviewer'] = {};\nAWS.CodeGuruReviewer = Service.defineService('codegurureviewer', ['2019-09-19']);\nObject.defineProperty(apiLoader.services['codegurureviewer'], '2019-09-19', {\n get: function get() {\n var model = require('../apis/codeguru-reviewer-2019-09-19.min.json');\n model.paginators = require('../apis/codeguru-reviewer-2019-09-19.paginators.json').pagination;\n model.waiters = require('../apis/codeguru-reviewer-2019-09-19.waiters2.json').waiters;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.CodeGuruReviewer;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['codepipeline'] = {};\nAWS.CodePipeline = Service.defineService('codepipeline', ['2015-07-09']);\nObject.defineProperty(apiLoader.services['codepipeline'], '2015-07-09', {\n get: function get() {\n var model = require('../apis/codepipeline-2015-07-09.min.json');\n model.paginators = require('../apis/codepipeline-2015-07-09.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.CodePipeline;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['codestar'] = {};\nAWS.CodeStar = Service.defineService('codestar', ['2017-04-19']);\nObject.defineProperty(apiLoader.services['codestar'], '2017-04-19', {\n get: function get() {\n var model = require('../apis/codestar-2017-04-19.min.json');\n model.paginators = require('../apis/codestar-2017-04-19.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.CodeStar;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['codestarconnections'] = {};\nAWS.CodeStarconnections = Service.defineService('codestarconnections', ['2019-12-01']);\nObject.defineProperty(apiLoader.services['codestarconnections'], '2019-12-01', {\n get: function get() {\n var model = require('../apis/codestar-connections-2019-12-01.min.json');\n model.paginators = require('../apis/codestar-connections-2019-12-01.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.CodeStarconnections;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['codestarnotifications'] = {};\nAWS.CodeStarNotifications = Service.defineService('codestarnotifications', ['2019-10-15']);\nObject.defineProperty(apiLoader.services['codestarnotifications'], '2019-10-15', {\n get: function get() {\n var model = require('../apis/codestar-notifications-2019-10-15.min.json');\n model.paginators = require('../apis/codestar-notifications-2019-10-15.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.CodeStarNotifications;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['cognitoidentity'] = {};\nAWS.CognitoIdentity = Service.defineService('cognitoidentity', ['2014-06-30']);\nObject.defineProperty(apiLoader.services['cognitoidentity'], '2014-06-30', {\n get: function get() {\n var model = require('../apis/cognito-identity-2014-06-30.min.json');\n model.paginators = require('../apis/cognito-identity-2014-06-30.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.CognitoIdentity;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['cognitoidentityserviceprovider'] = {};\nAWS.CognitoIdentityServiceProvider = Service.defineService('cognitoidentityserviceprovider', ['2016-04-18']);\nObject.defineProperty(apiLoader.services['cognitoidentityserviceprovider'], '2016-04-18', {\n get: function get() {\n var model = require('../apis/cognito-idp-2016-04-18.min.json');\n model.paginators = require('../apis/cognito-idp-2016-04-18.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.CognitoIdentityServiceProvider;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['cognitosync'] = {};\nAWS.CognitoSync = Service.defineService('cognitosync', ['2014-06-30']);\nObject.defineProperty(apiLoader.services['cognitosync'], '2014-06-30', {\n get: function get() {\n var model = require('../apis/cognito-sync-2014-06-30.min.json');\n model.paginators = require('../apis/cognito-sync-2014-06-30.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.CognitoSync;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['comprehend'] = {};\nAWS.Comprehend = Service.defineService('comprehend', ['2017-11-27']);\nObject.defineProperty(apiLoader.services['comprehend'], '2017-11-27', {\n get: function get() {\n var model = require('../apis/comprehend-2017-11-27.min.json');\n model.paginators = require('../apis/comprehend-2017-11-27.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.Comprehend;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['comprehendmedical'] = {};\nAWS.ComprehendMedical = Service.defineService('comprehendmedical', ['2018-10-30']);\nObject.defineProperty(apiLoader.services['comprehendmedical'], '2018-10-30', {\n get: function get() {\n var model = require('../apis/comprehendmedical-2018-10-30.min.json');\n model.paginators = require('../apis/comprehendmedical-2018-10-30.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.ComprehendMedical;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['computeoptimizer'] = {};\nAWS.ComputeOptimizer = Service.defineService('computeoptimizer', ['2019-11-01']);\nObject.defineProperty(apiLoader.services['computeoptimizer'], '2019-11-01', {\n get: function get() {\n var model = require('../apis/compute-optimizer-2019-11-01.min.json');\n model.paginators = require('../apis/compute-optimizer-2019-11-01.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.ComputeOptimizer;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['configservice'] = {};\nAWS.ConfigService = Service.defineService('configservice', ['2014-11-12']);\nObject.defineProperty(apiLoader.services['configservice'], '2014-11-12', {\n get: function get() {\n var model = require('../apis/config-2014-11-12.min.json');\n model.paginators = require('../apis/config-2014-11-12.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.ConfigService;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['connect'] = {};\nAWS.Connect = Service.defineService('connect', ['2017-08-08']);\nObject.defineProperty(apiLoader.services['connect'], '2017-08-08', {\n get: function get() {\n var model = require('../apis/connect-2017-08-08.min.json');\n model.paginators = require('../apis/connect-2017-08-08.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.Connect;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['connectcontactlens'] = {};\nAWS.ConnectContactLens = Service.defineService('connectcontactlens', ['2020-08-21']);\nObject.defineProperty(apiLoader.services['connectcontactlens'], '2020-08-21', {\n get: function get() {\n var model = require('../apis/connect-contact-lens-2020-08-21.min.json');\n model.paginators = require('../apis/connect-contact-lens-2020-08-21.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.ConnectContactLens;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['connectparticipant'] = {};\nAWS.ConnectParticipant = Service.defineService('connectparticipant', ['2018-09-07']);\nObject.defineProperty(apiLoader.services['connectparticipant'], '2018-09-07', {\n get: function get() {\n var model = require('../apis/connectparticipant-2018-09-07.min.json');\n model.paginators = require('../apis/connectparticipant-2018-09-07.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.ConnectParticipant;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['costexplorer'] = {};\nAWS.CostExplorer = Service.defineService('costexplorer', ['2017-10-25']);\nObject.defineProperty(apiLoader.services['costexplorer'], '2017-10-25', {\n get: function get() {\n var model = require('../apis/ce-2017-10-25.min.json');\n model.paginators = require('../apis/ce-2017-10-25.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.CostExplorer;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['cur'] = {};\nAWS.CUR = Service.defineService('cur', ['2017-01-06']);\nObject.defineProperty(apiLoader.services['cur'], '2017-01-06', {\n get: function get() {\n var model = require('../apis/cur-2017-01-06.min.json');\n model.paginators = require('../apis/cur-2017-01-06.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.CUR;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['customerprofiles'] = {};\nAWS.CustomerProfiles = Service.defineService('customerprofiles', ['2020-08-15']);\nObject.defineProperty(apiLoader.services['customerprofiles'], '2020-08-15', {\n get: function get() {\n var model = require('../apis/customer-profiles-2020-08-15.min.json');\n model.paginators = require('../apis/customer-profiles-2020-08-15.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.CustomerProfiles;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['databrew'] = {};\nAWS.DataBrew = Service.defineService('databrew', ['2017-07-25']);\nObject.defineProperty(apiLoader.services['databrew'], '2017-07-25', {\n get: function get() {\n var model = require('../apis/databrew-2017-07-25.min.json');\n model.paginators = require('../apis/databrew-2017-07-25.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.DataBrew;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['dataexchange'] = {};\nAWS.DataExchange = Service.defineService('dataexchange', ['2017-07-25']);\nObject.defineProperty(apiLoader.services['dataexchange'], '2017-07-25', {\n get: function get() {\n var model = require('../apis/dataexchange-2017-07-25.min.json');\n model.paginators = require('../apis/dataexchange-2017-07-25.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.DataExchange;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['datapipeline'] = {};\nAWS.DataPipeline = Service.defineService('datapipeline', ['2012-10-29']);\nObject.defineProperty(apiLoader.services['datapipeline'], '2012-10-29', {\n get: function get() {\n var model = require('../apis/datapipeline-2012-10-29.min.json');\n model.paginators = require('../apis/datapipeline-2012-10-29.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.DataPipeline;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['datasync'] = {};\nAWS.DataSync = Service.defineService('datasync', ['2018-11-09']);\nObject.defineProperty(apiLoader.services['datasync'], '2018-11-09', {\n get: function get() {\n var model = require('../apis/datasync-2018-11-09.min.json');\n model.paginators = require('../apis/datasync-2018-11-09.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.DataSync;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['dax'] = {};\nAWS.DAX = Service.defineService('dax', ['2017-04-19']);\nObject.defineProperty(apiLoader.services['dax'], '2017-04-19', {\n get: function get() {\n var model = require('../apis/dax-2017-04-19.min.json');\n model.paginators = require('../apis/dax-2017-04-19.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.DAX;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['detective'] = {};\nAWS.Detective = Service.defineService('detective', ['2018-10-26']);\nObject.defineProperty(apiLoader.services['detective'], '2018-10-26', {\n get: function get() {\n var model = require('../apis/detective-2018-10-26.min.json');\n model.paginators = require('../apis/detective-2018-10-26.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.Detective;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['devicefarm'] = {};\nAWS.DeviceFarm = Service.defineService('devicefarm', ['2015-06-23']);\nObject.defineProperty(apiLoader.services['devicefarm'], '2015-06-23', {\n get: function get() {\n var model = require('../apis/devicefarm-2015-06-23.min.json');\n model.paginators = require('../apis/devicefarm-2015-06-23.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.DeviceFarm;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['devopsguru'] = {};\nAWS.DevOpsGuru = Service.defineService('devopsguru', ['2020-12-01']);\nObject.defineProperty(apiLoader.services['devopsguru'], '2020-12-01', {\n get: function get() {\n var model = require('../apis/devops-guru-2020-12-01.min.json');\n model.paginators = require('../apis/devops-guru-2020-12-01.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.DevOpsGuru;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['directconnect'] = {};\nAWS.DirectConnect = Service.defineService('directconnect', ['2012-10-25']);\nObject.defineProperty(apiLoader.services['directconnect'], '2012-10-25', {\n get: function get() {\n var model = require('../apis/directconnect-2012-10-25.min.json');\n model.paginators = require('../apis/directconnect-2012-10-25.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.DirectConnect;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['directoryservice'] = {};\nAWS.DirectoryService = Service.defineService('directoryservice', ['2015-04-16']);\nObject.defineProperty(apiLoader.services['directoryservice'], '2015-04-16', {\n get: function get() {\n var model = require('../apis/ds-2015-04-16.min.json');\n model.paginators = require('../apis/ds-2015-04-16.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.DirectoryService;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['discovery'] = {};\nAWS.Discovery = Service.defineService('discovery', ['2015-11-01']);\nObject.defineProperty(apiLoader.services['discovery'], '2015-11-01', {\n get: function get() {\n var model = require('../apis/discovery-2015-11-01.min.json');\n model.paginators = require('../apis/discovery-2015-11-01.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.Discovery;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['dlm'] = {};\nAWS.DLM = Service.defineService('dlm', ['2018-01-12']);\nObject.defineProperty(apiLoader.services['dlm'], '2018-01-12', {\n get: function get() {\n var model = require('../apis/dlm-2018-01-12.min.json');\n model.paginators = require('../apis/dlm-2018-01-12.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.DLM;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['dms'] = {};\nAWS.DMS = Service.defineService('dms', ['2016-01-01']);\nObject.defineProperty(apiLoader.services['dms'], '2016-01-01', {\n get: function get() {\n var model = require('../apis/dms-2016-01-01.min.json');\n model.paginators = require('../apis/dms-2016-01-01.paginators.json').pagination;\n model.waiters = require('../apis/dms-2016-01-01.waiters2.json').waiters;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.DMS;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['docdb'] = {};\nAWS.DocDB = Service.defineService('docdb', ['2014-10-31']);\nrequire('../lib/services/docdb');\nObject.defineProperty(apiLoader.services['docdb'], '2014-10-31', {\n get: function get() {\n var model = require('../apis/docdb-2014-10-31.min.json');\n model.paginators = require('../apis/docdb-2014-10-31.paginators.json').pagination;\n model.waiters = require('../apis/docdb-2014-10-31.waiters2.json').waiters;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.DocDB;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['drs'] = {};\nAWS.Drs = Service.defineService('drs', ['2020-02-26']);\nObject.defineProperty(apiLoader.services['drs'], '2020-02-26', {\n get: function get() {\n var model = require('../apis/drs-2020-02-26.min.json');\n model.paginators = require('../apis/drs-2020-02-26.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.Drs;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['dynamodb'] = {};\nAWS.DynamoDB = Service.defineService('dynamodb', ['2011-12-05', '2012-08-10']);\nrequire('../lib/services/dynamodb');\nObject.defineProperty(apiLoader.services['dynamodb'], '2011-12-05', {\n get: function get() {\n var model = require('../apis/dynamodb-2011-12-05.min.json');\n model.paginators = require('../apis/dynamodb-2011-12-05.paginators.json').pagination;\n model.waiters = require('../apis/dynamodb-2011-12-05.waiters2.json').waiters;\n return model;\n },\n enumerable: true,\n configurable: true\n});\nObject.defineProperty(apiLoader.services['dynamodb'], '2012-08-10', {\n get: function get() {\n var model = require('../apis/dynamodb-2012-08-10.min.json');\n model.paginators = require('../apis/dynamodb-2012-08-10.paginators.json').pagination;\n model.waiters = require('../apis/dynamodb-2012-08-10.waiters2.json').waiters;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.DynamoDB;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['dynamodbstreams'] = {};\nAWS.DynamoDBStreams = Service.defineService('dynamodbstreams', ['2012-08-10']);\nObject.defineProperty(apiLoader.services['dynamodbstreams'], '2012-08-10', {\n get: function get() {\n var model = require('../apis/streams.dynamodb-2012-08-10.min.json');\n model.paginators = require('../apis/streams.dynamodb-2012-08-10.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.DynamoDBStreams;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['ebs'] = {};\nAWS.EBS = Service.defineService('ebs', ['2019-11-02']);\nObject.defineProperty(apiLoader.services['ebs'], '2019-11-02', {\n get: function get() {\n var model = require('../apis/ebs-2019-11-02.min.json');\n model.paginators = require('../apis/ebs-2019-11-02.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.EBS;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['ec2'] = {};\nAWS.EC2 = Service.defineService('ec2', ['2013-06-15*', '2013-10-15*', '2014-02-01*', '2014-05-01*', '2014-06-15*', '2014-09-01*', '2014-10-01*', '2015-03-01*', '2015-04-15*', '2015-10-01*', '2016-04-01*', '2016-09-15*', '2016-11-15']);\nrequire('../lib/services/ec2');\nObject.defineProperty(apiLoader.services['ec2'], '2016-11-15', {\n get: function get() {\n var model = require('../apis/ec2-2016-11-15.min.json');\n model.paginators = require('../apis/ec2-2016-11-15.paginators.json').pagination;\n model.waiters = require('../apis/ec2-2016-11-15.waiters2.json').waiters;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.EC2;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['ec2instanceconnect'] = {};\nAWS.EC2InstanceConnect = Service.defineService('ec2instanceconnect', ['2018-04-02']);\nObject.defineProperty(apiLoader.services['ec2instanceconnect'], '2018-04-02', {\n get: function get() {\n var model = require('../apis/ec2-instance-connect-2018-04-02.min.json');\n model.paginators = require('../apis/ec2-instance-connect-2018-04-02.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.EC2InstanceConnect;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['ecr'] = {};\nAWS.ECR = Service.defineService('ecr', ['2015-09-21']);\nObject.defineProperty(apiLoader.services['ecr'], '2015-09-21', {\n get: function get() {\n var model = require('../apis/ecr-2015-09-21.min.json');\n model.paginators = require('../apis/ecr-2015-09-21.paginators.json').pagination;\n model.waiters = require('../apis/ecr-2015-09-21.waiters2.json').waiters;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.ECR;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['ecrpublic'] = {};\nAWS.ECRPUBLIC = Service.defineService('ecrpublic', ['2020-10-30']);\nObject.defineProperty(apiLoader.services['ecrpublic'], '2020-10-30', {\n get: function get() {\n var model = require('../apis/ecr-public-2020-10-30.min.json');\n model.paginators = require('../apis/ecr-public-2020-10-30.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.ECRPUBLIC;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['ecs'] = {};\nAWS.ECS = Service.defineService('ecs', ['2014-11-13']);\nObject.defineProperty(apiLoader.services['ecs'], '2014-11-13', {\n get: function get() {\n var model = require('../apis/ecs-2014-11-13.min.json');\n model.paginators = require('../apis/ecs-2014-11-13.paginators.json').pagination;\n model.waiters = require('../apis/ecs-2014-11-13.waiters2.json').waiters;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.ECS;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['efs'] = {};\nAWS.EFS = Service.defineService('efs', ['2015-02-01']);\nObject.defineProperty(apiLoader.services['efs'], '2015-02-01', {\n get: function get() {\n var model = require('../apis/elasticfilesystem-2015-02-01.min.json');\n model.paginators = require('../apis/elasticfilesystem-2015-02-01.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.EFS;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['eks'] = {};\nAWS.EKS = Service.defineService('eks', ['2017-11-01']);\nObject.defineProperty(apiLoader.services['eks'], '2017-11-01', {\n get: function get() {\n var model = require('../apis/eks-2017-11-01.min.json');\n model.paginators = require('../apis/eks-2017-11-01.paginators.json').pagination;\n model.waiters = require('../apis/eks-2017-11-01.waiters2.json').waiters;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.EKS;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['elasticache'] = {};\nAWS.ElastiCache = Service.defineService('elasticache', ['2012-11-15*', '2014-03-24*', '2014-07-15*', '2014-09-30*', '2015-02-02']);\nObject.defineProperty(apiLoader.services['elasticache'], '2015-02-02', {\n get: function get() {\n var model = require('../apis/elasticache-2015-02-02.min.json');\n model.paginators = require('../apis/elasticache-2015-02-02.paginators.json').pagination;\n model.waiters = require('../apis/elasticache-2015-02-02.waiters2.json').waiters;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.ElastiCache;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['elasticbeanstalk'] = {};\nAWS.ElasticBeanstalk = Service.defineService('elasticbeanstalk', ['2010-12-01']);\nObject.defineProperty(apiLoader.services['elasticbeanstalk'], '2010-12-01', {\n get: function get() {\n var model = require('../apis/elasticbeanstalk-2010-12-01.min.json');\n model.paginators = require('../apis/elasticbeanstalk-2010-12-01.paginators.json').pagination;\n model.waiters = require('../apis/elasticbeanstalk-2010-12-01.waiters2.json').waiters;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.ElasticBeanstalk;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['elasticinference'] = {};\nAWS.ElasticInference = Service.defineService('elasticinference', ['2017-07-25']);\nObject.defineProperty(apiLoader.services['elasticinference'], '2017-07-25', {\n get: function get() {\n var model = require('../apis/elastic-inference-2017-07-25.min.json');\n model.paginators = require('../apis/elastic-inference-2017-07-25.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.ElasticInference;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['elastictranscoder'] = {};\nAWS.ElasticTranscoder = Service.defineService('elastictranscoder', ['2012-09-25']);\nObject.defineProperty(apiLoader.services['elastictranscoder'], '2012-09-25', {\n get: function get() {\n var model = require('../apis/elastictranscoder-2012-09-25.min.json');\n model.paginators = require('../apis/elastictranscoder-2012-09-25.paginators.json').pagination;\n model.waiters = require('../apis/elastictranscoder-2012-09-25.waiters2.json').waiters;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.ElasticTranscoder;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['elb'] = {};\nAWS.ELB = Service.defineService('elb', ['2012-06-01']);\nObject.defineProperty(apiLoader.services['elb'], '2012-06-01', {\n get: function get() {\n var model = require('../apis/elasticloadbalancing-2012-06-01.min.json');\n model.paginators = require('../apis/elasticloadbalancing-2012-06-01.paginators.json').pagination;\n model.waiters = require('../apis/elasticloadbalancing-2012-06-01.waiters2.json').waiters;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.ELB;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['elbv2'] = {};\nAWS.ELBv2 = Service.defineService('elbv2', ['2015-12-01']);\nObject.defineProperty(apiLoader.services['elbv2'], '2015-12-01', {\n get: function get() {\n var model = require('../apis/elasticloadbalancingv2-2015-12-01.min.json');\n model.paginators = require('../apis/elasticloadbalancingv2-2015-12-01.paginators.json').pagination;\n model.waiters = require('../apis/elasticloadbalancingv2-2015-12-01.waiters2.json').waiters;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.ELBv2;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['emr'] = {};\nAWS.EMR = Service.defineService('emr', ['2009-03-31']);\nObject.defineProperty(apiLoader.services['emr'], '2009-03-31', {\n get: function get() {\n var model = require('../apis/elasticmapreduce-2009-03-31.min.json');\n model.paginators = require('../apis/elasticmapreduce-2009-03-31.paginators.json').pagination;\n model.waiters = require('../apis/elasticmapreduce-2009-03-31.waiters2.json').waiters;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.EMR;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['emrcontainers'] = {};\nAWS.EMRcontainers = Service.defineService('emrcontainers', ['2020-10-01']);\nObject.defineProperty(apiLoader.services['emrcontainers'], '2020-10-01', {\n get: function get() {\n var model = require('../apis/emr-containers-2020-10-01.min.json');\n model.paginators = require('../apis/emr-containers-2020-10-01.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.EMRcontainers;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['es'] = {};\nAWS.ES = Service.defineService('es', ['2015-01-01']);\nObject.defineProperty(apiLoader.services['es'], '2015-01-01', {\n get: function get() {\n var model = require('../apis/es-2015-01-01.min.json');\n model.paginators = require('../apis/es-2015-01-01.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.ES;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['eventbridge'] = {};\nAWS.EventBridge = Service.defineService('eventbridge', ['2015-10-07']);\nObject.defineProperty(apiLoader.services['eventbridge'], '2015-10-07', {\n get: function get() {\n var model = require('../apis/eventbridge-2015-10-07.min.json');\n model.paginators = require('../apis/eventbridge-2015-10-07.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.EventBridge;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['evidently'] = {};\nAWS.Evidently = Service.defineService('evidently', ['2021-02-01']);\nObject.defineProperty(apiLoader.services['evidently'], '2021-02-01', {\n get: function get() {\n var model = require('../apis/evidently-2021-02-01.min.json');\n model.paginators = require('../apis/evidently-2021-02-01.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.Evidently;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['finspace'] = {};\nAWS.Finspace = Service.defineService('finspace', ['2021-03-12']);\nObject.defineProperty(apiLoader.services['finspace'], '2021-03-12', {\n get: function get() {\n var model = require('../apis/finspace-2021-03-12.min.json');\n model.paginators = require('../apis/finspace-2021-03-12.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.Finspace;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['finspacedata'] = {};\nAWS.Finspacedata = Service.defineService('finspacedata', ['2020-07-13']);\nObject.defineProperty(apiLoader.services['finspacedata'], '2020-07-13', {\n get: function get() {\n var model = require('../apis/finspace-data-2020-07-13.min.json');\n model.paginators = require('../apis/finspace-data-2020-07-13.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.Finspacedata;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['firehose'] = {};\nAWS.Firehose = Service.defineService('firehose', ['2015-08-04']);\nObject.defineProperty(apiLoader.services['firehose'], '2015-08-04', {\n get: function get() {\n var model = require('../apis/firehose-2015-08-04.min.json');\n model.paginators = require('../apis/firehose-2015-08-04.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.Firehose;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['fis'] = {};\nAWS.Fis = Service.defineService('fis', ['2020-12-01']);\nObject.defineProperty(apiLoader.services['fis'], '2020-12-01', {\n get: function get() {\n var model = require('../apis/fis-2020-12-01.min.json');\n model.paginators = require('../apis/fis-2020-12-01.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.Fis;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['fms'] = {};\nAWS.FMS = Service.defineService('fms', ['2018-01-01']);\nObject.defineProperty(apiLoader.services['fms'], '2018-01-01', {\n get: function get() {\n var model = require('../apis/fms-2018-01-01.min.json');\n model.paginators = require('../apis/fms-2018-01-01.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.FMS;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['forecastqueryservice'] = {};\nAWS.ForecastQueryService = Service.defineService('forecastqueryservice', ['2018-06-26']);\nObject.defineProperty(apiLoader.services['forecastqueryservice'], '2018-06-26', {\n get: function get() {\n var model = require('../apis/forecastquery-2018-06-26.min.json');\n model.paginators = require('../apis/forecastquery-2018-06-26.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.ForecastQueryService;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['forecastservice'] = {};\nAWS.ForecastService = Service.defineService('forecastservice', ['2018-06-26']);\nObject.defineProperty(apiLoader.services['forecastservice'], '2018-06-26', {\n get: function get() {\n var model = require('../apis/forecast-2018-06-26.min.json');\n model.paginators = require('../apis/forecast-2018-06-26.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.ForecastService;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['frauddetector'] = {};\nAWS.FraudDetector = Service.defineService('frauddetector', ['2019-11-15']);\nObject.defineProperty(apiLoader.services['frauddetector'], '2019-11-15', {\n get: function get() {\n var model = require('../apis/frauddetector-2019-11-15.min.json');\n model.paginators = require('../apis/frauddetector-2019-11-15.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.FraudDetector;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['fsx'] = {};\nAWS.FSx = Service.defineService('fsx', ['2018-03-01']);\nObject.defineProperty(apiLoader.services['fsx'], '2018-03-01', {\n get: function get() {\n var model = require('../apis/fsx-2018-03-01.min.json');\n model.paginators = require('../apis/fsx-2018-03-01.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.FSx;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['gamelift'] = {};\nAWS.GameLift = Service.defineService('gamelift', ['2015-10-01']);\nObject.defineProperty(apiLoader.services['gamelift'], '2015-10-01', {\n get: function get() {\n var model = require('../apis/gamelift-2015-10-01.min.json');\n model.paginators = require('../apis/gamelift-2015-10-01.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.GameLift;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['glacier'] = {};\nAWS.Glacier = Service.defineService('glacier', ['2012-06-01']);\nrequire('../lib/services/glacier');\nObject.defineProperty(apiLoader.services['glacier'], '2012-06-01', {\n get: function get() {\n var model = require('../apis/glacier-2012-06-01.min.json');\n model.paginators = require('../apis/glacier-2012-06-01.paginators.json').pagination;\n model.waiters = require('../apis/glacier-2012-06-01.waiters2.json').waiters;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.Glacier;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['globalaccelerator'] = {};\nAWS.GlobalAccelerator = Service.defineService('globalaccelerator', ['2018-08-08']);\nObject.defineProperty(apiLoader.services['globalaccelerator'], '2018-08-08', {\n get: function get() {\n var model = require('../apis/globalaccelerator-2018-08-08.min.json');\n model.paginators = require('../apis/globalaccelerator-2018-08-08.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.GlobalAccelerator;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['glue'] = {};\nAWS.Glue = Service.defineService('glue', ['2017-03-31']);\nObject.defineProperty(apiLoader.services['glue'], '2017-03-31', {\n get: function get() {\n var model = require('../apis/glue-2017-03-31.min.json');\n model.paginators = require('../apis/glue-2017-03-31.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.Glue;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['grafana'] = {};\nAWS.Grafana = Service.defineService('grafana', ['2020-08-18']);\nObject.defineProperty(apiLoader.services['grafana'], '2020-08-18', {\n get: function get() {\n var model = require('../apis/grafana-2020-08-18.min.json');\n model.paginators = require('../apis/grafana-2020-08-18.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.Grafana;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['greengrass'] = {};\nAWS.Greengrass = Service.defineService('greengrass', ['2017-06-07']);\nObject.defineProperty(apiLoader.services['greengrass'], '2017-06-07', {\n get: function get() {\n var model = require('../apis/greengrass-2017-06-07.min.json');\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.Greengrass;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['greengrassv2'] = {};\nAWS.GreengrassV2 = Service.defineService('greengrassv2', ['2020-11-30']);\nObject.defineProperty(apiLoader.services['greengrassv2'], '2020-11-30', {\n get: function get() {\n var model = require('../apis/greengrassv2-2020-11-30.min.json');\n model.paginators = require('../apis/greengrassv2-2020-11-30.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.GreengrassV2;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['groundstation'] = {};\nAWS.GroundStation = Service.defineService('groundstation', ['2019-05-23']);\nObject.defineProperty(apiLoader.services['groundstation'], '2019-05-23', {\n get: function get() {\n var model = require('../apis/groundstation-2019-05-23.min.json');\n model.paginators = require('../apis/groundstation-2019-05-23.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.GroundStation;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['guardduty'] = {};\nAWS.GuardDuty = Service.defineService('guardduty', ['2017-11-28']);\nObject.defineProperty(apiLoader.services['guardduty'], '2017-11-28', {\n get: function get() {\n var model = require('../apis/guardduty-2017-11-28.min.json');\n model.paginators = require('../apis/guardduty-2017-11-28.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.GuardDuty;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['health'] = {};\nAWS.Health = Service.defineService('health', ['2016-08-04']);\nObject.defineProperty(apiLoader.services['health'], '2016-08-04', {\n get: function get() {\n var model = require('../apis/health-2016-08-04.min.json');\n model.paginators = require('../apis/health-2016-08-04.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.Health;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['healthlake'] = {};\nAWS.HealthLake = Service.defineService('healthlake', ['2017-07-01']);\nObject.defineProperty(apiLoader.services['healthlake'], '2017-07-01', {\n get: function get() {\n var model = require('../apis/healthlake-2017-07-01.min.json');\n model.paginators = require('../apis/healthlake-2017-07-01.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.HealthLake;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['honeycode'] = {};\nAWS.Honeycode = Service.defineService('honeycode', ['2020-03-01']);\nObject.defineProperty(apiLoader.services['honeycode'], '2020-03-01', {\n get: function get() {\n var model = require('../apis/honeycode-2020-03-01.min.json');\n model.paginators = require('../apis/honeycode-2020-03-01.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.Honeycode;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['iam'] = {};\nAWS.IAM = Service.defineService('iam', ['2010-05-08']);\nObject.defineProperty(apiLoader.services['iam'], '2010-05-08', {\n get: function get() {\n var model = require('../apis/iam-2010-05-08.min.json');\n model.paginators = require('../apis/iam-2010-05-08.paginators.json').pagination;\n model.waiters = require('../apis/iam-2010-05-08.waiters2.json').waiters;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.IAM;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['identitystore'] = {};\nAWS.IdentityStore = Service.defineService('identitystore', ['2020-06-15']);\nObject.defineProperty(apiLoader.services['identitystore'], '2020-06-15', {\n get: function get() {\n var model = require('../apis/identitystore-2020-06-15.min.json');\n model.paginators = require('../apis/identitystore-2020-06-15.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.IdentityStore;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['imagebuilder'] = {};\nAWS.Imagebuilder = Service.defineService('imagebuilder', ['2019-12-02']);\nObject.defineProperty(apiLoader.services['imagebuilder'], '2019-12-02', {\n get: function get() {\n var model = require('../apis/imagebuilder-2019-12-02.min.json');\n model.paginators = require('../apis/imagebuilder-2019-12-02.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.Imagebuilder;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['importexport'] = {};\nAWS.ImportExport = Service.defineService('importexport', ['2010-06-01']);\nObject.defineProperty(apiLoader.services['importexport'], '2010-06-01', {\n get: function get() {\n var model = require('../apis/importexport-2010-06-01.min.json');\n model.paginators = require('../apis/importexport-2010-06-01.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.ImportExport;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['inspector'] = {};\nAWS.Inspector = Service.defineService('inspector', ['2015-08-18*', '2016-02-16']);\nObject.defineProperty(apiLoader.services['inspector'], '2016-02-16', {\n get: function get() {\n var model = require('../apis/inspector-2016-02-16.min.json');\n model.paginators = require('../apis/inspector-2016-02-16.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.Inspector;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['inspector2'] = {};\nAWS.Inspector2 = Service.defineService('inspector2', ['2020-06-08']);\nObject.defineProperty(apiLoader.services['inspector2'], '2020-06-08', {\n get: function get() {\n var model = require('../apis/inspector2-2020-06-08.min.json');\n model.paginators = require('../apis/inspector2-2020-06-08.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.Inspector2;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['iot'] = {};\nAWS.Iot = Service.defineService('iot', ['2015-05-28']);\nObject.defineProperty(apiLoader.services['iot'], '2015-05-28', {\n get: function get() {\n var model = require('../apis/iot-2015-05-28.min.json');\n model.paginators = require('../apis/iot-2015-05-28.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.Iot;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['iot1clickdevicesservice'] = {};\nAWS.IoT1ClickDevicesService = Service.defineService('iot1clickdevicesservice', ['2018-05-14']);\nObject.defineProperty(apiLoader.services['iot1clickdevicesservice'], '2018-05-14', {\n get: function get() {\n var model = require('../apis/iot1click-devices-2018-05-14.min.json');\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.IoT1ClickDevicesService;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['iot1clickprojects'] = {};\nAWS.IoT1ClickProjects = Service.defineService('iot1clickprojects', ['2018-05-14']);\nObject.defineProperty(apiLoader.services['iot1clickprojects'], '2018-05-14', {\n get: function get() {\n var model = require('../apis/iot1click-projects-2018-05-14.min.json');\n model.paginators = require('../apis/iot1click-projects-2018-05-14.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.IoT1ClickProjects;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['iotanalytics'] = {};\nAWS.IoTAnalytics = Service.defineService('iotanalytics', ['2017-11-27']);\nObject.defineProperty(apiLoader.services['iotanalytics'], '2017-11-27', {\n get: function get() {\n var model = require('../apis/iotanalytics-2017-11-27.min.json');\n model.paginators = require('../apis/iotanalytics-2017-11-27.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.IoTAnalytics;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['iotdata'] = {};\nAWS.IotData = Service.defineService('iotdata', ['2015-05-28']);\nrequire('../lib/services/iotdata');\nObject.defineProperty(apiLoader.services['iotdata'], '2015-05-28', {\n get: function get() {\n var model = require('../apis/iot-data-2015-05-28.min.json');\n model.paginators = require('../apis/iot-data-2015-05-28.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.IotData;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['iotdeviceadvisor'] = {};\nAWS.IotDeviceAdvisor = Service.defineService('iotdeviceadvisor', ['2020-09-18']);\nObject.defineProperty(apiLoader.services['iotdeviceadvisor'], '2020-09-18', {\n get: function get() {\n var model = require('../apis/iotdeviceadvisor-2020-09-18.min.json');\n model.paginators = require('../apis/iotdeviceadvisor-2020-09-18.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.IotDeviceAdvisor;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['iotevents'] = {};\nAWS.IoTEvents = Service.defineService('iotevents', ['2018-07-27']);\nObject.defineProperty(apiLoader.services['iotevents'], '2018-07-27', {\n get: function get() {\n var model = require('../apis/iotevents-2018-07-27.min.json');\n model.paginators = require('../apis/iotevents-2018-07-27.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.IoTEvents;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['ioteventsdata'] = {};\nAWS.IoTEventsData = Service.defineService('ioteventsdata', ['2018-10-23']);\nObject.defineProperty(apiLoader.services['ioteventsdata'], '2018-10-23', {\n get: function get() {\n var model = require('../apis/iotevents-data-2018-10-23.min.json');\n model.paginators = require('../apis/iotevents-data-2018-10-23.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.IoTEventsData;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['iotfleethub'] = {};\nAWS.IoTFleetHub = Service.defineService('iotfleethub', ['2020-11-03']);\nObject.defineProperty(apiLoader.services['iotfleethub'], '2020-11-03', {\n get: function get() {\n var model = require('../apis/iotfleethub-2020-11-03.min.json');\n model.paginators = require('../apis/iotfleethub-2020-11-03.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.IoTFleetHub;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['iotjobsdataplane'] = {};\nAWS.IoTJobsDataPlane = Service.defineService('iotjobsdataplane', ['2017-09-29']);\nObject.defineProperty(apiLoader.services['iotjobsdataplane'], '2017-09-29', {\n get: function get() {\n var model = require('../apis/iot-jobs-data-2017-09-29.min.json');\n model.paginators = require('../apis/iot-jobs-data-2017-09-29.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.IoTJobsDataPlane;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['iotsecuretunneling'] = {};\nAWS.IoTSecureTunneling = Service.defineService('iotsecuretunneling', ['2018-10-05']);\nObject.defineProperty(apiLoader.services['iotsecuretunneling'], '2018-10-05', {\n get: function get() {\n var model = require('../apis/iotsecuretunneling-2018-10-05.min.json');\n model.paginators = require('../apis/iotsecuretunneling-2018-10-05.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.IoTSecureTunneling;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['iotsitewise'] = {};\nAWS.IoTSiteWise = Service.defineService('iotsitewise', ['2019-12-02']);\nObject.defineProperty(apiLoader.services['iotsitewise'], '2019-12-02', {\n get: function get() {\n var model = require('../apis/iotsitewise-2019-12-02.min.json');\n model.paginators = require('../apis/iotsitewise-2019-12-02.paginators.json').pagination;\n model.waiters = require('../apis/iotsitewise-2019-12-02.waiters2.json').waiters;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.IoTSiteWise;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['iotthingsgraph'] = {};\nAWS.IoTThingsGraph = Service.defineService('iotthingsgraph', ['2018-09-06']);\nObject.defineProperty(apiLoader.services['iotthingsgraph'], '2018-09-06', {\n get: function get() {\n var model = require('../apis/iotthingsgraph-2018-09-06.min.json');\n model.paginators = require('../apis/iotthingsgraph-2018-09-06.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.IoTThingsGraph;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['iottwinmaker'] = {};\nAWS.IoTTwinMaker = Service.defineService('iottwinmaker', ['2021-11-29']);\nObject.defineProperty(apiLoader.services['iottwinmaker'], '2021-11-29', {\n get: function get() {\n var model = require('../apis/iottwinmaker-2021-11-29.min.json');\n model.paginators = require('../apis/iottwinmaker-2021-11-29.paginators.json').pagination;\n model.waiters = require('../apis/iottwinmaker-2021-11-29.waiters2.json').waiters;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.IoTTwinMaker;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['iotwireless'] = {};\nAWS.IoTWireless = Service.defineService('iotwireless', ['2020-11-22']);\nObject.defineProperty(apiLoader.services['iotwireless'], '2020-11-22', {\n get: function get() {\n var model = require('../apis/iotwireless-2020-11-22.min.json');\n model.paginators = require('../apis/iotwireless-2020-11-22.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.IoTWireless;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['ivs'] = {};\nAWS.IVS = Service.defineService('ivs', ['2020-07-14']);\nObject.defineProperty(apiLoader.services['ivs'], '2020-07-14', {\n get: function get() {\n var model = require('../apis/ivs-2020-07-14.min.json');\n model.paginators = require('../apis/ivs-2020-07-14.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.IVS;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['kafka'] = {};\nAWS.Kafka = Service.defineService('kafka', ['2018-11-14']);\nObject.defineProperty(apiLoader.services['kafka'], '2018-11-14', {\n get: function get() {\n var model = require('../apis/kafka-2018-11-14.min.json');\n model.paginators = require('../apis/kafka-2018-11-14.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.Kafka;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['kafkaconnect'] = {};\nAWS.KafkaConnect = Service.defineService('kafkaconnect', ['2021-09-14']);\nObject.defineProperty(apiLoader.services['kafkaconnect'], '2021-09-14', {\n get: function get() {\n var model = require('../apis/kafkaconnect-2021-09-14.min.json');\n model.paginators = require('../apis/kafkaconnect-2021-09-14.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.KafkaConnect;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['kendra'] = {};\nAWS.Kendra = Service.defineService('kendra', ['2019-02-03']);\nObject.defineProperty(apiLoader.services['kendra'], '2019-02-03', {\n get: function get() {\n var model = require('../apis/kendra-2019-02-03.min.json');\n model.paginators = require('../apis/kendra-2019-02-03.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.Kendra;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['kinesis'] = {};\nAWS.Kinesis = Service.defineService('kinesis', ['2013-12-02']);\nObject.defineProperty(apiLoader.services['kinesis'], '2013-12-02', {\n get: function get() {\n var model = require('../apis/kinesis-2013-12-02.min.json');\n model.paginators = require('../apis/kinesis-2013-12-02.paginators.json').pagination;\n model.waiters = require('../apis/kinesis-2013-12-02.waiters2.json').waiters;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.Kinesis;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['kinesisanalytics'] = {};\nAWS.KinesisAnalytics = Service.defineService('kinesisanalytics', ['2015-08-14']);\nObject.defineProperty(apiLoader.services['kinesisanalytics'], '2015-08-14', {\n get: function get() {\n var model = require('../apis/kinesisanalytics-2015-08-14.min.json');\n model.paginators = require('../apis/kinesisanalytics-2015-08-14.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.KinesisAnalytics;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['kinesisanalyticsv2'] = {};\nAWS.KinesisAnalyticsV2 = Service.defineService('kinesisanalyticsv2', ['2018-05-23']);\nObject.defineProperty(apiLoader.services['kinesisanalyticsv2'], '2018-05-23', {\n get: function get() {\n var model = require('../apis/kinesisanalyticsv2-2018-05-23.min.json');\n model.paginators = require('../apis/kinesisanalyticsv2-2018-05-23.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.KinesisAnalyticsV2;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['kinesisvideo'] = {};\nAWS.KinesisVideo = Service.defineService('kinesisvideo', ['2017-09-30']);\nObject.defineProperty(apiLoader.services['kinesisvideo'], '2017-09-30', {\n get: function get() {\n var model = require('../apis/kinesisvideo-2017-09-30.min.json');\n model.paginators = require('../apis/kinesisvideo-2017-09-30.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.KinesisVideo;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['kinesisvideoarchivedmedia'] = {};\nAWS.KinesisVideoArchivedMedia = Service.defineService('kinesisvideoarchivedmedia', ['2017-09-30']);\nObject.defineProperty(apiLoader.services['kinesisvideoarchivedmedia'], '2017-09-30', {\n get: function get() {\n var model = require('../apis/kinesis-video-archived-media-2017-09-30.min.json');\n model.paginators = require('../apis/kinesis-video-archived-media-2017-09-30.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.KinesisVideoArchivedMedia;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['kinesisvideomedia'] = {};\nAWS.KinesisVideoMedia = Service.defineService('kinesisvideomedia', ['2017-09-30']);\nObject.defineProperty(apiLoader.services['kinesisvideomedia'], '2017-09-30', {\n get: function get() {\n var model = require('../apis/kinesis-video-media-2017-09-30.min.json');\n model.paginators = require('../apis/kinesis-video-media-2017-09-30.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.KinesisVideoMedia;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['kinesisvideosignalingchannels'] = {};\nAWS.KinesisVideoSignalingChannels = Service.defineService('kinesisvideosignalingchannels', ['2019-12-04']);\nObject.defineProperty(apiLoader.services['kinesisvideosignalingchannels'], '2019-12-04', {\n get: function get() {\n var model = require('../apis/kinesis-video-signaling-2019-12-04.min.json');\n model.paginators = require('../apis/kinesis-video-signaling-2019-12-04.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.KinesisVideoSignalingChannels;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['kms'] = {};\nAWS.KMS = Service.defineService('kms', ['2014-11-01']);\nObject.defineProperty(apiLoader.services['kms'], '2014-11-01', {\n get: function get() {\n var model = require('../apis/kms-2014-11-01.min.json');\n model.paginators = require('../apis/kms-2014-11-01.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.KMS;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['lakeformation'] = {};\nAWS.LakeFormation = Service.defineService('lakeformation', ['2017-03-31']);\nObject.defineProperty(apiLoader.services['lakeformation'], '2017-03-31', {\n get: function get() {\n var model = require('../apis/lakeformation-2017-03-31.min.json');\n model.paginators = require('../apis/lakeformation-2017-03-31.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.LakeFormation;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['lambda'] = {};\nAWS.Lambda = Service.defineService('lambda', ['2014-11-11', '2015-03-31']);\nrequire('../lib/services/lambda');\nObject.defineProperty(apiLoader.services['lambda'], '2014-11-11', {\n get: function get() {\n var model = require('../apis/lambda-2014-11-11.min.json');\n model.paginators = require('../apis/lambda-2014-11-11.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\nObject.defineProperty(apiLoader.services['lambda'], '2015-03-31', {\n get: function get() {\n var model = require('../apis/lambda-2015-03-31.min.json');\n model.paginators = require('../apis/lambda-2015-03-31.paginators.json').pagination;\n model.waiters = require('../apis/lambda-2015-03-31.waiters2.json').waiters;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.Lambda;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['lexmodelbuildingservice'] = {};\nAWS.LexModelBuildingService = Service.defineService('lexmodelbuildingservice', ['2017-04-19']);\nObject.defineProperty(apiLoader.services['lexmodelbuildingservice'], '2017-04-19', {\n get: function get() {\n var model = require('../apis/lex-models-2017-04-19.min.json');\n model.paginators = require('../apis/lex-models-2017-04-19.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.LexModelBuildingService;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['lexmodelsv2'] = {};\nAWS.LexModelsV2 = Service.defineService('lexmodelsv2', ['2020-08-07']);\nObject.defineProperty(apiLoader.services['lexmodelsv2'], '2020-08-07', {\n get: function get() {\n var model = require('../apis/models.lex.v2-2020-08-07.min.json');\n model.paginators = require('../apis/models.lex.v2-2020-08-07.paginators.json').pagination;\n model.waiters = require('../apis/models.lex.v2-2020-08-07.waiters2.json').waiters;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.LexModelsV2;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['lexruntime'] = {};\nAWS.LexRuntime = Service.defineService('lexruntime', ['2016-11-28']);\nObject.defineProperty(apiLoader.services['lexruntime'], '2016-11-28', {\n get: function get() {\n var model = require('../apis/runtime.lex-2016-11-28.min.json');\n model.paginators = require('../apis/runtime.lex-2016-11-28.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.LexRuntime;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['lexruntimev2'] = {};\nAWS.LexRuntimeV2 = Service.defineService('lexruntimev2', ['2020-08-07']);\nObject.defineProperty(apiLoader.services['lexruntimev2'], '2020-08-07', {\n get: function get() {\n var model = require('../apis/runtime.lex.v2-2020-08-07.min.json');\n model.paginators = require('../apis/runtime.lex.v2-2020-08-07.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.LexRuntimeV2;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['licensemanager'] = {};\nAWS.LicenseManager = Service.defineService('licensemanager', ['2018-08-01']);\nObject.defineProperty(apiLoader.services['licensemanager'], '2018-08-01', {\n get: function get() {\n var model = require('../apis/license-manager-2018-08-01.min.json');\n model.paginators = require('../apis/license-manager-2018-08-01.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.LicenseManager;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['lightsail'] = {};\nAWS.Lightsail = Service.defineService('lightsail', ['2016-11-28']);\nObject.defineProperty(apiLoader.services['lightsail'], '2016-11-28', {\n get: function get() {\n var model = require('../apis/lightsail-2016-11-28.min.json');\n model.paginators = require('../apis/lightsail-2016-11-28.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.Lightsail;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['location'] = {};\nAWS.Location = Service.defineService('location', ['2020-11-19']);\nObject.defineProperty(apiLoader.services['location'], '2020-11-19', {\n get: function get() {\n var model = require('../apis/location-2020-11-19.min.json');\n model.paginators = require('../apis/location-2020-11-19.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.Location;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['lookoutequipment'] = {};\nAWS.LookoutEquipment = Service.defineService('lookoutequipment', ['2020-12-15']);\nObject.defineProperty(apiLoader.services['lookoutequipment'], '2020-12-15', {\n get: function get() {\n var model = require('../apis/lookoutequipment-2020-12-15.min.json');\n model.paginators = require('../apis/lookoutequipment-2020-12-15.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.LookoutEquipment;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['lookoutmetrics'] = {};\nAWS.LookoutMetrics = Service.defineService('lookoutmetrics', ['2017-07-25']);\nObject.defineProperty(apiLoader.services['lookoutmetrics'], '2017-07-25', {\n get: function get() {\n var model = require('../apis/lookoutmetrics-2017-07-25.min.json');\n model.paginators = require('../apis/lookoutmetrics-2017-07-25.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.LookoutMetrics;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['lookoutvision'] = {};\nAWS.LookoutVision = Service.defineService('lookoutvision', ['2020-11-20']);\nObject.defineProperty(apiLoader.services['lookoutvision'], '2020-11-20', {\n get: function get() {\n var model = require('../apis/lookoutvision-2020-11-20.min.json');\n model.paginators = require('../apis/lookoutvision-2020-11-20.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.LookoutVision;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['machinelearning'] = {};\nAWS.MachineLearning = Service.defineService('machinelearning', ['2014-12-12']);\nrequire('../lib/services/machinelearning');\nObject.defineProperty(apiLoader.services['machinelearning'], '2014-12-12', {\n get: function get() {\n var model = require('../apis/machinelearning-2014-12-12.min.json');\n model.paginators = require('../apis/machinelearning-2014-12-12.paginators.json').pagination;\n model.waiters = require('../apis/machinelearning-2014-12-12.waiters2.json').waiters;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.MachineLearning;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['macie'] = {};\nAWS.Macie = Service.defineService('macie', ['2017-12-19']);\nObject.defineProperty(apiLoader.services['macie'], '2017-12-19', {\n get: function get() {\n var model = require('../apis/macie-2017-12-19.min.json');\n model.paginators = require('../apis/macie-2017-12-19.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.Macie;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['macie2'] = {};\nAWS.Macie2 = Service.defineService('macie2', ['2020-01-01']);\nObject.defineProperty(apiLoader.services['macie2'], '2020-01-01', {\n get: function get() {\n var model = require('../apis/macie2-2020-01-01.min.json');\n model.paginators = require('../apis/macie2-2020-01-01.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.Macie2;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['managedblockchain'] = {};\nAWS.ManagedBlockchain = Service.defineService('managedblockchain', ['2018-09-24']);\nObject.defineProperty(apiLoader.services['managedblockchain'], '2018-09-24', {\n get: function get() {\n var model = require('../apis/managedblockchain-2018-09-24.min.json');\n model.paginators = require('../apis/managedblockchain-2018-09-24.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.ManagedBlockchain;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['marketplacecatalog'] = {};\nAWS.MarketplaceCatalog = Service.defineService('marketplacecatalog', ['2018-09-17']);\nObject.defineProperty(apiLoader.services['marketplacecatalog'], '2018-09-17', {\n get: function get() {\n var model = require('../apis/marketplace-catalog-2018-09-17.min.json');\n model.paginators = require('../apis/marketplace-catalog-2018-09-17.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.MarketplaceCatalog;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['marketplacecommerceanalytics'] = {};\nAWS.MarketplaceCommerceAnalytics = Service.defineService('marketplacecommerceanalytics', ['2015-07-01']);\nObject.defineProperty(apiLoader.services['marketplacecommerceanalytics'], '2015-07-01', {\n get: function get() {\n var model = require('../apis/marketplacecommerceanalytics-2015-07-01.min.json');\n model.paginators = require('../apis/marketplacecommerceanalytics-2015-07-01.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.MarketplaceCommerceAnalytics;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['marketplaceentitlementservice'] = {};\nAWS.MarketplaceEntitlementService = Service.defineService('marketplaceentitlementservice', ['2017-01-11']);\nObject.defineProperty(apiLoader.services['marketplaceentitlementservice'], '2017-01-11', {\n get: function get() {\n var model = require('../apis/entitlement.marketplace-2017-01-11.min.json');\n model.paginators = require('../apis/entitlement.marketplace-2017-01-11.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.MarketplaceEntitlementService;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['marketplacemetering'] = {};\nAWS.MarketplaceMetering = Service.defineService('marketplacemetering', ['2016-01-14']);\nObject.defineProperty(apiLoader.services['marketplacemetering'], '2016-01-14', {\n get: function get() {\n var model = require('../apis/meteringmarketplace-2016-01-14.min.json');\n model.paginators = require('../apis/meteringmarketplace-2016-01-14.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.MarketplaceMetering;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['mediaconnect'] = {};\nAWS.MediaConnect = Service.defineService('mediaconnect', ['2018-11-14']);\nObject.defineProperty(apiLoader.services['mediaconnect'], '2018-11-14', {\n get: function get() {\n var model = require('../apis/mediaconnect-2018-11-14.min.json');\n model.paginators = require('../apis/mediaconnect-2018-11-14.paginators.json').pagination;\n model.waiters = require('../apis/mediaconnect-2018-11-14.waiters2.json').waiters;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.MediaConnect;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['mediaconvert'] = {};\nAWS.MediaConvert = Service.defineService('mediaconvert', ['2017-08-29']);\nObject.defineProperty(apiLoader.services['mediaconvert'], '2017-08-29', {\n get: function get() {\n var model = require('../apis/mediaconvert-2017-08-29.min.json');\n model.paginators = require('../apis/mediaconvert-2017-08-29.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.MediaConvert;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['medialive'] = {};\nAWS.MediaLive = Service.defineService('medialive', ['2017-10-14']);\nObject.defineProperty(apiLoader.services['medialive'], '2017-10-14', {\n get: function get() {\n var model = require('../apis/medialive-2017-10-14.min.json');\n model.paginators = require('../apis/medialive-2017-10-14.paginators.json').pagination;\n model.waiters = require('../apis/medialive-2017-10-14.waiters2.json').waiters;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.MediaLive;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['mediapackage'] = {};\nAWS.MediaPackage = Service.defineService('mediapackage', ['2017-10-12']);\nObject.defineProperty(apiLoader.services['mediapackage'], '2017-10-12', {\n get: function get() {\n var model = require('../apis/mediapackage-2017-10-12.min.json');\n model.paginators = require('../apis/mediapackage-2017-10-12.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.MediaPackage;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['mediapackagevod'] = {};\nAWS.MediaPackageVod = Service.defineService('mediapackagevod', ['2018-11-07']);\nObject.defineProperty(apiLoader.services['mediapackagevod'], '2018-11-07', {\n get: function get() {\n var model = require('../apis/mediapackage-vod-2018-11-07.min.json');\n model.paginators = require('../apis/mediapackage-vod-2018-11-07.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.MediaPackageVod;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['mediastore'] = {};\nAWS.MediaStore = Service.defineService('mediastore', ['2017-09-01']);\nObject.defineProperty(apiLoader.services['mediastore'], '2017-09-01', {\n get: function get() {\n var model = require('../apis/mediastore-2017-09-01.min.json');\n model.paginators = require('../apis/mediastore-2017-09-01.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.MediaStore;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['mediastoredata'] = {};\nAWS.MediaStoreData = Service.defineService('mediastoredata', ['2017-09-01']);\nObject.defineProperty(apiLoader.services['mediastoredata'], '2017-09-01', {\n get: function get() {\n var model = require('../apis/mediastore-data-2017-09-01.min.json');\n model.paginators = require('../apis/mediastore-data-2017-09-01.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.MediaStoreData;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['mediatailor'] = {};\nAWS.MediaTailor = Service.defineService('mediatailor', ['2018-04-23']);\nObject.defineProperty(apiLoader.services['mediatailor'], '2018-04-23', {\n get: function get() {\n var model = require('../apis/mediatailor-2018-04-23.min.json');\n model.paginators = require('../apis/mediatailor-2018-04-23.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.MediaTailor;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['memorydb'] = {};\nAWS.MemoryDB = Service.defineService('memorydb', ['2021-01-01']);\nObject.defineProperty(apiLoader.services['memorydb'], '2021-01-01', {\n get: function get() {\n var model = require('../apis/memorydb-2021-01-01.min.json');\n model.paginators = require('../apis/memorydb-2021-01-01.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.MemoryDB;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['mgn'] = {};\nAWS.Mgn = Service.defineService('mgn', ['2020-02-26']);\nObject.defineProperty(apiLoader.services['mgn'], '2020-02-26', {\n get: function get() {\n var model = require('../apis/mgn-2020-02-26.min.json');\n model.paginators = require('../apis/mgn-2020-02-26.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.Mgn;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['migrationhub'] = {};\nAWS.MigrationHub = Service.defineService('migrationhub', ['2017-05-31']);\nObject.defineProperty(apiLoader.services['migrationhub'], '2017-05-31', {\n get: function get() {\n var model = require('../apis/AWSMigrationHub-2017-05-31.min.json');\n model.paginators = require('../apis/AWSMigrationHub-2017-05-31.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.MigrationHub;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['migrationhubconfig'] = {};\nAWS.MigrationHubConfig = Service.defineService('migrationhubconfig', ['2019-06-30']);\nObject.defineProperty(apiLoader.services['migrationhubconfig'], '2019-06-30', {\n get: function get() {\n var model = require('../apis/migrationhub-config-2019-06-30.min.json');\n model.paginators = require('../apis/migrationhub-config-2019-06-30.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.MigrationHubConfig;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['migrationhubrefactorspaces'] = {};\nAWS.MigrationHubRefactorSpaces = Service.defineService('migrationhubrefactorspaces', ['2021-10-26']);\nObject.defineProperty(apiLoader.services['migrationhubrefactorspaces'], '2021-10-26', {\n get: function get() {\n var model = require('../apis/migration-hub-refactor-spaces-2021-10-26.min.json');\n model.paginators = require('../apis/migration-hub-refactor-spaces-2021-10-26.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.MigrationHubRefactorSpaces;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['migrationhubstrategy'] = {};\nAWS.MigrationHubStrategy = Service.defineService('migrationhubstrategy', ['2020-02-19']);\nObject.defineProperty(apiLoader.services['migrationhubstrategy'], '2020-02-19', {\n get: function get() {\n var model = require('../apis/migrationhubstrategy-2020-02-19.min.json');\n model.paginators = require('../apis/migrationhubstrategy-2020-02-19.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.MigrationHubStrategy;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['mobile'] = {};\nAWS.Mobile = Service.defineService('mobile', ['2017-07-01']);\nObject.defineProperty(apiLoader.services['mobile'], '2017-07-01', {\n get: function get() {\n var model = require('../apis/mobile-2017-07-01.min.json');\n model.paginators = require('../apis/mobile-2017-07-01.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.Mobile;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['mobileanalytics'] = {};\nAWS.MobileAnalytics = Service.defineService('mobileanalytics', ['2014-06-05']);\nObject.defineProperty(apiLoader.services['mobileanalytics'], '2014-06-05', {\n get: function get() {\n var model = require('../apis/mobileanalytics-2014-06-05.min.json');\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.MobileAnalytics;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['mq'] = {};\nAWS.MQ = Service.defineService('mq', ['2017-11-27']);\nObject.defineProperty(apiLoader.services['mq'], '2017-11-27', {\n get: function get() {\n var model = require('../apis/mq-2017-11-27.min.json');\n model.paginators = require('../apis/mq-2017-11-27.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.MQ;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['mturk'] = {};\nAWS.MTurk = Service.defineService('mturk', ['2017-01-17']);\nObject.defineProperty(apiLoader.services['mturk'], '2017-01-17', {\n get: function get() {\n var model = require('../apis/mturk-requester-2017-01-17.min.json');\n model.paginators = require('../apis/mturk-requester-2017-01-17.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.MTurk;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['mwaa'] = {};\nAWS.MWAA = Service.defineService('mwaa', ['2020-07-01']);\nObject.defineProperty(apiLoader.services['mwaa'], '2020-07-01', {\n get: function get() {\n var model = require('../apis/mwaa-2020-07-01.min.json');\n model.paginators = require('../apis/mwaa-2020-07-01.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.MWAA;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['neptune'] = {};\nAWS.Neptune = Service.defineService('neptune', ['2014-10-31']);\nrequire('../lib/services/neptune');\nObject.defineProperty(apiLoader.services['neptune'], '2014-10-31', {\n get: function get() {\n var model = require('../apis/neptune-2014-10-31.min.json');\n model.paginators = require('../apis/neptune-2014-10-31.paginators.json').pagination;\n model.waiters = require('../apis/neptune-2014-10-31.waiters2.json').waiters;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.Neptune;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['networkfirewall'] = {};\nAWS.NetworkFirewall = Service.defineService('networkfirewall', ['2020-11-12']);\nObject.defineProperty(apiLoader.services['networkfirewall'], '2020-11-12', {\n get: function get() {\n var model = require('../apis/network-firewall-2020-11-12.min.json');\n model.paginators = require('../apis/network-firewall-2020-11-12.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.NetworkFirewall;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['networkmanager'] = {};\nAWS.NetworkManager = Service.defineService('networkmanager', ['2019-07-05']);\nObject.defineProperty(apiLoader.services['networkmanager'], '2019-07-05', {\n get: function get() {\n var model = require('../apis/networkmanager-2019-07-05.min.json');\n model.paginators = require('../apis/networkmanager-2019-07-05.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.NetworkManager;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['nimble'] = {};\nAWS.Nimble = Service.defineService('nimble', ['2020-08-01']);\nObject.defineProperty(apiLoader.services['nimble'], '2020-08-01', {\n get: function get() {\n var model = require('../apis/nimble-2020-08-01.min.json');\n model.paginators = require('../apis/nimble-2020-08-01.paginators.json').pagination;\n model.waiters = require('../apis/nimble-2020-08-01.waiters2.json').waiters;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.Nimble;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['opensearch'] = {};\nAWS.OpenSearch = Service.defineService('opensearch', ['2021-01-01']);\nObject.defineProperty(apiLoader.services['opensearch'], '2021-01-01', {\n get: function get() {\n var model = require('../apis/opensearch-2021-01-01.min.json');\n model.paginators = require('../apis/opensearch-2021-01-01.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.OpenSearch;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['opsworks'] = {};\nAWS.OpsWorks = Service.defineService('opsworks', ['2013-02-18']);\nObject.defineProperty(apiLoader.services['opsworks'], '2013-02-18', {\n get: function get() {\n var model = require('../apis/opsworks-2013-02-18.min.json');\n model.paginators = require('../apis/opsworks-2013-02-18.paginators.json').pagination;\n model.waiters = require('../apis/opsworks-2013-02-18.waiters2.json').waiters;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.OpsWorks;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['opsworkscm'] = {};\nAWS.OpsWorksCM = Service.defineService('opsworkscm', ['2016-11-01']);\nObject.defineProperty(apiLoader.services['opsworkscm'], '2016-11-01', {\n get: function get() {\n var model = require('../apis/opsworkscm-2016-11-01.min.json');\n model.paginators = require('../apis/opsworkscm-2016-11-01.paginators.json').pagination;\n model.waiters = require('../apis/opsworkscm-2016-11-01.waiters2.json').waiters;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.OpsWorksCM;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['organizations'] = {};\nAWS.Organizations = Service.defineService('organizations', ['2016-11-28']);\nObject.defineProperty(apiLoader.services['organizations'], '2016-11-28', {\n get: function get() {\n var model = require('../apis/organizations-2016-11-28.min.json');\n model.paginators = require('../apis/organizations-2016-11-28.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.Organizations;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['outposts'] = {};\nAWS.Outposts = Service.defineService('outposts', ['2019-12-03']);\nObject.defineProperty(apiLoader.services['outposts'], '2019-12-03', {\n get: function get() {\n var model = require('../apis/outposts-2019-12-03.min.json');\n model.paginators = require('../apis/outposts-2019-12-03.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.Outposts;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['panorama'] = {};\nAWS.Panorama = Service.defineService('panorama', ['2019-07-24']);\nObject.defineProperty(apiLoader.services['panorama'], '2019-07-24', {\n get: function get() {\n var model = require('../apis/panorama-2019-07-24.min.json');\n model.paginators = require('../apis/panorama-2019-07-24.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.Panorama;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['personalize'] = {};\nAWS.Personalize = Service.defineService('personalize', ['2018-05-22']);\nObject.defineProperty(apiLoader.services['personalize'], '2018-05-22', {\n get: function get() {\n var model = require('../apis/personalize-2018-05-22.min.json');\n model.paginators = require('../apis/personalize-2018-05-22.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.Personalize;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['personalizeevents'] = {};\nAWS.PersonalizeEvents = Service.defineService('personalizeevents', ['2018-03-22']);\nObject.defineProperty(apiLoader.services['personalizeevents'], '2018-03-22', {\n get: function get() {\n var model = require('../apis/personalize-events-2018-03-22.min.json');\n model.paginators = require('../apis/personalize-events-2018-03-22.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.PersonalizeEvents;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['personalizeruntime'] = {};\nAWS.PersonalizeRuntime = Service.defineService('personalizeruntime', ['2018-05-22']);\nObject.defineProperty(apiLoader.services['personalizeruntime'], '2018-05-22', {\n get: function get() {\n var model = require('../apis/personalize-runtime-2018-05-22.min.json');\n model.paginators = require('../apis/personalize-runtime-2018-05-22.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.PersonalizeRuntime;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['pi'] = {};\nAWS.PI = Service.defineService('pi', ['2018-02-27']);\nObject.defineProperty(apiLoader.services['pi'], '2018-02-27', {\n get: function get() {\n var model = require('../apis/pi-2018-02-27.min.json');\n model.paginators = require('../apis/pi-2018-02-27.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.PI;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['pinpoint'] = {};\nAWS.Pinpoint = Service.defineService('pinpoint', ['2016-12-01']);\nObject.defineProperty(apiLoader.services['pinpoint'], '2016-12-01', {\n get: function get() {\n var model = require('../apis/pinpoint-2016-12-01.min.json');\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.Pinpoint;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['pinpointemail'] = {};\nAWS.PinpointEmail = Service.defineService('pinpointemail', ['2018-07-26']);\nObject.defineProperty(apiLoader.services['pinpointemail'], '2018-07-26', {\n get: function get() {\n var model = require('../apis/pinpoint-email-2018-07-26.min.json');\n model.paginators = require('../apis/pinpoint-email-2018-07-26.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.PinpointEmail;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['pinpointsmsvoice'] = {};\nAWS.PinpointSMSVoice = Service.defineService('pinpointsmsvoice', ['2018-09-05']);\nObject.defineProperty(apiLoader.services['pinpointsmsvoice'], '2018-09-05', {\n get: function get() {\n var model = require('../apis/sms-voice-2018-09-05.min.json');\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.PinpointSMSVoice;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['polly'] = {};\nAWS.Polly = Service.defineService('polly', ['2016-06-10']);\nrequire('../lib/services/polly');\nObject.defineProperty(apiLoader.services['polly'], '2016-06-10', {\n get: function get() {\n var model = require('../apis/polly-2016-06-10.min.json');\n model.paginators = require('../apis/polly-2016-06-10.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.Polly;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['pricing'] = {};\nAWS.Pricing = Service.defineService('pricing', ['2017-10-15']);\nObject.defineProperty(apiLoader.services['pricing'], '2017-10-15', {\n get: function get() {\n var model = require('../apis/pricing-2017-10-15.min.json');\n model.paginators = require('../apis/pricing-2017-10-15.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.Pricing;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['proton'] = {};\nAWS.Proton = Service.defineService('proton', ['2020-07-20']);\nObject.defineProperty(apiLoader.services['proton'], '2020-07-20', {\n get: function get() {\n var model = require('../apis/proton-2020-07-20.min.json');\n model.paginators = require('../apis/proton-2020-07-20.paginators.json').pagination;\n model.waiters = require('../apis/proton-2020-07-20.waiters2.json').waiters;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.Proton;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['qldb'] = {};\nAWS.QLDB = Service.defineService('qldb', ['2019-01-02']);\nObject.defineProperty(apiLoader.services['qldb'], '2019-01-02', {\n get: function get() {\n var model = require('../apis/qldb-2019-01-02.min.json');\n model.paginators = require('../apis/qldb-2019-01-02.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.QLDB;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['qldbsession'] = {};\nAWS.QLDBSession = Service.defineService('qldbsession', ['2019-07-11']);\nObject.defineProperty(apiLoader.services['qldbsession'], '2019-07-11', {\n get: function get() {\n var model = require('../apis/qldb-session-2019-07-11.min.json');\n model.paginators = require('../apis/qldb-session-2019-07-11.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.QLDBSession;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['quicksight'] = {};\nAWS.QuickSight = Service.defineService('quicksight', ['2018-04-01']);\nObject.defineProperty(apiLoader.services['quicksight'], '2018-04-01', {\n get: function get() {\n var model = require('../apis/quicksight-2018-04-01.min.json');\n model.paginators = require('../apis/quicksight-2018-04-01.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.QuickSight;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['ram'] = {};\nAWS.RAM = Service.defineService('ram', ['2018-01-04']);\nObject.defineProperty(apiLoader.services['ram'], '2018-01-04', {\n get: function get() {\n var model = require('../apis/ram-2018-01-04.min.json');\n model.paginators = require('../apis/ram-2018-01-04.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.RAM;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['rbin'] = {};\nAWS.Rbin = Service.defineService('rbin', ['2021-06-15']);\nObject.defineProperty(apiLoader.services['rbin'], '2021-06-15', {\n get: function get() {\n var model = require('../apis/rbin-2021-06-15.min.json');\n model.paginators = require('../apis/rbin-2021-06-15.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.Rbin;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['rds'] = {};\nAWS.RDS = Service.defineService('rds', ['2013-01-10', '2013-02-12', '2013-09-09', '2014-09-01', '2014-09-01*', '2014-10-31']);\nrequire('../lib/services/rds');\nObject.defineProperty(apiLoader.services['rds'], '2013-01-10', {\n get: function get() {\n var model = require('../apis/rds-2013-01-10.min.json');\n model.paginators = require('../apis/rds-2013-01-10.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\nObject.defineProperty(apiLoader.services['rds'], '2013-02-12', {\n get: function get() {\n var model = require('../apis/rds-2013-02-12.min.json');\n model.paginators = require('../apis/rds-2013-02-12.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\nObject.defineProperty(apiLoader.services['rds'], '2013-09-09', {\n get: function get() {\n var model = require('../apis/rds-2013-09-09.min.json');\n model.paginators = require('../apis/rds-2013-09-09.paginators.json').pagination;\n model.waiters = require('../apis/rds-2013-09-09.waiters2.json').waiters;\n return model;\n },\n enumerable: true,\n configurable: true\n});\nObject.defineProperty(apiLoader.services['rds'], '2014-09-01', {\n get: function get() {\n var model = require('../apis/rds-2014-09-01.min.json');\n model.paginators = require('../apis/rds-2014-09-01.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\nObject.defineProperty(apiLoader.services['rds'], '2014-10-31', {\n get: function get() {\n var model = require('../apis/rds-2014-10-31.min.json');\n model.paginators = require('../apis/rds-2014-10-31.paginators.json').pagination;\n model.waiters = require('../apis/rds-2014-10-31.waiters2.json').waiters;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.RDS;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['rdsdataservice'] = {};\nAWS.RDSDataService = Service.defineService('rdsdataservice', ['2018-08-01']);\nrequire('../lib/services/rdsdataservice');\nObject.defineProperty(apiLoader.services['rdsdataservice'], '2018-08-01', {\n get: function get() {\n var model = require('../apis/rds-data-2018-08-01.min.json');\n model.paginators = require('../apis/rds-data-2018-08-01.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.RDSDataService;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['redshift'] = {};\nAWS.Redshift = Service.defineService('redshift', ['2012-12-01']);\nObject.defineProperty(apiLoader.services['redshift'], '2012-12-01', {\n get: function get() {\n var model = require('../apis/redshift-2012-12-01.min.json');\n model.paginators = require('../apis/redshift-2012-12-01.paginators.json').pagination;\n model.waiters = require('../apis/redshift-2012-12-01.waiters2.json').waiters;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.Redshift;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['redshiftdata'] = {};\nAWS.RedshiftData = Service.defineService('redshiftdata', ['2019-12-20']);\nObject.defineProperty(apiLoader.services['redshiftdata'], '2019-12-20', {\n get: function get() {\n var model = require('../apis/redshift-data-2019-12-20.min.json');\n model.paginators = require('../apis/redshift-data-2019-12-20.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.RedshiftData;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['rekognition'] = {};\nAWS.Rekognition = Service.defineService('rekognition', ['2016-06-27']);\nObject.defineProperty(apiLoader.services['rekognition'], '2016-06-27', {\n get: function get() {\n var model = require('../apis/rekognition-2016-06-27.min.json');\n model.paginators = require('../apis/rekognition-2016-06-27.paginators.json').pagination;\n model.waiters = require('../apis/rekognition-2016-06-27.waiters2.json').waiters;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.Rekognition;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['resiliencehub'] = {};\nAWS.Resiliencehub = Service.defineService('resiliencehub', ['2020-04-30']);\nObject.defineProperty(apiLoader.services['resiliencehub'], '2020-04-30', {\n get: function get() {\n var model = require('../apis/resiliencehub-2020-04-30.min.json');\n model.paginators = require('../apis/resiliencehub-2020-04-30.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.Resiliencehub;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['resourcegroups'] = {};\nAWS.ResourceGroups = Service.defineService('resourcegroups', ['2017-11-27']);\nObject.defineProperty(apiLoader.services['resourcegroups'], '2017-11-27', {\n get: function get() {\n var model = require('../apis/resource-groups-2017-11-27.min.json');\n model.paginators = require('../apis/resource-groups-2017-11-27.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.ResourceGroups;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['resourcegroupstaggingapi'] = {};\nAWS.ResourceGroupsTaggingAPI = Service.defineService('resourcegroupstaggingapi', ['2017-01-26']);\nObject.defineProperty(apiLoader.services['resourcegroupstaggingapi'], '2017-01-26', {\n get: function get() {\n var model = require('../apis/resourcegroupstaggingapi-2017-01-26.min.json');\n model.paginators = require('../apis/resourcegroupstaggingapi-2017-01-26.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.ResourceGroupsTaggingAPI;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['robomaker'] = {};\nAWS.RoboMaker = Service.defineService('robomaker', ['2018-06-29']);\nObject.defineProperty(apiLoader.services['robomaker'], '2018-06-29', {\n get: function get() {\n var model = require('../apis/robomaker-2018-06-29.min.json');\n model.paginators = require('../apis/robomaker-2018-06-29.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.RoboMaker;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['route53'] = {};\nAWS.Route53 = Service.defineService('route53', ['2013-04-01']);\nrequire('../lib/services/route53');\nObject.defineProperty(apiLoader.services['route53'], '2013-04-01', {\n get: function get() {\n var model = require('../apis/route53-2013-04-01.min.json');\n model.paginators = require('../apis/route53-2013-04-01.paginators.json').pagination;\n model.waiters = require('../apis/route53-2013-04-01.waiters2.json').waiters;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.Route53;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['route53domains'] = {};\nAWS.Route53Domains = Service.defineService('route53domains', ['2014-05-15']);\nObject.defineProperty(apiLoader.services['route53domains'], '2014-05-15', {\n get: function get() {\n var model = require('../apis/route53domains-2014-05-15.min.json');\n model.paginators = require('../apis/route53domains-2014-05-15.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.Route53Domains;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['route53recoverycluster'] = {};\nAWS.Route53RecoveryCluster = Service.defineService('route53recoverycluster', ['2019-12-02']);\nObject.defineProperty(apiLoader.services['route53recoverycluster'], '2019-12-02', {\n get: function get() {\n var model = require('../apis/route53-recovery-cluster-2019-12-02.min.json');\n model.paginators = require('../apis/route53-recovery-cluster-2019-12-02.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.Route53RecoveryCluster;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['route53recoverycontrolconfig'] = {};\nAWS.Route53RecoveryControlConfig = Service.defineService('route53recoverycontrolconfig', ['2020-11-02']);\nObject.defineProperty(apiLoader.services['route53recoverycontrolconfig'], '2020-11-02', {\n get: function get() {\n var model = require('../apis/route53-recovery-control-config-2020-11-02.min.json');\n model.paginators = require('../apis/route53-recovery-control-config-2020-11-02.paginators.json').pagination;\n model.waiters = require('../apis/route53-recovery-control-config-2020-11-02.waiters2.json').waiters;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.Route53RecoveryControlConfig;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['route53recoveryreadiness'] = {};\nAWS.Route53RecoveryReadiness = Service.defineService('route53recoveryreadiness', ['2019-12-02']);\nObject.defineProperty(apiLoader.services['route53recoveryreadiness'], '2019-12-02', {\n get: function get() {\n var model = require('../apis/route53-recovery-readiness-2019-12-02.min.json');\n model.paginators = require('../apis/route53-recovery-readiness-2019-12-02.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.Route53RecoveryReadiness;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['route53resolver'] = {};\nAWS.Route53Resolver = Service.defineService('route53resolver', ['2018-04-01']);\nObject.defineProperty(apiLoader.services['route53resolver'], '2018-04-01', {\n get: function get() {\n var model = require('../apis/route53resolver-2018-04-01.min.json');\n model.paginators = require('../apis/route53resolver-2018-04-01.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.Route53Resolver;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['rum'] = {};\nAWS.RUM = Service.defineService('rum', ['2018-05-10']);\nObject.defineProperty(apiLoader.services['rum'], '2018-05-10', {\n get: function get() {\n var model = require('../apis/rum-2018-05-10.min.json');\n model.paginators = require('../apis/rum-2018-05-10.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.RUM;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['s3'] = {};\nAWS.S3 = Service.defineService('s3', ['2006-03-01']);\nrequire('../lib/services/s3');\nObject.defineProperty(apiLoader.services['s3'], '2006-03-01', {\n get: function get() {\n var model = require('../apis/s3-2006-03-01.min.json');\n model.paginators = require('../apis/s3-2006-03-01.paginators.json').pagination;\n model.waiters = require('../apis/s3-2006-03-01.waiters2.json').waiters;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.S3;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['s3control'] = {};\nAWS.S3Control = Service.defineService('s3control', ['2018-08-20']);\nrequire('../lib/services/s3control');\nObject.defineProperty(apiLoader.services['s3control'], '2018-08-20', {\n get: function get() {\n var model = require('../apis/s3control-2018-08-20.min.json');\n model.paginators = require('../apis/s3control-2018-08-20.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.S3Control;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['s3outposts'] = {};\nAWS.S3Outposts = Service.defineService('s3outposts', ['2017-07-25']);\nObject.defineProperty(apiLoader.services['s3outposts'], '2017-07-25', {\n get: function get() {\n var model = require('../apis/s3outposts-2017-07-25.min.json');\n model.paginators = require('../apis/s3outposts-2017-07-25.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.S3Outposts;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['sagemaker'] = {};\nAWS.SageMaker = Service.defineService('sagemaker', ['2017-07-24']);\nObject.defineProperty(apiLoader.services['sagemaker'], '2017-07-24', {\n get: function get() {\n var model = require('../apis/sagemaker-2017-07-24.min.json');\n model.paginators = require('../apis/sagemaker-2017-07-24.paginators.json').pagination;\n model.waiters = require('../apis/sagemaker-2017-07-24.waiters2.json').waiters;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.SageMaker;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['sagemakeredge'] = {};\nAWS.SagemakerEdge = Service.defineService('sagemakeredge', ['2020-09-23']);\nObject.defineProperty(apiLoader.services['sagemakeredge'], '2020-09-23', {\n get: function get() {\n var model = require('../apis/sagemaker-edge-2020-09-23.min.json');\n model.paginators = require('../apis/sagemaker-edge-2020-09-23.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.SagemakerEdge;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['sagemakerfeaturestoreruntime'] = {};\nAWS.SageMakerFeatureStoreRuntime = Service.defineService('sagemakerfeaturestoreruntime', ['2020-07-01']);\nObject.defineProperty(apiLoader.services['sagemakerfeaturestoreruntime'], '2020-07-01', {\n get: function get() {\n var model = require('../apis/sagemaker-featurestore-runtime-2020-07-01.min.json');\n model.paginators = require('../apis/sagemaker-featurestore-runtime-2020-07-01.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.SageMakerFeatureStoreRuntime;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['sagemakerruntime'] = {};\nAWS.SageMakerRuntime = Service.defineService('sagemakerruntime', ['2017-05-13']);\nObject.defineProperty(apiLoader.services['sagemakerruntime'], '2017-05-13', {\n get: function get() {\n var model = require('../apis/runtime.sagemaker-2017-05-13.min.json');\n model.paginators = require('../apis/runtime.sagemaker-2017-05-13.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.SageMakerRuntime;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['savingsplans'] = {};\nAWS.SavingsPlans = Service.defineService('savingsplans', ['2019-06-28']);\nObject.defineProperty(apiLoader.services['savingsplans'], '2019-06-28', {\n get: function get() {\n var model = require('../apis/savingsplans-2019-06-28.min.json');\n model.paginators = require('../apis/savingsplans-2019-06-28.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.SavingsPlans;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['schemas'] = {};\nAWS.Schemas = Service.defineService('schemas', ['2019-12-02']);\nObject.defineProperty(apiLoader.services['schemas'], '2019-12-02', {\n get: function get() {\n var model = require('../apis/schemas-2019-12-02.min.json');\n model.paginators = require('../apis/schemas-2019-12-02.paginators.json').pagination;\n model.waiters = require('../apis/schemas-2019-12-02.waiters2.json').waiters;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.Schemas;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['secretsmanager'] = {};\nAWS.SecretsManager = Service.defineService('secretsmanager', ['2017-10-17']);\nObject.defineProperty(apiLoader.services['secretsmanager'], '2017-10-17', {\n get: function get() {\n var model = require('../apis/secretsmanager-2017-10-17.min.json');\n model.paginators = require('../apis/secretsmanager-2017-10-17.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.SecretsManager;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['securityhub'] = {};\nAWS.SecurityHub = Service.defineService('securityhub', ['2018-10-26']);\nObject.defineProperty(apiLoader.services['securityhub'], '2018-10-26', {\n get: function get() {\n var model = require('../apis/securityhub-2018-10-26.min.json');\n model.paginators = require('../apis/securityhub-2018-10-26.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.SecurityHub;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['serverlessapplicationrepository'] = {};\nAWS.ServerlessApplicationRepository = Service.defineService('serverlessapplicationrepository', ['2017-09-08']);\nObject.defineProperty(apiLoader.services['serverlessapplicationrepository'], '2017-09-08', {\n get: function get() {\n var model = require('../apis/serverlessrepo-2017-09-08.min.json');\n model.paginators = require('../apis/serverlessrepo-2017-09-08.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.ServerlessApplicationRepository;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['servicecatalog'] = {};\nAWS.ServiceCatalog = Service.defineService('servicecatalog', ['2015-12-10']);\nObject.defineProperty(apiLoader.services['servicecatalog'], '2015-12-10', {\n get: function get() {\n var model = require('../apis/servicecatalog-2015-12-10.min.json');\n model.paginators = require('../apis/servicecatalog-2015-12-10.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.ServiceCatalog;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['servicecatalogappregistry'] = {};\nAWS.ServiceCatalogAppRegistry = Service.defineService('servicecatalogappregistry', ['2020-06-24']);\nObject.defineProperty(apiLoader.services['servicecatalogappregistry'], '2020-06-24', {\n get: function get() {\n var model = require('../apis/servicecatalog-appregistry-2020-06-24.min.json');\n model.paginators = require('../apis/servicecatalog-appregistry-2020-06-24.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.ServiceCatalogAppRegistry;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['servicediscovery'] = {};\nAWS.ServiceDiscovery = Service.defineService('servicediscovery', ['2017-03-14']);\nObject.defineProperty(apiLoader.services['servicediscovery'], '2017-03-14', {\n get: function get() {\n var model = require('../apis/servicediscovery-2017-03-14.min.json');\n model.paginators = require('../apis/servicediscovery-2017-03-14.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.ServiceDiscovery;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['servicequotas'] = {};\nAWS.ServiceQuotas = Service.defineService('servicequotas', ['2019-06-24']);\nObject.defineProperty(apiLoader.services['servicequotas'], '2019-06-24', {\n get: function get() {\n var model = require('../apis/service-quotas-2019-06-24.min.json');\n model.paginators = require('../apis/service-quotas-2019-06-24.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.ServiceQuotas;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['ses'] = {};\nAWS.SES = Service.defineService('ses', ['2010-12-01']);\nObject.defineProperty(apiLoader.services['ses'], '2010-12-01', {\n get: function get() {\n var model = require('../apis/email-2010-12-01.min.json');\n model.paginators = require('../apis/email-2010-12-01.paginators.json').pagination;\n model.waiters = require('../apis/email-2010-12-01.waiters2.json').waiters;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.SES;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['sesv2'] = {};\nAWS.SESV2 = Service.defineService('sesv2', ['2019-09-27']);\nObject.defineProperty(apiLoader.services['sesv2'], '2019-09-27', {\n get: function get() {\n var model = require('../apis/sesv2-2019-09-27.min.json');\n model.paginators = require('../apis/sesv2-2019-09-27.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.SESV2;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['shield'] = {};\nAWS.Shield = Service.defineService('shield', ['2016-06-02']);\nObject.defineProperty(apiLoader.services['shield'], '2016-06-02', {\n get: function get() {\n var model = require('../apis/shield-2016-06-02.min.json');\n model.paginators = require('../apis/shield-2016-06-02.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.Shield;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['signer'] = {};\nAWS.Signer = Service.defineService('signer', ['2017-08-25']);\nObject.defineProperty(apiLoader.services['signer'], '2017-08-25', {\n get: function get() {\n var model = require('../apis/signer-2017-08-25.min.json');\n model.paginators = require('../apis/signer-2017-08-25.paginators.json').pagination;\n model.waiters = require('../apis/signer-2017-08-25.waiters2.json').waiters;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.Signer;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['simpledb'] = {};\nAWS.SimpleDB = Service.defineService('simpledb', ['2009-04-15']);\nObject.defineProperty(apiLoader.services['simpledb'], '2009-04-15', {\n get: function get() {\n var model = require('../apis/sdb-2009-04-15.min.json');\n model.paginators = require('../apis/sdb-2009-04-15.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.SimpleDB;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['sms'] = {};\nAWS.SMS = Service.defineService('sms', ['2016-10-24']);\nObject.defineProperty(apiLoader.services['sms'], '2016-10-24', {\n get: function get() {\n var model = require('../apis/sms-2016-10-24.min.json');\n model.paginators = require('../apis/sms-2016-10-24.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.SMS;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['snowball'] = {};\nAWS.Snowball = Service.defineService('snowball', ['2016-06-30']);\nObject.defineProperty(apiLoader.services['snowball'], '2016-06-30', {\n get: function get() {\n var model = require('../apis/snowball-2016-06-30.min.json');\n model.paginators = require('../apis/snowball-2016-06-30.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.Snowball;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['snowdevicemanagement'] = {};\nAWS.SnowDeviceManagement = Service.defineService('snowdevicemanagement', ['2021-08-04']);\nObject.defineProperty(apiLoader.services['snowdevicemanagement'], '2021-08-04', {\n get: function get() {\n var model = require('../apis/snow-device-management-2021-08-04.min.json');\n model.paginators = require('../apis/snow-device-management-2021-08-04.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.SnowDeviceManagement;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['sns'] = {};\nAWS.SNS = Service.defineService('sns', ['2010-03-31']);\nObject.defineProperty(apiLoader.services['sns'], '2010-03-31', {\n get: function get() {\n var model = require('../apis/sns-2010-03-31.min.json');\n model.paginators = require('../apis/sns-2010-03-31.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.SNS;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['sqs'] = {};\nAWS.SQS = Service.defineService('sqs', ['2012-11-05']);\nrequire('../lib/services/sqs');\nObject.defineProperty(apiLoader.services['sqs'], '2012-11-05', {\n get: function get() {\n var model = require('../apis/sqs-2012-11-05.min.json');\n model.paginators = require('../apis/sqs-2012-11-05.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.SQS;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['ssm'] = {};\nAWS.SSM = Service.defineService('ssm', ['2014-11-06']);\nObject.defineProperty(apiLoader.services['ssm'], '2014-11-06', {\n get: function get() {\n var model = require('../apis/ssm-2014-11-06.min.json');\n model.paginators = require('../apis/ssm-2014-11-06.paginators.json').pagination;\n model.waiters = require('../apis/ssm-2014-11-06.waiters2.json').waiters;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.SSM;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['ssmcontacts'] = {};\nAWS.SSMContacts = Service.defineService('ssmcontacts', ['2021-05-03']);\nObject.defineProperty(apiLoader.services['ssmcontacts'], '2021-05-03', {\n get: function get() {\n var model = require('../apis/ssm-contacts-2021-05-03.min.json');\n model.paginators = require('../apis/ssm-contacts-2021-05-03.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.SSMContacts;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['ssmincidents'] = {};\nAWS.SSMIncidents = Service.defineService('ssmincidents', ['2018-05-10']);\nObject.defineProperty(apiLoader.services['ssmincidents'], '2018-05-10', {\n get: function get() {\n var model = require('../apis/ssm-incidents-2018-05-10.min.json');\n model.paginators = require('../apis/ssm-incidents-2018-05-10.paginators.json').pagination;\n model.waiters = require('../apis/ssm-incidents-2018-05-10.waiters2.json').waiters;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.SSMIncidents;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['sso'] = {};\nAWS.SSO = Service.defineService('sso', ['2019-06-10']);\nObject.defineProperty(apiLoader.services['sso'], '2019-06-10', {\n get: function get() {\n var model = require('../apis/sso-2019-06-10.min.json');\n model.paginators = require('../apis/sso-2019-06-10.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.SSO;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['ssoadmin'] = {};\nAWS.SSOAdmin = Service.defineService('ssoadmin', ['2020-07-20']);\nObject.defineProperty(apiLoader.services['ssoadmin'], '2020-07-20', {\n get: function get() {\n var model = require('../apis/sso-admin-2020-07-20.min.json');\n model.paginators = require('../apis/sso-admin-2020-07-20.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.SSOAdmin;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['ssooidc'] = {};\nAWS.SSOOIDC = Service.defineService('ssooidc', ['2019-06-10']);\nObject.defineProperty(apiLoader.services['ssooidc'], '2019-06-10', {\n get: function get() {\n var model = require('../apis/sso-oidc-2019-06-10.min.json');\n model.paginators = require('../apis/sso-oidc-2019-06-10.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.SSOOIDC;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['stepfunctions'] = {};\nAWS.StepFunctions = Service.defineService('stepfunctions', ['2016-11-23']);\nObject.defineProperty(apiLoader.services['stepfunctions'], '2016-11-23', {\n get: function get() {\n var model = require('../apis/states-2016-11-23.min.json');\n model.paginators = require('../apis/states-2016-11-23.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.StepFunctions;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['storagegateway'] = {};\nAWS.StorageGateway = Service.defineService('storagegateway', ['2013-06-30']);\nObject.defineProperty(apiLoader.services['storagegateway'], '2013-06-30', {\n get: function get() {\n var model = require('../apis/storagegateway-2013-06-30.min.json');\n model.paginators = require('../apis/storagegateway-2013-06-30.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.StorageGateway;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['sts'] = {};\nAWS.STS = Service.defineService('sts', ['2011-06-15']);\nrequire('../lib/services/sts');\nObject.defineProperty(apiLoader.services['sts'], '2011-06-15', {\n get: function get() {\n var model = require('../apis/sts-2011-06-15.min.json');\n model.paginators = require('../apis/sts-2011-06-15.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.STS;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['support'] = {};\nAWS.Support = Service.defineService('support', ['2013-04-15']);\nObject.defineProperty(apiLoader.services['support'], '2013-04-15', {\n get: function get() {\n var model = require('../apis/support-2013-04-15.min.json');\n model.paginators = require('../apis/support-2013-04-15.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.Support;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['swf'] = {};\nAWS.SWF = Service.defineService('swf', ['2012-01-25']);\nrequire('../lib/services/swf');\nObject.defineProperty(apiLoader.services['swf'], '2012-01-25', {\n get: function get() {\n var model = require('../apis/swf-2012-01-25.min.json');\n model.paginators = require('../apis/swf-2012-01-25.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.SWF;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['synthetics'] = {};\nAWS.Synthetics = Service.defineService('synthetics', ['2017-10-11']);\nObject.defineProperty(apiLoader.services['synthetics'], '2017-10-11', {\n get: function get() {\n var model = require('../apis/synthetics-2017-10-11.min.json');\n model.paginators = require('../apis/synthetics-2017-10-11.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.Synthetics;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['textract'] = {};\nAWS.Textract = Service.defineService('textract', ['2018-06-27']);\nObject.defineProperty(apiLoader.services['textract'], '2018-06-27', {\n get: function get() {\n var model = require('../apis/textract-2018-06-27.min.json');\n model.paginators = require('../apis/textract-2018-06-27.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.Textract;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['timestreamquery'] = {};\nAWS.TimestreamQuery = Service.defineService('timestreamquery', ['2018-11-01']);\nObject.defineProperty(apiLoader.services['timestreamquery'], '2018-11-01', {\n get: function get() {\n var model = require('../apis/timestream-query-2018-11-01.min.json');\n model.paginators = require('../apis/timestream-query-2018-11-01.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.TimestreamQuery;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['timestreamwrite'] = {};\nAWS.TimestreamWrite = Service.defineService('timestreamwrite', ['2018-11-01']);\nObject.defineProperty(apiLoader.services['timestreamwrite'], '2018-11-01', {\n get: function get() {\n var model = require('../apis/timestream-write-2018-11-01.min.json');\n model.paginators = require('../apis/timestream-write-2018-11-01.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.TimestreamWrite;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['transcribeservice'] = {};\nAWS.TranscribeService = Service.defineService('transcribeservice', ['2017-10-26']);\nObject.defineProperty(apiLoader.services['transcribeservice'], '2017-10-26', {\n get: function get() {\n var model = require('../apis/transcribe-2017-10-26.min.json');\n model.paginators = require('../apis/transcribe-2017-10-26.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.TranscribeService;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['transfer'] = {};\nAWS.Transfer = Service.defineService('transfer', ['2018-11-05']);\nObject.defineProperty(apiLoader.services['transfer'], '2018-11-05', {\n get: function get() {\n var model = require('../apis/transfer-2018-11-05.min.json');\n model.paginators = require('../apis/transfer-2018-11-05.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.Transfer;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['translate'] = {};\nAWS.Translate = Service.defineService('translate', ['2017-07-01']);\nObject.defineProperty(apiLoader.services['translate'], '2017-07-01', {\n get: function get() {\n var model = require('../apis/translate-2017-07-01.min.json');\n model.paginators = require('../apis/translate-2017-07-01.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.Translate;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['voiceid'] = {};\nAWS.VoiceID = Service.defineService('voiceid', ['2021-09-27']);\nObject.defineProperty(apiLoader.services['voiceid'], '2021-09-27', {\n get: function get() {\n var model = require('../apis/voice-id-2021-09-27.min.json');\n model.paginators = require('../apis/voice-id-2021-09-27.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.VoiceID;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['waf'] = {};\nAWS.WAF = Service.defineService('waf', ['2015-08-24']);\nObject.defineProperty(apiLoader.services['waf'], '2015-08-24', {\n get: function get() {\n var model = require('../apis/waf-2015-08-24.min.json');\n model.paginators = require('../apis/waf-2015-08-24.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.WAF;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['wafregional'] = {};\nAWS.WAFRegional = Service.defineService('wafregional', ['2016-11-28']);\nObject.defineProperty(apiLoader.services['wafregional'], '2016-11-28', {\n get: function get() {\n var model = require('../apis/waf-regional-2016-11-28.min.json');\n model.paginators = require('../apis/waf-regional-2016-11-28.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.WAFRegional;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['wafv2'] = {};\nAWS.WAFV2 = Service.defineService('wafv2', ['2019-07-29']);\nObject.defineProperty(apiLoader.services['wafv2'], '2019-07-29', {\n get: function get() {\n var model = require('../apis/wafv2-2019-07-29.min.json');\n model.paginators = require('../apis/wafv2-2019-07-29.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.WAFV2;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['wellarchitected'] = {};\nAWS.WellArchitected = Service.defineService('wellarchitected', ['2020-03-31']);\nObject.defineProperty(apiLoader.services['wellarchitected'], '2020-03-31', {\n get: function get() {\n var model = require('../apis/wellarchitected-2020-03-31.min.json');\n model.paginators = require('../apis/wellarchitected-2020-03-31.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.WellArchitected;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['wisdom'] = {};\nAWS.Wisdom = Service.defineService('wisdom', ['2020-10-19']);\nObject.defineProperty(apiLoader.services['wisdom'], '2020-10-19', {\n get: function get() {\n var model = require('../apis/wisdom-2020-10-19.min.json');\n model.paginators = require('../apis/wisdom-2020-10-19.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.Wisdom;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['workdocs'] = {};\nAWS.WorkDocs = Service.defineService('workdocs', ['2016-05-01']);\nObject.defineProperty(apiLoader.services['workdocs'], '2016-05-01', {\n get: function get() {\n var model = require('../apis/workdocs-2016-05-01.min.json');\n model.paginators = require('../apis/workdocs-2016-05-01.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.WorkDocs;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['worklink'] = {};\nAWS.WorkLink = Service.defineService('worklink', ['2018-09-25']);\nObject.defineProperty(apiLoader.services['worklink'], '2018-09-25', {\n get: function get() {\n var model = require('../apis/worklink-2018-09-25.min.json');\n model.paginators = require('../apis/worklink-2018-09-25.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.WorkLink;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['workmail'] = {};\nAWS.WorkMail = Service.defineService('workmail', ['2017-10-01']);\nObject.defineProperty(apiLoader.services['workmail'], '2017-10-01', {\n get: function get() {\n var model = require('../apis/workmail-2017-10-01.min.json');\n model.paginators = require('../apis/workmail-2017-10-01.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.WorkMail;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['workmailmessageflow'] = {};\nAWS.WorkMailMessageFlow = Service.defineService('workmailmessageflow', ['2019-05-01']);\nObject.defineProperty(apiLoader.services['workmailmessageflow'], '2019-05-01', {\n get: function get() {\n var model = require('../apis/workmailmessageflow-2019-05-01.min.json');\n model.paginators = require('../apis/workmailmessageflow-2019-05-01.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.WorkMailMessageFlow;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['workspaces'] = {};\nAWS.WorkSpaces = Service.defineService('workspaces', ['2015-04-08']);\nObject.defineProperty(apiLoader.services['workspaces'], '2015-04-08', {\n get: function get() {\n var model = require('../apis/workspaces-2015-04-08.min.json');\n model.paginators = require('../apis/workspaces-2015-04-08.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.WorkSpaces;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['workspacesweb'] = {};\nAWS.WorkSpacesWeb = Service.defineService('workspacesweb', ['2020-07-08']);\nObject.defineProperty(apiLoader.services['workspacesweb'], '2020-07-08', {\n get: function get() {\n var model = require('../apis/workspaces-web-2020-07-08.min.json');\n model.paginators = require('../apis/workspaces-web-2020-07-08.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.WorkSpacesWeb;\n","require('../lib/node_loader');\nvar AWS = require('../lib/core');\nvar Service = AWS.Service;\nvar apiLoader = AWS.apiLoader;\n\napiLoader.services['xray'] = {};\nAWS.XRay = Service.defineService('xray', ['2016-04-12']);\nObject.defineProperty(apiLoader.services['xray'], '2016-04-12', {\n get: function get() {\n var model = require('../apis/xray-2016-04-12.min.json');\n model.paginators = require('../apis/xray-2016-04-12.paginators.json').pagination;\n return model;\n },\n enumerable: true,\n configurable: true\n});\n\nmodule.exports = AWS.XRay;\n","function apiLoader(svc, version) {\n if (!apiLoader.services.hasOwnProperty(svc)) {\n throw new Error('InvalidService: Failed to load api for ' + svc);\n }\n return apiLoader.services[svc][version];\n}\n\n/**\n * @api private\n *\n * This member of AWS.apiLoader is private, but changing it will necessitate a\n * change to ../scripts/services-table-generator.ts\n */\napiLoader.services = {};\n\n/**\n * @api private\n */\nmodule.exports = apiLoader;\n","require('./node_loader');\n\nvar AWS = require('./core');\n\n// Load all service classes\nrequire('../clients/all');\n\n/**\n * @api private\n */\nmodule.exports = AWS;\n","var AWS = require('../core'),\n url = AWS.util.url,\n crypto = AWS.util.crypto.lib,\n base64Encode = AWS.util.base64.encode,\n inherit = AWS.util.inherit;\n\nvar queryEncode = function (string) {\n var replacements = {\n '+': '-',\n '=': '_',\n '/': '~'\n };\n return string.replace(/[\\+=\\/]/g, function (match) {\n return replacements[match];\n });\n};\n\nvar signPolicy = function (policy, privateKey) {\n var sign = crypto.createSign('RSA-SHA1');\n sign.write(policy);\n return queryEncode(sign.sign(privateKey, 'base64'));\n};\n\nvar signWithCannedPolicy = function (url, expires, keyPairId, privateKey) {\n var policy = JSON.stringify({\n Statement: [\n {\n Resource: url,\n Condition: { DateLessThan: { 'AWS:EpochTime': expires } }\n }\n ]\n });\n\n return {\n Expires: expires,\n 'Key-Pair-Id': keyPairId,\n Signature: signPolicy(policy.toString(), privateKey)\n };\n};\n\nvar signWithCustomPolicy = function (policy, keyPairId, privateKey) {\n policy = policy.replace(/\\s/mg, '');\n\n return {\n Policy: queryEncode(base64Encode(policy)),\n 'Key-Pair-Id': keyPairId,\n Signature: signPolicy(policy, privateKey)\n };\n};\n\nvar determineScheme = function (url) {\n var parts = url.split('://');\n if (parts.length < 2) {\n throw new Error('Invalid URL.');\n }\n\n return parts[0].replace('*', '');\n};\n\nvar getRtmpUrl = function (rtmpUrl) {\n var parsed = url.parse(rtmpUrl);\n return parsed.path.replace(/^\\//, '') + (parsed.hash || '');\n};\n\nvar getResource = function (url) {\n switch (determineScheme(url)) {\n case 'http':\n case 'https':\n return url;\n case 'rtmp':\n return getRtmpUrl(url);\n default:\n throw new Error('Invalid URI scheme. Scheme must be one of'\n + ' http, https, or rtmp');\n }\n};\n\nvar handleError = function (err, callback) {\n if (!callback || typeof callback !== 'function') {\n throw err;\n }\n\n callback(err);\n};\n\nvar handleSuccess = function (result, callback) {\n if (!callback || typeof callback !== 'function') {\n return result;\n }\n\n callback(null, result);\n};\n\nAWS.CloudFront.Signer = inherit({\n /**\n * A signer object can be used to generate signed URLs and cookies for granting\n * access to content on restricted CloudFront distributions.\n *\n * @see http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/PrivateContent.html\n *\n * @param keyPairId [String] (Required) The ID of the CloudFront key pair\n * being used.\n * @param privateKey [String] (Required) A private key in RSA format.\n */\n constructor: function Signer(keyPairId, privateKey) {\n if (keyPairId === void 0 || privateKey === void 0) {\n throw new Error('A key pair ID and private key are required');\n }\n\n this.keyPairId = keyPairId;\n this.privateKey = privateKey;\n },\n\n /**\n * Create a signed Amazon CloudFront Cookie.\n *\n * @param options [Object] The options to create a signed cookie.\n * @option options url [String] The URL to which the signature will grant\n * access. Required unless you pass in a full\n * policy.\n * @option options expires [Number] A Unix UTC timestamp indicating when the\n * signature should expire. Required unless you\n * pass in a full policy.\n * @option options policy [String] A CloudFront JSON policy. Required unless\n * you pass in a url and an expiry time.\n *\n * @param cb [Function] if a callback is provided, this function will\n * pass the hash as the second parameter (after the error parameter) to\n * the callback function.\n *\n * @return [Object] if called synchronously (with no callback), returns the\n * signed cookie parameters.\n * @return [null] nothing is returned if a callback is provided.\n */\n getSignedCookie: function (options, cb) {\n var signatureHash = 'policy' in options\n ? signWithCustomPolicy(options.policy, this.keyPairId, this.privateKey)\n : signWithCannedPolicy(options.url, options.expires, this.keyPairId, this.privateKey);\n\n var cookieHash = {};\n for (var key in signatureHash) {\n if (Object.prototype.hasOwnProperty.call(signatureHash, key)) {\n cookieHash['CloudFront-' + key] = signatureHash[key];\n }\n }\n\n return handleSuccess(cookieHash, cb);\n },\n\n /**\n * Create a signed Amazon CloudFront URL.\n *\n * Keep in mind that URLs meant for use in media/flash players may have\n * different requirements for URL formats (e.g. some require that the\n * extension be removed, some require the file name to be prefixed\n * - mp4:, some require you to add \"/cfx/st\" into your URL).\n *\n * @param options [Object] The options to create a signed URL.\n * @option options url [String] The URL to which the signature will grant\n * access. Any query params included with\n * the URL should be encoded. Required.\n * @option options expires [Number] A Unix UTC timestamp indicating when the\n * signature should expire. Required unless you\n * pass in a full policy.\n * @option options policy [String] A CloudFront JSON policy. Required unless\n * you pass in a url and an expiry time.\n *\n * @param cb [Function] if a callback is provided, this function will\n * pass the URL as the second parameter (after the error parameter) to\n * the callback function.\n *\n * @return [String] if called synchronously (with no callback), returns the\n * signed URL.\n * @return [null] nothing is returned if a callback is provided.\n */\n getSignedUrl: function (options, cb) {\n try {\n var resource = getResource(options.url);\n } catch (err) {\n return handleError(err, cb);\n }\n\n var parsedUrl = url.parse(options.url, true),\n signatureHash = Object.prototype.hasOwnProperty.call(options, 'policy')\n ? signWithCustomPolicy(options.policy, this.keyPairId, this.privateKey)\n : signWithCannedPolicy(resource, options.expires, this.keyPairId, this.privateKey);\n\n parsedUrl.search = null;\n for (var key in signatureHash) {\n if (Object.prototype.hasOwnProperty.call(signatureHash, key)) {\n parsedUrl.query[key] = signatureHash[key];\n }\n }\n\n try {\n var signedUrl = determineScheme(options.url) === 'rtmp'\n ? getRtmpUrl(url.format(parsedUrl))\n : url.format(parsedUrl);\n } catch (err) {\n return handleError(err, cb);\n }\n\n return handleSuccess(signedUrl, cb);\n }\n});\n\n/**\n * @api private\n */\nmodule.exports = AWS.CloudFront.Signer;\n","var AWS = require('./core');\nrequire('./credentials');\nrequire('./credentials/credential_provider_chain');\nvar PromisesDependency;\n\n/**\n * The main configuration class used by all service objects to set\n * the region, credentials, and other options for requests.\n *\n * By default, credentials and region settings are left unconfigured.\n * This should be configured by the application before using any\n * AWS service APIs.\n *\n * In order to set global configuration options, properties should\n * be assigned to the global {AWS.config} object.\n *\n * @see AWS.config\n *\n * @!group General Configuration Options\n *\n * @!attribute credentials\n * @return [AWS.Credentials] the AWS credentials to sign requests with.\n *\n * @!attribute region\n * @example Set the global region setting to us-west-2\n * AWS.config.update({region: 'us-west-2'});\n * @return [AWS.Credentials] The region to send service requests to.\n * @see http://docs.amazonwebservices.com/general/latest/gr/rande.html\n * A list of available endpoints for each AWS service\n *\n * @!attribute maxRetries\n * @return [Integer] the maximum amount of retries to perform for a\n * service request. By default this value is calculated by the specific\n * service object that the request is being made to.\n *\n * @!attribute maxRedirects\n * @return [Integer] the maximum amount of redirects to follow for a\n * service request. Defaults to 10.\n *\n * @!attribute paramValidation\n * @return [Boolean|map] whether input parameters should be validated against\n * the operation description before sending the request. Defaults to true.\n * Pass a map to enable any of the following specific validation features:\n *\n * * **min** [Boolean] — Validates that a value meets the min\n * constraint. This is enabled by default when paramValidation is set\n * to `true`.\n * * **max** [Boolean] — Validates that a value meets the max\n * constraint.\n * * **pattern** [Boolean] — Validates that a string value matches a\n * regular expression.\n * * **enum** [Boolean] — Validates that a string value matches one\n * of the allowable enum values.\n *\n * @!attribute computeChecksums\n * @return [Boolean] whether to compute checksums for payload bodies when\n * the service accepts it (currently supported in S3 and SQS only).\n *\n * @!attribute convertResponseTypes\n * @return [Boolean] whether types are converted when parsing response data.\n * Currently only supported for JSON based services. Turning this off may\n * improve performance on large response payloads. Defaults to `true`.\n *\n * @!attribute correctClockSkew\n * @return [Boolean] whether to apply a clock skew correction and retry\n * requests that fail because of an skewed client clock. Defaults to\n * `false`.\n *\n * @!attribute sslEnabled\n * @return [Boolean] whether SSL is enabled for requests\n *\n * @!attribute s3ForcePathStyle\n * @return [Boolean] whether to force path style URLs for S3 objects\n *\n * @!attribute s3BucketEndpoint\n * @note Setting this configuration option requires an `endpoint` to be\n * provided explicitly to the service constructor.\n * @return [Boolean] whether the provided endpoint addresses an individual\n * bucket (false if it addresses the root API endpoint).\n *\n * @!attribute s3DisableBodySigning\n * @return [Boolean] whether to disable S3 body signing when using signature version `v4`.\n * Body signing can only be disabled when using https. Defaults to `true`.\n *\n * @!attribute s3UsEast1RegionalEndpoint\n * @return ['legacy'|'regional'] when region is set to 'us-east-1', whether to send s3\n * request to global endpoints or 'us-east-1' regional endpoints. This config is only\n * applicable to S3 client;\n * Defaults to 'legacy'\n * @!attribute s3UseArnRegion\n * @return [Boolean] whether to override the request region with the region inferred\n * from requested resource's ARN. Only available for S3 buckets\n * Defaults to `true`\n *\n * @!attribute useAccelerateEndpoint\n * @note This configuration option is only compatible with S3 while accessing\n * dns-compatible buckets.\n * @return [Boolean] Whether to use the Accelerate endpoint with the S3 service.\n * Defaults to `false`.\n *\n * @!attribute retryDelayOptions\n * @example Set the base retry delay for all services to 300 ms\n * AWS.config.update({retryDelayOptions: {base: 300}});\n * // Delays with maxRetries = 3: 300, 600, 1200\n * @example Set a custom backoff function to provide delay values on retries\n * AWS.config.update({retryDelayOptions: {customBackoff: function(retryCount, err) {\n * // returns delay in ms\n * }}});\n * @return [map] A set of options to configure the retry delay on retryable errors.\n * Currently supported options are:\n *\n * * **base** [Integer] — The base number of milliseconds to use in the\n * exponential backoff for operation retries. Defaults to 100 ms for all services except\n * DynamoDB, where it defaults to 50ms.\n *\n * * **customBackoff ** [function] — A custom function that accepts a\n * retry count and error and returns the amount of time to delay in\n * milliseconds. If the result is a non-zero negative value, no further\n * retry attempts will be made. The `base` option will be ignored if this\n * option is supplied. The function is only called for retryable errors.\n *\n * @!attribute httpOptions\n * @return [map] A set of options to pass to the low-level HTTP request.\n * Currently supported options are:\n *\n * * **proxy** [String] — the URL to proxy requests through\n * * **agent** [http.Agent, https.Agent] — the Agent object to perform\n * HTTP requests with. Used for connection pooling. Note that for\n * SSL connections, a special Agent object is used in order to enable\n * peer certificate verification. This feature is only supported in the\n * Node.js environment.\n * * **connectTimeout** [Integer] — Sets the socket to timeout after\n * failing to establish a connection with the server after\n * `connectTimeout` milliseconds. This timeout has no effect once a socket\n * connection has been established.\n * * **timeout** [Integer] — The number of milliseconds a request can\n * take before automatically being terminated.\n * Defaults to two minutes (120000).\n * * **xhrAsync** [Boolean] — Whether the SDK will send asynchronous\n * HTTP requests. Used in the browser environment only. Set to false to\n * send requests synchronously. Defaults to true (async on).\n * * **xhrWithCredentials** [Boolean] — Sets the \"withCredentials\"\n * property of an XMLHttpRequest object. Used in the browser environment\n * only. Defaults to false.\n * @!attribute logger\n * @return [#write,#log] an object that responds to .write() (like a stream)\n * or .log() (like the console object) in order to log information about\n * requests\n *\n * @!attribute systemClockOffset\n * @return [Number] an offset value in milliseconds to apply to all signing\n * times. Use this to compensate for clock skew when your system may be\n * out of sync with the service time. Note that this configuration option\n * can only be applied to the global `AWS.config` object and cannot be\n * overridden in service-specific configuration. Defaults to 0 milliseconds.\n *\n * @!attribute signatureVersion\n * @return [String] the signature version to sign requests with (overriding\n * the API configuration). Possible values are: 'v2', 'v3', 'v4'.\n *\n * @!attribute signatureCache\n * @return [Boolean] whether the signature to sign requests with (overriding\n * the API configuration) is cached. Only applies to the signature version 'v4'.\n * Defaults to `true`.\n *\n * @!attribute endpointDiscoveryEnabled\n * @return [Boolean|undefined] whether to call operations with endpoints\n * given by service dynamically. Setting this config to `true` will enable\n * endpoint discovery for all applicable operations. Setting it to `false`\n * will explicitly disable endpoint discovery even though operations that\n * require endpoint discovery will presumably fail. Leaving it to\n * `undefined` means SDK only do endpoint discovery when it's required.\n * Defaults to `undefined`\n *\n * @!attribute endpointCacheSize\n * @return [Number] the size of the global cache storing endpoints from endpoint\n * discovery operations. Once endpoint cache is created, updating this setting\n * cannot change existing cache size.\n * Defaults to 1000\n *\n * @!attribute hostPrefixEnabled\n * @return [Boolean] whether to marshal request parameters to the prefix of\n * hostname. Defaults to `true`.\n *\n * @!attribute stsRegionalEndpoints\n * @return ['legacy'|'regional'] whether to send sts request to global endpoints or\n * regional endpoints.\n * Defaults to 'legacy'.\n *\n * @!attribute useFipsEndpoint\n * @return [Boolean] Enables FIPS compatible endpoints. Defaults to `false`.\n *\n * @!attribute useDualstackEndpoint\n * @return [Boolean] Enables IPv6 dualstack endpoint. Defaults to `false`.\n */\nAWS.Config = AWS.util.inherit({\n /**\n * @!endgroup\n */\n\n /**\n * Creates a new configuration object. This is the object that passes\n * option data along to service requests, including credentials, security,\n * region information, and some service specific settings.\n *\n * @example Creating a new configuration object with credentials and region\n * var config = new AWS.Config({\n * accessKeyId: 'AKID', secretAccessKey: 'SECRET', region: 'us-west-2'\n * });\n * @option options accessKeyId [String] your AWS access key ID.\n * @option options secretAccessKey [String] your AWS secret access key.\n * @option options sessionToken [AWS.Credentials] the optional AWS\n * session token to sign requests with.\n * @option options credentials [AWS.Credentials] the AWS credentials\n * to sign requests with. You can either specify this object, or\n * specify the accessKeyId and secretAccessKey options directly.\n * @option options credentialProvider [AWS.CredentialProviderChain] the\n * provider chain used to resolve credentials if no static `credentials`\n * property is set.\n * @option options region [String] the region to send service requests to.\n * See {region} for more information.\n * @option options maxRetries [Integer] the maximum amount of retries to\n * attempt with a request. See {maxRetries} for more information.\n * @option options maxRedirects [Integer] the maximum amount of redirects to\n * follow with a request. See {maxRedirects} for more information.\n * @option options sslEnabled [Boolean] whether to enable SSL for\n * requests.\n * @option options paramValidation [Boolean|map] whether input parameters\n * should be validated against the operation description before sending\n * the request. Defaults to true. Pass a map to enable any of the\n * following specific validation features:\n *\n * * **min** [Boolean] — Validates that a value meets the min\n * constraint. This is enabled by default when paramValidation is set\n * to `true`.\n * * **max** [Boolean] — Validates that a value meets the max\n * constraint.\n * * **pattern** [Boolean] — Validates that a string value matches a\n * regular expression.\n * * **enum** [Boolean] — Validates that a string value matches one\n * of the allowable enum values.\n * @option options computeChecksums [Boolean] whether to compute checksums\n * for payload bodies when the service accepts it (currently supported\n * in S3 only)\n * @option options convertResponseTypes [Boolean] whether types are converted\n * when parsing response data. Currently only supported for JSON based\n * services. Turning this off may improve performance on large response\n * payloads. Defaults to `true`.\n * @option options correctClockSkew [Boolean] whether to apply a clock skew\n * correction and retry requests that fail because of an skewed client\n * clock. Defaults to `false`.\n * @option options s3ForcePathStyle [Boolean] whether to force path\n * style URLs for S3 objects.\n * @option options s3BucketEndpoint [Boolean] whether the provided endpoint\n * addresses an individual bucket (false if it addresses the root API\n * endpoint). Note that setting this configuration option requires an\n * `endpoint` to be provided explicitly to the service constructor.\n * @option options s3DisableBodySigning [Boolean] whether S3 body signing\n * should be disabled when using signature version `v4`. Body signing\n * can only be disabled when using https. Defaults to `true`.\n * @option options s3UsEast1RegionalEndpoint ['legacy'|'regional'] when region\n * is set to 'us-east-1', whether to send s3 request to global endpoints or\n * 'us-east-1' regional endpoints. This config is only applicable to S3 client.\n * Defaults to `legacy`\n * @option options s3UseArnRegion [Boolean] whether to override the request region\n * with the region inferred from requested resource's ARN. Only available for S3 buckets\n * Defaults to `true`\n *\n * @option options retryDelayOptions [map] A set of options to configure\n * the retry delay on retryable errors. Currently supported options are:\n *\n * * **base** [Integer] — The base number of milliseconds to use in the\n * exponential backoff for operation retries. Defaults to 100 ms for all\n * services except DynamoDB, where it defaults to 50ms.\n * * **customBackoff ** [function] — A custom function that accepts a\n * retry count and error and returns the amount of time to delay in\n * milliseconds. If the result is a non-zero negative value, no further\n * retry attempts will be made. The `base` option will be ignored if this\n * option is supplied. The function is only called for retryable errors.\n * @option options httpOptions [map] A set of options to pass to the low-level\n * HTTP request. Currently supported options are:\n *\n * * **proxy** [String] — the URL to proxy requests through\n * * **agent** [http.Agent, https.Agent] — the Agent object to perform\n * HTTP requests with. Used for connection pooling. Defaults to the global\n * agent (`http.globalAgent`) for non-SSL connections. Note that for\n * SSL connections, a special Agent object is used in order to enable\n * peer certificate verification. This feature is only available in the\n * Node.js environment.\n * * **connectTimeout** [Integer] — Sets the socket to timeout after\n * failing to establish a connection with the server after\n * `connectTimeout` milliseconds. This timeout has no effect once a socket\n * connection has been established.\n * * **timeout** [Integer] — Sets the socket to timeout after timeout\n * milliseconds of inactivity on the socket. Defaults to two minutes\n * (120000).\n * * **xhrAsync** [Boolean] — Whether the SDK will send asynchronous\n * HTTP requests. Used in the browser environment only. Set to false to\n * send requests synchronously. Defaults to true (async on).\n * * **xhrWithCredentials** [Boolean] — Sets the \"withCredentials\"\n * property of an XMLHttpRequest object. Used in the browser environment\n * only. Defaults to false.\n * @option options apiVersion [String, Date] a String in YYYY-MM-DD format\n * (or a date) that represents the latest possible API version that can be\n * used in all services (unless overridden by `apiVersions`). Specify\n * 'latest' to use the latest possible version.\n * @option options apiVersions [map] a map of service\n * identifiers (the lowercase service class name) with the API version to\n * use when instantiating a service. Specify 'latest' for each individual\n * that can use the latest available version.\n * @option options logger [#write,#log] an object that responds to .write()\n * (like a stream) or .log() (like the console object) in order to log\n * information about requests\n * @option options systemClockOffset [Number] an offset value in milliseconds\n * to apply to all signing times. Use this to compensate for clock skew\n * when your system may be out of sync with the service time. Note that\n * this configuration option can only be applied to the global `AWS.config`\n * object and cannot be overridden in service-specific configuration.\n * Defaults to 0 milliseconds.\n * @option options signatureVersion [String] the signature version to sign\n * requests with (overriding the API configuration). Possible values are:\n * 'v2', 'v3', 'v4'.\n * @option options signatureCache [Boolean] whether the signature to sign\n * requests with (overriding the API configuration) is cached. Only applies\n * to the signature version 'v4'. Defaults to `true`.\n * @option options dynamoDbCrc32 [Boolean] whether to validate the CRC32\n * checksum of HTTP response bodies returned by DynamoDB. Default: `true`.\n * @option options useAccelerateEndpoint [Boolean] Whether to use the\n * S3 Transfer Acceleration endpoint with the S3 service. Default: `false`.\n * @option options clientSideMonitoring [Boolean] whether to collect and\n * publish this client's performance metrics of all its API requests.\n * @option options endpointDiscoveryEnabled [Boolean|undefined] whether to\n * call operations with endpoints given by service dynamically. Setting this\n * config to `true` will enable endpoint discovery for all applicable operations.\n * Setting it to `false` will explicitly disable endpoint discovery even though\n * operations that require endpoint discovery will presumably fail. Leaving it\n * to `undefined` means SDK will only do endpoint discovery when it's required.\n * Defaults to `undefined`\n * @option options endpointCacheSize [Number] the size of the global cache storing\n * endpoints from endpoint discovery operations. Once endpoint cache is created,\n * updating this setting cannot change existing cache size.\n * Defaults to 1000\n * @option options hostPrefixEnabled [Boolean] whether to marshal request\n * parameters to the prefix of hostname.\n * Defaults to `true`.\n * @option options stsRegionalEndpoints ['legacy'|'regional'] whether to send sts request\n * to global endpoints or regional endpoints.\n * Defaults to 'legacy'.\n * @option options useFipsEndpoint [Boolean] Enables FIPS compatible endpoints.\n * Defaults to `false`.\n * @option options useDualstackEndpoint [Boolean] Enables IPv6 dualstack endpoint.\n * Defaults to `false`.\n */\n constructor: function Config(options) {\n if (options === undefined) options = {};\n options = this.extractCredentials(options);\n\n AWS.util.each.call(this, this.keys, function (key, value) {\n this.set(key, options[key], value);\n });\n },\n\n /**\n * @!group Managing Credentials\n */\n\n /**\n * Loads credentials from the configuration object. This is used internally\n * by the SDK to ensure that refreshable {Credentials} objects are properly\n * refreshed and loaded when sending a request. If you want to ensure that\n * your credentials are loaded prior to a request, you can use this method\n * directly to provide accurate credential data stored in the object.\n *\n * @note If you configure the SDK with static or environment credentials,\n * the credential data should already be present in {credentials} attribute.\n * This method is primarily necessary to load credentials from asynchronous\n * sources, or sources that can refresh credentials periodically.\n * @example Getting your access key\n * AWS.config.getCredentials(function(err) {\n * if (err) console.log(err.stack); // credentials not loaded\n * else console.log(\"Access Key:\", AWS.config.credentials.accessKeyId);\n * })\n * @callback callback function(err)\n * Called when the {credentials} have been properly set on the configuration\n * object.\n *\n * @param err [Error] if this is set, credentials were not successfully\n * loaded and this error provides information why.\n * @see credentials\n * @see Credentials\n */\n getCredentials: function getCredentials(callback) {\n var self = this;\n\n function finish(err) {\n callback(err, err ? null : self.credentials);\n }\n\n function credError(msg, err) {\n return new AWS.util.error(err || new Error(), {\n code: 'CredentialsError',\n message: msg,\n name: 'CredentialsError'\n });\n }\n\n function getAsyncCredentials() {\n self.credentials.get(function(err) {\n if (err) {\n var msg = 'Could not load credentials from ' +\n self.credentials.constructor.name;\n err = credError(msg, err);\n }\n finish(err);\n });\n }\n\n function getStaticCredentials() {\n var err = null;\n if (!self.credentials.accessKeyId || !self.credentials.secretAccessKey) {\n err = credError('Missing credentials');\n }\n finish(err);\n }\n\n if (self.credentials) {\n if (typeof self.credentials.get === 'function') {\n getAsyncCredentials();\n } else { // static credentials\n getStaticCredentials();\n }\n } else if (self.credentialProvider) {\n self.credentialProvider.resolve(function(err, creds) {\n if (err) {\n err = credError('Could not load credentials from any providers', err);\n }\n self.credentials = creds;\n finish(err);\n });\n } else {\n finish(credError('No credentials to load'));\n }\n },\n\n /**\n * @!group Loading and Setting Configuration Options\n */\n\n /**\n * @overload update(options, allowUnknownKeys = false)\n * Updates the current configuration object with new options.\n *\n * @example Update maxRetries property of a configuration object\n * config.update({maxRetries: 10});\n * @param [Object] options a map of option keys and values.\n * @param [Boolean] allowUnknownKeys whether unknown keys can be set on\n * the configuration object. Defaults to `false`.\n * @see constructor\n */\n update: function update(options, allowUnknownKeys) {\n allowUnknownKeys = allowUnknownKeys || false;\n options = this.extractCredentials(options);\n AWS.util.each.call(this, options, function (key, value) {\n if (allowUnknownKeys || Object.prototype.hasOwnProperty.call(this.keys, key) ||\n AWS.Service.hasService(key)) {\n this.set(key, value);\n }\n });\n },\n\n /**\n * Loads configuration data from a JSON file into this config object.\n * @note Loading configuration will reset all existing configuration\n * on the object.\n * @!macro nobrowser\n * @param path [String] the path relative to your process's current\n * working directory to load configuration from.\n * @return [AWS.Config] the same configuration object\n */\n loadFromPath: function loadFromPath(path) {\n this.clear();\n\n var options = JSON.parse(AWS.util.readFileSync(path));\n var fileSystemCreds = new AWS.FileSystemCredentials(path);\n var chain = new AWS.CredentialProviderChain();\n chain.providers.unshift(fileSystemCreds);\n chain.resolve(function (err, creds) {\n if (err) throw err;\n else options.credentials = creds;\n });\n\n this.constructor(options);\n\n return this;\n },\n\n /**\n * Clears configuration data on this object\n *\n * @api private\n */\n clear: function clear() {\n /*jshint forin:false */\n AWS.util.each.call(this, this.keys, function (key) {\n delete this[key];\n });\n\n // reset credential provider\n this.set('credentials', undefined);\n this.set('credentialProvider', undefined);\n },\n\n /**\n * Sets a property on the configuration object, allowing for a\n * default value\n * @api private\n */\n set: function set(property, value, defaultValue) {\n if (value === undefined) {\n if (defaultValue === undefined) {\n defaultValue = this.keys[property];\n }\n if (typeof defaultValue === 'function') {\n this[property] = defaultValue.call(this);\n } else {\n this[property] = defaultValue;\n }\n } else if (property === 'httpOptions' && this[property]) {\n // deep merge httpOptions\n this[property] = AWS.util.merge(this[property], value);\n } else {\n this[property] = value;\n }\n },\n\n /**\n * All of the keys with their default values.\n *\n * @constant\n * @api private\n */\n keys: {\n credentials: null,\n credentialProvider: null,\n region: null,\n logger: null,\n apiVersions: {},\n apiVersion: null,\n endpoint: undefined,\n httpOptions: {\n timeout: 120000\n },\n maxRetries: undefined,\n maxRedirects: 10,\n paramValidation: true,\n sslEnabled: true,\n s3ForcePathStyle: false,\n s3BucketEndpoint: false,\n s3DisableBodySigning: true,\n s3UsEast1RegionalEndpoint: 'legacy',\n s3UseArnRegion: undefined,\n computeChecksums: true,\n convertResponseTypes: true,\n correctClockSkew: false,\n customUserAgent: null,\n dynamoDbCrc32: true,\n systemClockOffset: 0,\n signatureVersion: null,\n signatureCache: true,\n retryDelayOptions: {},\n useAccelerateEndpoint: false,\n clientSideMonitoring: false,\n endpointDiscoveryEnabled: undefined,\n endpointCacheSize: 1000,\n hostPrefixEnabled: true,\n stsRegionalEndpoints: 'legacy',\n useFipsEndpoint: false,\n useDualstackEndpoint: false\n },\n\n /**\n * Extracts accessKeyId, secretAccessKey and sessionToken\n * from a configuration hash.\n *\n * @api private\n */\n extractCredentials: function extractCredentials(options) {\n if (options.accessKeyId && options.secretAccessKey) {\n options = AWS.util.copy(options);\n options.credentials = new AWS.Credentials(options);\n }\n return options;\n },\n\n /**\n * Sets the promise dependency the SDK will use wherever Promises are returned.\n * Passing `null` will force the SDK to use native Promises if they are available.\n * If native Promises are not available, passing `null` will have no effect.\n * @param [Constructor] dep A reference to a Promise constructor\n */\n setPromisesDependency: function setPromisesDependency(dep) {\n PromisesDependency = dep;\n // if null was passed in, we should try to use native promises\n if (dep === null && typeof Promise === 'function') {\n PromisesDependency = Promise;\n }\n var constructors = [AWS.Request, AWS.Credentials, AWS.CredentialProviderChain];\n if (AWS.S3) {\n constructors.push(AWS.S3);\n if (AWS.S3.ManagedUpload) {\n constructors.push(AWS.S3.ManagedUpload);\n }\n }\n AWS.util.addPromises(constructors, PromisesDependency);\n },\n\n /**\n * Gets the promise dependency set by `AWS.config.setPromisesDependency`.\n */\n getPromisesDependency: function getPromisesDependency() {\n return PromisesDependency;\n }\n});\n\n/**\n * @return [AWS.Config] The global configuration object singleton instance\n * @readonly\n * @see AWS.Config\n */\nAWS.config = new AWS.Config();\n","var AWS = require('./core');\n/**\n * @api private\n */\nfunction validateRegionalEndpointsFlagValue(configValue, errorOptions) {\n if (typeof configValue !== 'string') return undefined;\n else if (['legacy', 'regional'].indexOf(configValue.toLowerCase()) >= 0) {\n return configValue.toLowerCase();\n } else {\n throw AWS.util.error(new Error(), errorOptions);\n }\n}\n\n/**\n * Resolve the configuration value for regional endpoint from difference sources: client\n * config, environmental variable, shared config file. Value can be case-insensitive\n * 'legacy' or 'reginal'.\n * @param originalConfig user-supplied config object to resolve\n * @param options a map of config property names from individual configuration source\n * - env: name of environmental variable that refers to the config\n * - sharedConfig: name of shared configuration file property that refers to the config\n * - clientConfig: name of client configuration property that refers to the config\n *\n * @api private\n */\nfunction resolveRegionalEndpointsFlag(originalConfig, options) {\n originalConfig = originalConfig || {};\n //validate config value\n var resolved;\n if (originalConfig[options.clientConfig]) {\n resolved = validateRegionalEndpointsFlagValue(originalConfig[options.clientConfig], {\n code: 'InvalidConfiguration',\n message: 'invalid \"' + options.clientConfig + '\" configuration. Expect \"legacy\" ' +\n ' or \"regional\". Got \"' + originalConfig[options.clientConfig] + '\".'\n });\n if (resolved) return resolved;\n }\n if (!AWS.util.isNode()) return resolved;\n //validate environmental variable\n if (Object.prototype.hasOwnProperty.call(process.env, options.env)) {\n var envFlag = process.env[options.env];\n resolved = validateRegionalEndpointsFlagValue(envFlag, {\n code: 'InvalidEnvironmentalVariable',\n message: 'invalid ' + options.env + ' environmental variable. Expect \"legacy\" ' +\n ' or \"regional\". Got \"' + process.env[options.env] + '\".'\n });\n if (resolved) return resolved;\n }\n //validate shared config file\n var profile = {};\n try {\n var profiles = AWS.util.getProfilesFromSharedConfig(AWS.util.iniLoader);\n profile = profiles[process.env.AWS_PROFILE || AWS.util.defaultProfile];\n } catch (e) {};\n if (profile && Object.prototype.hasOwnProperty.call(profile, options.sharedConfig)) {\n var fileFlag = profile[options.sharedConfig];\n resolved = validateRegionalEndpointsFlagValue(fileFlag, {\n code: 'InvalidConfiguration',\n message: 'invalid ' + options.sharedConfig + ' profile config. Expect \"legacy\" ' +\n ' or \"regional\". Got \"' + profile[options.sharedConfig] + '\".'\n });\n if (resolved) return resolved;\n }\n return resolved;\n}\n\nmodule.exports = resolveRegionalEndpointsFlag;\n","/**\n * The main AWS namespace\n */\nvar AWS = { util: require('./util') };\n\n/**\n * @api private\n * @!macro [new] nobrowser\n * @note This feature is not supported in the browser environment of the SDK.\n */\nvar _hidden = {}; _hidden.toString(); // hack to parse macro\n\n/**\n * @api private\n */\nmodule.exports = AWS;\n\nAWS.util.update(AWS, {\n\n /**\n * @constant\n */\n VERSION: '2.1082.0',\n\n /**\n * @api private\n */\n Signers: {},\n\n /**\n * @api private\n */\n Protocol: {\n Json: require('./protocol/json'),\n Query: require('./protocol/query'),\n Rest: require('./protocol/rest'),\n RestJson: require('./protocol/rest_json'),\n RestXml: require('./protocol/rest_xml')\n },\n\n /**\n * @api private\n */\n XML: {\n Builder: require('./xml/builder'),\n Parser: null // conditionally set based on environment\n },\n\n /**\n * @api private\n */\n JSON: {\n Builder: require('./json/builder'),\n Parser: require('./json/parser')\n },\n\n /**\n * @api private\n */\n Model: {\n Api: require('./model/api'),\n Operation: require('./model/operation'),\n Shape: require('./model/shape'),\n Paginator: require('./model/paginator'),\n ResourceWaiter: require('./model/resource_waiter')\n },\n\n /**\n * @api private\n */\n apiLoader: require('./api_loader'),\n\n /**\n * @api private\n */\n EndpointCache: require('../vendor/endpoint-cache').EndpointCache\n});\nrequire('./sequential_executor');\nrequire('./service');\nrequire('./config');\nrequire('./http');\nrequire('./event_listeners');\nrequire('./request');\nrequire('./response');\nrequire('./resource_waiter');\nrequire('./signers/request_signer');\nrequire('./param_validator');\n\n/**\n * @readonly\n * @return [AWS.SequentialExecutor] a collection of global event listeners that\n * are attached to every sent request.\n * @see AWS.Request AWS.Request for a list of events to listen for\n * @example Logging the time taken to send a request\n * AWS.events.on('send', function startSend(resp) {\n * resp.startTime = new Date().getTime();\n * }).on('complete', function calculateTime(resp) {\n * var time = (new Date().getTime() - resp.startTime) / 1000;\n * console.log('Request took ' + time + ' seconds');\n * });\n *\n * new AWS.S3().listBuckets(); // prints 'Request took 0.285 seconds'\n */\nAWS.events = new AWS.SequentialExecutor();\n\n//create endpoint cache lazily\nAWS.util.memoizedProperty(AWS, 'endpointCache', function() {\n return new AWS.EndpointCache(AWS.config.endpointCacheSize);\n}, true);\n","var AWS = require('./core');\n\n/**\n * Represents your AWS security credentials, specifically the\n * {accessKeyId}, {secretAccessKey}, and optional {sessionToken}.\n * Creating a `Credentials` object allows you to pass around your\n * security information to configuration and service objects.\n *\n * Note that this class typically does not need to be constructed manually,\n * as the {AWS.Config} and {AWS.Service} classes both accept simple\n * options hashes with the three keys. These structures will be converted\n * into Credentials objects automatically.\n *\n * ## Expiring and Refreshing Credentials\n *\n * Occasionally credentials can expire in the middle of a long-running\n * application. In this case, the SDK will automatically attempt to\n * refresh the credentials from the storage location if the Credentials\n * class implements the {refresh} method.\n *\n * If you are implementing a credential storage location, you\n * will want to create a subclass of the `Credentials` class and\n * override the {refresh} method. This method allows credentials to be\n * retrieved from the backing store, be it a file system, database, or\n * some network storage. The method should reset the credential attributes\n * on the object.\n *\n * @!attribute expired\n * @return [Boolean] whether the credentials have been expired and\n * require a refresh. Used in conjunction with {expireTime}.\n * @!attribute expireTime\n * @return [Date] a time when credentials should be considered expired. Used\n * in conjunction with {expired}.\n * @!attribute accessKeyId\n * @return [String] the AWS access key ID\n * @!attribute secretAccessKey\n * @return [String] the AWS secret access key\n * @!attribute sessionToken\n * @return [String] an optional AWS session token\n */\nAWS.Credentials = AWS.util.inherit({\n /**\n * A credentials object can be created using positional arguments or an options\n * hash.\n *\n * @overload AWS.Credentials(accessKeyId, secretAccessKey, sessionToken=null)\n * Creates a Credentials object with a given set of credential information\n * as positional arguments.\n * @param accessKeyId [String] the AWS access key ID\n * @param secretAccessKey [String] the AWS secret access key\n * @param sessionToken [String] the optional AWS session token\n * @example Create a credentials object with AWS credentials\n * var creds = new AWS.Credentials('akid', 'secret', 'session');\n * @overload AWS.Credentials(options)\n * Creates a Credentials object with a given set of credential information\n * as an options hash.\n * @option options accessKeyId [String] the AWS access key ID\n * @option options secretAccessKey [String] the AWS secret access key\n * @option options sessionToken [String] the optional AWS session token\n * @example Create a credentials object with AWS credentials\n * var creds = new AWS.Credentials({\n * accessKeyId: 'akid', secretAccessKey: 'secret', sessionToken: 'session'\n * });\n */\n constructor: function Credentials() {\n // hide secretAccessKey from being displayed with util.inspect\n AWS.util.hideProperties(this, ['secretAccessKey']);\n\n this.expired = false;\n this.expireTime = null;\n this.refreshCallbacks = [];\n if (arguments.length === 1 && typeof arguments[0] === 'object') {\n var creds = arguments[0].credentials || arguments[0];\n this.accessKeyId = creds.accessKeyId;\n this.secretAccessKey = creds.secretAccessKey;\n this.sessionToken = creds.sessionToken;\n } else {\n this.accessKeyId = arguments[0];\n this.secretAccessKey = arguments[1];\n this.sessionToken = arguments[2];\n }\n },\n\n /**\n * @return [Integer] the number of seconds before {expireTime} during which\n * the credentials will be considered expired.\n */\n expiryWindow: 15,\n\n /**\n * @return [Boolean] whether the credentials object should call {refresh}\n * @note Subclasses should override this method to provide custom refresh\n * logic.\n */\n needsRefresh: function needsRefresh() {\n var currentTime = AWS.util.date.getDate().getTime();\n var adjustedTime = new Date(currentTime + this.expiryWindow * 1000);\n\n if (this.expireTime && adjustedTime > this.expireTime) {\n return true;\n } else {\n return this.expired || !this.accessKeyId || !this.secretAccessKey;\n }\n },\n\n /**\n * Gets the existing credentials, refreshing them if they are not yet loaded\n * or have expired. Users should call this method before using {refresh},\n * as this will not attempt to reload credentials when they are already\n * loaded into the object.\n *\n * @callback callback function(err)\n * When this callback is called with no error, it means either credentials\n * do not need to be refreshed or refreshed credentials information has\n * been loaded into the object (as the `accessKeyId`, `secretAccessKey`,\n * and `sessionToken` properties).\n * @param err [Error] if an error occurred, this value will be filled\n */\n get: function get(callback) {\n var self = this;\n if (this.needsRefresh()) {\n this.refresh(function(err) {\n if (!err) self.expired = false; // reset expired flag\n if (callback) callback(err);\n });\n } else if (callback) {\n callback();\n }\n },\n\n /**\n * @!method getPromise()\n * Returns a 'thenable' promise.\n * Gets the existing credentials, refreshing them if they are not yet loaded\n * or have expired. Users should call this method before using {refresh},\n * as this will not attempt to reload credentials when they are already\n * loaded into the object.\n *\n * Two callbacks can be provided to the `then` method on the returned promise.\n * The first callback will be called if the promise is fulfilled, and the second\n * callback will be called if the promise is rejected.\n * @callback fulfilledCallback function()\n * Called if the promise is fulfilled. When this callback is called, it\n * means either credentials do not need to be refreshed or refreshed\n * credentials information has been loaded into the object (as the\n * `accessKeyId`, `secretAccessKey`, and `sessionToken` properties).\n * @callback rejectedCallback function(err)\n * Called if the promise is rejected.\n * @param err [Error] if an error occurred, this value will be filled\n * @return [Promise] A promise that represents the state of the `get` call.\n * @example Calling the `getPromise` method.\n * var promise = credProvider.getPromise();\n * promise.then(function() { ... }, function(err) { ... });\n */\n\n /**\n * @!method refreshPromise()\n * Returns a 'thenable' promise.\n * Refreshes the credentials. Users should call {get} before attempting\n * to forcibly refresh credentials.\n *\n * Two callbacks can be provided to the `then` method on the returned promise.\n * The first callback will be called if the promise is fulfilled, and the second\n * callback will be called if the promise is rejected.\n * @callback fulfilledCallback function()\n * Called if the promise is fulfilled. When this callback is called, it\n * means refreshed credentials information has been loaded into the object\n * (as the `accessKeyId`, `secretAccessKey`, and `sessionToken` properties).\n * @callback rejectedCallback function(err)\n * Called if the promise is rejected.\n * @param err [Error] if an error occurred, this value will be filled\n * @return [Promise] A promise that represents the state of the `refresh` call.\n * @example Calling the `refreshPromise` method.\n * var promise = credProvider.refreshPromise();\n * promise.then(function() { ... }, function(err) { ... });\n */\n\n /**\n * Refreshes the credentials. Users should call {get} before attempting\n * to forcibly refresh credentials.\n *\n * @callback callback function(err)\n * When this callback is called with no error, it means refreshed\n * credentials information has been loaded into the object (as the\n * `accessKeyId`, `secretAccessKey`, and `sessionToken` properties).\n * @param err [Error] if an error occurred, this value will be filled\n * @note Subclasses should override this class to reset the\n * {accessKeyId}, {secretAccessKey} and optional {sessionToken}\n * on the credentials object and then call the callback with\n * any error information.\n * @see get\n */\n refresh: function refresh(callback) {\n this.expired = false;\n callback();\n },\n\n /**\n * @api private\n * @param callback\n */\n coalesceRefresh: function coalesceRefresh(callback, sync) {\n var self = this;\n if (self.refreshCallbacks.push(callback) === 1) {\n self.load(function onLoad(err) {\n AWS.util.arrayEach(self.refreshCallbacks, function(callback) {\n if (sync) {\n callback(err);\n } else {\n // callback could throw, so defer to ensure all callbacks are notified\n AWS.util.defer(function () {\n callback(err);\n });\n }\n });\n self.refreshCallbacks.length = 0;\n });\n }\n },\n\n /**\n * @api private\n * @param callback\n */\n load: function load(callback) {\n callback();\n }\n});\n\n/**\n * @api private\n */\nAWS.Credentials.addPromisesToClass = function addPromisesToClass(PromiseDependency) {\n this.prototype.getPromise = AWS.util.promisifyMethod('get', PromiseDependency);\n this.prototype.refreshPromise = AWS.util.promisifyMethod('refresh', PromiseDependency);\n};\n\n/**\n * @api private\n */\nAWS.Credentials.deletePromisesFromClass = function deletePromisesFromClass() {\n delete this.prototype.getPromise;\n delete this.prototype.refreshPromise;\n};\n\nAWS.util.addPromises(AWS.Credentials);\n","var AWS = require('../core');\nvar STS = require('../../clients/sts');\n\n/**\n * Represents temporary credentials retrieved from {AWS.STS}. Without any\n * extra parameters, credentials will be fetched from the\n * {AWS.STS.getSessionToken} operation. If an IAM role is provided, the\n * {AWS.STS.assumeRole} operation will be used to fetch credentials for the\n * role instead.\n *\n * AWS.ChainableTemporaryCredentials differs from AWS.TemporaryCredentials in\n * the way masterCredentials and refreshes are handled.\n * AWS.ChainableTemporaryCredentials refreshes expired credentials using the\n * masterCredentials passed by the user to support chaining of STS credentials.\n * However, AWS.TemporaryCredentials recursively collapses the masterCredentials\n * during instantiation, precluding the ability to refresh credentials which\n * require intermediate, temporary credentials.\n *\n * For example, if the application should use RoleA, which must be assumed from\n * RoleB, and the environment provides credentials which can assume RoleB, then\n * AWS.ChainableTemporaryCredentials must be used to support refreshing the\n * temporary credentials for RoleA:\n *\n * ```javascript\n * var roleACreds = new AWS.ChainableTemporaryCredentials({\n * params: {RoleArn: 'RoleA'},\n * masterCredentials: new AWS.ChainableTemporaryCredentials({\n * params: {RoleArn: 'RoleB'},\n * masterCredentials: new AWS.EnvironmentCredentials('AWS')\n * })\n * });\n * ```\n *\n * If AWS.TemporaryCredentials had been used in the previous example,\n * `roleACreds` would fail to refresh because `roleACreds` would\n * use the environment credentials for the AssumeRole request.\n *\n * Another difference is that AWS.ChainableTemporaryCredentials creates the STS\n * service instance during instantiation while AWS.TemporaryCredentials creates\n * the STS service instance during the first refresh. Creating the service\n * instance during instantiation effectively captures the master credentials\n * from the global config, so that subsequent changes to the global config do\n * not affect the master credentials used to refresh the temporary credentials.\n *\n * This allows an instance of AWS.ChainableTemporaryCredentials to be assigned\n * to AWS.config.credentials:\n *\n * ```javascript\n * var envCreds = new AWS.EnvironmentCredentials('AWS');\n * AWS.config.credentials = envCreds;\n * // masterCredentials will be envCreds\n * AWS.config.credentials = new AWS.ChainableTemporaryCredentials({\n * params: {RoleArn: '...'}\n * });\n * ```\n *\n * Similarly, to use the CredentialProviderChain's default providers as the\n * master credentials, simply create a new instance of\n * AWS.ChainableTemporaryCredentials:\n *\n * ```javascript\n * AWS.config.credentials = new ChainableTemporaryCredentials({\n * params: {RoleArn: '...'}\n * });\n * ```\n *\n * @!attribute service\n * @return [AWS.STS] the STS service instance used to\n * get and refresh temporary credentials from AWS STS.\n * @note (see constructor)\n */\nAWS.ChainableTemporaryCredentials = AWS.util.inherit(AWS.Credentials, {\n /**\n * Creates a new temporary credentials object.\n *\n * @param options [map] a set of options\n * @option options params [map] ({}) a map of options that are passed to the\n * {AWS.STS.assumeRole} or {AWS.STS.getSessionToken} operations.\n * If a `RoleArn` parameter is passed in, credentials will be based on the\n * IAM role. If a `SerialNumber` parameter is passed in, {tokenCodeFn} must\n * also be passed in or an error will be thrown.\n * @option options masterCredentials [AWS.Credentials] the master credentials\n * used to get and refresh temporary credentials from AWS STS. By default,\n * AWS.config.credentials or AWS.config.credentialProvider will be used.\n * @option options tokenCodeFn [Function] (null) Function to provide\n * `TokenCode`, if `SerialNumber` is provided for profile in {params}. Function\n * is called with value of `SerialNumber` and `callback`, and should provide\n * the `TokenCode` or an error to the callback in the format\n * `callback(err, token)`.\n * @example Creating a new credentials object for generic temporary credentials\n * AWS.config.credentials = new AWS.ChainableTemporaryCredentials();\n * @example Creating a new credentials object for an IAM role\n * AWS.config.credentials = new AWS.ChainableTemporaryCredentials({\n * params: {\n * RoleArn: 'arn:aws:iam::1234567890:role/TemporaryCredentials'\n * }\n * });\n * @see AWS.STS.assumeRole\n * @see AWS.STS.getSessionToken\n */\n constructor: function ChainableTemporaryCredentials(options) {\n AWS.Credentials.call(this);\n options = options || {};\n this.errorCode = 'ChainableTemporaryCredentialsProviderFailure';\n this.expired = true;\n this.tokenCodeFn = null;\n\n var params = AWS.util.copy(options.params) || {};\n if (params.RoleArn) {\n params.RoleSessionName = params.RoleSessionName || 'temporary-credentials';\n }\n if (params.SerialNumber) {\n if (!options.tokenCodeFn || (typeof options.tokenCodeFn !== 'function')) {\n throw new AWS.util.error(\n new Error('tokenCodeFn must be a function when params.SerialNumber is given'),\n {code: this.errorCode}\n );\n } else {\n this.tokenCodeFn = options.tokenCodeFn;\n }\n }\n var config = AWS.util.merge(\n {\n params: params,\n credentials: options.masterCredentials || AWS.config.credentials\n },\n options.stsConfig || {}\n );\n this.service = new STS(config);\n },\n\n /**\n * Refreshes credentials using {AWS.STS.assumeRole} or\n * {AWS.STS.getSessionToken}, depending on whether an IAM role ARN was passed\n * to the credentials {constructor}.\n *\n * @callback callback function(err)\n * Called when the STS service responds (or fails). When\n * this callback is called with no error, it means that the credentials\n * information has been loaded into the object (as the `accessKeyId`,\n * `secretAccessKey`, and `sessionToken` properties).\n * @param err [Error] if an error occurred, this value will be filled\n * @see AWS.Credentials.get\n */\n refresh: function refresh(callback) {\n this.coalesceRefresh(callback || AWS.util.fn.callback);\n },\n\n /**\n * @api private\n * @param callback\n */\n load: function load(callback) {\n var self = this;\n var operation = self.service.config.params.RoleArn ? 'assumeRole' : 'getSessionToken';\n this.getTokenCode(function (err, tokenCode) {\n var params = {};\n if (err) {\n callback(err);\n return;\n }\n if (tokenCode) {\n params.TokenCode = tokenCode;\n }\n self.service[operation](params, function (err, data) {\n if (!err) {\n self.service.credentialsFrom(data, self);\n }\n callback(err);\n });\n });\n },\n\n /**\n * @api private\n */\n getTokenCode: function getTokenCode(callback) {\n var self = this;\n if (this.tokenCodeFn) {\n this.tokenCodeFn(this.service.config.params.SerialNumber, function (err, token) {\n if (err) {\n var message = err;\n if (err instanceof Error) {\n message = err.message;\n }\n callback(\n AWS.util.error(\n new Error('Error fetching MFA token: ' + message),\n { code: self.errorCode}\n )\n );\n return;\n }\n callback(null, token);\n });\n } else {\n callback(null);\n }\n }\n});\n","var AWS = require('../core');\nvar CognitoIdentity = require('../../clients/cognitoidentity');\nvar STS = require('../../clients/sts');\n\n/**\n * Represents credentials retrieved from STS Web Identity Federation using\n * the Amazon Cognito Identity service.\n *\n * By default this provider gets credentials using the\n * {AWS.CognitoIdentity.getCredentialsForIdentity} service operation, which\n * requires either an `IdentityId` or an `IdentityPoolId` (Amazon Cognito\n * Identity Pool ID), which is used to call {AWS.CognitoIdentity.getId} to\n * obtain an `IdentityId`. If the identity or identity pool is not configured in\n * the Amazon Cognito Console to use IAM roles with the appropriate permissions,\n * then additionally a `RoleArn` is required containing the ARN of the IAM trust\n * policy for the Amazon Cognito role that the user will log into. If a `RoleArn`\n * is provided, then this provider gets credentials using the\n * {AWS.STS.assumeRoleWithWebIdentity} service operation, after first getting an\n * Open ID token from {AWS.CognitoIdentity.getOpenIdToken}.\n *\n * In addition, if this credential provider is used to provide authenticated\n * login, the `Logins` map may be set to the tokens provided by the respective\n * identity providers. See {constructor} for an example on creating a credentials\n * object with proper property values.\n *\n * ## Refreshing Credentials from Identity Service\n *\n * In addition to AWS credentials expiring after a given amount of time, the\n * login token from the identity provider will also expire. Once this token\n * expires, it will not be usable to refresh AWS credentials, and another\n * token will be needed. The SDK does not manage refreshing of the token value,\n * but this can be done through a \"refresh token\" supported by most identity\n * providers. Consult the documentation for the identity provider for refreshing\n * tokens. Once the refreshed token is acquired, you should make sure to update\n * this new token in the credentials object's {params} property. The following\n * code will update the WebIdentityToken, assuming you have retrieved an updated\n * token from the identity provider:\n *\n * ```javascript\n * AWS.config.credentials.params.Logins['graph.facebook.com'] = updatedToken;\n * ```\n *\n * Future calls to `credentials.refresh()` will now use the new token.\n *\n * @!attribute params\n * @return [map] the map of params passed to\n * {AWS.CognitoIdentity.getId},\n * {AWS.CognitoIdentity.getOpenIdToken}, and\n * {AWS.STS.assumeRoleWithWebIdentity}. To update the token, set the\n * `params.WebIdentityToken` property.\n * @!attribute data\n * @return [map] the raw data response from the call to\n * {AWS.CognitoIdentity.getCredentialsForIdentity}, or\n * {AWS.STS.assumeRoleWithWebIdentity}. Use this if you want to get\n * access to other properties from the response.\n * @!attribute identityId\n * @return [String] the Cognito ID returned by the last call to\n * {AWS.CognitoIdentity.getOpenIdToken}. This ID represents the actual\n * final resolved identity ID from Amazon Cognito.\n */\nAWS.CognitoIdentityCredentials = AWS.util.inherit(AWS.Credentials, {\n /**\n * @api private\n */\n localStorageKey: {\n id: 'aws.cognito.identity-id.',\n providers: 'aws.cognito.identity-providers.'\n },\n\n /**\n * Creates a new credentials object.\n * @example Creating a new credentials object\n * AWS.config.credentials = new AWS.CognitoIdentityCredentials({\n *\n * // either IdentityPoolId or IdentityId is required\n * // See the IdentityPoolId param for AWS.CognitoIdentity.getID (linked below)\n * // See the IdentityId param for AWS.CognitoIdentity.getCredentialsForIdentity\n * // or AWS.CognitoIdentity.getOpenIdToken (linked below)\n * IdentityPoolId: 'us-east-1:1699ebc0-7900-4099-b910-2df94f52a030',\n * IdentityId: 'us-east-1:128d0a74-c82f-4553-916d-90053e4a8b0f'\n *\n * // optional, only necessary when the identity pool is not configured\n * // to use IAM roles in the Amazon Cognito Console\n * // See the RoleArn param for AWS.STS.assumeRoleWithWebIdentity (linked below)\n * RoleArn: 'arn:aws:iam::1234567890:role/MYAPP-CognitoIdentity',\n *\n * // optional tokens, used for authenticated login\n * // See the Logins param for AWS.CognitoIdentity.getID (linked below)\n * Logins: {\n * 'graph.facebook.com': 'FBTOKEN',\n * 'www.amazon.com': 'AMAZONTOKEN',\n * 'accounts.google.com': 'GOOGLETOKEN',\n * 'api.twitter.com': 'TWITTERTOKEN',\n * 'www.digits.com': 'DIGITSTOKEN'\n * },\n *\n * // optional name, defaults to web-identity\n * // See the RoleSessionName param for AWS.STS.assumeRoleWithWebIdentity (linked below)\n * RoleSessionName: 'web',\n *\n * // optional, only necessary when application runs in a browser\n * // and multiple users are signed in at once, used for caching\n * LoginId: 'example@gmail.com'\n *\n * }, {\n * // optionally provide configuration to apply to the underlying service clients\n * // if configuration is not provided, then configuration will be pulled from AWS.config\n *\n * // region should match the region your identity pool is located in\n * region: 'us-east-1',\n *\n * // specify timeout options\n * httpOptions: {\n * timeout: 100\n * }\n * });\n * @see AWS.CognitoIdentity.getId\n * @see AWS.CognitoIdentity.getCredentialsForIdentity\n * @see AWS.STS.assumeRoleWithWebIdentity\n * @see AWS.CognitoIdentity.getOpenIdToken\n * @see AWS.Config\n * @note If a region is not provided in the global AWS.config, or\n * specified in the `clientConfig` to the CognitoIdentityCredentials\n * constructor, you may encounter a 'Missing credentials in config' error\n * when calling making a service call.\n */\n constructor: function CognitoIdentityCredentials(params, clientConfig) {\n AWS.Credentials.call(this);\n this.expired = true;\n this.params = params;\n this.data = null;\n this._identityId = null;\n this._clientConfig = AWS.util.copy(clientConfig || {});\n this.loadCachedId();\n var self = this;\n Object.defineProperty(this, 'identityId', {\n get: function() {\n self.loadCachedId();\n return self._identityId || self.params.IdentityId;\n },\n set: function(identityId) {\n self._identityId = identityId;\n }\n });\n },\n\n /**\n * Refreshes credentials using {AWS.CognitoIdentity.getCredentialsForIdentity},\n * or {AWS.STS.assumeRoleWithWebIdentity}.\n *\n * @callback callback function(err)\n * Called when the STS service responds (or fails). When\n * this callback is called with no error, it means that the credentials\n * information has been loaded into the object (as the `accessKeyId`,\n * `secretAccessKey`, and `sessionToken` properties).\n * @param err [Error] if an error occurred, this value will be filled\n * @see AWS.Credentials.get\n */\n refresh: function refresh(callback) {\n this.coalesceRefresh(callback || AWS.util.fn.callback);\n },\n\n /**\n * @api private\n * @param callback\n */\n load: function load(callback) {\n var self = this;\n self.createClients();\n self.data = null;\n self._identityId = null;\n self.getId(function(err) {\n if (!err) {\n if (!self.params.RoleArn) {\n self.getCredentialsForIdentity(callback);\n } else {\n self.getCredentialsFromSTS(callback);\n }\n } else {\n self.clearIdOnNotAuthorized(err);\n callback(err);\n }\n });\n },\n\n /**\n * Clears the cached Cognito ID associated with the currently configured\n * identity pool ID. Use this to manually invalidate your cache if\n * the identity pool ID was deleted.\n */\n clearCachedId: function clearCache() {\n this._identityId = null;\n delete this.params.IdentityId;\n\n var poolId = this.params.IdentityPoolId;\n var loginId = this.params.LoginId || '';\n delete this.storage[this.localStorageKey.id + poolId + loginId];\n delete this.storage[this.localStorageKey.providers + poolId + loginId];\n },\n\n /**\n * @api private\n */\n clearIdOnNotAuthorized: function clearIdOnNotAuthorized(err) {\n var self = this;\n if (err.code == 'NotAuthorizedException') {\n self.clearCachedId();\n }\n },\n\n /**\n * Retrieves a Cognito ID, loading from cache if it was already retrieved\n * on this device.\n *\n * @callback callback function(err, identityId)\n * @param err [Error, null] an error object if the call failed or null if\n * it succeeded.\n * @param identityId [String, null] if successful, the callback will return\n * the Cognito ID.\n * @note If not loaded explicitly, the Cognito ID is loaded and stored in\n * localStorage in the browser environment of a device.\n * @api private\n */\n getId: function getId(callback) {\n var self = this;\n if (typeof self.params.IdentityId === 'string') {\n return callback(null, self.params.IdentityId);\n }\n\n self.cognito.getId(function(err, data) {\n if (!err && data.IdentityId) {\n self.params.IdentityId = data.IdentityId;\n callback(null, data.IdentityId);\n } else {\n callback(err);\n }\n });\n },\n\n\n /**\n * @api private\n */\n loadCredentials: function loadCredentials(data, credentials) {\n if (!data || !credentials) return;\n credentials.expired = false;\n credentials.accessKeyId = data.Credentials.AccessKeyId;\n credentials.secretAccessKey = data.Credentials.SecretKey;\n credentials.sessionToken = data.Credentials.SessionToken;\n credentials.expireTime = data.Credentials.Expiration;\n },\n\n /**\n * @api private\n */\n getCredentialsForIdentity: function getCredentialsForIdentity(callback) {\n var self = this;\n self.cognito.getCredentialsForIdentity(function(err, data) {\n if (!err) {\n self.cacheId(data);\n self.data = data;\n self.loadCredentials(self.data, self);\n } else {\n self.clearIdOnNotAuthorized(err);\n }\n callback(err);\n });\n },\n\n /**\n * @api private\n */\n getCredentialsFromSTS: function getCredentialsFromSTS(callback) {\n var self = this;\n self.cognito.getOpenIdToken(function(err, data) {\n if (!err) {\n self.cacheId(data);\n self.params.WebIdentityToken = data.Token;\n self.webIdentityCredentials.refresh(function(webErr) {\n if (!webErr) {\n self.data = self.webIdentityCredentials.data;\n self.sts.credentialsFrom(self.data, self);\n }\n callback(webErr);\n });\n } else {\n self.clearIdOnNotAuthorized(err);\n callback(err);\n }\n });\n },\n\n /**\n * @api private\n */\n loadCachedId: function loadCachedId() {\n var self = this;\n\n // in the browser we source default IdentityId from localStorage\n if (AWS.util.isBrowser() && !self.params.IdentityId) {\n var id = self.getStorage('id');\n if (id && self.params.Logins) {\n var actualProviders = Object.keys(self.params.Logins);\n var cachedProviders =\n (self.getStorage('providers') || '').split(',');\n\n // only load ID if at least one provider used this ID before\n var intersect = cachedProviders.filter(function(n) {\n return actualProviders.indexOf(n) !== -1;\n });\n if (intersect.length !== 0) {\n self.params.IdentityId = id;\n }\n } else if (id) {\n self.params.IdentityId = id;\n }\n }\n },\n\n /**\n * @api private\n */\n createClients: function() {\n var clientConfig = this._clientConfig;\n this.webIdentityCredentials = this.webIdentityCredentials ||\n new AWS.WebIdentityCredentials(this.params, clientConfig);\n if (!this.cognito) {\n var cognitoConfig = AWS.util.merge({}, clientConfig);\n cognitoConfig.params = this.params;\n this.cognito = new CognitoIdentity(cognitoConfig);\n }\n this.sts = this.sts || new STS(clientConfig);\n },\n\n /**\n * @api private\n */\n cacheId: function cacheId(data) {\n this._identityId = data.IdentityId;\n this.params.IdentityId = this._identityId;\n\n // cache this IdentityId in browser localStorage if possible\n if (AWS.util.isBrowser()) {\n this.setStorage('id', data.IdentityId);\n\n if (this.params.Logins) {\n this.setStorage('providers', Object.keys(this.params.Logins).join(','));\n }\n }\n },\n\n /**\n * @api private\n */\n getStorage: function getStorage(key) {\n return this.storage[this.localStorageKey[key] + this.params.IdentityPoolId + (this.params.LoginId || '')];\n },\n\n /**\n * @api private\n */\n setStorage: function setStorage(key, val) {\n try {\n this.storage[this.localStorageKey[key] + this.params.IdentityPoolId + (this.params.LoginId || '')] = val;\n } catch (_) {}\n },\n\n /**\n * @api private\n */\n storage: (function() {\n try {\n var storage = AWS.util.isBrowser() && window.localStorage !== null && typeof window.localStorage === 'object' ?\n window.localStorage : {};\n\n // Test set/remove which would throw an error in Safari's private browsing\n storage['aws.test-storage'] = 'foobar';\n delete storage['aws.test-storage'];\n\n return storage;\n } catch (_) {\n return {};\n }\n })()\n});\n","var AWS = require('../core');\n\n/**\n * Creates a credential provider chain that searches for AWS credentials\n * in a list of credential providers specified by the {providers} property.\n *\n * By default, the chain will use the {defaultProviders} to resolve credentials.\n * These providers will look in the environment using the\n * {AWS.EnvironmentCredentials} class with the 'AWS' and 'AMAZON' prefixes.\n *\n * ## Setting Providers\n *\n * Each provider in the {providers} list should be a function that returns\n * a {AWS.Credentials} object, or a hardcoded credentials object. The function\n * form allows for delayed execution of the credential construction.\n *\n * ## Resolving Credentials from a Chain\n *\n * Call {resolve} to return the first valid credential object that can be\n * loaded by the provider chain.\n *\n * For example, to resolve a chain with a custom provider that checks a file\n * on disk after the set of {defaultProviders}:\n *\n * ```javascript\n * var diskProvider = new AWS.FileSystemCredentials('./creds.json');\n * var chain = new AWS.CredentialProviderChain();\n * chain.providers.push(diskProvider);\n * chain.resolve();\n * ```\n *\n * The above code will return the `diskProvider` object if the\n * file contains credentials and the `defaultProviders` do not contain\n * any credential settings.\n *\n * @!attribute providers\n * @return [Array]\n * a list of credentials objects or functions that return credentials\n * objects. If the provider is a function, the function will be\n * executed lazily when the provider needs to be checked for valid\n * credentials. By default, this object will be set to the\n * {defaultProviders}.\n * @see defaultProviders\n */\nAWS.CredentialProviderChain = AWS.util.inherit(AWS.Credentials, {\n\n /**\n * Creates a new CredentialProviderChain with a default set of providers\n * specified by {defaultProviders}.\n */\n constructor: function CredentialProviderChain(providers) {\n if (providers) {\n this.providers = providers;\n } else {\n this.providers = AWS.CredentialProviderChain.defaultProviders.slice(0);\n }\n this.resolveCallbacks = [];\n },\n\n /**\n * @!method resolvePromise()\n * Returns a 'thenable' promise.\n * Resolves the provider chain by searching for the first set of\n * credentials in {providers}.\n *\n * Two callbacks can be provided to the `then` method on the returned promise.\n * The first callback will be called if the promise is fulfilled, and the second\n * callback will be called if the promise is rejected.\n * @callback fulfilledCallback function(credentials)\n * Called if the promise is fulfilled and the provider resolves the chain\n * to a credentials object\n * @param credentials [AWS.Credentials] the credentials object resolved\n * by the provider chain.\n * @callback rejectedCallback function(error)\n * Called if the promise is rejected.\n * @param err [Error] the error object returned if no credentials are found.\n * @return [Promise] A promise that represents the state of the `resolve` method call.\n * @example Calling the `resolvePromise` method.\n * var promise = chain.resolvePromise();\n * promise.then(function(credentials) { ... }, function(err) { ... });\n */\n\n /**\n * Resolves the provider chain by searching for the first set of\n * credentials in {providers}.\n *\n * @callback callback function(err, credentials)\n * Called when the provider resolves the chain to a credentials object\n * or null if no credentials can be found.\n *\n * @param err [Error] the error object returned if no credentials are\n * found.\n * @param credentials [AWS.Credentials] the credentials object resolved\n * by the provider chain.\n * @return [AWS.CredentialProviderChain] the provider, for chaining.\n */\n resolve: function resolve(callback) {\n var self = this;\n if (self.providers.length === 0) {\n callback(new Error('No providers'));\n return self;\n }\n\n if (self.resolveCallbacks.push(callback) === 1) {\n var index = 0;\n var providers = self.providers.slice(0);\n\n function resolveNext(err, creds) {\n if ((!err && creds) || index === providers.length) {\n AWS.util.arrayEach(self.resolveCallbacks, function (callback) {\n callback(err, creds);\n });\n self.resolveCallbacks.length = 0;\n return;\n }\n\n var provider = providers[index++];\n if (typeof provider === 'function') {\n creds = provider.call();\n } else {\n creds = provider;\n }\n\n if (creds.get) {\n creds.get(function (getErr) {\n resolveNext(getErr, getErr ? null : creds);\n });\n } else {\n resolveNext(null, creds);\n }\n }\n\n resolveNext();\n }\n\n return self;\n }\n});\n\n/**\n * The default set of providers used by a vanilla CredentialProviderChain.\n *\n * In the browser:\n *\n * ```javascript\n * AWS.CredentialProviderChain.defaultProviders = []\n * ```\n *\n * In Node.js:\n *\n * ```javascript\n * AWS.CredentialProviderChain.defaultProviders = [\n * function () { return new AWS.EnvironmentCredentials('AWS'); },\n * function () { return new AWS.EnvironmentCredentials('AMAZON'); },\n * function () { return new AWS.SharedIniFileCredentials(); },\n * function () { return new AWS.ECSCredentials(); },\n * function () { return new AWS.ProcessCredentials(); },\n * function () { return new AWS.TokenFileWebIdentityCredentials(); },\n * function () { return new AWS.EC2MetadataCredentials() }\n * ]\n * ```\n */\nAWS.CredentialProviderChain.defaultProviders = [];\n\n/**\n * @api private\n */\nAWS.CredentialProviderChain.addPromisesToClass = function addPromisesToClass(PromiseDependency) {\n this.prototype.resolvePromise = AWS.util.promisifyMethod('resolve', PromiseDependency);\n};\n\n/**\n * @api private\n */\nAWS.CredentialProviderChain.deletePromisesFromClass = function deletePromisesFromClass() {\n delete this.prototype.resolvePromise;\n};\n\nAWS.util.addPromises(AWS.CredentialProviderChain);\n","var AWS = require('../core');\nrequire('../metadata_service');\n\n/**\n * Represents credentials received from the metadata service on an EC2 instance.\n *\n * By default, this class will connect to the metadata service using\n * {AWS.MetadataService} and attempt to load any available credentials. If it\n * can connect, and credentials are available, these will be used with zero\n * configuration.\n *\n * This credentials class will by default timeout after 1 second of inactivity\n * and retry 3 times.\n * If your requests to the EC2 metadata service are timing out, you can increase\n * these values by configuring them directly:\n *\n * ```javascript\n * AWS.config.credentials = new AWS.EC2MetadataCredentials({\n * httpOptions: { timeout: 5000 }, // 5 second timeout\n * maxRetries: 10, // retry 10 times\n * retryDelayOptions: { base: 200 } // see AWS.Config for information\n * });\n *\n * If your requests are timing out in connecting to the metadata service, such\n * as when testing on a development machine, you can use the connectTimeout\n * option, specified in milliseconds, which also defaults to 1 second.\n * ```\n *\n * @see AWS.Config.retryDelayOptions\n *\n * @!macro nobrowser\n */\nAWS.EC2MetadataCredentials = AWS.util.inherit(AWS.Credentials, {\n constructor: function EC2MetadataCredentials(options) {\n AWS.Credentials.call(this);\n\n options = options ? AWS.util.copy(options) : {};\n options = AWS.util.merge(\n {maxRetries: this.defaultMaxRetries}, options);\n if (!options.httpOptions) options.httpOptions = {};\n options.httpOptions = AWS.util.merge(\n {timeout: this.defaultTimeout,\n connectTimeout: this.defaultConnectTimeout},\n options.httpOptions);\n\n this.metadataService = new AWS.MetadataService(options);\n this.metadata = {};\n },\n\n /**\n * @api private\n */\n defaultTimeout: 1000,\n\n /**\n * @api private\n */\n defaultConnectTimeout: 1000,\n\n /**\n * @api private\n */\n defaultMaxRetries: 3,\n\n /**\n * Loads the credentials from the instance metadata service\n *\n * @callback callback function(err)\n * Called when the instance metadata service responds (or fails). When\n * this callback is called with no error, it means that the credentials\n * information has been loaded into the object (as the `accessKeyId`,\n * `secretAccessKey`, and `sessionToken` properties).\n * @param err [Error] if an error occurred, this value will be filled\n * @see get\n */\n refresh: function refresh(callback) {\n this.coalesceRefresh(callback || AWS.util.fn.callback);\n },\n\n /**\n * @api private\n * @param callback\n */\n load: function load(callback) {\n var self = this;\n self.metadataService.loadCredentials(function(err, creds) {\n if (!err) {\n var currentTime = AWS.util.date.getDate();\n var expireTime = new Date(creds.Expiration);\n if (expireTime < currentTime) {\n err = AWS.util.error(\n new Error('EC2 Instance Metadata Serivce provided expired credentials'),\n { code: 'EC2MetadataCredentialsProviderFailure' }\n );\n } else {\n self.expired = false;\n self.metadata = creds;\n self.accessKeyId = creds.AccessKeyId;\n self.secretAccessKey = creds.SecretAccessKey;\n self.sessionToken = creds.Token;\n self.expireTime = expireTime;\n }\n }\n callback(err);\n });\n }\n});\n","var AWS = require('../core');\n\n/**\n * Represents credentials received from relative URI specified in the ECS container.\n *\n * This class will request refreshable credentials from the relative URI\n * specified by the AWS_CONTAINER_CREDENTIALS_RELATIVE_URI or the\n * AWS_CONTAINER_CREDENTIALS_FULL_URI environment variable. If valid credentials\n * are returned in the response, these will be used with zero configuration.\n *\n * This credentials class will by default timeout after 1 second of inactivity\n * and retry 3 times.\n * If your requests to the relative URI are timing out, you can increase\n * the value by configuring them directly:\n *\n * ```javascript\n * AWS.config.credentials = new AWS.ECSCredentials({\n * httpOptions: { timeout: 5000 }, // 5 second timeout\n * maxRetries: 10, // retry 10 times\n * retryDelayOptions: { base: 200 } // see AWS.Config for information\n * });\n * ```\n *\n * @see AWS.Config.retryDelayOptions\n *\n * @!macro nobrowser\n */\nAWS.ECSCredentials = AWS.RemoteCredentials;\n","var AWS = require('../core');\n\n/**\n * Represents credentials from the environment.\n *\n * By default, this class will look for the matching environment variables\n * prefixed by a given {envPrefix}. The un-prefixed environment variable names\n * for each credential value is listed below:\n *\n * ```javascript\n * accessKeyId: ACCESS_KEY_ID\n * secretAccessKey: SECRET_ACCESS_KEY\n * sessionToken: SESSION_TOKEN\n * ```\n *\n * With the default prefix of 'AWS', the environment variables would be:\n *\n * AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_SESSION_TOKEN\n *\n * @!attribute envPrefix\n * @readonly\n * @return [String] the prefix for the environment variable names excluding\n * the separating underscore ('_').\n */\nAWS.EnvironmentCredentials = AWS.util.inherit(AWS.Credentials, {\n\n /**\n * Creates a new EnvironmentCredentials class with a given variable\n * prefix {envPrefix}. For example, to load credentials using the 'AWS'\n * prefix:\n *\n * ```javascript\n * var creds = new AWS.EnvironmentCredentials('AWS');\n * creds.accessKeyId == 'AKID' // from AWS_ACCESS_KEY_ID env var\n * ```\n *\n * @param envPrefix [String] the prefix to use (e.g., 'AWS') for environment\n * variables. Do not include the separating underscore.\n */\n constructor: function EnvironmentCredentials(envPrefix) {\n AWS.Credentials.call(this);\n this.envPrefix = envPrefix;\n this.get(function() {});\n },\n\n /**\n * Loads credentials from the environment using the prefixed\n * environment variables.\n *\n * @callback callback function(err)\n * Called after the (prefixed) ACCESS_KEY_ID, SECRET_ACCESS_KEY, and\n * SESSION_TOKEN environment variables are read. When this callback is\n * called with no error, it means that the credentials information has\n * been loaded into the object (as the `accessKeyId`, `secretAccessKey`,\n * and `sessionToken` properties).\n * @param err [Error] if an error occurred, this value will be filled\n * @see get\n */\n refresh: function refresh(callback) {\n if (!callback) callback = AWS.util.fn.callback;\n\n if (!process || !process.env) {\n callback(AWS.util.error(\n new Error('No process info or environment variables available'),\n { code: 'EnvironmentCredentialsProviderFailure' }\n ));\n return;\n }\n\n var keys = ['ACCESS_KEY_ID', 'SECRET_ACCESS_KEY', 'SESSION_TOKEN'];\n var values = [];\n\n for (var i = 0; i < keys.length; i++) {\n var prefix = '';\n if (this.envPrefix) prefix = this.envPrefix + '_';\n values[i] = process.env[prefix + keys[i]];\n if (!values[i] && keys[i] !== 'SESSION_TOKEN') {\n callback(AWS.util.error(\n new Error('Variable ' + prefix + keys[i] + ' not set.'),\n { code: 'EnvironmentCredentialsProviderFailure' }\n ));\n return;\n }\n }\n\n this.expired = false;\n AWS.Credentials.apply(this, values);\n callback();\n }\n\n});\n","var AWS = require('../core');\n\n/**\n * Represents credentials from a JSON file on disk.\n * If the credentials expire, the SDK can {refresh} the credentials\n * from the file.\n *\n * The format of the file should be similar to the options passed to\n * {AWS.Config}:\n *\n * ```javascript\n * {accessKeyId: 'akid', secretAccessKey: 'secret', sessionToken: 'optional'}\n * ```\n *\n * @example Loading credentials from disk\n * var creds = new AWS.FileSystemCredentials('./configuration.json');\n * creds.accessKeyId == 'AKID'\n *\n * @!attribute filename\n * @readonly\n * @return [String] the path to the JSON file on disk containing the\n * credentials.\n * @!macro nobrowser\n */\nAWS.FileSystemCredentials = AWS.util.inherit(AWS.Credentials, {\n\n /**\n * @overload AWS.FileSystemCredentials(filename)\n * Creates a new FileSystemCredentials object from a filename\n *\n * @param filename [String] the path on disk to the JSON file to load.\n */\n constructor: function FileSystemCredentials(filename) {\n AWS.Credentials.call(this);\n this.filename = filename;\n this.get(function() {});\n },\n\n /**\n * Loads the credentials from the {filename} on disk.\n *\n * @callback callback function(err)\n * Called after the JSON file on disk is read and parsed. When this callback\n * is called with no error, it means that the credentials information\n * has been loaded into the object (as the `accessKeyId`, `secretAccessKey`,\n * and `sessionToken` properties).\n * @param err [Error] if an error occurred, this value will be filled\n * @see get\n */\n refresh: function refresh(callback) {\n if (!callback) callback = AWS.util.fn.callback;\n try {\n var creds = JSON.parse(AWS.util.readFileSync(this.filename));\n AWS.Credentials.call(this, creds);\n if (!this.accessKeyId || !this.secretAccessKey) {\n throw AWS.util.error(\n new Error('Credentials not set in ' + this.filename),\n { code: 'FileSystemCredentialsProviderFailure' }\n );\n }\n this.expired = false;\n callback();\n } catch (err) {\n callback(err);\n }\n }\n\n});\n","var AWS = require('../core');\nvar proc = require('child_process');\nvar iniLoader = AWS.util.iniLoader;\n\n/**\n * Represents credentials loaded from shared credentials file\n * (defaulting to ~/.aws/credentials or defined by the\n * `AWS_SHARED_CREDENTIALS_FILE` environment variable).\n *\n * ## Using process credentials\n *\n * The credentials file can specify a credential provider that executes\n * a given process and attempts to read its stdout to recieve a JSON payload\n * containing the credentials:\n *\n * [default]\n * credential_process = /usr/bin/credential_proc\n *\n * Automatically handles refreshing credentials if an Expiration time is\n * provided in the credentials payload. Credentials supplied in the same profile\n * will take precedence over the credential_process.\n *\n * Sourcing credentials from an external process can potentially be dangerous,\n * so proceed with caution. Other credential providers should be preferred if\n * at all possible. If using this option, you should make sure that the shared\n * credentials file is as locked down as possible using security best practices\n * for your operating system.\n *\n * ## Using custom profiles\n *\n * The SDK supports loading credentials for separate profiles. This can be done\n * in two ways:\n *\n * 1. Set the `AWS_PROFILE` environment variable in your process prior to\n * loading the SDK.\n * 2. Directly load the AWS.ProcessCredentials provider:\n *\n * ```javascript\n * var creds = new AWS.ProcessCredentials({profile: 'myprofile'});\n * AWS.config.credentials = creds;\n * ```\n *\n * @!macro nobrowser\n */\nAWS.ProcessCredentials = AWS.util.inherit(AWS.Credentials, {\n /**\n * Creates a new ProcessCredentials object.\n *\n * @param options [map] a set of options\n * @option options profile [String] (AWS_PROFILE env var or 'default')\n * the name of the profile to load.\n * @option options filename [String] ('~/.aws/credentials' or defined by\n * AWS_SHARED_CREDENTIALS_FILE process env var)\n * the filename to use when loading credentials.\n * @option options callback [Function] (err) Credentials are eagerly loaded\n * by the constructor. When the callback is called with no error, the\n * credentials have been loaded successfully.\n */\n constructor: function ProcessCredentials(options) {\n AWS.Credentials.call(this);\n\n options = options || {};\n\n this.filename = options.filename;\n this.profile = options.profile || process.env.AWS_PROFILE || AWS.util.defaultProfile;\n this.get(options.callback || AWS.util.fn.noop);\n },\n\n /**\n * @api private\n */\n load: function load(callback) {\n var self = this;\n try {\n var profiles = AWS.util.getProfilesFromSharedConfig(iniLoader, this.filename);\n var profile = profiles[this.profile] || {};\n\n if (Object.keys(profile).length === 0) {\n throw AWS.util.error(\n new Error('Profile ' + this.profile + ' not found'),\n { code: 'ProcessCredentialsProviderFailure' }\n );\n }\n\n if (profile['credential_process']) {\n this.loadViaCredentialProcess(profile, function(err, data) {\n if (err) {\n callback(err, null);\n } else {\n self.expired = false;\n self.accessKeyId = data.AccessKeyId;\n self.secretAccessKey = data.SecretAccessKey;\n self.sessionToken = data.SessionToken;\n if (data.Expiration) {\n self.expireTime = new Date(data.Expiration);\n }\n callback(null);\n }\n });\n } else {\n throw AWS.util.error(\n new Error('Profile ' + this.profile + ' did not include credential process'),\n { code: 'ProcessCredentialsProviderFailure' }\n );\n }\n } catch (err) {\n callback(err);\n }\n },\n\n /**\n * Executes the credential_process and retrieves\n * credentials from the output\n * @api private\n * @param profile [map] credentials profile\n * @throws ProcessCredentialsProviderFailure\n */\n loadViaCredentialProcess: function loadViaCredentialProcess(profile, callback) {\n proc.exec(profile['credential_process'], { env: process.env }, function(err, stdOut, stdErr) {\n if (err) {\n callback(AWS.util.error(\n new Error('credential_process returned error'),\n { code: 'ProcessCredentialsProviderFailure'}\n ), null);\n } else {\n try {\n var credData = JSON.parse(stdOut);\n if (credData.Expiration) {\n var currentTime = AWS.util.date.getDate();\n var expireTime = new Date(credData.Expiration);\n if (expireTime < currentTime) {\n throw Error('credential_process returned expired credentials');\n }\n }\n\n if (credData.Version !== 1) {\n throw Error('credential_process does not return Version == 1');\n }\n callback(null, credData);\n } catch (err) {\n callback(AWS.util.error(\n new Error(err.message),\n { code: 'ProcessCredentialsProviderFailure'}\n ), null);\n }\n }\n });\n },\n\n /**\n * Loads the credentials from the credential process\n *\n * @callback callback function(err)\n * Called after the credential process has been executed. When this\n * callback is called with no error, it means that the credentials\n * information has been loaded into the object (as the `accessKeyId`,\n * `secretAccessKey`, and `sessionToken` properties).\n * @param err [Error] if an error occurred, this value will be filled\n * @see get\n */\n refresh: function refresh(callback) {\n iniLoader.clearCachedFiles();\n this.coalesceRefresh(callback || AWS.util.fn.callback);\n }\n});\n","var AWS = require('../core'),\n ENV_RELATIVE_URI = 'AWS_CONTAINER_CREDENTIALS_RELATIVE_URI',\n ENV_FULL_URI = 'AWS_CONTAINER_CREDENTIALS_FULL_URI',\n ENV_AUTH_TOKEN = 'AWS_CONTAINER_AUTHORIZATION_TOKEN',\n FULL_URI_UNRESTRICTED_PROTOCOLS = ['https:'],\n FULL_URI_ALLOWED_PROTOCOLS = ['http:', 'https:'],\n FULL_URI_ALLOWED_HOSTNAMES = ['localhost', '127.0.0.1'],\n RELATIVE_URI_HOST = '169.254.170.2';\n\n/**\n * Represents credentials received from specified URI.\n *\n * This class will request refreshable credentials from the relative URI\n * specified by the AWS_CONTAINER_CREDENTIALS_RELATIVE_URI or the\n * AWS_CONTAINER_CREDENTIALS_FULL_URI environment variable. If valid credentials\n * are returned in the response, these will be used with zero configuration.\n *\n * This credentials class will by default timeout after 1 second of inactivity\n * and retry 3 times.\n * If your requests to the relative URI are timing out, you can increase\n * the value by configuring them directly:\n *\n * ```javascript\n * AWS.config.credentials = new AWS.RemoteCredentials({\n * httpOptions: { timeout: 5000 }, // 5 second timeout\n * maxRetries: 10, // retry 10 times\n * retryDelayOptions: { base: 200 } // see AWS.Config for information\n * });\n * ```\n *\n * @see AWS.Config.retryDelayOptions\n *\n * @!macro nobrowser\n */\nAWS.RemoteCredentials = AWS.util.inherit(AWS.Credentials, {\n constructor: function RemoteCredentials(options) {\n AWS.Credentials.call(this);\n options = options ? AWS.util.copy(options) : {};\n if (!options.httpOptions) options.httpOptions = {};\n options.httpOptions = AWS.util.merge(\n this.httpOptions, options.httpOptions);\n AWS.util.update(this, options);\n },\n\n /**\n * @api private\n */\n httpOptions: { timeout: 1000 },\n\n /**\n * @api private\n */\n maxRetries: 3,\n\n /**\n * @api private\n */\n isConfiguredForEcsCredentials: function isConfiguredForEcsCredentials() {\n return Boolean(\n process &&\n process.env &&\n (process.env[ENV_RELATIVE_URI] || process.env[ENV_FULL_URI])\n );\n },\n\n /**\n * @api private\n */\n getECSFullUri: function getECSFullUri() {\n if (process && process.env) {\n var relative = process.env[ENV_RELATIVE_URI],\n full = process.env[ENV_FULL_URI];\n if (relative) {\n return 'http://' + RELATIVE_URI_HOST + relative;\n } else if (full) {\n var parsed = AWS.util.urlParse(full);\n if (FULL_URI_ALLOWED_PROTOCOLS.indexOf(parsed.protocol) < 0) {\n throw AWS.util.error(\n new Error('Unsupported protocol: AWS.RemoteCredentials supports '\n + FULL_URI_ALLOWED_PROTOCOLS.join(',') + ' only; '\n + parsed.protocol + ' requested.'),\n { code: 'ECSCredentialsProviderFailure' }\n );\n }\n\n if (FULL_URI_UNRESTRICTED_PROTOCOLS.indexOf(parsed.protocol) < 0 &&\n FULL_URI_ALLOWED_HOSTNAMES.indexOf(parsed.hostname) < 0) {\n throw AWS.util.error(\n new Error('Unsupported hostname: AWS.RemoteCredentials only supports '\n + FULL_URI_ALLOWED_HOSTNAMES.join(',') + ' for ' + parsed.protocol + '; '\n + parsed.protocol + '//' + parsed.hostname + ' requested.'),\n { code: 'ECSCredentialsProviderFailure' }\n );\n }\n\n return full;\n } else {\n throw AWS.util.error(\n new Error('Variable ' + ENV_RELATIVE_URI + ' or ' + ENV_FULL_URI +\n ' must be set to use AWS.RemoteCredentials.'),\n { code: 'ECSCredentialsProviderFailure' }\n );\n }\n } else {\n throw AWS.util.error(\n new Error('No process info available'),\n { code: 'ECSCredentialsProviderFailure' }\n );\n }\n },\n\n /**\n * @api private\n */\n getECSAuthToken: function getECSAuthToken() {\n if (process && process.env && process.env[ENV_FULL_URI]) {\n return process.env[ENV_AUTH_TOKEN];\n }\n },\n\n /**\n * @api private\n */\n credsFormatIsValid: function credsFormatIsValid(credData) {\n return (!!credData.accessKeyId && !!credData.secretAccessKey &&\n !!credData.sessionToken && !!credData.expireTime);\n },\n\n /**\n * @api private\n */\n formatCreds: function formatCreds(credData) {\n if (!!credData.credentials) {\n credData = credData.credentials;\n }\n\n return {\n expired: false,\n accessKeyId: credData.accessKeyId || credData.AccessKeyId,\n secretAccessKey: credData.secretAccessKey || credData.SecretAccessKey,\n sessionToken: credData.sessionToken || credData.Token,\n expireTime: new Date(credData.expiration || credData.Expiration)\n };\n },\n\n /**\n * @api private\n */\n request: function request(url, callback) {\n var httpRequest = new AWS.HttpRequest(url);\n httpRequest.method = 'GET';\n httpRequest.headers.Accept = 'application/json';\n var token = this.getECSAuthToken();\n if (token) {\n httpRequest.headers.Authorization = token;\n }\n AWS.util.handleRequestWithRetries(httpRequest, this, callback);\n },\n\n /**\n * Loads the credentials from the relative URI specified by container\n *\n * @callback callback function(err)\n * Called when the request to the relative URI responds (or fails). When\n * this callback is called with no error, it means that the credentials\n * information has been loaded into the object (as the `accessKeyId`,\n * `secretAccessKey`, `sessionToken`, and `expireTime` properties).\n * @param err [Error] if an error occurred, this value will be filled\n * @see get\n */\n refresh: function refresh(callback) {\n this.coalesceRefresh(callback || AWS.util.fn.callback);\n },\n\n /**\n * @api private\n */\n load: function load(callback) {\n var self = this;\n var fullUri;\n\n try {\n fullUri = this.getECSFullUri();\n } catch (err) {\n callback(err);\n return;\n }\n\n this.request(fullUri, function(err, data) {\n if (!err) {\n try {\n data = JSON.parse(data);\n var creds = self.formatCreds(data);\n if (!self.credsFormatIsValid(creds)) {\n throw AWS.util.error(\n new Error('Response data is not in valid format'),\n { code: 'ECSCredentialsProviderFailure' }\n );\n }\n AWS.util.update(self, creds);\n } catch (dataError) {\n err = dataError;\n }\n }\n callback(err, creds);\n });\n }\n});\n","var AWS = require('../core');\nvar STS = require('../../clients/sts');\n\n/**\n * Represents credentials retrieved from STS SAML support.\n *\n * By default this provider gets credentials using the\n * {AWS.STS.assumeRoleWithSAML} service operation. This operation\n * requires a `RoleArn` containing the ARN of the IAM trust policy for the\n * application for which credentials will be given, as well as a `PrincipalArn`\n * representing the ARN for the SAML identity provider. In addition, the\n * `SAMLAssertion` must be set to the token provided by the identity\n * provider. See {constructor} for an example on creating a credentials\n * object with proper `RoleArn`, `PrincipalArn`, and `SAMLAssertion` values.\n *\n * ## Refreshing Credentials from Identity Service\n *\n * In addition to AWS credentials expiring after a given amount of time, the\n * login token from the identity provider will also expire. Once this token\n * expires, it will not be usable to refresh AWS credentials, and another\n * token will be needed. The SDK does not manage refreshing of the token value,\n * but this can be done through a \"refresh token\" supported by most identity\n * providers. Consult the documentation for the identity provider for refreshing\n * tokens. Once the refreshed token is acquired, you should make sure to update\n * this new token in the credentials object's {params} property. The following\n * code will update the SAMLAssertion, assuming you have retrieved an updated\n * token from the identity provider:\n *\n * ```javascript\n * AWS.config.credentials.params.SAMLAssertion = updatedToken;\n * ```\n *\n * Future calls to `credentials.refresh()` will now use the new token.\n *\n * @!attribute params\n * @return [map] the map of params passed to\n * {AWS.STS.assumeRoleWithSAML}. To update the token, set the\n * `params.SAMLAssertion` property.\n */\nAWS.SAMLCredentials = AWS.util.inherit(AWS.Credentials, {\n /**\n * Creates a new credentials object.\n * @param (see AWS.STS.assumeRoleWithSAML)\n * @example Creating a new credentials object\n * AWS.config.credentials = new AWS.SAMLCredentials({\n * RoleArn: 'arn:aws:iam::1234567890:role/SAMLRole',\n * PrincipalArn: 'arn:aws:iam::1234567890:role/SAMLPrincipal',\n * SAMLAssertion: 'base64-token', // base64-encoded token from IdP\n * });\n * @see AWS.STS.assumeRoleWithSAML\n */\n constructor: function SAMLCredentials(params) {\n AWS.Credentials.call(this);\n this.expired = true;\n this.params = params;\n },\n\n /**\n * Refreshes credentials using {AWS.STS.assumeRoleWithSAML}\n *\n * @callback callback function(err)\n * Called when the STS service responds (or fails). When\n * this callback is called with no error, it means that the credentials\n * information has been loaded into the object (as the `accessKeyId`,\n * `secretAccessKey`, and `sessionToken` properties).\n * @param err [Error] if an error occurred, this value will be filled\n * @see get\n */\n refresh: function refresh(callback) {\n this.coalesceRefresh(callback || AWS.util.fn.callback);\n },\n\n /**\n * @api private\n */\n load: function load(callback) {\n var self = this;\n self.createClients();\n self.service.assumeRoleWithSAML(function (err, data) {\n if (!err) {\n self.service.credentialsFrom(data, self);\n }\n callback(err);\n });\n },\n\n /**\n * @api private\n */\n createClients: function() {\n this.service = this.service || new STS({params: this.params});\n }\n\n});\n","var AWS = require('../core');\nvar STS = require('../../clients/sts');\nvar iniLoader = AWS.util.iniLoader;\n\nvar ASSUME_ROLE_DEFAULT_REGION = 'us-east-1';\n\n/**\n * Represents credentials loaded from shared credentials file\n * (defaulting to ~/.aws/credentials or defined by the\n * `AWS_SHARED_CREDENTIALS_FILE` environment variable).\n *\n * ## Using the shared credentials file\n *\n * This provider is checked by default in the Node.js environment. To use the\n * credentials file provider, simply add your access and secret keys to the\n * ~/.aws/credentials file in the following format:\n *\n * [default]\n * aws_access_key_id = AKID...\n * aws_secret_access_key = YOUR_SECRET_KEY\n *\n * ## Using custom profiles\n *\n * The SDK supports loading credentials for separate profiles. This can be done\n * in two ways:\n *\n * 1. Set the `AWS_PROFILE` environment variable in your process prior to\n * loading the SDK.\n * 2. Directly load the AWS.SharedIniFileCredentials provider:\n *\n * ```javascript\n * var creds = new AWS.SharedIniFileCredentials({profile: 'myprofile'});\n * AWS.config.credentials = creds;\n * ```\n *\n * @!macro nobrowser\n */\nAWS.SharedIniFileCredentials = AWS.util.inherit(AWS.Credentials, {\n /**\n * Creates a new SharedIniFileCredentials object.\n *\n * @param options [map] a set of options\n * @option options profile [String] (AWS_PROFILE env var or 'default')\n * the name of the profile to load.\n * @option options filename [String] ('~/.aws/credentials' or defined by\n * AWS_SHARED_CREDENTIALS_FILE process env var)\n * the filename to use when loading credentials.\n * @option options disableAssumeRole [Boolean] (false) True to disable\n * support for profiles that assume an IAM role. If true, and an assume\n * role profile is selected, an error is raised.\n * @option options preferStaticCredentials [Boolean] (false) True to\n * prefer static credentials to role_arn if both are present.\n * @option options tokenCodeFn [Function] (null) Function to provide\n * STS Assume Role TokenCode, if mfa_serial is provided for profile in ini\n * file. Function is called with value of mfa_serial and callback, and\n * should provide the TokenCode or an error to the callback in the format\n * callback(err, token)\n * @option options callback [Function] (err) Credentials are eagerly loaded\n * by the constructor. When the callback is called with no error, the\n * credentials have been loaded successfully.\n * @option options httpOptions [map] A set of options to pass to the low-level\n * HTTP request. Currently supported options are:\n * * **proxy** [String] — the URL to proxy requests through\n * * **agent** [http.Agent, https.Agent] — the Agent object to perform\n * HTTP requests with. Used for connection pooling. Defaults to the global\n * agent (`http.globalAgent`) for non-SSL connections. Note that for\n * SSL connections, a special Agent object is used in order to enable\n * peer certificate verification. This feature is only available in the\n * Node.js environment.\n * * **connectTimeout** [Integer] — Sets the socket to timeout after\n * failing to establish a connection with the server after\n * `connectTimeout` milliseconds. This timeout has no effect once a socket\n * connection has been established.\n * * **timeout** [Integer] — The number of milliseconds a request can\n * take before automatically being terminated.\n * Defaults to two minutes (120000).\n */\n constructor: function SharedIniFileCredentials(options) {\n AWS.Credentials.call(this);\n\n options = options || {};\n\n this.filename = options.filename;\n this.profile = options.profile || process.env.AWS_PROFILE || AWS.util.defaultProfile;\n this.disableAssumeRole = Boolean(options.disableAssumeRole);\n this.preferStaticCredentials = Boolean(options.preferStaticCredentials);\n this.tokenCodeFn = options.tokenCodeFn || null;\n this.httpOptions = options.httpOptions || null;\n this.get(options.callback || AWS.util.fn.noop);\n },\n\n /**\n * @api private\n */\n load: function load(callback) {\n var self = this;\n try {\n var profiles = AWS.util.getProfilesFromSharedConfig(iniLoader, this.filename);\n var profile = profiles[this.profile] || {};\n\n if (Object.keys(profile).length === 0) {\n throw AWS.util.error(\n new Error('Profile ' + this.profile + ' not found'),\n { code: 'SharedIniFileCredentialsProviderFailure' }\n );\n }\n\n /*\n In the CLI, the presence of both a role_arn and static credentials have\n different meanings depending on how many profiles have been visited. For\n the first profile processed, role_arn takes precedence over any static\n credentials, but for all subsequent profiles, static credentials are\n used if present, and only in their absence will the profile's\n source_profile and role_arn keys be used to load another set of\n credentials. This var is intended to yield compatible behaviour in this\n sdk.\n */\n var preferStaticCredentialsToRoleArn = Boolean(\n this.preferStaticCredentials\n && profile['aws_access_key_id']\n && profile['aws_secret_access_key']\n );\n\n if (profile['role_arn'] && !preferStaticCredentialsToRoleArn) {\n this.loadRoleProfile(profiles, profile, function(err, data) {\n if (err) {\n callback(err);\n } else {\n self.expired = false;\n self.accessKeyId = data.Credentials.AccessKeyId;\n self.secretAccessKey = data.Credentials.SecretAccessKey;\n self.sessionToken = data.Credentials.SessionToken;\n self.expireTime = data.Credentials.Expiration;\n callback(null);\n }\n });\n return;\n }\n\n this.accessKeyId = profile['aws_access_key_id'];\n this.secretAccessKey = profile['aws_secret_access_key'];\n this.sessionToken = profile['aws_session_token'];\n\n if (!this.accessKeyId || !this.secretAccessKey) {\n throw AWS.util.error(\n new Error('Credentials not set for profile ' + this.profile),\n { code: 'SharedIniFileCredentialsProviderFailure' }\n );\n }\n this.expired = false;\n callback(null);\n } catch (err) {\n callback(err);\n }\n },\n\n /**\n * Loads the credentials from the shared credentials file\n *\n * @callback callback function(err)\n * Called after the shared INI file on disk is read and parsed. When this\n * callback is called with no error, it means that the credentials\n * information has been loaded into the object (as the `accessKeyId`,\n * `secretAccessKey`, and `sessionToken` properties).\n * @param err [Error] if an error occurred, this value will be filled\n * @see get\n */\n refresh: function refresh(callback) {\n iniLoader.clearCachedFiles();\n this.coalesceRefresh(\n callback || AWS.util.fn.callback,\n this.disableAssumeRole\n );\n },\n\n /**\n * @api private\n */\n loadRoleProfile: function loadRoleProfile(creds, roleProfile, callback) {\n if (this.disableAssumeRole) {\n throw AWS.util.error(\n new Error('Role assumption profiles are disabled. ' +\n 'Failed to load profile ' + this.profile +\n ' from ' + creds.filename),\n { code: 'SharedIniFileCredentialsProviderFailure' }\n );\n }\n\n var self = this;\n var roleArn = roleProfile['role_arn'];\n var roleSessionName = roleProfile['role_session_name'];\n var externalId = roleProfile['external_id'];\n var mfaSerial = roleProfile['mfa_serial'];\n var sourceProfileName = roleProfile['source_profile'];\n\n // From experimentation, the following behavior mimics the AWS CLI:\n //\n // 1. Use region from the profile if present.\n // 2. Otherwise fall back to N. Virginia (global endpoint).\n //\n // It is necessary to do the fallback explicitly, because if\n // 'AWS_STS_REGIONAL_ENDPOINTS=regional', the underlying STS client will\n // otherwise throw an error if region is left 'undefined'.\n //\n // Experimentation shows that the AWS CLI (tested at version 1.18.136)\n // ignores the following potential sources of a region for the purposes of\n // this AssumeRole call:\n //\n // - The [default] profile\n // - The AWS_REGION environment variable\n //\n // Ignoring the [default] profile for the purposes of AssumeRole is arguably\n // a bug in the CLI since it does use the [default] region for service\n // calls... but right now we're matching behavior of the other tool.\n var profileRegion = roleProfile['region'] || ASSUME_ROLE_DEFAULT_REGION;\n\n if (!sourceProfileName) {\n throw AWS.util.error(\n new Error('source_profile is not set using profile ' + this.profile),\n { code: 'SharedIniFileCredentialsProviderFailure' }\n );\n }\n\n var sourceProfileExistanceTest = creds[sourceProfileName];\n\n if (typeof sourceProfileExistanceTest !== 'object') {\n throw AWS.util.error(\n new Error('source_profile ' + sourceProfileName + ' using profile '\n + this.profile + ' does not exist'),\n { code: 'SharedIniFileCredentialsProviderFailure' }\n );\n }\n\n var sourceCredentials = new AWS.SharedIniFileCredentials(\n AWS.util.merge(this.options || {}, {\n profile: sourceProfileName,\n preferStaticCredentials: true\n })\n );\n\n this.roleArn = roleArn;\n var sts = new STS({\n credentials: sourceCredentials,\n region: profileRegion,\n httpOptions: this.httpOptions\n });\n\n var roleParams = {\n RoleArn: roleArn,\n RoleSessionName: roleSessionName || 'aws-sdk-js-' + Date.now()\n };\n\n if (externalId) {\n roleParams.ExternalId = externalId;\n }\n\n if (mfaSerial && self.tokenCodeFn) {\n roleParams.SerialNumber = mfaSerial;\n self.tokenCodeFn(mfaSerial, function(err, token) {\n if (err) {\n var message;\n if (err instanceof Error) {\n message = err.message;\n } else {\n message = err;\n }\n callback(\n AWS.util.error(\n new Error('Error fetching MFA token: ' + message),\n { code: 'SharedIniFileCredentialsProviderFailure' }\n ));\n return;\n }\n\n roleParams.TokenCode = token;\n sts.assumeRole(roleParams, callback);\n });\n return;\n }\n sts.assumeRole(roleParams, callback);\n }\n});\n","var AWS = require('../core');\nvar STS = require('../../clients/sts');\n\n/**\n * Represents temporary credentials retrieved from {AWS.STS}. Without any\n * extra parameters, credentials will be fetched from the\n * {AWS.STS.getSessionToken} operation. If an IAM role is provided, the\n * {AWS.STS.assumeRole} operation will be used to fetch credentials for the\n * role instead.\n *\n * @note AWS.TemporaryCredentials is deprecated, but remains available for\n * backwards compatibility. {AWS.ChainableTemporaryCredentials} is the\n * preferred class for temporary credentials.\n *\n * To setup temporary credentials, configure a set of master credentials\n * using the standard credentials providers (environment, EC2 instance metadata,\n * or from the filesystem), then set the global credentials to a new\n * temporary credentials object:\n *\n * ```javascript\n * // Note that environment credentials are loaded by default,\n * // the following line is shown for clarity:\n * AWS.config.credentials = new AWS.EnvironmentCredentials('AWS');\n *\n * // Now set temporary credentials seeded from the master credentials\n * AWS.config.credentials = new AWS.TemporaryCredentials();\n *\n * // subsequent requests will now use temporary credentials from AWS STS.\n * new AWS.S3().listBucket(function(err, data) { ... });\n * ```\n *\n * @!attribute masterCredentials\n * @return [AWS.Credentials] the master (non-temporary) credentials used to\n * get and refresh temporary credentials from AWS STS.\n * @note (see constructor)\n */\nAWS.TemporaryCredentials = AWS.util.inherit(AWS.Credentials, {\n /**\n * Creates a new temporary credentials object.\n *\n * @note In order to create temporary credentials, you first need to have\n * \"master\" credentials configured in {AWS.Config.credentials}. These\n * master credentials are necessary to retrieve the temporary credentials,\n * as well as refresh the credentials when they expire.\n * @param params [map] a map of options that are passed to the\n * {AWS.STS.assumeRole} or {AWS.STS.getSessionToken} operations.\n * If a `RoleArn` parameter is passed in, credentials will be based on the\n * IAM role.\n * @param masterCredentials [AWS.Credentials] the master (non-temporary) credentials\n * used to get and refresh temporary credentials from AWS STS.\n * @example Creating a new credentials object for generic temporary credentials\n * AWS.config.credentials = new AWS.TemporaryCredentials();\n * @example Creating a new credentials object for an IAM role\n * AWS.config.credentials = new AWS.TemporaryCredentials({\n * RoleArn: 'arn:aws:iam::1234567890:role/TemporaryCredentials',\n * });\n * @see AWS.STS.assumeRole\n * @see AWS.STS.getSessionToken\n */\n constructor: function TemporaryCredentials(params, masterCredentials) {\n AWS.Credentials.call(this);\n this.loadMasterCredentials(masterCredentials);\n this.expired = true;\n\n this.params = params || {};\n if (this.params.RoleArn) {\n this.params.RoleSessionName =\n this.params.RoleSessionName || 'temporary-credentials';\n }\n },\n\n /**\n * Refreshes credentials using {AWS.STS.assumeRole} or\n * {AWS.STS.getSessionToken}, depending on whether an IAM role ARN was passed\n * to the credentials {constructor}.\n *\n * @callback callback function(err)\n * Called when the STS service responds (or fails). When\n * this callback is called with no error, it means that the credentials\n * information has been loaded into the object (as the `accessKeyId`,\n * `secretAccessKey`, and `sessionToken` properties).\n * @param err [Error] if an error occurred, this value will be filled\n * @see get\n */\n refresh: function refresh (callback) {\n this.coalesceRefresh(callback || AWS.util.fn.callback);\n },\n\n /**\n * @api private\n */\n load: function load (callback) {\n var self = this;\n self.createClients();\n self.masterCredentials.get(function () {\n self.service.config.credentials = self.masterCredentials;\n var operation = self.params.RoleArn ?\n self.service.assumeRole : self.service.getSessionToken;\n operation.call(self.service, function (err, data) {\n if (!err) {\n self.service.credentialsFrom(data, self);\n }\n callback(err);\n });\n });\n },\n\n /**\n * @api private\n */\n loadMasterCredentials: function loadMasterCredentials (masterCredentials) {\n this.masterCredentials = masterCredentials || AWS.config.credentials;\n while (this.masterCredentials.masterCredentials) {\n this.masterCredentials = this.masterCredentials.masterCredentials;\n }\n\n if (typeof this.masterCredentials.get !== 'function') {\n this.masterCredentials = new AWS.Credentials(this.masterCredentials);\n }\n },\n\n /**\n * @api private\n */\n createClients: function () {\n this.service = this.service || new STS({params: this.params});\n }\n\n});\n","var AWS = require('../core');\nvar fs = require('fs');\nvar STS = require('../../clients/sts');\nvar iniLoader = AWS.util.iniLoader;\n\n/**\n * Represents OIDC credentials from a file on disk\n * If the credentials expire, the SDK can {refresh} the credentials\n * from the file.\n *\n * ## Using the web identity token file\n *\n * This provider is checked by default in the Node.js environment. To use\n * the provider simply add your OIDC token to a file (ASCII encoding) and\n * share the filename in either AWS_WEB_IDENTITY_TOKEN_FILE environment\n * variable or web_identity_token_file shared config variable\n *\n * The file contains encoded OIDC token and the characters are\n * ASCII encoded. OIDC tokens are JSON Web Tokens (JWT).\n * JWT's are 3 base64 encoded strings joined by the '.' character.\n *\n * This class will read filename from AWS_WEB_IDENTITY_TOKEN_FILE\n * environment variable or web_identity_token_file shared config variable,\n * and get the OIDC token from filename.\n * It will also read IAM role to be assumed from AWS_ROLE_ARN\n * environment variable or role_arn shared config variable.\n * This provider gets credetials using the {AWS.STS.assumeRoleWithWebIdentity}\n * service operation\n *\n * @!macro nobrowser\n */\nAWS.TokenFileWebIdentityCredentials = AWS.util.inherit(AWS.Credentials, {\n\n /**\n * @example Creating a new credentials object\n * AWS.config.credentials = new AWS.TokenFileWebIdentityCredentials(\n * // optionally provide configuration to apply to the underlying AWS.STS service client\n * // if configuration is not provided, then configuration will be pulled from AWS.config\n * {\n * // specify timeout options\n * httpOptions: {\n * timeout: 100\n * }\n * });\n * @see AWS.Config\n */\n constructor: function TokenFileWebIdentityCredentials(clientConfig) {\n AWS.Credentials.call(this);\n this.data = null;\n this.clientConfig = AWS.util.copy(clientConfig || {});\n },\n\n /**\n * Returns params from environment variables\n *\n * @api private\n */\n getParamsFromEnv: function getParamsFromEnv() {\n var ENV_TOKEN_FILE = 'AWS_WEB_IDENTITY_TOKEN_FILE',\n ENV_ROLE_ARN = 'AWS_ROLE_ARN';\n if (process.env[ENV_TOKEN_FILE] && process.env[ENV_ROLE_ARN]) {\n return [{\n envTokenFile: process.env[ENV_TOKEN_FILE],\n roleArn: process.env[ENV_ROLE_ARN],\n roleSessionName: process.env['AWS_ROLE_SESSION_NAME']\n }];\n }\n },\n\n /**\n * Returns params from shared config variables\n *\n * @api private\n */\n getParamsFromSharedConfig: function getParamsFromSharedConfig() {\n var profiles = AWS.util.getProfilesFromSharedConfig(iniLoader);\n var profileName = process.env.AWS_PROFILE || AWS.util.defaultProfile;\n var profile = profiles[profileName] || {};\n\n if (Object.keys(profile).length === 0) {\n throw AWS.util.error(\n new Error('Profile ' + profileName + ' not found'),\n { code: 'TokenFileWebIdentityCredentialsProviderFailure' }\n );\n }\n\n var paramsArray = [];\n\n while (!profile['web_identity_token_file'] && profile['source_profile']) {\n paramsArray.unshift({\n roleArn: profile['role_arn'],\n roleSessionName: profile['role_session_name']\n });\n var sourceProfile = profile['source_profile'];\n profile = profiles[sourceProfile];\n }\n\n paramsArray.unshift({\n envTokenFile: profile['web_identity_token_file'],\n roleArn: profile['role_arn'],\n roleSessionName: profile['role_session_name']\n });\n\n return paramsArray;\n },\n\n /**\n * Refreshes credentials using {AWS.STS.assumeRoleWithWebIdentity}\n *\n * @callback callback function(err)\n * Called when the STS service responds (or fails). When\n * this callback is called with no error, it means that the credentials\n * information has been loaded into the object (as the `accessKeyId`,\n * `secretAccessKey`, and `sessionToken` properties).\n * @param err [Error] if an error occurred, this value will be filled\n * @see AWS.Credentials.get\n */\n refresh: function refresh(callback) {\n this.coalesceRefresh(callback || AWS.util.fn.callback);\n },\n\n /**\n * @api private\n */\n assumeRoleChaining: function assumeRoleChaining(paramsArray, callback) {\n var self = this;\n if (paramsArray.length === 0) {\n self.service.credentialsFrom(self.data, self);\n callback();\n } else {\n var params = paramsArray.shift();\n self.service.config.credentials = self.service.credentialsFrom(self.data, self);\n self.service.assumeRole(\n {\n RoleArn: params.roleArn,\n RoleSessionName: params.roleSessionName || 'token-file-web-identity'\n },\n function (err, data) {\n self.data = null;\n if (err) {\n callback(err);\n } else {\n self.data = data;\n self.assumeRoleChaining(paramsArray, callback);\n }\n }\n );\n }\n },\n\n /**\n * @api private\n */\n load: function load(callback) {\n var self = this;\n try {\n var paramsArray = self.getParamsFromEnv();\n if (!paramsArray) {\n paramsArray = self.getParamsFromSharedConfig();\n }\n if (paramsArray) {\n var params = paramsArray.shift();\n var oidcToken = fs.readFileSync(params.envTokenFile, {encoding: 'ascii'});\n if (!self.service) {\n self.createClients();\n }\n self.service.assumeRoleWithWebIdentity(\n {\n WebIdentityToken: oidcToken,\n RoleArn: params.roleArn,\n RoleSessionName: params.roleSessionName || 'token-file-web-identity'\n },\n function (err, data) {\n self.data = null;\n if (err) {\n callback(err);\n } else {\n self.data = data;\n self.assumeRoleChaining(paramsArray, callback);\n }\n }\n );\n }\n } catch (err) {\n callback(err);\n }\n },\n\n /**\n * @api private\n */\n createClients: function() {\n if (!this.service) {\n var stsConfig = AWS.util.merge({}, this.clientConfig);\n this.service = new STS(stsConfig);\n\n // Retry in case of IDPCommunicationErrorException or InvalidIdentityToken\n this.service.retryableError = function(error) {\n if (error.code === 'IDPCommunicationErrorException' || error.code === 'InvalidIdentityToken') {\n return true;\n } else {\n return AWS.Service.prototype.retryableError.call(this, error);\n }\n };\n }\n }\n});\n","var AWS = require('../core');\nvar STS = require('../../clients/sts');\n\n/**\n * Represents credentials retrieved from STS Web Identity Federation support.\n *\n * By default this provider gets credentials using the\n * {AWS.STS.assumeRoleWithWebIdentity} service operation. This operation\n * requires a `RoleArn` containing the ARN of the IAM trust policy for the\n * application for which credentials will be given. In addition, the\n * `WebIdentityToken` must be set to the token provided by the identity\n * provider. See {constructor} for an example on creating a credentials\n * object with proper `RoleArn` and `WebIdentityToken` values.\n *\n * ## Refreshing Credentials from Identity Service\n *\n * In addition to AWS credentials expiring after a given amount of time, the\n * login token from the identity provider will also expire. Once this token\n * expires, it will not be usable to refresh AWS credentials, and another\n * token will be needed. The SDK does not manage refreshing of the token value,\n * but this can be done through a \"refresh token\" supported by most identity\n * providers. Consult the documentation for the identity provider for refreshing\n * tokens. Once the refreshed token is acquired, you should make sure to update\n * this new token in the credentials object's {params} property. The following\n * code will update the WebIdentityToken, assuming you have retrieved an updated\n * token from the identity provider:\n *\n * ```javascript\n * AWS.config.credentials.params.WebIdentityToken = updatedToken;\n * ```\n *\n * Future calls to `credentials.refresh()` will now use the new token.\n *\n * @!attribute params\n * @return [map] the map of params passed to\n * {AWS.STS.assumeRoleWithWebIdentity}. To update the token, set the\n * `params.WebIdentityToken` property.\n * @!attribute data\n * @return [map] the raw data response from the call to\n * {AWS.STS.assumeRoleWithWebIdentity}. Use this if you want to get\n * access to other properties from the response.\n */\nAWS.WebIdentityCredentials = AWS.util.inherit(AWS.Credentials, {\n /**\n * Creates a new credentials object.\n * @param (see AWS.STS.assumeRoleWithWebIdentity)\n * @example Creating a new credentials object\n * AWS.config.credentials = new AWS.WebIdentityCredentials({\n * RoleArn: 'arn:aws:iam::1234567890:role/WebIdentity',\n * WebIdentityToken: 'ABCDEFGHIJKLMNOP', // token from identity service\n * RoleSessionName: 'web' // optional name, defaults to web-identity\n * }, {\n * // optionally provide configuration to apply to the underlying AWS.STS service client\n * // if configuration is not provided, then configuration will be pulled from AWS.config\n *\n * // specify timeout options\n * httpOptions: {\n * timeout: 100\n * }\n * });\n * @see AWS.STS.assumeRoleWithWebIdentity\n * @see AWS.Config\n */\n constructor: function WebIdentityCredentials(params, clientConfig) {\n AWS.Credentials.call(this);\n this.expired = true;\n this.params = params;\n this.params.RoleSessionName = this.params.RoleSessionName || 'web-identity';\n this.data = null;\n this._clientConfig = AWS.util.copy(clientConfig || {});\n },\n\n /**\n * Refreshes credentials using {AWS.STS.assumeRoleWithWebIdentity}\n *\n * @callback callback function(err)\n * Called when the STS service responds (or fails). When\n * this callback is called with no error, it means that the credentials\n * information has been loaded into the object (as the `accessKeyId`,\n * `secretAccessKey`, and `sessionToken` properties).\n * @param err [Error] if an error occurred, this value will be filled\n * @see get\n */\n refresh: function refresh(callback) {\n this.coalesceRefresh(callback || AWS.util.fn.callback);\n },\n\n /**\n * @api private\n */\n load: function load(callback) {\n var self = this;\n self.createClients();\n self.service.assumeRoleWithWebIdentity(function (err, data) {\n self.data = null;\n if (!err) {\n self.data = data;\n self.service.credentialsFrom(data, self);\n }\n callback(err);\n });\n },\n\n /**\n * @api private\n */\n createClients: function() {\n if (!this.service) {\n var stsConfig = AWS.util.merge({}, this._clientConfig);\n stsConfig.params = this.params;\n this.service = new STS(stsConfig);\n }\n }\n\n});\n","var AWS = require('./core');\nvar util = require('./util');\nvar endpointDiscoveryEnabledEnvs = ['AWS_ENABLE_ENDPOINT_DISCOVERY', 'AWS_ENDPOINT_DISCOVERY_ENABLED'];\n\n/**\n * Generate key (except resources and operation part) to index the endpoints in the cache\n * If input shape has endpointdiscoveryid trait then use\n * accessKey + operation + resources + region + service as cache key\n * If input shape doesn't have endpointdiscoveryid trait then use\n * accessKey + region + service as cache key\n * @return [map] object with keys to index endpoints.\n * @api private\n */\nfunction getCacheKey(request) {\n var service = request.service;\n var api = service.api || {};\n var operations = api.operations;\n var identifiers = {};\n if (service.config.region) {\n identifiers.region = service.config.region;\n }\n if (api.serviceId) {\n identifiers.serviceId = api.serviceId;\n }\n if (service.config.credentials.accessKeyId) {\n identifiers.accessKeyId = service.config.credentials.accessKeyId;\n }\n return identifiers;\n}\n\n/**\n * Recursive helper for marshallCustomIdentifiers().\n * Looks for required string input members that have 'endpointdiscoveryid' trait.\n * @api private\n */\nfunction marshallCustomIdentifiersHelper(result, params, shape) {\n if (!shape || params === undefined || params === null) return;\n if (shape.type === 'structure' && shape.required && shape.required.length > 0) {\n util.arrayEach(shape.required, function(name) {\n var memberShape = shape.members[name];\n if (memberShape.endpointDiscoveryId === true) {\n var locationName = memberShape.isLocationName ? memberShape.name : name;\n result[locationName] = String(params[name]);\n } else {\n marshallCustomIdentifiersHelper(result, params[name], memberShape);\n }\n });\n }\n}\n\n/**\n * Get custom identifiers for cache key.\n * Identifies custom identifiers by checking each shape's `endpointDiscoveryId` trait.\n * @param [object] request object\n * @param [object] input shape of the given operation's api\n * @api private\n */\nfunction marshallCustomIdentifiers(request, shape) {\n var identifiers = {};\n marshallCustomIdentifiersHelper(identifiers, request.params, shape);\n return identifiers;\n}\n\n/**\n * Call endpoint discovery operation when it's optional.\n * When endpoint is available in cache then use the cached endpoints. If endpoints\n * are unavailable then use regional endpoints and call endpoint discovery operation\n * asynchronously. This is turned off by default.\n * @param [object] request object\n * @api private\n */\nfunction optionalDiscoverEndpoint(request) {\n var service = request.service;\n var api = service.api;\n var operationModel = api.operations ? api.operations[request.operation] : undefined;\n var inputShape = operationModel ? operationModel.input : undefined;\n\n var identifiers = marshallCustomIdentifiers(request, inputShape);\n var cacheKey = getCacheKey(request);\n if (Object.keys(identifiers).length > 0) {\n cacheKey = util.update(cacheKey, identifiers);\n if (operationModel) cacheKey.operation = operationModel.name;\n }\n var endpoints = AWS.endpointCache.get(cacheKey);\n if (endpoints && endpoints.length === 1 && endpoints[0].Address === '') {\n //endpoint operation is being made but response not yet received\n //or endpoint operation just failed in 1 minute\n return;\n } else if (endpoints && endpoints.length > 0) {\n //found endpoint record from cache\n request.httpRequest.updateEndpoint(endpoints[0].Address);\n } else {\n //endpoint record not in cache or outdated. make discovery operation\n var endpointRequest = service.makeRequest(api.endpointOperation, {\n Operation: operationModel.name,\n Identifiers: identifiers,\n });\n addApiVersionHeader(endpointRequest);\n endpointRequest.removeListener('validate', AWS.EventListeners.Core.VALIDATE_PARAMETERS);\n endpointRequest.removeListener('retry', AWS.EventListeners.Core.RETRY_CHECK);\n //put in a placeholder for endpoints already requested, prevent\n //too much in-flight calls\n AWS.endpointCache.put(cacheKey, [{\n Address: '',\n CachePeriodInMinutes: 1\n }]);\n endpointRequest.send(function(err, data) {\n if (data && data.Endpoints) {\n AWS.endpointCache.put(cacheKey, data.Endpoints);\n } else if (err) {\n AWS.endpointCache.put(cacheKey, [{\n Address: '',\n CachePeriodInMinutes: 1 //not to make more endpoint operation in next 1 minute\n }]);\n }\n });\n }\n}\n\nvar requestQueue = {};\n\n/**\n * Call endpoint discovery operation when it's required.\n * When endpoint is available in cache then use cached ones. If endpoints are\n * unavailable then SDK should call endpoint operation then use returned new\n * endpoint for the api call. SDK will automatically attempt to do endpoint\n * discovery. This is turned off by default\n * @param [object] request object\n * @api private\n */\nfunction requiredDiscoverEndpoint(request, done) {\n var service = request.service;\n var api = service.api;\n var operationModel = api.operations ? api.operations[request.operation] : undefined;\n var inputShape = operationModel ? operationModel.input : undefined;\n\n var identifiers = marshallCustomIdentifiers(request, inputShape);\n var cacheKey = getCacheKey(request);\n if (Object.keys(identifiers).length > 0) {\n cacheKey = util.update(cacheKey, identifiers);\n if (operationModel) cacheKey.operation = operationModel.name;\n }\n var cacheKeyStr = AWS.EndpointCache.getKeyString(cacheKey);\n var endpoints = AWS.endpointCache.get(cacheKeyStr); //endpoint cache also accepts string keys\n if (endpoints && endpoints.length === 1 && endpoints[0].Address === '') {\n //endpoint operation is being made but response not yet received\n //push request object to a pending queue\n if (!requestQueue[cacheKeyStr]) requestQueue[cacheKeyStr] = [];\n requestQueue[cacheKeyStr].push({request: request, callback: done});\n return;\n } else if (endpoints && endpoints.length > 0) {\n request.httpRequest.updateEndpoint(endpoints[0].Address);\n done();\n } else {\n var endpointRequest = service.makeRequest(api.endpointOperation, {\n Operation: operationModel.name,\n Identifiers: identifiers,\n });\n endpointRequest.removeListener('validate', AWS.EventListeners.Core.VALIDATE_PARAMETERS);\n addApiVersionHeader(endpointRequest);\n\n //put in a placeholder for endpoints already requested, prevent\n //too much in-flight calls\n AWS.endpointCache.put(cacheKeyStr, [{\n Address: '',\n CachePeriodInMinutes: 60 //long-live cache\n }]);\n endpointRequest.send(function(err, data) {\n if (err) {\n request.response.error = util.error(err, { retryable: false });\n AWS.endpointCache.remove(cacheKey);\n\n //fail all the pending requests in batch\n if (requestQueue[cacheKeyStr]) {\n var pendingRequests = requestQueue[cacheKeyStr];\n util.arrayEach(pendingRequests, function(requestContext) {\n requestContext.request.response.error = util.error(err, { retryable: false });\n requestContext.callback();\n });\n delete requestQueue[cacheKeyStr];\n }\n } else if (data) {\n AWS.endpointCache.put(cacheKeyStr, data.Endpoints);\n request.httpRequest.updateEndpoint(data.Endpoints[0].Address);\n\n //update the endpoint for all the pending requests in batch\n if (requestQueue[cacheKeyStr]) {\n var pendingRequests = requestQueue[cacheKeyStr];\n util.arrayEach(pendingRequests, function(requestContext) {\n requestContext.request.httpRequest.updateEndpoint(data.Endpoints[0].Address);\n requestContext.callback();\n });\n delete requestQueue[cacheKeyStr];\n }\n }\n done();\n });\n }\n}\n\n/**\n * add api version header to endpoint operation\n * @api private\n */\nfunction addApiVersionHeader(endpointRequest) {\n var api = endpointRequest.service.api;\n var apiVersion = api.apiVersion;\n if (apiVersion && !endpointRequest.httpRequest.headers['x-amz-api-version']) {\n endpointRequest.httpRequest.headers['x-amz-api-version'] = apiVersion;\n }\n}\n\n/**\n * If api call gets invalid endpoint exception, SDK should attempt to remove the invalid\n * endpoint from cache.\n * @api private\n */\nfunction invalidateCachedEndpoints(response) {\n var error = response.error;\n var httpResponse = response.httpResponse;\n if (error &&\n (error.code === 'InvalidEndpointException' || httpResponse.statusCode === 421)\n ) {\n var request = response.request;\n var operations = request.service.api.operations || {};\n var inputShape = operations[request.operation] ? operations[request.operation].input : undefined;\n var identifiers = marshallCustomIdentifiers(request, inputShape);\n var cacheKey = getCacheKey(request);\n if (Object.keys(identifiers).length > 0) {\n cacheKey = util.update(cacheKey, identifiers);\n if (operations[request.operation]) cacheKey.operation = operations[request.operation].name;\n }\n AWS.endpointCache.remove(cacheKey);\n }\n}\n\n/**\n * If endpoint is explicitly configured, SDK should not do endpoint discovery in anytime.\n * @param [object] client Service client object.\n * @api private\n */\nfunction hasCustomEndpoint(client) {\n //if set endpoint is set for specific client, enable endpoint discovery will raise an error.\n if (client._originalConfig && client._originalConfig.endpoint && client._originalConfig.endpointDiscoveryEnabled === true) {\n throw util.error(new Error(), {\n code: 'ConfigurationException',\n message: 'Custom endpoint is supplied; endpointDiscoveryEnabled must not be true.'\n });\n };\n var svcConfig = AWS.config[client.serviceIdentifier] || {};\n return Boolean(AWS.config.endpoint || svcConfig.endpoint || (client._originalConfig && client._originalConfig.endpoint));\n}\n\n/**\n * @api private\n */\nfunction isFalsy(value) {\n return ['false', '0'].indexOf(value) >= 0;\n}\n\n/**\n * If endpoint discovery should perform for this request when no operation requires endpoint\n * discovery for the given service.\n * SDK performs config resolution in order like below:\n * 1. If set in client configuration.\n * 2. If set in env AWS_ENABLE_ENDPOINT_DISCOVERY.\n * 3. If set in shared ini config file with key 'endpoint_discovery_enabled'.\n * @param [object] request request object.\n * @returns [boolean|undefined] if endpoint discovery config is not set in any source, this\n * function returns undefined\n * @api private\n */\nfunction resolveEndpointDiscoveryConfig(request) {\n var service = request.service || {};\n if (service.config.endpointDiscoveryEnabled !== undefined) {\n return service.config.endpointDiscoveryEnabled;\n }\n\n //shared ini file is only available in Node\n //not to check env in browser\n if (util.isBrowser()) return undefined;\n\n // If any of recognized endpoint discovery config env is set\n for (var i = 0; i < endpointDiscoveryEnabledEnvs.length; i++) {\n var env = endpointDiscoveryEnabledEnvs[i];\n if (Object.prototype.hasOwnProperty.call(process.env, env)) {\n if (process.env[env] === '' || process.env[env] === undefined) {\n throw util.error(new Error(), {\n code: 'ConfigurationException',\n message: 'environmental variable ' + env + ' cannot be set to nothing'\n });\n }\n return !isFalsy(process.env[env]);\n }\n }\n\n var configFile = {};\n try {\n configFile = AWS.util.iniLoader ? AWS.util.iniLoader.loadFrom({\n isConfig: true,\n filename: process.env[AWS.util.sharedConfigFileEnv]\n }) : {};\n } catch (e) {}\n var sharedFileConfig = configFile[\n process.env.AWS_PROFILE || AWS.util.defaultProfile\n ] || {};\n if (Object.prototype.hasOwnProperty.call(sharedFileConfig, 'endpoint_discovery_enabled')) {\n if (sharedFileConfig.endpoint_discovery_enabled === undefined) {\n throw util.error(new Error(), {\n code: 'ConfigurationException',\n message: 'config file entry \\'endpoint_discovery_enabled\\' cannot be set to nothing'\n });\n }\n return !isFalsy(sharedFileConfig.endpoint_discovery_enabled);\n }\n return undefined;\n}\n\n/**\n * attach endpoint discovery logic to request object\n * @param [object] request\n * @api private\n */\nfunction discoverEndpoint(request, done) {\n var service = request.service || {};\n if (hasCustomEndpoint(service) || request.isPresigned()) return done();\n\n var operations = service.api.operations || {};\n var operationModel = operations[request.operation];\n var isEndpointDiscoveryRequired = operationModel ? operationModel.endpointDiscoveryRequired : 'NULL';\n var isEnabled = resolveEndpointDiscoveryConfig(request);\n var hasRequiredEndpointDiscovery = service.api.hasRequiredEndpointDiscovery;\n if (isEnabled || hasRequiredEndpointDiscovery) {\n // Once a customer enables endpoint discovery, the SDK should start appending\n // the string endpoint-discovery to the user-agent on all requests.\n request.httpRequest.appendToUserAgent('endpoint-discovery');\n }\n switch (isEndpointDiscoveryRequired) {\n case 'OPTIONAL':\n if (isEnabled || hasRequiredEndpointDiscovery) {\n // For a given service; if at least one operation requires endpoint discovery then the SDK must enable endpoint discovery\n // by default for all operations of that service, including operations where endpoint discovery is optional.\n optionalDiscoverEndpoint(request);\n request.addNamedListener('INVALIDATE_CACHED_ENDPOINTS', 'extractError', invalidateCachedEndpoints);\n }\n done();\n break;\n case 'REQUIRED':\n if (isEnabled === false) {\n // For a given operation; if endpoint discovery is required and it has been disabled on the SDK client,\n // then the SDK must return a clear and actionable exception.\n request.response.error = util.error(new Error(), {\n code: 'ConfigurationException',\n message: 'Endpoint Discovery is disabled but ' + service.api.className + '.' + request.operation +\n '() requires it. Please check your configurations.'\n });\n done();\n break;\n }\n request.addNamedListener('INVALIDATE_CACHED_ENDPOINTS', 'extractError', invalidateCachedEndpoints);\n requiredDiscoverEndpoint(request, done);\n break;\n case 'NULL':\n default:\n done();\n break;\n }\n}\n\nmodule.exports = {\n discoverEndpoint: discoverEndpoint,\n requiredDiscoverEndpoint: requiredDiscoverEndpoint,\n optionalDiscoverEndpoint: optionalDiscoverEndpoint,\n marshallCustomIdentifiers: marshallCustomIdentifiers,\n getCacheKey: getCacheKey,\n invalidateCachedEndpoint: invalidateCachedEndpoints,\n};\n","var AWS = require('../core');\nvar util = AWS.util;\nvar typeOf = require('./types').typeOf;\nvar DynamoDBSet = require('./set');\nvar NumberValue = require('./numberValue');\n\nAWS.DynamoDB.Converter = {\n /**\n * Convert a JavaScript value to its equivalent DynamoDB AttributeValue type\n *\n * @param data [any] The data to convert to a DynamoDB AttributeValue\n * @param options [map]\n * @option options convertEmptyValues [Boolean] Whether to automatically\n * convert empty strings, blobs,\n * and sets to `null`\n * @option options wrapNumbers [Boolean] Whether to return numbers as a\n * NumberValue object instead of\n * converting them to native JavaScript\n * numbers. This allows for the safe\n * round-trip transport of numbers of\n * arbitrary size.\n * @return [map] An object in the Amazon DynamoDB AttributeValue format\n *\n * @see AWS.DynamoDB.Converter.marshall AWS.DynamoDB.Converter.marshall to\n * convert entire records (rather than individual attributes)\n */\n input: function convertInput(data, options) {\n options = options || {};\n var type = typeOf(data);\n if (type === 'Object') {\n return formatMap(data, options);\n } else if (type === 'Array') {\n return formatList(data, options);\n } else if (type === 'Set') {\n return formatSet(data, options);\n } else if (type === 'String') {\n if (data.length === 0 && options.convertEmptyValues) {\n return convertInput(null);\n }\n return { S: data };\n } else if (type === 'Number' || type === 'NumberValue') {\n return { N: data.toString() };\n } else if (type === 'Binary') {\n if (data.length === 0 && options.convertEmptyValues) {\n return convertInput(null);\n }\n return { B: data };\n } else if (type === 'Boolean') {\n return { BOOL: data };\n } else if (type === 'null') {\n return { NULL: true };\n } else if (type !== 'undefined' && type !== 'Function') {\n // this value has a custom constructor\n return formatMap(data, options);\n }\n },\n\n /**\n * Convert a JavaScript object into a DynamoDB record.\n *\n * @param data [any] The data to convert to a DynamoDB record\n * @param options [map]\n * @option options convertEmptyValues [Boolean] Whether to automatically\n * convert empty strings, blobs,\n * and sets to `null`\n * @option options wrapNumbers [Boolean] Whether to return numbers as a\n * NumberValue object instead of\n * converting them to native JavaScript\n * numbers. This allows for the safe\n * round-trip transport of numbers of\n * arbitrary size.\n *\n * @return [map] An object in the DynamoDB record format.\n *\n * @example Convert a JavaScript object into a DynamoDB record\n * var marshalled = AWS.DynamoDB.Converter.marshall({\n * string: 'foo',\n * list: ['fizz', 'buzz', 'pop'],\n * map: {\n * nestedMap: {\n * key: 'value',\n * }\n * },\n * number: 123,\n * nullValue: null,\n * boolValue: true,\n * stringSet: new DynamoDBSet(['foo', 'bar', 'baz'])\n * });\n */\n marshall: function marshallItem(data, options) {\n return AWS.DynamoDB.Converter.input(data, options).M;\n },\n\n /**\n * Convert a DynamoDB AttributeValue object to its equivalent JavaScript type.\n *\n * @param data [map] An object in the Amazon DynamoDB AttributeValue format\n * @param options [map]\n * @option options convertEmptyValues [Boolean] Whether to automatically\n * convert empty strings, blobs,\n * and sets to `null`\n * @option options wrapNumbers [Boolean] Whether to return numbers as a\n * NumberValue object instead of\n * converting them to native JavaScript\n * numbers. This allows for the safe\n * round-trip transport of numbers of\n * arbitrary size.\n *\n * @return [Object|Array|String|Number|Boolean|null]\n *\n * @see AWS.DynamoDB.Converter.unmarshall AWS.DynamoDB.Converter.unmarshall to\n * convert entire records (rather than individual attributes)\n */\n output: function convertOutput(data, options) {\n options = options || {};\n var list, map, i;\n for (var type in data) {\n var values = data[type];\n if (type === 'M') {\n map = {};\n for (var key in values) {\n map[key] = convertOutput(values[key], options);\n }\n return map;\n } else if (type === 'L') {\n list = [];\n for (i = 0; i < values.length; i++) {\n list.push(convertOutput(values[i], options));\n }\n return list;\n } else if (type === 'SS') {\n list = [];\n for (i = 0; i < values.length; i++) {\n list.push(values[i] + '');\n }\n return new DynamoDBSet(list);\n } else if (type === 'NS') {\n list = [];\n for (i = 0; i < values.length; i++) {\n list.push(convertNumber(values[i], options.wrapNumbers));\n }\n return new DynamoDBSet(list);\n } else if (type === 'BS') {\n list = [];\n for (i = 0; i < values.length; i++) {\n list.push(AWS.util.buffer.toBuffer(values[i]));\n }\n return new DynamoDBSet(list);\n } else if (type === 'S') {\n return values + '';\n } else if (type === 'N') {\n return convertNumber(values, options.wrapNumbers);\n } else if (type === 'B') {\n return util.buffer.toBuffer(values);\n } else if (type === 'BOOL') {\n return (values === 'true' || values === 'TRUE' || values === true);\n } else if (type === 'NULL') {\n return null;\n }\n }\n },\n\n /**\n * Convert a DynamoDB record into a JavaScript object.\n *\n * @param data [any] The DynamoDB record\n * @param options [map]\n * @option options convertEmptyValues [Boolean] Whether to automatically\n * convert empty strings, blobs,\n * and sets to `null`\n * @option options wrapNumbers [Boolean] Whether to return numbers as a\n * NumberValue object instead of\n * converting them to native JavaScript\n * numbers. This allows for the safe\n * round-trip transport of numbers of\n * arbitrary size.\n *\n * @return [map] An object whose properties have been converted from\n * DynamoDB's AttributeValue format into their corresponding native\n * JavaScript types.\n *\n * @example Convert a record received from a DynamoDB stream\n * var unmarshalled = AWS.DynamoDB.Converter.unmarshall({\n * string: {S: 'foo'},\n * list: {L: [{S: 'fizz'}, {S: 'buzz'}, {S: 'pop'}]},\n * map: {\n * M: {\n * nestedMap: {\n * M: {\n * key: {S: 'value'}\n * }\n * }\n * }\n * },\n * number: {N: '123'},\n * nullValue: {NULL: true},\n * boolValue: {BOOL: true}\n * });\n */\n unmarshall: function unmarshall(data, options) {\n return AWS.DynamoDB.Converter.output({M: data}, options);\n }\n};\n\n/**\n * @api private\n * @param data [Array]\n * @param options [map]\n */\nfunction formatList(data, options) {\n var list = {L: []};\n for (var i = 0; i < data.length; i++) {\n list['L'].push(AWS.DynamoDB.Converter.input(data[i], options));\n }\n return list;\n}\n\n/**\n * @api private\n * @param value [String]\n * @param wrapNumbers [Boolean]\n */\nfunction convertNumber(value, wrapNumbers) {\n return wrapNumbers ? new NumberValue(value) : Number(value);\n}\n\n/**\n * @api private\n * @param data [map]\n * @param options [map]\n */\nfunction formatMap(data, options) {\n var map = {M: {}};\n for (var key in data) {\n var formatted = AWS.DynamoDB.Converter.input(data[key], options);\n if (formatted !== void 0) {\n map['M'][key] = formatted;\n }\n }\n return map;\n}\n\n/**\n * @api private\n */\nfunction formatSet(data, options) {\n options = options || {};\n var values = data.values;\n if (options.convertEmptyValues) {\n values = filterEmptySetValues(data);\n if (values.length === 0) {\n return AWS.DynamoDB.Converter.input(null);\n }\n }\n\n var map = {};\n switch (data.type) {\n case 'String': map['SS'] = values; break;\n case 'Binary': map['BS'] = values; break;\n case 'Number': map['NS'] = values.map(function (value) {\n return value.toString();\n });\n }\n return map;\n}\n\n/**\n * @api private\n */\nfunction filterEmptySetValues(set) {\n var nonEmptyValues = [];\n var potentiallyEmptyTypes = {\n String: true,\n Binary: true,\n Number: false\n };\n if (potentiallyEmptyTypes[set.type]) {\n for (var i = 0; i < set.values.length; i++) {\n if (set.values[i].length === 0) {\n continue;\n }\n nonEmptyValues.push(set.values[i]);\n }\n\n return nonEmptyValues;\n }\n\n return set.values;\n}\n\n/**\n * @api private\n */\nmodule.exports = AWS.DynamoDB.Converter;\n","var AWS = require('../core');\nvar Translator = require('./translator');\nvar DynamoDBSet = require('./set');\n\n/**\n * The document client simplifies working with items in Amazon DynamoDB\n * by abstracting away the notion of attribute values. This abstraction\n * annotates native JavaScript types supplied as input parameters, as well\n * as converts annotated response data to native JavaScript types.\n *\n * ## Marshalling Input and Unmarshalling Response Data\n *\n * The document client affords developers the use of native JavaScript types\n * instead of `AttributeValue`s to simplify the JavaScript development\n * experience with Amazon DynamoDB. JavaScript objects passed in as parameters\n * are marshalled into `AttributeValue` shapes required by Amazon DynamoDB.\n * Responses from DynamoDB are unmarshalled into plain JavaScript objects\n * by the `DocumentClient`. The `DocumentClient`, does not accept\n * `AttributeValue`s in favor of native JavaScript types.\n *\n * | JavaScript Type | DynamoDB AttributeValue |\n * |:----------------------------------------------------------------------:|-------------------------|\n * | String | S |\n * | Number | N |\n * | Boolean | BOOL |\n * | null | NULL |\n * | Array | L |\n * | Object | M |\n * | Buffer, File, Blob, ArrayBuffer, DataView, and JavaScript typed arrays | B |\n *\n * ## Support for Sets\n *\n * The `DocumentClient` offers a convenient way to create sets from\n * JavaScript Arrays. The type of set is inferred from the first element\n * in the array. DynamoDB supports string, number, and binary sets. To\n * learn more about supported types see the\n * [Amazon DynamoDB Data Model Documentation](http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/DataModel.html)\n * For more information see {AWS.DynamoDB.DocumentClient.createSet}\n *\n */\nAWS.DynamoDB.DocumentClient = AWS.util.inherit({\n\n /**\n * Creates a DynamoDB document client with a set of configuration options.\n *\n * @option options params [map] An optional map of parameters to bind to every\n * request sent by this service object.\n * @option options service [AWS.DynamoDB] An optional pre-configured instance\n * of the AWS.DynamoDB service object to use for requests. The object may\n * bound parameters used by the document client.\n * @option options convertEmptyValues [Boolean] set to true if you would like\n * the document client to convert empty values (0-length strings, binary\n * buffers, and sets) to be converted to NULL types when persisting to\n * DynamoDB.\n * @option options wrapNumbers [Boolean] Set to true to return numbers as a\n * NumberValue object instead of converting them to native JavaScript numbers.\n * This allows for the safe round-trip transport of numbers of arbitrary size.\n * @see AWS.DynamoDB.constructor\n *\n */\n constructor: function DocumentClient(options) {\n var self = this;\n self.options = options || {};\n self.configure(self.options);\n },\n\n /**\n * @api private\n */\n configure: function configure(options) {\n var self = this;\n self.service = options.service;\n self.bindServiceObject(options);\n self.attrValue = options.attrValue =\n self.service.api.operations.putItem.input.members.Item.value.shape;\n },\n\n /**\n * @api private\n */\n bindServiceObject: function bindServiceObject(options) {\n var self = this;\n options = options || {};\n\n if (!self.service) {\n self.service = new AWS.DynamoDB(options);\n } else {\n var config = AWS.util.copy(self.service.config);\n self.service = new self.service.constructor.__super__(config);\n self.service.config.params =\n AWS.util.merge(self.service.config.params || {}, options.params);\n }\n },\n\n /**\n * @api private\n */\n makeServiceRequest: function(operation, params, callback) {\n var self = this;\n var request = self.service[operation](params);\n self.setupRequest(request);\n self.setupResponse(request);\n if (typeof callback === 'function') {\n request.send(callback);\n }\n return request;\n },\n\n /**\n * @api private\n */\n serviceClientOperationsMap: {\n batchGet: 'batchGetItem',\n batchWrite: 'batchWriteItem',\n delete: 'deleteItem',\n get: 'getItem',\n put: 'putItem',\n query: 'query',\n scan: 'scan',\n update: 'updateItem',\n transactGet: 'transactGetItems',\n transactWrite: 'transactWriteItems'\n },\n\n /**\n * Returns the attributes of one or more items from one or more tables\n * by delegating to `AWS.DynamoDB.batchGetItem()`.\n *\n * Supply the same parameters as {AWS.DynamoDB.batchGetItem} with\n * `AttributeValue`s substituted by native JavaScript types.\n *\n * @see AWS.DynamoDB.batchGetItem\n * @example Get items from multiple tables\n * var params = {\n * RequestItems: {\n * 'Table-1': {\n * Keys: [\n * {\n * HashKey: 'haskey',\n * NumberRangeKey: 1\n * }\n * ]\n * },\n * 'Table-2': {\n * Keys: [\n * { foo: 'bar' },\n * ]\n * }\n * }\n * };\n *\n * var documentClient = new AWS.DynamoDB.DocumentClient();\n *\n * documentClient.batchGet(params, function(err, data) {\n * if (err) console.log(err);\n * else console.log(data);\n * });\n *\n */\n batchGet: function(params, callback) {\n var operation = this.serviceClientOperationsMap['batchGet'];\n return this.makeServiceRequest(operation, params, callback);\n },\n\n /**\n * Puts or deletes multiple items in one or more tables by delegating\n * to `AWS.DynamoDB.batchWriteItem()`.\n *\n * Supply the same parameters as {AWS.DynamoDB.batchWriteItem} with\n * `AttributeValue`s substituted by native JavaScript types.\n *\n * @see AWS.DynamoDB.batchWriteItem\n * @example Write to and delete from a table\n * var params = {\n * RequestItems: {\n * 'Table-1': [\n * {\n * DeleteRequest: {\n * Key: { HashKey: 'someKey' }\n * }\n * },\n * {\n * PutRequest: {\n * Item: {\n * HashKey: 'anotherKey',\n * NumAttribute: 1,\n * BoolAttribute: true,\n * ListAttribute: [1, 'two', false],\n * MapAttribute: { foo: 'bar' }\n * }\n * }\n * }\n * ]\n * }\n * };\n *\n * var documentClient = new AWS.DynamoDB.DocumentClient();\n *\n * documentClient.batchWrite(params, function(err, data) {\n * if (err) console.log(err);\n * else console.log(data);\n * });\n *\n */\n batchWrite: function(params, callback) {\n var operation = this.serviceClientOperationsMap['batchWrite'];\n return this.makeServiceRequest(operation, params, callback);\n },\n\n /**\n * Deletes a single item in a table by primary key by delegating to\n * `AWS.DynamoDB.deleteItem()`\n *\n * Supply the same parameters as {AWS.DynamoDB.deleteItem} with\n * `AttributeValue`s substituted by native JavaScript types.\n *\n * @see AWS.DynamoDB.deleteItem\n * @example Delete an item from a table\n * var params = {\n * TableName : 'Table',\n * Key: {\n * HashKey: 'hashkey',\n * NumberRangeKey: 1\n * }\n * };\n *\n * var documentClient = new AWS.DynamoDB.DocumentClient();\n *\n * documentClient.delete(params, function(err, data) {\n * if (err) console.log(err);\n * else console.log(data);\n * });\n *\n */\n delete: function(params, callback) {\n var operation = this.serviceClientOperationsMap['delete'];\n return this.makeServiceRequest(operation, params, callback);\n },\n\n /**\n * Returns a set of attributes for the item with the given primary key\n * by delegating to `AWS.DynamoDB.getItem()`.\n *\n * Supply the same parameters as {AWS.DynamoDB.getItem} with\n * `AttributeValue`s substituted by native JavaScript types.\n *\n * @see AWS.DynamoDB.getItem\n * @example Get an item from a table\n * var params = {\n * TableName : 'Table',\n * Key: {\n * HashKey: 'hashkey'\n * }\n * };\n *\n * var documentClient = new AWS.DynamoDB.DocumentClient();\n *\n * documentClient.get(params, function(err, data) {\n * if (err) console.log(err);\n * else console.log(data);\n * });\n *\n */\n get: function(params, callback) {\n var operation = this.serviceClientOperationsMap['get'];\n return this.makeServiceRequest(operation, params, callback);\n },\n\n /**\n * Creates a new item, or replaces an old item with a new item by\n * delegating to `AWS.DynamoDB.putItem()`.\n *\n * Supply the same parameters as {AWS.DynamoDB.putItem} with\n * `AttributeValue`s substituted by native JavaScript types.\n *\n * @see AWS.DynamoDB.putItem\n * @example Create a new item in a table\n * var params = {\n * TableName : 'Table',\n * Item: {\n * HashKey: 'haskey',\n * NumAttribute: 1,\n * BoolAttribute: true,\n * ListAttribute: [1, 'two', false],\n * MapAttribute: { foo: 'bar'},\n * NullAttribute: null\n * }\n * };\n *\n * var documentClient = new AWS.DynamoDB.DocumentClient();\n *\n * documentClient.put(params, function(err, data) {\n * if (err) console.log(err);\n * else console.log(data);\n * });\n *\n */\n put: function(params, callback) {\n var operation = this.serviceClientOperationsMap['put'];\n return this.makeServiceRequest(operation, params, callback);\n },\n\n /**\n * Edits an existing item's attributes, or adds a new item to the table if\n * it does not already exist by delegating to `AWS.DynamoDB.updateItem()`.\n *\n * Supply the same parameters as {AWS.DynamoDB.updateItem} with\n * `AttributeValue`s substituted by native JavaScript types.\n *\n * @see AWS.DynamoDB.updateItem\n * @example Update an item with expressions\n * var params = {\n * TableName: 'Table',\n * Key: { HashKey : 'hashkey' },\n * UpdateExpression: 'set #a = :x + :y',\n * ConditionExpression: '#a < :MAX',\n * ExpressionAttributeNames: {'#a' : 'Sum'},\n * ExpressionAttributeValues: {\n * ':x' : 20,\n * ':y' : 45,\n * ':MAX' : 100,\n * }\n * };\n *\n * var documentClient = new AWS.DynamoDB.DocumentClient();\n *\n * documentClient.update(params, function(err, data) {\n * if (err) console.log(err);\n * else console.log(data);\n * });\n *\n */\n update: function(params, callback) {\n var operation = this.serviceClientOperationsMap['update'];\n return this.makeServiceRequest(operation, params, callback);\n },\n\n /**\n * Returns one or more items and item attributes by accessing every item\n * in a table or a secondary index.\n *\n * Supply the same parameters as {AWS.DynamoDB.scan} with\n * `AttributeValue`s substituted by native JavaScript types.\n *\n * @see AWS.DynamoDB.scan\n * @example Scan the table with a filter expression\n * var params = {\n * TableName : 'Table',\n * FilterExpression : 'Year = :this_year',\n * ExpressionAttributeValues : {':this_year' : 2015}\n * };\n *\n * var documentClient = new AWS.DynamoDB.DocumentClient();\n *\n * documentClient.scan(params, function(err, data) {\n * if (err) console.log(err);\n * else console.log(data);\n * });\n *\n */\n scan: function(params, callback) {\n var operation = this.serviceClientOperationsMap['scan'];\n return this.makeServiceRequest(operation, params, callback);\n },\n\n /**\n * Directly access items from a table by primary key or a secondary index.\n *\n * Supply the same parameters as {AWS.DynamoDB.query} with\n * `AttributeValue`s substituted by native JavaScript types.\n *\n * @see AWS.DynamoDB.query\n * @example Query an index\n * var params = {\n * TableName: 'Table',\n * IndexName: 'Index',\n * KeyConditionExpression: 'HashKey = :hkey and RangeKey > :rkey',\n * ExpressionAttributeValues: {\n * ':hkey': 'key',\n * ':rkey': 2015\n * }\n * };\n *\n * var documentClient = new AWS.DynamoDB.DocumentClient();\n *\n * documentClient.query(params, function(err, data) {\n * if (err) console.log(err);\n * else console.log(data);\n * });\n *\n */\n query: function(params, callback) {\n var operation = this.serviceClientOperationsMap['query'];\n return this.makeServiceRequest(operation, params, callback);\n },\n\n /**\n * Synchronous write operation that groups up to 25 action requests.\n *\n * Supply the same parameters as {AWS.DynamoDB.transactWriteItems} with\n * `AttributeValue`s substituted by native JavaScript types.\n *\n * @see AWS.DynamoDB.transactWriteItems\n * @example Get items from multiple tables\n * var params = {\n * TransactItems: [{\n * Put: {\n * TableName : 'Table0',\n * Item: {\n * HashKey: 'haskey',\n * NumAttribute: 1,\n * BoolAttribute: true,\n * ListAttribute: [1, 'two', false],\n * MapAttribute: { foo: 'bar'},\n * NullAttribute: null\n * }\n * }\n * }, {\n * Update: {\n * TableName: 'Table1',\n * Key: { HashKey : 'hashkey' },\n * UpdateExpression: 'set #a = :x + :y',\n * ConditionExpression: '#a < :MAX',\n * ExpressionAttributeNames: {'#a' : 'Sum'},\n * ExpressionAttributeValues: {\n * ':x' : 20,\n * ':y' : 45,\n * ':MAX' : 100,\n * }\n * }\n * }]\n * };\n *\n * documentClient.transactWrite(params, function(err, data) {\n * if (err) console.log(err);\n * else console.log(data);\n * });\n */\n transactWrite: function(params, callback) {\n var operation = this.serviceClientOperationsMap['transactWrite'];\n return this.makeServiceRequest(operation, params, callback);\n },\n\n /**\n * Atomically retrieves multiple items from one or more tables (but not from indexes)\n * in a single account and region.\n *\n * Supply the same parameters as {AWS.DynamoDB.transactGetItems} with\n * `AttributeValue`s substituted by native JavaScript types.\n *\n * @see AWS.DynamoDB.transactGetItems\n * @example Get items from multiple tables\n * var params = {\n * TransactItems: [{\n * Get: {\n * TableName : 'Table0',\n * Key: {\n * HashKey: 'hashkey0'\n * }\n * }\n * }, {\n * Get: {\n * TableName : 'Table1',\n * Key: {\n * HashKey: 'hashkey1'\n * }\n * }\n * }]\n * };\n *\n * documentClient.transactGet(params, function(err, data) {\n * if (err) console.log(err);\n * else console.log(data);\n * });\n */\n transactGet: function(params, callback) {\n var operation = this.serviceClientOperationsMap['transactGet'];\n return this.makeServiceRequest(operation, params, callback);\n },\n\n /**\n * Creates a set of elements inferring the type of set from\n * the type of the first element. Amazon DynamoDB currently supports\n * the number sets, string sets, and binary sets. For more information\n * about DynamoDB data types see the documentation on the\n * [Amazon DynamoDB Data Model](http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/DataModel.html#DataModel.DataTypes).\n *\n * @param list [Array] Collection to represent your DynamoDB Set\n * @param options [map]\n * * **validate** [Boolean] set to true if you want to validate the type\n * of each element in the set. Defaults to `false`.\n * @example Creating a number set\n * var documentClient = new AWS.DynamoDB.DocumentClient();\n *\n * var params = {\n * Item: {\n * hashkey: 'hashkey'\n * numbers: documentClient.createSet([1, 2, 3]);\n * }\n * };\n *\n * documentClient.put(params, function(err, data) {\n * if (err) console.log(err);\n * else console.log(data);\n * });\n *\n */\n createSet: function(list, options) {\n options = options || {};\n return new DynamoDBSet(list, options);\n },\n\n /**\n * @api private\n */\n getTranslator: function() {\n return new Translator(this.options);\n },\n\n /**\n * @api private\n */\n setupRequest: function setupRequest(request) {\n var self = this;\n var translator = self.getTranslator();\n var operation = request.operation;\n var inputShape = request.service.api.operations[operation].input;\n request._events.validate.unshift(function(req) {\n req.rawParams = AWS.util.copy(req.params);\n req.params = translator.translateInput(req.rawParams, inputShape);\n });\n },\n\n /**\n * @api private\n */\n setupResponse: function setupResponse(request) {\n var self = this;\n var translator = self.getTranslator();\n var outputShape = self.service.api.operations[request.operation].output;\n request.on('extractData', function(response) {\n response.data = translator.translateOutput(response.data, outputShape);\n });\n\n var response = request.response;\n response.nextPage = function(cb) {\n var resp = this;\n var req = resp.request;\n var config;\n var service = req.service;\n var operation = req.operation;\n try {\n config = service.paginationConfig(operation, true);\n } catch (e) { resp.error = e; }\n\n if (!resp.hasNextPage()) {\n if (cb) cb(resp.error, null);\n else if (resp.error) throw resp.error;\n return null;\n }\n\n var params = AWS.util.copy(req.rawParams);\n if (!resp.nextPageTokens) {\n return cb ? cb(null, null) : null;\n } else {\n var inputTokens = config.inputToken;\n if (typeof inputTokens === 'string') inputTokens = [inputTokens];\n for (var i = 0; i < inputTokens.length; i++) {\n params[inputTokens[i]] = resp.nextPageTokens[i];\n }\n return self[operation](params, cb);\n }\n };\n }\n\n});\n\n/**\n * @api private\n */\nmodule.exports = AWS.DynamoDB.DocumentClient;\n","var util = require('../core').util;\n\n/**\n * An object recognizable as a numeric value that stores the underlying number\n * as a string.\n *\n * Intended to be a deserialization target for the DynamoDB Document Client when\n * the `wrapNumbers` flag is set. This allows for numeric values that lose\n * precision when converted to JavaScript's `number` type.\n */\nvar DynamoDBNumberValue = util.inherit({\n constructor: function NumberValue(value) {\n this.wrapperName = 'NumberValue';\n this.value = value.toString();\n },\n\n /**\n * Render the underlying value as a number when converting to JSON.\n */\n toJSON: function () {\n return this.toNumber();\n },\n\n /**\n * Convert the underlying value to a JavaScript number.\n */\n toNumber: function () {\n return Number(this.value);\n },\n\n /**\n * Return a string representing the unaltered value provided to the\n * constructor.\n */\n toString: function () {\n return this.value;\n }\n});\n\n/**\n * @api private\n */\nmodule.exports = DynamoDBNumberValue;\n","var util = require('../core').util;\nvar typeOf = require('./types').typeOf;\n\n/**\n * @api private\n */\nvar memberTypeToSetType = {\n 'String': 'String',\n 'Number': 'Number',\n 'NumberValue': 'Number',\n 'Binary': 'Binary'\n};\n\n/**\n * @api private\n */\nvar DynamoDBSet = util.inherit({\n\n constructor: function Set(list, options) {\n options = options || {};\n this.wrapperName = 'Set';\n this.initialize(list, options.validate);\n },\n\n initialize: function(list, validate) {\n var self = this;\n self.values = [].concat(list);\n self.detectType();\n if (validate) {\n self.validate();\n }\n },\n\n detectType: function() {\n this.type = memberTypeToSetType[typeOf(this.values[0])];\n if (!this.type) {\n throw util.error(new Error(), {\n code: 'InvalidSetType',\n message: 'Sets can contain string, number, or binary values'\n });\n }\n },\n\n validate: function() {\n var self = this;\n var length = self.values.length;\n var values = self.values;\n for (var i = 0; i < length; i++) {\n if (memberTypeToSetType[typeOf(values[i])] !== self.type) {\n throw util.error(new Error(), {\n code: 'InvalidType',\n message: self.type + ' Set contains ' + typeOf(values[i]) + ' value'\n });\n }\n }\n },\n\n /**\n * Render the underlying values only when converting to JSON.\n */\n toJSON: function() {\n var self = this;\n return self.values;\n }\n\n});\n\n/**\n * @api private\n */\nmodule.exports = DynamoDBSet;\n","var util = require('../core').util;\nvar convert = require('./converter');\n\nvar Translator = function(options) {\n options = options || {};\n this.attrValue = options.attrValue;\n this.convertEmptyValues = Boolean(options.convertEmptyValues);\n this.wrapNumbers = Boolean(options.wrapNumbers);\n};\n\nTranslator.prototype.translateInput = function(value, shape) {\n this.mode = 'input';\n return this.translate(value, shape);\n};\n\nTranslator.prototype.translateOutput = function(value, shape) {\n this.mode = 'output';\n return this.translate(value, shape);\n};\n\nTranslator.prototype.translate = function(value, shape) {\n var self = this;\n if (!shape || value === undefined) return undefined;\n\n if (shape.shape === self.attrValue) {\n return convert[self.mode](value, {\n convertEmptyValues: self.convertEmptyValues,\n wrapNumbers: self.wrapNumbers,\n });\n }\n switch (shape.type) {\n case 'structure': return self.translateStructure(value, shape);\n case 'map': return self.translateMap(value, shape);\n case 'list': return self.translateList(value, shape);\n default: return self.translateScalar(value, shape);\n }\n};\n\nTranslator.prototype.translateStructure = function(structure, shape) {\n var self = this;\n if (structure == null) return undefined;\n\n var struct = {};\n util.each(structure, function(name, value) {\n var memberShape = shape.members[name];\n if (memberShape) {\n var result = self.translate(value, memberShape);\n if (result !== undefined) struct[name] = result;\n }\n });\n return struct;\n};\n\nTranslator.prototype.translateList = function(list, shape) {\n var self = this;\n if (list == null) return undefined;\n\n var out = [];\n util.arrayEach(list, function(value) {\n var result = self.translate(value, shape.member);\n if (result === undefined) out.push(null);\n else out.push(result);\n });\n return out;\n};\n\nTranslator.prototype.translateMap = function(map, shape) {\n var self = this;\n if (map == null) return undefined;\n\n var out = {};\n util.each(map, function(key, value) {\n var result = self.translate(value, shape.value);\n if (result === undefined) out[key] = null;\n else out[key] = result;\n });\n return out;\n};\n\nTranslator.prototype.translateScalar = function(value, shape) {\n return shape.toType(value);\n};\n\n/**\n * @api private\n */\nmodule.exports = Translator;\n","var util = require('../core').util;\n\nfunction typeOf(data) {\n if (data === null && typeof data === 'object') {\n return 'null';\n } else if (data !== undefined && isBinary(data)) {\n return 'Binary';\n } else if (data !== undefined && data.constructor) {\n return data.wrapperName || util.typeName(data.constructor);\n } else if (data !== undefined && typeof data === 'object') {\n // this object is the result of Object.create(null), hence the absence of a\n // defined constructor\n return 'Object';\n } else {\n return 'undefined';\n }\n}\n\nfunction isBinary(data) {\n var types = [\n 'Buffer', 'File', 'Blob', 'ArrayBuffer', 'DataView',\n 'Int8Array', 'Uint8Array', 'Uint8ClampedArray',\n 'Int16Array', 'Uint16Array', 'Int32Array', 'Uint32Array',\n 'Float32Array', 'Float64Array'\n ];\n if (util.isNode()) {\n var Stream = util.stream.Stream;\n if (util.Buffer.isBuffer(data) || data instanceof Stream) {\n return true;\n }\n }\n\n for (var i = 0; i < types.length; i++) {\n if (data !== undefined && data.constructor) {\n if (util.isType(data, types[i])) return true;\n if (util.typeName(data.constructor) === types[i]) return true;\n }\n }\n\n return false;\n}\n\n/**\n * @api private\n */\nmodule.exports = {\n typeOf: typeOf,\n isBinary: isBinary\n};\n","var eventMessageChunker = require('../event-stream/event-message-chunker').eventMessageChunker;\nvar parseEvent = require('./parse-event').parseEvent;\n\nfunction createEventStream(body, parser, model) {\n var eventMessages = eventMessageChunker(body);\n\n var events = [];\n\n for (var i = 0; i < eventMessages.length; i++) {\n events.push(parseEvent(parser, eventMessages[i], model));\n }\n\n return events;\n}\n\n/**\n * @api private\n */\nmodule.exports = {\n createEventStream: createEventStream\n};\n","var util = require('../core').util;\nvar Transform = require('stream').Transform;\nvar allocBuffer = util.buffer.alloc;\n\n/** @type {Transform} */\nfunction EventMessageChunkerStream(options) {\n Transform.call(this, options);\n\n this.currentMessageTotalLength = 0;\n this.currentMessagePendingLength = 0;\n /** @type {Buffer} */\n this.currentMessage = null;\n\n /** @type {Buffer} */\n this.messageLengthBuffer = null;\n}\n\nEventMessageChunkerStream.prototype = Object.create(Transform.prototype);\n\n/**\n *\n * @param {Buffer} chunk\n * @param {string} encoding\n * @param {*} callback\n */\nEventMessageChunkerStream.prototype._transform = function(chunk, encoding, callback) {\n var chunkLength = chunk.length;\n var currentOffset = 0;\n\n while (currentOffset < chunkLength) {\n // create new message if necessary\n if (!this.currentMessage) {\n // working on a new message, determine total length\n var bytesRemaining = chunkLength - currentOffset;\n // prevent edge case where total length spans 2 chunks\n if (!this.messageLengthBuffer) {\n this.messageLengthBuffer = allocBuffer(4);\n }\n var numBytesForTotal = Math.min(\n 4 - this.currentMessagePendingLength, // remaining bytes to fill the messageLengthBuffer\n bytesRemaining // bytes left in chunk\n );\n\n chunk.copy(\n this.messageLengthBuffer,\n this.currentMessagePendingLength,\n currentOffset,\n currentOffset + numBytesForTotal\n );\n\n this.currentMessagePendingLength += numBytesForTotal;\n currentOffset += numBytesForTotal;\n\n if (this.currentMessagePendingLength < 4) {\n // not enough information to create the current message\n break;\n }\n this.allocateMessage(this.messageLengthBuffer.readUInt32BE(0));\n this.messageLengthBuffer = null;\n }\n\n // write data into current message\n var numBytesToWrite = Math.min(\n this.currentMessageTotalLength - this.currentMessagePendingLength, // number of bytes left to complete message\n chunkLength - currentOffset // number of bytes left in the original chunk\n );\n chunk.copy(\n this.currentMessage, // target buffer\n this.currentMessagePendingLength, // target offset\n currentOffset, // chunk offset\n currentOffset + numBytesToWrite // chunk end to write\n );\n this.currentMessagePendingLength += numBytesToWrite;\n currentOffset += numBytesToWrite;\n\n // check if a message is ready to be pushed\n if (this.currentMessageTotalLength && this.currentMessageTotalLength === this.currentMessagePendingLength) {\n // push out the message\n this.push(this.currentMessage);\n // cleanup\n this.currentMessage = null;\n this.currentMessageTotalLength = 0;\n this.currentMessagePendingLength = 0;\n }\n }\n\n callback();\n};\n\nEventMessageChunkerStream.prototype._flush = function(callback) {\n if (this.currentMessageTotalLength) {\n if (this.currentMessageTotalLength === this.currentMessagePendingLength) {\n callback(null, this.currentMessage);\n } else {\n callback(new Error('Truncated event message received.'));\n }\n } else {\n callback();\n }\n};\n\n/**\n * @param {number} size Size of the message to be allocated.\n * @api private\n */\nEventMessageChunkerStream.prototype.allocateMessage = function(size) {\n if (typeof size !== 'number') {\n throw new Error('Attempted to allocate an event message where size was not a number: ' + size);\n }\n this.currentMessageTotalLength = size;\n this.currentMessagePendingLength = 4;\n this.currentMessage = allocBuffer(size);\n this.currentMessage.writeUInt32BE(size, 0);\n};\n\n/**\n * @api private\n */\nmodule.exports = {\n EventMessageChunkerStream: EventMessageChunkerStream\n};\n","/**\n * Takes in a buffer of event messages and splits them into individual messages.\n * @param {Buffer} buffer\n * @api private\n */\nfunction eventMessageChunker(buffer) {\n /** @type Buffer[] */\n var messages = [];\n var offset = 0;\n\n while (offset < buffer.length) {\n var totalLength = buffer.readInt32BE(offset);\n\n // create new buffer for individual message (shares memory with original)\n var message = buffer.slice(offset, totalLength + offset);\n // increment offset to it starts at the next message\n offset += totalLength;\n\n messages.push(message);\n }\n\n return messages;\n}\n\n/**\n * @api private\n */\nmodule.exports = {\n eventMessageChunker: eventMessageChunker\n};\n","var Transform = require('stream').Transform;\nvar parseEvent = require('./parse-event').parseEvent;\n\n/** @type {Transform} */\nfunction EventUnmarshallerStream(options) {\n options = options || {};\n // set output to object mode\n options.readableObjectMode = true;\n Transform.call(this, options);\n this._readableState.objectMode = true;\n\n this.parser = options.parser;\n this.eventStreamModel = options.eventStreamModel;\n}\n\nEventUnmarshallerStream.prototype = Object.create(Transform.prototype);\n\n/**\n *\n * @param {Buffer} chunk\n * @param {string} encoding\n * @param {*} callback\n */\nEventUnmarshallerStream.prototype._transform = function(chunk, encoding, callback) {\n try {\n var event = parseEvent(this.parser, chunk, this.eventStreamModel);\n this.push(event);\n return callback();\n } catch (err) {\n callback(err);\n }\n};\n\n/**\n * @api private\n */\nmodule.exports = {\n EventUnmarshallerStream: EventUnmarshallerStream\n};\n","var util = require('../core').util;\nvar toBuffer = util.buffer.toBuffer;\n\n/**\n * A lossless representation of a signed, 64-bit integer. Instances of this\n * class may be used in arithmetic expressions as if they were numeric\n * primitives, but the binary representation will be preserved unchanged as the\n * `bytes` property of the object. The bytes should be encoded as big-endian,\n * two's complement integers.\n * @param {Buffer} bytes\n *\n * @api private\n */\nfunction Int64(bytes) {\n if (bytes.length !== 8) {\n throw new Error('Int64 buffers must be exactly 8 bytes');\n }\n if (!util.Buffer.isBuffer(bytes)) bytes = toBuffer(bytes);\n\n this.bytes = bytes;\n}\n\n/**\n * @param {number} number\n * @returns {Int64}\n *\n * @api private\n */\nInt64.fromNumber = function(number) {\n if (number > 9223372036854775807 || number < -9223372036854775808) {\n throw new Error(\n number + ' is too large (or, if negative, too small) to represent as an Int64'\n );\n }\n\n var bytes = new Uint8Array(8);\n for (\n var i = 7, remaining = Math.abs(Math.round(number));\n i > -1 && remaining > 0;\n i--, remaining /= 256\n ) {\n bytes[i] = remaining;\n }\n\n if (number < 0) {\n negate(bytes);\n }\n\n return new Int64(bytes);\n};\n\n/**\n * @returns {number}\n *\n * @api private\n */\nInt64.prototype.valueOf = function() {\n var bytes = this.bytes.slice(0);\n var negative = bytes[0] & 128;\n if (negative) {\n negate(bytes);\n }\n\n return parseInt(bytes.toString('hex'), 16) * (negative ? -1 : 1);\n};\n\nInt64.prototype.toString = function() {\n return String(this.valueOf());\n};\n\n/**\n * @param {Buffer} bytes\n *\n * @api private\n */\nfunction negate(bytes) {\n for (var i = 0; i < 8; i++) {\n bytes[i] ^= 0xFF;\n }\n for (var i = 7; i > -1; i--) {\n bytes[i]++;\n if (bytes[i] !== 0) {\n break;\n }\n }\n}\n\n/**\n * @api private\n */\nmodule.exports = {\n Int64: Int64\n};\n","var parseMessage = require('./parse-message').parseMessage;\n\n/**\n *\n * @param {*} parser\n * @param {Buffer} message\n * @param {*} shape\n * @api private\n */\nfunction parseEvent(parser, message, shape) {\n var parsedMessage = parseMessage(message);\n\n // check if message is an event or error\n var messageType = parsedMessage.headers[':message-type'];\n if (messageType) {\n if (messageType.value === 'error') {\n throw parseError(parsedMessage);\n } else if (messageType.value !== 'event') {\n // not sure how to parse non-events/non-errors, ignore for now\n return;\n }\n }\n\n // determine event type\n var eventType = parsedMessage.headers[':event-type'];\n // check that the event type is modeled\n var eventModel = shape.members[eventType.value];\n if (!eventModel) {\n return;\n }\n\n var result = {};\n // check if an event payload exists\n var eventPayloadMemberName = eventModel.eventPayloadMemberName;\n if (eventPayloadMemberName) {\n var payloadShape = eventModel.members[eventPayloadMemberName];\n // if the shape is binary, return the byte array\n if (payloadShape.type === 'binary') {\n result[eventPayloadMemberName] = parsedMessage.body;\n } else {\n result[eventPayloadMemberName] = parser.parse(parsedMessage.body.toString(), payloadShape);\n }\n }\n\n // read event headers\n var eventHeaderNames = eventModel.eventHeaderMemberNames;\n for (var i = 0; i < eventHeaderNames.length; i++) {\n var name = eventHeaderNames[i];\n if (parsedMessage.headers[name]) {\n // parse the header!\n result[name] = eventModel.members[name].toType(parsedMessage.headers[name].value);\n }\n }\n\n var output = {};\n output[eventType.value] = result;\n return output;\n}\n\nfunction parseError(message) {\n var errorCode = message.headers[':error-code'];\n var errorMessage = message.headers[':error-message'];\n var error = new Error(errorMessage.value || errorMessage);\n error.code = error.name = errorCode.value || errorCode;\n return error;\n}\n\n/**\n * @api private\n */\nmodule.exports = {\n parseEvent: parseEvent\n};\n","var Int64 = require('./int64').Int64;\n\nvar splitMessage = require('./split-message').splitMessage;\n\nvar BOOLEAN_TAG = 'boolean';\nvar BYTE_TAG = 'byte';\nvar SHORT_TAG = 'short';\nvar INT_TAG = 'integer';\nvar LONG_TAG = 'long';\nvar BINARY_TAG = 'binary';\nvar STRING_TAG = 'string';\nvar TIMESTAMP_TAG = 'timestamp';\nvar UUID_TAG = 'uuid';\n\n/**\n * @api private\n *\n * @param {Buffer} headers\n */\nfunction parseHeaders(headers) {\n var out = {};\n var position = 0;\n while (position < headers.length) {\n var nameLength = headers.readUInt8(position++);\n var name = headers.slice(position, position + nameLength).toString();\n position += nameLength;\n switch (headers.readUInt8(position++)) {\n case 0 /* boolTrue */:\n out[name] = {\n type: BOOLEAN_TAG,\n value: true\n };\n break;\n case 1 /* boolFalse */:\n out[name] = {\n type: BOOLEAN_TAG,\n value: false\n };\n break;\n case 2 /* byte */:\n out[name] = {\n type: BYTE_TAG,\n value: headers.readInt8(position++)\n };\n break;\n case 3 /* short */:\n out[name] = {\n type: SHORT_TAG,\n value: headers.readInt16BE(position)\n };\n position += 2;\n break;\n case 4 /* integer */:\n out[name] = {\n type: INT_TAG,\n value: headers.readInt32BE(position)\n };\n position += 4;\n break;\n case 5 /* long */:\n out[name] = {\n type: LONG_TAG,\n value: new Int64(headers.slice(position, position + 8))\n };\n position += 8;\n break;\n case 6 /* byteArray */:\n var binaryLength = headers.readUInt16BE(position);\n position += 2;\n out[name] = {\n type: BINARY_TAG,\n value: headers.slice(position, position + binaryLength)\n };\n position += binaryLength;\n break;\n case 7 /* string */:\n var stringLength = headers.readUInt16BE(position);\n position += 2;\n out[name] = {\n type: STRING_TAG,\n value: headers.slice(\n position,\n position + stringLength\n ).toString()\n };\n position += stringLength;\n break;\n case 8 /* timestamp */:\n out[name] = {\n type: TIMESTAMP_TAG,\n value: new Date(\n new Int64(headers.slice(position, position + 8))\n .valueOf()\n )\n };\n position += 8;\n break;\n case 9 /* uuid */:\n var uuidChars = headers.slice(position, position + 16)\n .toString('hex');\n position += 16;\n out[name] = {\n type: UUID_TAG,\n value: uuidChars.substr(0, 8) + '-' +\n uuidChars.substr(8, 4) + '-' +\n uuidChars.substr(12, 4) + '-' +\n uuidChars.substr(16, 4) + '-' +\n uuidChars.substr(20)\n };\n break;\n default:\n throw new Error('Unrecognized header type tag');\n }\n }\n return out;\n}\n\nfunction parseMessage(message) {\n var parsed = splitMessage(message);\n return { headers: parseHeaders(parsed.headers), body: parsed.body };\n}\n\n/**\n * @api private\n */\nmodule.exports = {\n parseMessage: parseMessage\n};\n","var util = require('../core').util;\nvar toBuffer = util.buffer.toBuffer;\n\n// All prelude components are unsigned, 32-bit integers\nvar PRELUDE_MEMBER_LENGTH = 4;\n// The prelude consists of two components\nvar PRELUDE_LENGTH = PRELUDE_MEMBER_LENGTH * 2;\n// Checksums are always CRC32 hashes.\nvar CHECKSUM_LENGTH = 4;\n// Messages must include a full prelude, a prelude checksum, and a message checksum\nvar MINIMUM_MESSAGE_LENGTH = PRELUDE_LENGTH + CHECKSUM_LENGTH * 2;\n\n/**\n * @api private\n *\n * @param {Buffer} message\n */\nfunction splitMessage(message) {\n if (!util.Buffer.isBuffer(message)) message = toBuffer(message);\n\n if (message.length < MINIMUM_MESSAGE_LENGTH) {\n throw new Error('Provided message too short to accommodate event stream message overhead');\n }\n\n if (message.length !== message.readUInt32BE(0)) {\n throw new Error('Reported message length does not match received message length');\n }\n\n var expectedPreludeChecksum = message.readUInt32BE(PRELUDE_LENGTH);\n\n if (\n expectedPreludeChecksum !== util.crypto.crc32(\n message.slice(0, PRELUDE_LENGTH)\n )\n ) {\n throw new Error(\n 'The prelude checksum specified in the message (' +\n expectedPreludeChecksum +\n ') does not match the calculated CRC32 checksum.'\n );\n }\n\n var expectedMessageChecksum = message.readUInt32BE(message.length - CHECKSUM_LENGTH);\n\n if (\n expectedMessageChecksum !== util.crypto.crc32(\n message.slice(0, message.length - CHECKSUM_LENGTH)\n )\n ) {\n throw new Error(\n 'The message checksum did not match the expected value of ' +\n expectedMessageChecksum\n );\n }\n\n var headersStart = PRELUDE_LENGTH + CHECKSUM_LENGTH;\n var headersEnd = headersStart + message.readUInt32BE(PRELUDE_MEMBER_LENGTH);\n\n return {\n headers: message.slice(headersStart, headersEnd),\n body: message.slice(headersEnd, message.length - CHECKSUM_LENGTH),\n };\n}\n\n/**\n * @api private\n */\nmodule.exports = {\n splitMessage: splitMessage\n};\n","/**\n * What is necessary to create an event stream in node?\n * - http response stream\n * - parser\n * - event stream model\n */\n\nvar EventMessageChunkerStream = require('../event-stream/event-message-chunker-stream').EventMessageChunkerStream;\nvar EventUnmarshallerStream = require('../event-stream/event-message-unmarshaller-stream').EventUnmarshallerStream;\n\nfunction createEventStream(stream, parser, model) {\n var eventStream = new EventUnmarshallerStream({\n parser: parser,\n eventStreamModel: model\n });\n\n var eventMessageChunker = new EventMessageChunkerStream();\n\n stream.pipe(\n eventMessageChunker\n ).pipe(eventStream);\n\n stream.on('error', function(err) {\n eventMessageChunker.emit('error', err);\n });\n\n eventMessageChunker.on('error', function(err) {\n eventStream.emit('error', err);\n });\n\n return eventStream;\n}\n\n/**\n * @api private\n */\nmodule.exports = {\n createEventStream: createEventStream\n};\n","var AWS = require('./core');\nvar SequentialExecutor = require('./sequential_executor');\nvar DISCOVER_ENDPOINT = require('./discover_endpoint').discoverEndpoint;\n/**\n * The namespace used to register global event listeners for request building\n * and sending.\n */\nAWS.EventListeners = {\n /**\n * @!attribute VALIDATE_CREDENTIALS\n * A request listener that validates whether the request is being\n * sent with credentials.\n * Handles the {AWS.Request~validate 'validate' Request event}\n * @example Sending a request without validating credentials\n * var listener = AWS.EventListeners.Core.VALIDATE_CREDENTIALS;\n * request.removeListener('validate', listener);\n * @readonly\n * @return [Function]\n * @!attribute VALIDATE_REGION\n * A request listener that validates whether the region is set\n * for a request.\n * Handles the {AWS.Request~validate 'validate' Request event}\n * @example Sending a request without validating region configuration\n * var listener = AWS.EventListeners.Core.VALIDATE_REGION;\n * request.removeListener('validate', listener);\n * @readonly\n * @return [Function]\n * @!attribute VALIDATE_PARAMETERS\n * A request listener that validates input parameters in a request.\n * Handles the {AWS.Request~validate 'validate' Request event}\n * @example Sending a request without validating parameters\n * var listener = AWS.EventListeners.Core.VALIDATE_PARAMETERS;\n * request.removeListener('validate', listener);\n * @example Disable parameter validation globally\n * AWS.EventListeners.Core.removeListener('validate',\n * AWS.EventListeners.Core.VALIDATE_REGION);\n * @readonly\n * @return [Function]\n * @!attribute SEND\n * A request listener that initiates the HTTP connection for a\n * request being sent. Handles the {AWS.Request~send 'send' Request event}\n * @example Replacing the HTTP handler\n * var listener = AWS.EventListeners.Core.SEND;\n * request.removeListener('send', listener);\n * request.on('send', function(response) {\n * customHandler.send(response);\n * });\n * @return [Function]\n * @readonly\n * @!attribute HTTP_DATA\n * A request listener that reads data from the HTTP connection in order\n * to build the response data.\n * Handles the {AWS.Request~httpData 'httpData' Request event}.\n * Remove this handler if you are overriding the 'httpData' event and\n * do not want extra data processing and buffering overhead.\n * @example Disabling default data processing\n * var listener = AWS.EventListeners.Core.HTTP_DATA;\n * request.removeListener('httpData', listener);\n * @return [Function]\n * @readonly\n */\n Core: {} /* doc hack */\n};\n\n/**\n * @api private\n */\nfunction getOperationAuthtype(req) {\n if (!req.service.api.operations) {\n return '';\n }\n var operation = req.service.api.operations[req.operation];\n return operation ? operation.authtype : '';\n}\n\nAWS.EventListeners = {\n Core: new SequentialExecutor().addNamedListeners(function(add, addAsync) {\n addAsync('VALIDATE_CREDENTIALS', 'validate',\n function VALIDATE_CREDENTIALS(req, done) {\n if (!req.service.api.signatureVersion && !req.service.config.signatureVersion) return done(); // none\n req.service.config.getCredentials(function(err) {\n if (err) {\n req.response.error = AWS.util.error(err,\n {code: 'CredentialsError', message: 'Missing credentials in config, if using AWS_CONFIG_FILE, set AWS_SDK_LOAD_CONFIG=1'});\n }\n done();\n });\n });\n\n add('VALIDATE_REGION', 'validate', function VALIDATE_REGION(req) {\n if (!req.service.isGlobalEndpoint) {\n var dnsHostRegex = new RegExp(/^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]{0,61}[a-zA-Z0-9])$/);\n if (!req.service.config.region) {\n req.response.error = AWS.util.error(new Error(),\n {code: 'ConfigError', message: 'Missing region in config'});\n } else if (!dnsHostRegex.test(req.service.config.region)) {\n req.response.error = AWS.util.error(new Error(),\n {code: 'ConfigError', message: 'Invalid region in config'});\n }\n }\n });\n\n add('BUILD_IDEMPOTENCY_TOKENS', 'validate', function BUILD_IDEMPOTENCY_TOKENS(req) {\n if (!req.service.api.operations) {\n return;\n }\n var operation = req.service.api.operations[req.operation];\n if (!operation) {\n return;\n }\n var idempotentMembers = operation.idempotentMembers;\n if (!idempotentMembers.length) {\n return;\n }\n // creates a copy of params so user's param object isn't mutated\n var params = AWS.util.copy(req.params);\n for (var i = 0, iLen = idempotentMembers.length; i < iLen; i++) {\n if (!params[idempotentMembers[i]]) {\n // add the member\n params[idempotentMembers[i]] = AWS.util.uuid.v4();\n }\n }\n req.params = params;\n });\n\n add('VALIDATE_PARAMETERS', 'validate', function VALIDATE_PARAMETERS(req) {\n if (!req.service.api.operations) {\n return;\n }\n var rules = req.service.api.operations[req.operation].input;\n var validation = req.service.config.paramValidation;\n new AWS.ParamValidator(validation).validate(rules, req.params);\n });\n\n add('COMPUTE_CHECKSUM', 'afterBuild', function COMPUTE_CHECKSUM(req) {\n if (!req.service.api.operations) {\n return;\n }\n var operation = req.service.api.operations[req.operation];\n if (!operation) {\n return;\n }\n var body = req.httpRequest.body;\n var isNonStreamingPayload = body && (AWS.util.Buffer.isBuffer(body) || typeof body === 'string');\n var headers = req.httpRequest.headers;\n if (\n operation.httpChecksumRequired &&\n req.service.config.computeChecksums &&\n isNonStreamingPayload &&\n !headers['Content-MD5']\n ) {\n var md5 = AWS.util.crypto.md5(body, 'base64');\n headers['Content-MD5'] = md5;\n }\n });\n\n addAsync('COMPUTE_SHA256', 'afterBuild', function COMPUTE_SHA256(req, done) {\n req.haltHandlersOnError();\n if (!req.service.api.operations) {\n return;\n }\n var operation = req.service.api.operations[req.operation];\n var authtype = operation ? operation.authtype : '';\n if (!req.service.api.signatureVersion && !authtype && !req.service.config.signatureVersion) return done(); // none\n if (req.service.getSignerClass(req) === AWS.Signers.V4) {\n var body = req.httpRequest.body || '';\n if (authtype.indexOf('unsigned-body') >= 0) {\n req.httpRequest.headers['X-Amz-Content-Sha256'] = 'UNSIGNED-PAYLOAD';\n return done();\n }\n AWS.util.computeSha256(body, function(err, sha) {\n if (err) {\n done(err);\n }\n else {\n req.httpRequest.headers['X-Amz-Content-Sha256'] = sha;\n done();\n }\n });\n } else {\n done();\n }\n });\n\n add('SET_CONTENT_LENGTH', 'afterBuild', function SET_CONTENT_LENGTH(req) {\n var authtype = getOperationAuthtype(req);\n var payloadMember = AWS.util.getRequestPayloadShape(req);\n if (req.httpRequest.headers['Content-Length'] === undefined) {\n try {\n var length = AWS.util.string.byteLength(req.httpRequest.body);\n req.httpRequest.headers['Content-Length'] = length;\n } catch (err) {\n if (payloadMember && payloadMember.isStreaming) {\n if (payloadMember.requiresLength) {\n //streaming payload requires length(s3, glacier)\n throw err;\n } else if (authtype.indexOf('unsigned-body') >= 0) {\n //unbounded streaming payload(lex, mediastore)\n req.httpRequest.headers['Transfer-Encoding'] = 'chunked';\n return;\n } else {\n throw err;\n }\n }\n throw err;\n }\n }\n });\n\n add('SET_HTTP_HOST', 'afterBuild', function SET_HTTP_HOST(req) {\n req.httpRequest.headers['Host'] = req.httpRequest.endpoint.host;\n });\n\n add('RESTART', 'restart', function RESTART() {\n var err = this.response.error;\n if (!err || !err.retryable) return;\n\n this.httpRequest = new AWS.HttpRequest(\n this.service.endpoint,\n this.service.region\n );\n\n if (this.response.retryCount < this.service.config.maxRetries) {\n this.response.retryCount++;\n } else {\n this.response.error = null;\n }\n });\n\n var addToHead = true;\n addAsync('DISCOVER_ENDPOINT', 'sign', DISCOVER_ENDPOINT, addToHead);\n\n addAsync('SIGN', 'sign', function SIGN(req, done) {\n var service = req.service;\n var operations = req.service.api.operations || {};\n var operation = operations[req.operation];\n var authtype = operation ? operation.authtype : '';\n if (!service.api.signatureVersion && !authtype && !service.config.signatureVersion) return done(); // none\n\n service.config.getCredentials(function (err, credentials) {\n if (err) {\n req.response.error = err;\n return done();\n }\n\n try {\n var date = service.getSkewCorrectedDate();\n var SignerClass = service.getSignerClass(req);\n var signer = new SignerClass(req.httpRequest,\n service.getSigningName(req),\n {\n signatureCache: service.config.signatureCache,\n operation: operation,\n signatureVersion: service.api.signatureVersion\n });\n signer.setServiceClientId(service._clientId);\n\n // clear old authorization headers\n delete req.httpRequest.headers['Authorization'];\n delete req.httpRequest.headers['Date'];\n delete req.httpRequest.headers['X-Amz-Date'];\n\n // add new authorization\n signer.addAuthorization(credentials, date);\n req.signedAt = date;\n } catch (e) {\n req.response.error = e;\n }\n done();\n });\n });\n\n add('VALIDATE_RESPONSE', 'validateResponse', function VALIDATE_RESPONSE(resp) {\n if (this.service.successfulResponse(resp, this)) {\n resp.data = {};\n resp.error = null;\n } else {\n resp.data = null;\n resp.error = AWS.util.error(new Error(),\n {code: 'UnknownError', message: 'An unknown error occurred.'});\n }\n });\n\n addAsync('SEND', 'send', function SEND(resp, done) {\n resp.httpResponse._abortCallback = done;\n resp.error = null;\n resp.data = null;\n\n function callback(httpResp) {\n resp.httpResponse.stream = httpResp;\n var stream = resp.request.httpRequest.stream;\n var service = resp.request.service;\n var api = service.api;\n var operationName = resp.request.operation;\n var operation = api.operations[operationName] || {};\n\n httpResp.on('headers', function onHeaders(statusCode, headers, statusMessage) {\n resp.request.emit(\n 'httpHeaders',\n [statusCode, headers, resp, statusMessage]\n );\n\n if (!resp.httpResponse.streaming) {\n if (AWS.HttpClient.streamsApiVersion === 2) { // streams2 API check\n // if we detect event streams, we're going to have to\n // return the stream immediately\n if (operation.hasEventOutput && service.successfulResponse(resp)) {\n // skip reading the IncomingStream\n resp.request.emit('httpDone');\n done();\n return;\n }\n\n httpResp.on('readable', function onReadable() {\n var data = httpResp.read();\n if (data !== null) {\n resp.request.emit('httpData', [data, resp]);\n }\n });\n } else { // legacy streams API\n httpResp.on('data', function onData(data) {\n resp.request.emit('httpData', [data, resp]);\n });\n }\n }\n });\n\n httpResp.on('end', function onEnd() {\n if (!stream || !stream.didCallback) {\n if (AWS.HttpClient.streamsApiVersion === 2 && (operation.hasEventOutput && service.successfulResponse(resp))) {\n // don't concatenate response chunks when streaming event stream data when response is successful\n return;\n }\n resp.request.emit('httpDone');\n done();\n }\n });\n }\n\n function progress(httpResp) {\n httpResp.on('sendProgress', function onSendProgress(value) {\n resp.request.emit('httpUploadProgress', [value, resp]);\n });\n\n httpResp.on('receiveProgress', function onReceiveProgress(value) {\n resp.request.emit('httpDownloadProgress', [value, resp]);\n });\n }\n\n function error(err) {\n if (err.code !== 'RequestAbortedError') {\n var errCode = err.code === 'TimeoutError' ? err.code : 'NetworkingError';\n err = AWS.util.error(err, {\n code: errCode,\n region: resp.request.httpRequest.region,\n hostname: resp.request.httpRequest.endpoint.hostname,\n retryable: true\n });\n }\n resp.error = err;\n resp.request.emit('httpError', [resp.error, resp], function() {\n done();\n });\n }\n\n function executeSend() {\n var http = AWS.HttpClient.getInstance();\n var httpOptions = resp.request.service.config.httpOptions || {};\n try {\n var stream = http.handleRequest(resp.request.httpRequest, httpOptions,\n callback, error);\n progress(stream);\n } catch (err) {\n error(err);\n }\n }\n var timeDiff = (resp.request.service.getSkewCorrectedDate() - this.signedAt) / 1000;\n if (timeDiff >= 60 * 10) { // if we signed 10min ago, re-sign\n this.emit('sign', [this], function(err) {\n if (err) done(err);\n else executeSend();\n });\n } else {\n executeSend();\n }\n });\n\n add('HTTP_HEADERS', 'httpHeaders',\n function HTTP_HEADERS(statusCode, headers, resp, statusMessage) {\n resp.httpResponse.statusCode = statusCode;\n resp.httpResponse.statusMessage = statusMessage;\n resp.httpResponse.headers = headers;\n resp.httpResponse.body = AWS.util.buffer.toBuffer('');\n resp.httpResponse.buffers = [];\n resp.httpResponse.numBytes = 0;\n var dateHeader = headers.date || headers.Date;\n var service = resp.request.service;\n if (dateHeader) {\n var serverTime = Date.parse(dateHeader);\n if (service.config.correctClockSkew\n && service.isClockSkewed(serverTime)) {\n service.applyClockOffset(serverTime);\n }\n }\n });\n\n add('HTTP_DATA', 'httpData', function HTTP_DATA(chunk, resp) {\n if (chunk) {\n if (AWS.util.isNode()) {\n resp.httpResponse.numBytes += chunk.length;\n\n var total = resp.httpResponse.headers['content-length'];\n var progress = { loaded: resp.httpResponse.numBytes, total: total };\n resp.request.emit('httpDownloadProgress', [progress, resp]);\n }\n\n resp.httpResponse.buffers.push(AWS.util.buffer.toBuffer(chunk));\n }\n });\n\n add('HTTP_DONE', 'httpDone', function HTTP_DONE(resp) {\n // convert buffers array into single buffer\n if (resp.httpResponse.buffers && resp.httpResponse.buffers.length > 0) {\n var body = AWS.util.buffer.concat(resp.httpResponse.buffers);\n resp.httpResponse.body = body;\n }\n delete resp.httpResponse.numBytes;\n delete resp.httpResponse.buffers;\n });\n\n add('FINALIZE_ERROR', 'retry', function FINALIZE_ERROR(resp) {\n if (resp.httpResponse.statusCode) {\n resp.error.statusCode = resp.httpResponse.statusCode;\n if (resp.error.retryable === undefined) {\n resp.error.retryable = this.service.retryableError(resp.error, this);\n }\n }\n });\n\n add('INVALIDATE_CREDENTIALS', 'retry', function INVALIDATE_CREDENTIALS(resp) {\n if (!resp.error) return;\n switch (resp.error.code) {\n case 'RequestExpired': // EC2 only\n case 'ExpiredTokenException':\n case 'ExpiredToken':\n resp.error.retryable = true;\n resp.request.service.config.credentials.expired = true;\n }\n });\n\n add('EXPIRED_SIGNATURE', 'retry', function EXPIRED_SIGNATURE(resp) {\n var err = resp.error;\n if (!err) return;\n if (typeof err.code === 'string' && typeof err.message === 'string') {\n if (err.code.match(/Signature/) && err.message.match(/expired/)) {\n resp.error.retryable = true;\n }\n }\n });\n\n add('CLOCK_SKEWED', 'retry', function CLOCK_SKEWED(resp) {\n if (!resp.error) return;\n if (this.service.clockSkewError(resp.error)\n && this.service.config.correctClockSkew) {\n resp.error.retryable = true;\n }\n });\n\n add('REDIRECT', 'retry', function REDIRECT(resp) {\n if (resp.error && resp.error.statusCode >= 300 &&\n resp.error.statusCode < 400 && resp.httpResponse.headers['location']) {\n this.httpRequest.endpoint =\n new AWS.Endpoint(resp.httpResponse.headers['location']);\n this.httpRequest.headers['Host'] = this.httpRequest.endpoint.host;\n resp.error.redirect = true;\n resp.error.retryable = true;\n }\n });\n\n add('RETRY_CHECK', 'retry', function RETRY_CHECK(resp) {\n if (resp.error) {\n if (resp.error.redirect && resp.redirectCount < resp.maxRedirects) {\n resp.error.retryDelay = 0;\n } else if (resp.retryCount < resp.maxRetries) {\n resp.error.retryDelay = this.service.retryDelays(resp.retryCount, resp.error) || 0;\n }\n }\n });\n\n addAsync('RESET_RETRY_STATE', 'afterRetry', function RESET_RETRY_STATE(resp, done) {\n var delay, willRetry = false;\n\n if (resp.error) {\n delay = resp.error.retryDelay || 0;\n if (resp.error.retryable && resp.retryCount < resp.maxRetries) {\n resp.retryCount++;\n willRetry = true;\n } else if (resp.error.redirect && resp.redirectCount < resp.maxRedirects) {\n resp.redirectCount++;\n willRetry = true;\n }\n }\n\n // delay < 0 is a signal from customBackoff to skip retries\n if (willRetry && delay >= 0) {\n resp.error = null;\n setTimeout(done, delay);\n } else {\n done();\n }\n });\n }),\n\n CorePost: new SequentialExecutor().addNamedListeners(function(add) {\n add('EXTRACT_REQUEST_ID', 'extractData', AWS.util.extractRequestId);\n add('EXTRACT_REQUEST_ID', 'extractError', AWS.util.extractRequestId);\n\n add('ENOTFOUND_ERROR', 'httpError', function ENOTFOUND_ERROR(err) {\n function isDNSError(err) {\n return err.errno === 'ENOTFOUND' ||\n typeof err.errno === 'number' &&\n typeof AWS.util.getSystemErrorName === 'function' &&\n ['EAI_NONAME', 'EAI_NODATA'].indexOf(AWS.util.getSystemErrorName(err.errno) >= 0);\n }\n if (err.code === 'NetworkingError' && isDNSError(err)) {\n var message = 'Inaccessible host: `' + err.hostname + '\\' at port `' + err.port +\n '\\'. This service may not be available in the `' + err.region +\n '\\' region.';\n this.response.error = AWS.util.error(new Error(message), {\n code: 'UnknownEndpoint',\n region: err.region,\n hostname: err.hostname,\n retryable: true,\n originalError: err\n });\n }\n });\n }),\n\n Logger: new SequentialExecutor().addNamedListeners(function(add) {\n add('LOG_REQUEST', 'complete', function LOG_REQUEST(resp) {\n var req = resp.request;\n var logger = req.service.config.logger;\n if (!logger) return;\n function filterSensitiveLog(inputShape, shape) {\n if (!shape) {\n return shape;\n }\n if (inputShape.isSensitive) {\n return '***SensitiveInformation***';\n }\n switch (inputShape.type) {\n case 'structure':\n var struct = {};\n AWS.util.each(shape, function(subShapeName, subShape) {\n if (Object.prototype.hasOwnProperty.call(inputShape.members, subShapeName)) {\n struct[subShapeName] = filterSensitiveLog(inputShape.members[subShapeName], subShape);\n } else {\n struct[subShapeName] = subShape;\n }\n });\n return struct;\n case 'list':\n var list = [];\n AWS.util.arrayEach(shape, function(subShape, index) {\n list.push(filterSensitiveLog(inputShape.member, subShape));\n });\n return list;\n case 'map':\n var map = {};\n AWS.util.each(shape, function(key, value) {\n map[key] = filterSensitiveLog(inputShape.value, value);\n });\n return map;\n default:\n return shape;\n }\n }\n\n function buildMessage() {\n var time = resp.request.service.getSkewCorrectedDate().getTime();\n var delta = (time - req.startTime.getTime()) / 1000;\n var ansi = logger.isTTY ? true : false;\n var status = resp.httpResponse.statusCode;\n var censoredParams = req.params;\n if (\n req.service.api.operations &&\n req.service.api.operations[req.operation] &&\n req.service.api.operations[req.operation].input\n ) {\n var inputShape = req.service.api.operations[req.operation].input;\n censoredParams = filterSensitiveLog(inputShape, req.params);\n }\n var params = require('util').inspect(censoredParams, true, null);\n var message = '';\n if (ansi) message += '\\x1B[33m';\n message += '[AWS ' + req.service.serviceIdentifier + ' ' + status;\n message += ' ' + delta.toString() + 's ' + resp.retryCount + ' retries]';\n if (ansi) message += '\\x1B[0;1m';\n message += ' ' + AWS.util.string.lowerFirst(req.operation);\n message += '(' + params + ')';\n if (ansi) message += '\\x1B[0m';\n return message;\n }\n\n var line = buildMessage();\n if (typeof logger.log === 'function') {\n logger.log(line);\n } else if (typeof logger.write === 'function') {\n logger.write(line + '\\n');\n }\n });\n }),\n\n Json: new SequentialExecutor().addNamedListeners(function(add) {\n var svc = require('./protocol/json');\n add('BUILD', 'build', svc.buildRequest);\n add('EXTRACT_DATA', 'extractData', svc.extractData);\n add('EXTRACT_ERROR', 'extractError', svc.extractError);\n }),\n\n Rest: new SequentialExecutor().addNamedListeners(function(add) {\n var svc = require('./protocol/rest');\n add('BUILD', 'build', svc.buildRequest);\n add('EXTRACT_DATA', 'extractData', svc.extractData);\n add('EXTRACT_ERROR', 'extractError', svc.extractError);\n }),\n\n RestJson: new SequentialExecutor().addNamedListeners(function(add) {\n var svc = require('./protocol/rest_json');\n add('BUILD', 'build', svc.buildRequest);\n add('EXTRACT_DATA', 'extractData', svc.extractData);\n add('EXTRACT_ERROR', 'extractError', svc.extractError);\n }),\n\n RestXml: new SequentialExecutor().addNamedListeners(function(add) {\n var svc = require('./protocol/rest_xml');\n add('BUILD', 'build', svc.buildRequest);\n add('EXTRACT_DATA', 'extractData', svc.extractData);\n add('EXTRACT_ERROR', 'extractError', svc.extractError);\n }),\n\n Query: new SequentialExecutor().addNamedListeners(function(add) {\n var svc = require('./protocol/query');\n add('BUILD', 'build', svc.buildRequest);\n add('EXTRACT_DATA', 'extractData', svc.extractData);\n add('EXTRACT_ERROR', 'extractError', svc.extractError);\n })\n};\n","var AWS = require('./core');\nvar inherit = AWS.util.inherit;\n\n/**\n * The endpoint that a service will talk to, for example,\n * `'https://ec2.ap-southeast-1.amazonaws.com'`. If\n * you need to override an endpoint for a service, you can\n * set the endpoint on a service by passing the endpoint\n * object with the `endpoint` option key:\n *\n * ```javascript\n * var ep = new AWS.Endpoint('awsproxy.example.com');\n * var s3 = new AWS.S3({endpoint: ep});\n * s3.service.endpoint.hostname == 'awsproxy.example.com'\n * ```\n *\n * Note that if you do not specify a protocol, the protocol will\n * be selected based on your current {AWS.config} configuration.\n *\n * @!attribute protocol\n * @return [String] the protocol (http or https) of the endpoint\n * URL\n * @!attribute hostname\n * @return [String] the host portion of the endpoint, e.g.,\n * example.com\n * @!attribute host\n * @return [String] the host portion of the endpoint including\n * the port, e.g., example.com:80\n * @!attribute port\n * @return [Integer] the port of the endpoint\n * @!attribute href\n * @return [String] the full URL of the endpoint\n */\nAWS.Endpoint = inherit({\n\n /**\n * @overload Endpoint(endpoint)\n * Constructs a new endpoint given an endpoint URL. If the\n * URL omits a protocol (http or https), the default protocol\n * set in the global {AWS.config} will be used.\n * @param endpoint [String] the URL to construct an endpoint from\n */\n constructor: function Endpoint(endpoint, config) {\n AWS.util.hideProperties(this, ['slashes', 'auth', 'hash', 'search', 'query']);\n\n if (typeof endpoint === 'undefined' || endpoint === null) {\n throw new Error('Invalid endpoint: ' + endpoint);\n } else if (typeof endpoint !== 'string') {\n return AWS.util.copy(endpoint);\n }\n\n if (!endpoint.match(/^http/)) {\n var useSSL = config && config.sslEnabled !== undefined ?\n config.sslEnabled : AWS.config.sslEnabled;\n endpoint = (useSSL ? 'https' : 'http') + '://' + endpoint;\n }\n\n AWS.util.update(this, AWS.util.urlParse(endpoint));\n\n // Ensure the port property is set as an integer\n if (this.port) {\n this.port = parseInt(this.port, 10);\n } else {\n this.port = this.protocol === 'https:' ? 443 : 80;\n }\n }\n\n});\n\n/**\n * The low level HTTP request object, encapsulating all HTTP header\n * and body data sent by a service request.\n *\n * @!attribute method\n * @return [String] the HTTP method of the request\n * @!attribute path\n * @return [String] the path portion of the URI, e.g.,\n * \"/list/?start=5&num=10\"\n * @!attribute headers\n * @return [map]\n * a map of header keys and their respective values\n * @!attribute body\n * @return [String] the request body payload\n * @!attribute endpoint\n * @return [AWS.Endpoint] the endpoint for the request\n * @!attribute region\n * @api private\n * @return [String] the region, for signing purposes only.\n */\nAWS.HttpRequest = inherit({\n\n /**\n * @api private\n */\n constructor: function HttpRequest(endpoint, region) {\n endpoint = new AWS.Endpoint(endpoint);\n this.method = 'POST';\n this.path = endpoint.path || '/';\n this.headers = {};\n this.body = '';\n this.endpoint = endpoint;\n this.region = region;\n this._userAgent = '';\n this.setUserAgent();\n },\n\n /**\n * @api private\n */\n setUserAgent: function setUserAgent() {\n this._userAgent = this.headers[this.getUserAgentHeaderName()] = AWS.util.userAgent();\n },\n\n getUserAgentHeaderName: function getUserAgentHeaderName() {\n var prefix = AWS.util.isBrowser() ? 'X-Amz-' : '';\n return prefix + 'User-Agent';\n },\n\n /**\n * @api private\n */\n appendToUserAgent: function appendToUserAgent(agentPartial) {\n if (typeof agentPartial === 'string' && agentPartial) {\n this._userAgent += ' ' + agentPartial;\n }\n this.headers[this.getUserAgentHeaderName()] = this._userAgent;\n },\n\n /**\n * @api private\n */\n getUserAgent: function getUserAgent() {\n return this._userAgent;\n },\n\n /**\n * @return [String] the part of the {path} excluding the\n * query string\n */\n pathname: function pathname() {\n return this.path.split('?', 1)[0];\n },\n\n /**\n * @return [String] the query string portion of the {path}\n */\n search: function search() {\n var query = this.path.split('?', 2)[1];\n if (query) {\n query = AWS.util.queryStringParse(query);\n return AWS.util.queryParamsToString(query);\n }\n return '';\n },\n\n /**\n * @api private\n * update httpRequest endpoint with endpoint string\n */\n updateEndpoint: function updateEndpoint(endpointStr) {\n var newEndpoint = new AWS.Endpoint(endpointStr);\n this.endpoint = newEndpoint;\n this.path = newEndpoint.path || '/';\n if (this.headers['Host']) {\n this.headers['Host'] = newEndpoint.host;\n }\n }\n});\n\n/**\n * The low level HTTP response object, encapsulating all HTTP header\n * and body data returned from the request.\n *\n * @!attribute statusCode\n * @return [Integer] the HTTP status code of the response (e.g., 200, 404)\n * @!attribute headers\n * @return [map]\n * a map of response header keys and their respective values\n * @!attribute body\n * @return [String] the response body payload\n * @!attribute [r] streaming\n * @return [Boolean] whether this response is being streamed at a low-level.\n * Defaults to `false` (buffered reads). Do not modify this manually, use\n * {createUnbufferedStream} to convert the stream to unbuffered mode\n * instead.\n */\nAWS.HttpResponse = inherit({\n\n /**\n * @api private\n */\n constructor: function HttpResponse() {\n this.statusCode = undefined;\n this.headers = {};\n this.body = undefined;\n this.streaming = false;\n this.stream = null;\n },\n\n /**\n * Disables buffering on the HTTP response and returns the stream for reading.\n * @return [Stream, XMLHttpRequest, null] the underlying stream object.\n * Use this object to directly read data off of the stream.\n * @note This object is only available after the {AWS.Request~httpHeaders}\n * event has fired. This method must be called prior to\n * {AWS.Request~httpData}.\n * @example Taking control of a stream\n * request.on('httpHeaders', function(statusCode, headers) {\n * if (statusCode < 300) {\n * if (headers.etag === 'xyz') {\n * // pipe the stream, disabling buffering\n * var stream = this.response.httpResponse.createUnbufferedStream();\n * stream.pipe(process.stdout);\n * } else { // abort this request and set a better error message\n * this.abort();\n * this.response.error = new Error('Invalid ETag');\n * }\n * }\n * }).send(console.log);\n */\n createUnbufferedStream: function createUnbufferedStream() {\n this.streaming = true;\n return this.stream;\n }\n});\n\n\nAWS.HttpClient = inherit({});\n\n/**\n * @api private\n */\nAWS.HttpClient.getInstance = function getInstance() {\n if (this.singleton === undefined) {\n this.singleton = new this();\n }\n return this.singleton;\n};\n","var AWS = require('../core');\nvar Stream = AWS.util.stream.Stream;\nvar TransformStream = AWS.util.stream.Transform;\nvar ReadableStream = AWS.util.stream.Readable;\nrequire('../http');\nvar CONNECTION_REUSE_ENV_NAME = 'AWS_NODEJS_CONNECTION_REUSE_ENABLED';\n\n/**\n * @api private\n */\nAWS.NodeHttpClient = AWS.util.inherit({\n handleRequest: function handleRequest(httpRequest, httpOptions, callback, errCallback) {\n var self = this;\n var endpoint = httpRequest.endpoint;\n var pathPrefix = '';\n if (!httpOptions) httpOptions = {};\n if (httpOptions.proxy) {\n pathPrefix = endpoint.protocol + '//' + endpoint.hostname;\n if (endpoint.port !== 80 && endpoint.port !== 443) {\n pathPrefix += ':' + endpoint.port;\n }\n endpoint = new AWS.Endpoint(httpOptions.proxy);\n }\n\n var useSSL = endpoint.protocol === 'https:';\n var http = useSSL ? require('https') : require('http');\n var options = {\n host: endpoint.hostname,\n port: endpoint.port,\n method: httpRequest.method,\n headers: httpRequest.headers,\n path: pathPrefix + httpRequest.path\n };\n\n if (!httpOptions.agent) {\n options.agent = this.getAgent(useSSL, {\n keepAlive: process.env[CONNECTION_REUSE_ENV_NAME] === '1' ? true : false\n });\n }\n\n AWS.util.update(options, httpOptions);\n delete options.proxy; // proxy isn't an HTTP option\n delete options.timeout; // timeout isn't an HTTP option\n\n var stream = http.request(options, function (httpResp) {\n if (stream.didCallback) return;\n\n callback(httpResp);\n httpResp.emit(\n 'headers',\n httpResp.statusCode,\n httpResp.headers,\n httpResp.statusMessage\n );\n });\n httpRequest.stream = stream; // attach stream to httpRequest\n stream.didCallback = false;\n\n // connection timeout support\n if (httpOptions.connectTimeout) {\n var connectTimeoutId;\n stream.on('socket', function(socket) {\n if (socket.connecting) {\n connectTimeoutId = setTimeout(function connectTimeout() {\n if (stream.didCallback) return; stream.didCallback = true;\n\n stream.abort();\n errCallback(AWS.util.error(\n new Error('Socket timed out without establishing a connection'),\n {code: 'TimeoutError'}\n ));\n }, httpOptions.connectTimeout);\n socket.on('connect', function() {\n clearTimeout(connectTimeoutId);\n connectTimeoutId = null;\n });\n }\n });\n }\n\n // timeout support\n stream.setTimeout(httpOptions.timeout || 0, function() {\n if (stream.didCallback) return; stream.didCallback = true;\n\n var msg = 'Connection timed out after ' + httpOptions.timeout + 'ms';\n errCallback(AWS.util.error(new Error(msg), {code: 'TimeoutError'}));\n stream.abort();\n });\n\n stream.on('error', function(err) {\n if (connectTimeoutId) {\n clearTimeout(connectTimeoutId);\n connectTimeoutId = null;\n }\n if (stream.didCallback) return; stream.didCallback = true;\n if ('ECONNRESET' === err.code || 'EPIPE' === err.code || 'ETIMEDOUT' === err.code) {\n errCallback(AWS.util.error(err, {code: 'TimeoutError'}));\n } else {\n errCallback(err);\n }\n });\n\n var expect = httpRequest.headers.Expect || httpRequest.headers.expect;\n if (expect === '100-continue') {\n stream.once('continue', function() {\n self.writeBody(stream, httpRequest);\n });\n } else {\n this.writeBody(stream, httpRequest);\n }\n\n return stream;\n },\n\n writeBody: function writeBody(stream, httpRequest) {\n var body = httpRequest.body;\n var totalBytes = parseInt(httpRequest.headers['Content-Length'], 10);\n\n if (body instanceof Stream) {\n // For progress support of streaming content -\n // pipe the data through a transform stream to emit 'sendProgress' events\n var progressStream = this.progressStream(stream, totalBytes);\n if (progressStream) {\n body.pipe(progressStream).pipe(stream);\n } else {\n body.pipe(stream);\n }\n } else if (body) {\n // The provided body is a buffer/string and is already fully available in memory -\n // For performance it's best to send it as a whole by calling stream.end(body),\n // Callers expect a 'sendProgress' event which is best emitted once\n // the http request stream has been fully written and all data flushed.\n // The use of totalBytes is important over body.length for strings where\n // length is char length and not byte length.\n stream.once('finish', function() {\n stream.emit('sendProgress', {\n loaded: totalBytes,\n total: totalBytes\n });\n });\n stream.end(body);\n } else {\n // no request body\n stream.end();\n }\n },\n\n /**\n * Create the https.Agent or http.Agent according to the request schema.\n */\n getAgent: function getAgent(useSSL, agentOptions) {\n var http = useSSL ? require('https') : require('http');\n if (useSSL) {\n if (!AWS.NodeHttpClient.sslAgent) {\n AWS.NodeHttpClient.sslAgent = new http.Agent(AWS.util.merge({\n rejectUnauthorized: process.env.NODE_TLS_REJECT_UNAUTHORIZED === '0' ? false : true\n }, agentOptions || {}));\n AWS.NodeHttpClient.sslAgent.setMaxListeners(0);\n\n // delegate maxSockets to globalAgent, set a default limit of 50 if current value is Infinity.\n // Users can bypass this default by supplying their own Agent as part of SDK configuration.\n Object.defineProperty(AWS.NodeHttpClient.sslAgent, 'maxSockets', {\n enumerable: true,\n get: function() {\n var defaultMaxSockets = 50;\n var globalAgent = http.globalAgent;\n if (globalAgent && globalAgent.maxSockets !== Infinity && typeof globalAgent.maxSockets === 'number') {\n return globalAgent.maxSockets;\n }\n return defaultMaxSockets;\n }\n });\n }\n return AWS.NodeHttpClient.sslAgent;\n } else {\n if (!AWS.NodeHttpClient.agent) {\n AWS.NodeHttpClient.agent = new http.Agent(agentOptions);\n }\n return AWS.NodeHttpClient.agent;\n }\n },\n\n progressStream: function progressStream(stream, totalBytes) {\n if (typeof TransformStream === 'undefined') {\n // for node 0.8 there is no streaming progress\n return;\n }\n var loadedBytes = 0;\n var reporter = new TransformStream();\n reporter._transform = function(chunk, encoding, callback) {\n if (chunk) {\n loadedBytes += chunk.length;\n stream.emit('sendProgress', {\n loaded: loadedBytes,\n total: totalBytes\n });\n }\n callback(null, chunk);\n };\n return reporter;\n },\n\n emitter: null\n});\n\n/**\n * @!ignore\n */\n\n/**\n * @api private\n */\nAWS.HttpClient.prototype = AWS.NodeHttpClient.prototype;\n\n/**\n * @api private\n */\nAWS.HttpClient.streamsApiVersion = ReadableStream ? 2 : 1;\n","var util = require('../util');\n\nfunction JsonBuilder() { }\n\nJsonBuilder.prototype.build = function(value, shape) {\n return JSON.stringify(translate(value, shape));\n};\n\nfunction translate(value, shape) {\n if (!shape || value === undefined || value === null) return undefined;\n\n switch (shape.type) {\n case 'structure': return translateStructure(value, shape);\n case 'map': return translateMap(value, shape);\n case 'list': return translateList(value, shape);\n default: return translateScalar(value, shape);\n }\n}\n\nfunction translateStructure(structure, shape) {\n if (shape.isDocument) {\n return structure;\n }\n var struct = {};\n util.each(structure, function(name, value) {\n var memberShape = shape.members[name];\n if (memberShape) {\n if (memberShape.location !== 'body') return;\n var locationName = memberShape.isLocationName ? memberShape.name : name;\n var result = translate(value, memberShape);\n if (result !== undefined) struct[locationName] = result;\n }\n });\n return struct;\n}\n\nfunction translateList(list, shape) {\n var out = [];\n util.arrayEach(list, function(value) {\n var result = translate(value, shape.member);\n if (result !== undefined) out.push(result);\n });\n return out;\n}\n\nfunction translateMap(map, shape) {\n var out = {};\n util.each(map, function(key, value) {\n var result = translate(value, shape.value);\n if (result !== undefined) out[key] = result;\n });\n return out;\n}\n\nfunction translateScalar(value, shape) {\n return shape.toWireFormat(value);\n}\n\n/**\n * @api private\n */\nmodule.exports = JsonBuilder;\n","var util = require('../util');\n\nfunction JsonParser() { }\n\nJsonParser.prototype.parse = function(value, shape) {\n return translate(JSON.parse(value), shape);\n};\n\nfunction translate(value, shape) {\n if (!shape || value === undefined) return undefined;\n\n switch (shape.type) {\n case 'structure': return translateStructure(value, shape);\n case 'map': return translateMap(value, shape);\n case 'list': return translateList(value, shape);\n default: return translateScalar(value, shape);\n }\n}\n\nfunction translateStructure(structure, shape) {\n if (structure == null) return undefined;\n if (shape.isDocument) return structure;\n\n var struct = {};\n var shapeMembers = shape.members;\n util.each(shapeMembers, function(name, memberShape) {\n var locationName = memberShape.isLocationName ? memberShape.name : name;\n if (Object.prototype.hasOwnProperty.call(structure, locationName)) {\n var value = structure[locationName];\n var result = translate(value, memberShape);\n if (result !== undefined) struct[name] = result;\n }\n });\n return struct;\n}\n\nfunction translateList(list, shape) {\n if (list == null) return undefined;\n\n var out = [];\n util.arrayEach(list, function(value) {\n var result = translate(value, shape.member);\n if (result === undefined) out.push(null);\n else out.push(result);\n });\n return out;\n}\n\nfunction translateMap(map, shape) {\n if (map == null) return undefined;\n\n var out = {};\n util.each(map, function(key, value) {\n var result = translate(value, shape.value);\n if (result === undefined) out[key] = null;\n else out[key] = result;\n });\n return out;\n}\n\nfunction translateScalar(value, shape) {\n return shape.toType(value);\n}\n\n/**\n * @api private\n */\nmodule.exports = JsonParser;\n","var AWS = require('./core');\nrequire('./http');\nvar inherit = AWS.util.inherit;\nvar getMetadataServiceEndpoint = require('./metadata_service/get_metadata_service_endpoint');\nvar URL = require('url').URL;\n\n/**\n * Represents a metadata service available on EC2 instances. Using the\n * {request} method, you can receieve metadata about any available resource\n * on the metadata service.\n *\n * You can disable the use of the IMDS by setting the AWS_EC2_METADATA_DISABLED\n * environment variable to a truthy value.\n *\n * @!attribute [r] httpOptions\n * @return [map] a map of options to pass to the underlying HTTP request:\n *\n * * **timeout** (Number) — a timeout value in milliseconds to wait\n * before aborting the connection. Set to 0 for no timeout.\n *\n * @!macro nobrowser\n */\nAWS.MetadataService = inherit({\n /**\n * @return [String] the endpoint of the instance metadata service\n */\n endpoint: getMetadataServiceEndpoint(),\n\n /**\n * @!ignore\n */\n\n /**\n * Default HTTP options. By default, the metadata service is set to not\n * timeout on long requests. This means that on non-EC2 machines, this\n * request will never return. If you are calling this operation from an\n * environment that may not always run on EC2, set a `timeout` value so\n * the SDK will abort the request after a given number of milliseconds.\n */\n httpOptions: { timeout: 0 },\n\n /**\n * when enabled, metadata service will not fetch token\n */\n disableFetchToken: false,\n\n /**\n * Creates a new MetadataService object with a given set of options.\n *\n * @option options host [String] the hostname of the instance metadata\n * service\n * @option options httpOptions [map] a map of options to pass to the\n * underlying HTTP request:\n *\n * * **timeout** (Number) — a timeout value in milliseconds to wait\n * before aborting the connection. Set to 0 for no timeout.\n * @option options maxRetries [Integer] the maximum number of retries to\n * perform for timeout errors\n * @option options retryDelayOptions [map] A set of options to configure the\n * retry delay on retryable errors. See AWS.Config for details.\n */\n constructor: function MetadataService(options) {\n if (options && options.host) {\n options.endpoint = 'http://' + options.host;\n delete options.host;\n }\n AWS.util.update(this, options);\n },\n\n /**\n * Sends a request to the instance metadata service for a given resource.\n *\n * @param path [String] the path of the resource to get\n *\n * @param options [map] an optional map used to make request\n *\n * * **method** (String) — HTTP request method\n *\n * * **headers** (map) — a map of response header keys and their respective values\n *\n * @callback callback function(err, data)\n * Called when a response is available from the service.\n * @param err [Error, null] if an error occurred, this value will be set\n * @param data [String, null] if the request was successful, the body of\n * the response\n */\n request: function request(path, options, callback) {\n if (arguments.length === 2) {\n callback = options;\n options = {};\n }\n\n if (process.env[AWS.util.imdsDisabledEnv]) {\n callback(new Error('EC2 Instance Metadata Service access disabled'));\n return;\n }\n\n path = path || '/';\n\n // Verify that host is a valid URL\n if (URL) { new URL(this.endpoint); }\n\n var httpRequest = new AWS.HttpRequest(this.endpoint + path);\n httpRequest.method = options.method || 'GET';\n if (options.headers) {\n httpRequest.headers = options.headers;\n }\n AWS.util.handleRequestWithRetries(httpRequest, this, callback);\n },\n\n /**\n * @api private\n */\n loadCredentialsCallbacks: [],\n\n /**\n * Fetches metadata token used for getting credentials\n *\n * @api private\n * @callback callback function(err, token)\n * Called when token is loaded from the resource\n */\n fetchMetadataToken: function fetchMetadataToken(callback) {\n var self = this;\n var tokenFetchPath = '/latest/api/token';\n self.request(\n tokenFetchPath,\n {\n 'method': 'PUT',\n 'headers': {\n 'x-aws-ec2-metadata-token-ttl-seconds': '21600'\n }\n },\n callback\n );\n },\n\n /**\n * Fetches credentials\n *\n * @api private\n * @callback cb function(err, creds)\n * Called when credentials are loaded from the resource\n */\n fetchCredentials: function fetchCredentials(options, cb) {\n var self = this;\n var basePath = '/latest/meta-data/iam/security-credentials/';\n\n self.request(basePath, options, function (err, roleName) {\n if (err) {\n self.disableFetchToken = !(err.statusCode === 401);\n cb(AWS.util.error(\n err,\n {\n message: 'EC2 Metadata roleName request returned error'\n }\n ));\n return;\n }\n roleName = roleName.split('\\n')[0]; // grab first (and only) role\n self.request(basePath + roleName, options, function (credErr, credData) {\n if (credErr) {\n self.disableFetchToken = !(credErr.statusCode === 401);\n cb(AWS.util.error(\n credErr,\n {\n message: 'EC2 Metadata creds request returned error'\n }\n ));\n return;\n }\n try {\n var credentials = JSON.parse(credData);\n cb(null, credentials);\n } catch (parseError) {\n cb(parseError);\n }\n });\n });\n },\n\n /**\n * Loads a set of credentials stored in the instance metadata service\n *\n * @api private\n * @callback callback function(err, credentials)\n * Called when credentials are loaded from the resource\n * @param err [Error] if an error occurred, this value will be set\n * @param credentials [Object] the raw JSON object containing all\n * metadata from the credentials resource\n */\n loadCredentials: function loadCredentials(callback) {\n var self = this;\n self.loadCredentialsCallbacks.push(callback);\n if (self.loadCredentialsCallbacks.length > 1) { return; }\n\n function callbacks(err, creds) {\n var cb;\n while ((cb = self.loadCredentialsCallbacks.shift()) !== undefined) {\n cb(err, creds);\n }\n }\n\n if (self.disableFetchToken) {\n self.fetchCredentials({}, callbacks);\n } else {\n self.fetchMetadataToken(function(tokenError, token) {\n if (tokenError) {\n if (tokenError.code === 'TimeoutError') {\n self.disableFetchToken = true;\n } else if (tokenError.retryable === true) {\n callbacks(AWS.util.error(\n tokenError,\n {\n message: 'EC2 Metadata token request returned error'\n }\n ));\n return;\n } else if (tokenError.statusCode === 400) {\n callbacks(AWS.util.error(\n tokenError,\n {\n message: 'EC2 Metadata token request returned 400'\n }\n ));\n return;\n }\n }\n var options = {};\n if (token) {\n options.headers = {\n 'x-aws-ec2-metadata-token': token\n };\n }\n self.fetchCredentials(options, callbacks);\n });\n\n }\n }\n});\n\n/**\n * @api private\n */\nmodule.exports = AWS.MetadataService;\n","var getEndpoint = function() {\n return {\n IPv4: 'http://169.254.169.254',\n IPv6: 'http://[fd00:ec2::254]',\n };\n};\n\nmodule.exports = getEndpoint;\n","var ENV_ENDPOINT_NAME = 'AWS_EC2_METADATA_SERVICE_ENDPOINT';\nvar CONFIG_ENDPOINT_NAME = 'ec2_metadata_service_endpoint';\n\nvar getEndpointConfigOptions = function() {\n return {\n environmentVariableSelector: function(env) { return env[ENV_ENDPOINT_NAME]; },\n configFileSelector: function(profile) { return profile[CONFIG_ENDPOINT_NAME]; },\n default: undefined,\n };\n};\n\nmodule.exports = getEndpointConfigOptions;\n","var getEndpointMode = function() {\n return {\n IPv4: 'IPv4',\n IPv6: 'IPv6',\n };\n};\n\nmodule.exports = getEndpointMode;\n","var EndpointMode = require('./get_endpoint_mode')();\n\nvar ENV_ENDPOINT_MODE_NAME = 'AWS_EC2_METADATA_SERVICE_ENDPOINT_MODE';\nvar CONFIG_ENDPOINT_MODE_NAME = 'ec2_metadata_service_endpoint_mode';\n\nvar getEndpointModeConfigOptions = function() {\n return {\n environmentVariableSelector: function(env) { return env[ENV_ENDPOINT_MODE_NAME]; },\n configFileSelector: function(profile) { return profile[CONFIG_ENDPOINT_MODE_NAME]; },\n default: EndpointMode.IPv4,\n };\n};\n\nmodule.exports = getEndpointModeConfigOptions;\n","var AWS = require('../core');\n\nvar Endpoint = require('./get_endpoint')();\nvar EndpointMode = require('./get_endpoint_mode')();\n\nvar ENDPOINT_CONFIG_OPTIONS = require('./get_endpoint_config_options')();\nvar ENDPOINT_MODE_CONFIG_OPTIONS = require('./get_endpoint_mode_config_options')();\n\nvar getMetadataServiceEndpoint = function() {\n var endpoint = AWS.util.loadConfig(ENDPOINT_CONFIG_OPTIONS);\n if (endpoint !== undefined) return endpoint;\n\n var endpointMode = AWS.util.loadConfig(ENDPOINT_MODE_CONFIG_OPTIONS);\n switch (endpointMode) {\n case EndpointMode.IPv4:\n return Endpoint.IPv4;\n case EndpointMode.IPv6:\n return Endpoint.IPv6;\n default:\n throw new Error('Unsupported endpoint mode: ' + endpointMode);\n }\n};\n\nmodule.exports = getMetadataServiceEndpoint;\n","var Collection = require('./collection');\nvar Operation = require('./operation');\nvar Shape = require('./shape');\nvar Paginator = require('./paginator');\nvar ResourceWaiter = require('./resource_waiter');\nvar metadata = require('../../apis/metadata.json');\n\nvar util = require('../util');\nvar property = util.property;\nvar memoizedProperty = util.memoizedProperty;\n\nfunction Api(api, options) {\n var self = this;\n api = api || {};\n options = options || {};\n options.api = this;\n\n api.metadata = api.metadata || {};\n\n var serviceIdentifier = options.serviceIdentifier;\n delete options.serviceIdentifier;\n\n property(this, 'isApi', true, false);\n property(this, 'apiVersion', api.metadata.apiVersion);\n property(this, 'endpointPrefix', api.metadata.endpointPrefix);\n property(this, 'signingName', api.metadata.signingName);\n property(this, 'globalEndpoint', api.metadata.globalEndpoint);\n property(this, 'signatureVersion', api.metadata.signatureVersion);\n property(this, 'jsonVersion', api.metadata.jsonVersion);\n property(this, 'targetPrefix', api.metadata.targetPrefix);\n property(this, 'protocol', api.metadata.protocol);\n property(this, 'timestampFormat', api.metadata.timestampFormat);\n property(this, 'xmlNamespaceUri', api.metadata.xmlNamespace);\n property(this, 'abbreviation', api.metadata.serviceAbbreviation);\n property(this, 'fullName', api.metadata.serviceFullName);\n property(this, 'serviceId', api.metadata.serviceId);\n if (serviceIdentifier && metadata[serviceIdentifier]) {\n property(this, 'xmlNoDefaultLists', metadata[serviceIdentifier].xmlNoDefaultLists, false);\n }\n\n memoizedProperty(this, 'className', function() {\n var name = api.metadata.serviceAbbreviation || api.metadata.serviceFullName;\n if (!name) return null;\n\n name = name.replace(/^Amazon|AWS\\s*|\\(.*|\\s+|\\W+/g, '');\n if (name === 'ElasticLoadBalancing') name = 'ELB';\n return name;\n });\n\n function addEndpointOperation(name, operation) {\n if (operation.endpointoperation === true) {\n property(self, 'endpointOperation', util.string.lowerFirst(name));\n }\n if (operation.endpointdiscovery && !self.hasRequiredEndpointDiscovery) {\n property(\n self,\n 'hasRequiredEndpointDiscovery',\n operation.endpointdiscovery.required === true\n );\n }\n }\n\n property(this, 'operations', new Collection(api.operations, options, function(name, operation) {\n return new Operation(name, operation, options);\n }, util.string.lowerFirst, addEndpointOperation));\n\n property(this, 'shapes', new Collection(api.shapes, options, function(name, shape) {\n return Shape.create(shape, options);\n }));\n\n property(this, 'paginators', new Collection(api.paginators, options, function(name, paginator) {\n return new Paginator(name, paginator, options);\n }));\n\n property(this, 'waiters', new Collection(api.waiters, options, function(name, waiter) {\n return new ResourceWaiter(name, waiter, options);\n }, util.string.lowerFirst));\n\n if (options.documentation) {\n property(this, 'documentation', api.documentation);\n property(this, 'documentationUrl', api.documentationUrl);\n }\n}\n\n/**\n * @api private\n */\nmodule.exports = Api;\n","var memoizedProperty = require('../util').memoizedProperty;\n\nfunction memoize(name, value, factory, nameTr) {\n memoizedProperty(this, nameTr(name), function() {\n return factory(name, value);\n });\n}\n\nfunction Collection(iterable, options, factory, nameTr, callback) {\n nameTr = nameTr || String;\n var self = this;\n\n for (var id in iterable) {\n if (Object.prototype.hasOwnProperty.call(iterable, id)) {\n memoize.call(self, id, iterable[id], factory, nameTr);\n if (callback) callback(id, iterable[id]);\n }\n }\n}\n\n/**\n * @api private\n */\nmodule.exports = Collection;\n","var Shape = require('./shape');\n\nvar util = require('../util');\nvar property = util.property;\nvar memoizedProperty = util.memoizedProperty;\n\nfunction Operation(name, operation, options) {\n var self = this;\n options = options || {};\n\n property(this, 'name', operation.name || name);\n property(this, 'api', options.api, false);\n\n operation.http = operation.http || {};\n property(this, 'endpoint', operation.endpoint);\n property(this, 'httpMethod', operation.http.method || 'POST');\n property(this, 'httpPath', operation.http.requestUri || '/');\n property(this, 'authtype', operation.authtype || '');\n property(\n this,\n 'endpointDiscoveryRequired',\n operation.endpointdiscovery ?\n (operation.endpointdiscovery.required ? 'REQUIRED' : 'OPTIONAL') :\n 'NULL'\n );\n\n // httpChecksum replaces usage of httpChecksumRequired, but some APIs\n // (s3control) still uses old trait.\n var httpChecksumRequired = operation.httpChecksumRequired\n || (operation.httpChecksum && operation.httpChecksum.requestChecksumRequired);\n property(this, 'httpChecksumRequired', httpChecksumRequired, false);\n\n memoizedProperty(this, 'input', function() {\n if (!operation.input) {\n return new Shape.create({type: 'structure'}, options);\n }\n return Shape.create(operation.input, options);\n });\n\n memoizedProperty(this, 'output', function() {\n if (!operation.output) {\n return new Shape.create({type: 'structure'}, options);\n }\n return Shape.create(operation.output, options);\n });\n\n memoizedProperty(this, 'errors', function() {\n var list = [];\n if (!operation.errors) return null;\n\n for (var i = 0; i < operation.errors.length; i++) {\n list.push(Shape.create(operation.errors[i], options));\n }\n\n return list;\n });\n\n memoizedProperty(this, 'paginator', function() {\n return options.api.paginators[name];\n });\n\n if (options.documentation) {\n property(this, 'documentation', operation.documentation);\n property(this, 'documentationUrl', operation.documentationUrl);\n }\n\n // idempotentMembers only tracks top-level input shapes\n memoizedProperty(this, 'idempotentMembers', function() {\n var idempotentMembers = [];\n var input = self.input;\n var members = input.members;\n if (!input.members) {\n return idempotentMembers;\n }\n for (var name in members) {\n if (!members.hasOwnProperty(name)) {\n continue;\n }\n if (members[name].isIdempotent === true) {\n idempotentMembers.push(name);\n }\n }\n return idempotentMembers;\n });\n\n memoizedProperty(this, 'hasEventOutput', function() {\n var output = self.output;\n return hasEventStream(output);\n });\n}\n\nfunction hasEventStream(topLevelShape) {\n var members = topLevelShape.members;\n var payload = topLevelShape.payload;\n\n if (!topLevelShape.members) {\n return false;\n }\n\n if (payload) {\n var payloadMember = members[payload];\n return payloadMember.isEventStream;\n }\n\n // check if any member is an event stream\n for (var name in members) {\n if (!members.hasOwnProperty(name)) {\n if (members[name].isEventStream === true) {\n return true;\n }\n }\n }\n return false;\n}\n\n/**\n * @api private\n */\nmodule.exports = Operation;\n","var property = require('../util').property;\n\nfunction Paginator(name, paginator) {\n property(this, 'inputToken', paginator.input_token);\n property(this, 'limitKey', paginator.limit_key);\n property(this, 'moreResults', paginator.more_results);\n property(this, 'outputToken', paginator.output_token);\n property(this, 'resultKey', paginator.result_key);\n}\n\n/**\n * @api private\n */\nmodule.exports = Paginator;\n","var util = require('../util');\nvar property = util.property;\n\nfunction ResourceWaiter(name, waiter, options) {\n options = options || {};\n property(this, 'name', name);\n property(this, 'api', options.api, false);\n\n if (waiter.operation) {\n property(this, 'operation', util.string.lowerFirst(waiter.operation));\n }\n\n var self = this;\n var keys = [\n 'type',\n 'description',\n 'delay',\n 'maxAttempts',\n 'acceptors'\n ];\n\n keys.forEach(function(key) {\n var value = waiter[key];\n if (value) {\n property(self, key, value);\n }\n });\n}\n\n/**\n * @api private\n */\nmodule.exports = ResourceWaiter;\n","var Collection = require('./collection');\n\nvar util = require('../util');\n\nfunction property(obj, name, value) {\n if (value !== null && value !== undefined) {\n util.property.apply(this, arguments);\n }\n}\n\nfunction memoizedProperty(obj, name) {\n if (!obj.constructor.prototype[name]) {\n util.memoizedProperty.apply(this, arguments);\n }\n}\n\nfunction Shape(shape, options, memberName) {\n options = options || {};\n\n property(this, 'shape', shape.shape);\n property(this, 'api', options.api, false);\n property(this, 'type', shape.type);\n property(this, 'enum', shape.enum);\n property(this, 'min', shape.min);\n property(this, 'max', shape.max);\n property(this, 'pattern', shape.pattern);\n property(this, 'location', shape.location || this.location || 'body');\n property(this, 'name', this.name || shape.xmlName || shape.queryName ||\n shape.locationName || memberName);\n property(this, 'isStreaming', shape.streaming || this.isStreaming || false);\n property(this, 'requiresLength', shape.requiresLength, false);\n property(this, 'isComposite', shape.isComposite || false);\n property(this, 'isShape', true, false);\n property(this, 'isQueryName', Boolean(shape.queryName), false);\n property(this, 'isLocationName', Boolean(shape.locationName), false);\n property(this, 'isIdempotent', shape.idempotencyToken === true);\n property(this, 'isJsonValue', shape.jsonvalue === true);\n property(this, 'isSensitive', shape.sensitive === true || shape.prototype && shape.prototype.sensitive === true);\n property(this, 'isEventStream', Boolean(shape.eventstream), false);\n property(this, 'isEvent', Boolean(shape.event), false);\n property(this, 'isEventPayload', Boolean(shape.eventpayload), false);\n property(this, 'isEventHeader', Boolean(shape.eventheader), false);\n property(this, 'isTimestampFormatSet', Boolean(shape.timestampFormat) || shape.prototype && shape.prototype.isTimestampFormatSet === true, false);\n property(this, 'endpointDiscoveryId', Boolean(shape.endpointdiscoveryid), false);\n property(this, 'hostLabel', Boolean(shape.hostLabel), false);\n\n if (options.documentation) {\n property(this, 'documentation', shape.documentation);\n property(this, 'documentationUrl', shape.documentationUrl);\n }\n\n if (shape.xmlAttribute) {\n property(this, 'isXmlAttribute', shape.xmlAttribute || false);\n }\n\n // type conversion and parsing\n property(this, 'defaultValue', null);\n this.toWireFormat = function(value) {\n if (value === null || value === undefined) return '';\n return value;\n };\n this.toType = function(value) { return value; };\n}\n\n/**\n * @api private\n */\nShape.normalizedTypes = {\n character: 'string',\n double: 'float',\n long: 'integer',\n short: 'integer',\n biginteger: 'integer',\n bigdecimal: 'float',\n blob: 'binary'\n};\n\n/**\n * @api private\n */\nShape.types = {\n 'structure': StructureShape,\n 'list': ListShape,\n 'map': MapShape,\n 'boolean': BooleanShape,\n 'timestamp': TimestampShape,\n 'float': FloatShape,\n 'integer': IntegerShape,\n 'string': StringShape,\n 'base64': Base64Shape,\n 'binary': BinaryShape\n};\n\nShape.resolve = function resolve(shape, options) {\n if (shape.shape) {\n var refShape = options.api.shapes[shape.shape];\n if (!refShape) {\n throw new Error('Cannot find shape reference: ' + shape.shape);\n }\n\n return refShape;\n } else {\n return null;\n }\n};\n\nShape.create = function create(shape, options, memberName) {\n if (shape.isShape) return shape;\n\n var refShape = Shape.resolve(shape, options);\n if (refShape) {\n var filteredKeys = Object.keys(shape);\n if (!options.documentation) {\n filteredKeys = filteredKeys.filter(function(name) {\n return !name.match(/documentation/);\n });\n }\n\n // create an inline shape with extra members\n var InlineShape = function() {\n refShape.constructor.call(this, shape, options, memberName);\n };\n InlineShape.prototype = refShape;\n return new InlineShape();\n } else {\n // set type if not set\n if (!shape.type) {\n if (shape.members) shape.type = 'structure';\n else if (shape.member) shape.type = 'list';\n else if (shape.key) shape.type = 'map';\n else shape.type = 'string';\n }\n\n // normalize types\n var origType = shape.type;\n if (Shape.normalizedTypes[shape.type]) {\n shape.type = Shape.normalizedTypes[shape.type];\n }\n\n if (Shape.types[shape.type]) {\n return new Shape.types[shape.type](shape, options, memberName);\n } else {\n throw new Error('Unrecognized shape type: ' + origType);\n }\n }\n};\n\nfunction CompositeShape(shape) {\n Shape.apply(this, arguments);\n property(this, 'isComposite', true);\n\n if (shape.flattened) {\n property(this, 'flattened', shape.flattened || false);\n }\n}\n\nfunction StructureShape(shape, options) {\n var self = this;\n var requiredMap = null, firstInit = !this.isShape;\n\n CompositeShape.apply(this, arguments);\n\n if (firstInit) {\n property(this, 'defaultValue', function() { return {}; });\n property(this, 'members', {});\n property(this, 'memberNames', []);\n property(this, 'required', []);\n property(this, 'isRequired', function() { return false; });\n property(this, 'isDocument', Boolean(shape.document));\n }\n\n if (shape.members) {\n property(this, 'members', new Collection(shape.members, options, function(name, member) {\n return Shape.create(member, options, name);\n }));\n memoizedProperty(this, 'memberNames', function() {\n return shape.xmlOrder || Object.keys(shape.members);\n });\n\n if (shape.event) {\n memoizedProperty(this, 'eventPayloadMemberName', function() {\n var members = self.members;\n var memberNames = self.memberNames;\n // iterate over members to find ones that are event payloads\n for (var i = 0, iLen = memberNames.length; i < iLen; i++) {\n if (members[memberNames[i]].isEventPayload) {\n return memberNames[i];\n }\n }\n });\n\n memoizedProperty(this, 'eventHeaderMemberNames', function() {\n var members = self.members;\n var memberNames = self.memberNames;\n var eventHeaderMemberNames = [];\n // iterate over members to find ones that are event headers\n for (var i = 0, iLen = memberNames.length; i < iLen; i++) {\n if (members[memberNames[i]].isEventHeader) {\n eventHeaderMemberNames.push(memberNames[i]);\n }\n }\n return eventHeaderMemberNames;\n });\n }\n }\n\n if (shape.required) {\n property(this, 'required', shape.required);\n property(this, 'isRequired', function(name) {\n if (!requiredMap) {\n requiredMap = {};\n for (var i = 0; i < shape.required.length; i++) {\n requiredMap[shape.required[i]] = true;\n }\n }\n\n return requiredMap[name];\n }, false, true);\n }\n\n property(this, 'resultWrapper', shape.resultWrapper || null);\n\n if (shape.payload) {\n property(this, 'payload', shape.payload);\n }\n\n if (typeof shape.xmlNamespace === 'string') {\n property(this, 'xmlNamespaceUri', shape.xmlNamespace);\n } else if (typeof shape.xmlNamespace === 'object') {\n property(this, 'xmlNamespacePrefix', shape.xmlNamespace.prefix);\n property(this, 'xmlNamespaceUri', shape.xmlNamespace.uri);\n }\n}\n\nfunction ListShape(shape, options) {\n var self = this, firstInit = !this.isShape;\n CompositeShape.apply(this, arguments);\n\n if (firstInit) {\n property(this, 'defaultValue', function() { return []; });\n }\n\n if (shape.member) {\n memoizedProperty(this, 'member', function() {\n return Shape.create(shape.member, options);\n });\n }\n\n if (this.flattened) {\n var oldName = this.name;\n memoizedProperty(this, 'name', function() {\n return self.member.name || oldName;\n });\n }\n}\n\nfunction MapShape(shape, options) {\n var firstInit = !this.isShape;\n CompositeShape.apply(this, arguments);\n\n if (firstInit) {\n property(this, 'defaultValue', function() { return {}; });\n property(this, 'key', Shape.create({type: 'string'}, options));\n property(this, 'value', Shape.create({type: 'string'}, options));\n }\n\n if (shape.key) {\n memoizedProperty(this, 'key', function() {\n return Shape.create(shape.key, options);\n });\n }\n if (shape.value) {\n memoizedProperty(this, 'value', function() {\n return Shape.create(shape.value, options);\n });\n }\n}\n\nfunction TimestampShape(shape) {\n var self = this;\n Shape.apply(this, arguments);\n\n if (shape.timestampFormat) {\n property(this, 'timestampFormat', shape.timestampFormat);\n } else if (self.isTimestampFormatSet && this.timestampFormat) {\n property(this, 'timestampFormat', this.timestampFormat);\n } else if (this.location === 'header') {\n property(this, 'timestampFormat', 'rfc822');\n } else if (this.location === 'querystring') {\n property(this, 'timestampFormat', 'iso8601');\n } else if (this.api) {\n switch (this.api.protocol) {\n case 'json':\n case 'rest-json':\n property(this, 'timestampFormat', 'unixTimestamp');\n break;\n case 'rest-xml':\n case 'query':\n case 'ec2':\n property(this, 'timestampFormat', 'iso8601');\n break;\n }\n }\n\n this.toType = function(value) {\n if (value === null || value === undefined) return null;\n if (typeof value.toUTCString === 'function') return value;\n return typeof value === 'string' || typeof value === 'number' ?\n util.date.parseTimestamp(value) : null;\n };\n\n this.toWireFormat = function(value) {\n return util.date.format(value, self.timestampFormat);\n };\n}\n\nfunction StringShape() {\n Shape.apply(this, arguments);\n\n var nullLessProtocols = ['rest-xml', 'query', 'ec2'];\n this.toType = function(value) {\n value = this.api && nullLessProtocols.indexOf(this.api.protocol) > -1 ?\n value || '' : value;\n if (this.isJsonValue) {\n return JSON.parse(value);\n }\n\n return value && typeof value.toString === 'function' ?\n value.toString() : value;\n };\n\n this.toWireFormat = function(value) {\n return this.isJsonValue ? JSON.stringify(value) : value;\n };\n}\n\nfunction FloatShape() {\n Shape.apply(this, arguments);\n\n this.toType = function(value) {\n if (value === null || value === undefined) return null;\n return parseFloat(value);\n };\n this.toWireFormat = this.toType;\n}\n\nfunction IntegerShape() {\n Shape.apply(this, arguments);\n\n this.toType = function(value) {\n if (value === null || value === undefined) return null;\n return parseInt(value, 10);\n };\n this.toWireFormat = this.toType;\n}\n\nfunction BinaryShape() {\n Shape.apply(this, arguments);\n this.toType = function(value) {\n var buf = util.base64.decode(value);\n if (this.isSensitive && util.isNode() && typeof util.Buffer.alloc === 'function') {\n /* Node.js can create a Buffer that is not isolated.\n * i.e. buf.byteLength !== buf.buffer.byteLength\n * This means that the sensitive data is accessible to anyone with access to buf.buffer.\n * If this is the node shared Buffer, then other code within this process _could_ find this secret.\n * Copy sensitive data to an isolated Buffer and zero the sensitive data.\n * While this is safe to do here, copying this code somewhere else may produce unexpected results.\n */\n var secureBuf = util.Buffer.alloc(buf.length, buf);\n buf.fill(0);\n buf = secureBuf;\n }\n return buf;\n };\n this.toWireFormat = util.base64.encode;\n}\n\nfunction Base64Shape() {\n BinaryShape.apply(this, arguments);\n}\n\nfunction BooleanShape() {\n Shape.apply(this, arguments);\n\n this.toType = function(value) {\n if (typeof value === 'boolean') return value;\n if (value === null || value === undefined) return null;\n return value === 'true';\n };\n}\n\n/**\n * @api private\n */\nShape.shapes = {\n StructureShape: StructureShape,\n ListShape: ListShape,\n MapShape: MapShape,\n StringShape: StringShape,\n BooleanShape: BooleanShape,\n Base64Shape: Base64Shape\n};\n\n/**\n * @api private\n */\nmodule.exports = Shape;\n","var util = require('./util');\n\nvar region_utils = require('./region/utils');\nvar isFipsRegion = region_utils.isFipsRegion;\nvar getRealRegion = region_utils.getRealRegion;\n\nutil.isBrowser = function() { return false; };\nutil.isNode = function() { return true; };\n\n// node.js specific modules\nutil.crypto.lib = require('crypto');\nutil.Buffer = require('buffer').Buffer;\nutil.domain = require('domain');\nutil.stream = require('stream');\nutil.url = require('url');\nutil.querystring = require('querystring');\nutil.environment = 'nodejs';\nutil.createEventStream = util.stream.Readable ?\n require('./event-stream/streaming-create-event-stream').createEventStream : require('./event-stream/buffered-create-event-stream').createEventStream;\nutil.realClock = require('./realclock/nodeClock');\nutil.clientSideMonitoring = {\n Publisher: require('./publisher').Publisher,\n configProvider: require('./publisher/configuration'),\n};\nutil.iniLoader = require('./shared-ini').iniLoader;\nutil.getSystemErrorName = require('util').getSystemErrorName;\n\nutil.loadConfig = function(options) {\n var envValue = options.environmentVariableSelector(process.env);\n if (envValue !== undefined) {\n return envValue;\n }\n\n var configFile = {};\n try {\n configFile = util.iniLoader ? util.iniLoader.loadFrom({\n isConfig: true,\n filename: process.env[util.sharedConfigFileEnv]\n }) : {};\n } catch (e) {}\n var sharedFileConfig = configFile[\n process.env.AWS_PROFILE || util.defaultProfile\n ] || {};\n var configValue = options.configFileSelector(sharedFileConfig);\n if (configValue !== undefined) {\n return configValue;\n }\n\n if (typeof options.default === 'function') {\n return options.default();\n }\n return options.default;\n};\n\nvar AWS;\n\n/**\n * @api private\n */\nmodule.exports = AWS = require('./core');\n\nrequire('./credentials');\nrequire('./credentials/credential_provider_chain');\nrequire('./credentials/temporary_credentials');\nrequire('./credentials/chainable_temporary_credentials');\nrequire('./credentials/web_identity_credentials');\nrequire('./credentials/cognito_identity_credentials');\nrequire('./credentials/saml_credentials');\nrequire('./credentials/process_credentials');\n\n// Load the xml2js XML parser\nAWS.XML.Parser = require('./xml/node_parser');\n\n// Load Node HTTP client\nrequire('./http/node');\n\nrequire('./shared-ini/ini-loader');\n\n// Load custom credential providers\nrequire('./credentials/token_file_web_identity_credentials');\nrequire('./credentials/ec2_metadata_credentials');\nrequire('./credentials/remote_credentials');\nrequire('./credentials/ecs_credentials');\nrequire('./credentials/environment_credentials');\nrequire('./credentials/file_system_credentials');\nrequire('./credentials/shared_ini_file_credentials');\nrequire('./credentials/process_credentials');\n\n// Setup default chain providers\n// If this changes, please update documentation for\n// AWS.CredentialProviderChain.defaultProviders in\n// credentials/credential_provider_chain.js\nAWS.CredentialProviderChain.defaultProviders = [\n function () { return new AWS.EnvironmentCredentials('AWS'); },\n function () { return new AWS.EnvironmentCredentials('AMAZON'); },\n function () { return new AWS.SharedIniFileCredentials(); },\n function () { return new AWS.ECSCredentials(); },\n function () { return new AWS.ProcessCredentials(); },\n function () { return new AWS.TokenFileWebIdentityCredentials(); },\n function () { return new AWS.EC2MetadataCredentials(); }\n];\n\nvar getRegion = function() {\n var env = process.env;\n var region = env.AWS_REGION || env.AMAZON_REGION;\n if (env[AWS.util.configOptInEnv]) {\n var toCheck = [\n {filename: env[AWS.util.sharedCredentialsFileEnv]},\n {isConfig: true, filename: env[AWS.util.sharedConfigFileEnv]}\n ];\n var iniLoader = AWS.util.iniLoader;\n while (!region && toCheck.length) {\n var configFile = {};\n var fileInfo = toCheck.shift();\n try {\n configFile = iniLoader.loadFrom(fileInfo);\n } catch (err) {\n if (fileInfo.isConfig) throw err;\n }\n var profile = configFile[env.AWS_PROFILE || AWS.util.defaultProfile];\n region = profile && profile.region;\n }\n }\n return region;\n};\n\nvar getBooleanValue = function(value) {\n return value === 'true' ? true: value === 'false' ? false: undefined;\n};\n\nvar USE_FIPS_ENDPOINT_CONFIG_OPTIONS = {\n environmentVariableSelector: function(env) {\n return getBooleanValue(env['AWS_USE_FIPS_ENDPOINT']);\n },\n configFileSelector: function(profile) {\n return getBooleanValue(profile['use_fips_endpoint']);\n },\n default: false,\n};\n\nvar USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS = {\n environmentVariableSelector: function(env) {\n return getBooleanValue(env['AWS_USE_DUALSTACK_ENDPOINT']);\n },\n configFileSelector: function(profile) {\n return getBooleanValue(profile['use_dualstack_endpoint']);\n },\n default: false,\n};\n\n// Update configuration keys\nAWS.util.update(AWS.Config.prototype.keys, {\n credentials: function () {\n var credentials = null;\n new AWS.CredentialProviderChain([\n function () { return new AWS.EnvironmentCredentials('AWS'); },\n function () { return new AWS.EnvironmentCredentials('AMAZON'); },\n function () { return new AWS.SharedIniFileCredentials({ disableAssumeRole: true }); }\n ]).resolve(function(err, creds) {\n if (!err) credentials = creds;\n });\n return credentials;\n },\n credentialProvider: function() {\n return new AWS.CredentialProviderChain();\n },\n logger: function () {\n return process.env.AWSJS_DEBUG ? console : null;\n },\n region: function() {\n var region = getRegion();\n return region ? getRealRegion(region): undefined;\n },\n useFipsEndpoint: function() {\n var region = getRegion();\n return isFipsRegion(region)\n ? true\n : util.loadConfig(USE_FIPS_ENDPOINT_CONFIG_OPTIONS);\n },\n useDualstackEndpoint: function() {\n return util.loadConfig(USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS);\n }\n});\n\n// Reset configuration\nAWS.config = new AWS.Config();\n","var AWS = require('./core');\n\n/**\n * @api private\n */\nAWS.ParamValidator = AWS.util.inherit({\n /**\n * Create a new validator object.\n *\n * @param validation [Boolean|map] whether input parameters should be\n * validated against the operation description before sending the\n * request. Pass a map to enable any of the following specific\n * validation features:\n *\n * * **min** [Boolean] — Validates that a value meets the min\n * constraint. This is enabled by default when paramValidation is set\n * to `true`.\n * * **max** [Boolean] — Validates that a value meets the max\n * constraint.\n * * **pattern** [Boolean] — Validates that a string value matches a\n * regular expression.\n * * **enum** [Boolean] — Validates that a string value matches one\n * of the allowable enum values.\n */\n constructor: function ParamValidator(validation) {\n if (validation === true || validation === undefined) {\n validation = {'min': true};\n }\n this.validation = validation;\n },\n\n validate: function validate(shape, params, context) {\n this.errors = [];\n this.validateMember(shape, params || {}, context || 'params');\n\n if (this.errors.length > 1) {\n var msg = this.errors.join('\\n* ');\n msg = 'There were ' + this.errors.length +\n ' validation errors:\\n* ' + msg;\n throw AWS.util.error(new Error(msg),\n {code: 'MultipleValidationErrors', errors: this.errors});\n } else if (this.errors.length === 1) {\n throw this.errors[0];\n } else {\n return true;\n }\n },\n\n fail: function fail(code, message) {\n this.errors.push(AWS.util.error(new Error(message), {code: code}));\n },\n\n validateStructure: function validateStructure(shape, params, context) {\n if (shape.isDocument) return true;\n\n this.validateType(params, context, ['object'], 'structure');\n var paramName;\n for (var i = 0; shape.required && i < shape.required.length; i++) {\n paramName = shape.required[i];\n var value = params[paramName];\n if (value === undefined || value === null) {\n this.fail('MissingRequiredParameter',\n 'Missing required key \\'' + paramName + '\\' in ' + context);\n }\n }\n\n // validate hash members\n for (paramName in params) {\n if (!Object.prototype.hasOwnProperty.call(params, paramName)) continue;\n\n var paramValue = params[paramName],\n memberShape = shape.members[paramName];\n\n if (memberShape !== undefined) {\n var memberContext = [context, paramName].join('.');\n this.validateMember(memberShape, paramValue, memberContext);\n } else if (paramValue !== undefined && paramValue !== null) {\n this.fail('UnexpectedParameter',\n 'Unexpected key \\'' + paramName + '\\' found in ' + context);\n }\n }\n\n return true;\n },\n\n validateMember: function validateMember(shape, param, context) {\n switch (shape.type) {\n case 'structure':\n return this.validateStructure(shape, param, context);\n case 'list':\n return this.validateList(shape, param, context);\n case 'map':\n return this.validateMap(shape, param, context);\n default:\n return this.validateScalar(shape, param, context);\n }\n },\n\n validateList: function validateList(shape, params, context) {\n if (this.validateType(params, context, [Array])) {\n this.validateRange(shape, params.length, context, 'list member count');\n // validate array members\n for (var i = 0; i < params.length; i++) {\n this.validateMember(shape.member, params[i], context + '[' + i + ']');\n }\n }\n },\n\n validateMap: function validateMap(shape, params, context) {\n if (this.validateType(params, context, ['object'], 'map')) {\n // Build up a count of map members to validate range traits.\n var mapCount = 0;\n for (var param in params) {\n if (!Object.prototype.hasOwnProperty.call(params, param)) continue;\n // Validate any map key trait constraints\n this.validateMember(shape.key, param,\n context + '[key=\\'' + param + '\\']');\n this.validateMember(shape.value, params[param],\n context + '[\\'' + param + '\\']');\n mapCount++;\n }\n this.validateRange(shape, mapCount, context, 'map member count');\n }\n },\n\n validateScalar: function validateScalar(shape, value, context) {\n switch (shape.type) {\n case null:\n case undefined:\n case 'string':\n return this.validateString(shape, value, context);\n case 'base64':\n case 'binary':\n return this.validatePayload(value, context);\n case 'integer':\n case 'float':\n return this.validateNumber(shape, value, context);\n case 'boolean':\n return this.validateType(value, context, ['boolean']);\n case 'timestamp':\n return this.validateType(value, context, [Date,\n /^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?Z$/, 'number'],\n 'Date object, ISO-8601 string, or a UNIX timestamp');\n default:\n return this.fail('UnkownType', 'Unhandled type ' +\n shape.type + ' for ' + context);\n }\n },\n\n validateString: function validateString(shape, value, context) {\n var validTypes = ['string'];\n if (shape.isJsonValue) {\n validTypes = validTypes.concat(['number', 'object', 'boolean']);\n }\n if (value !== null && this.validateType(value, context, validTypes)) {\n this.validateEnum(shape, value, context);\n this.validateRange(shape, value.length, context, 'string length');\n this.validatePattern(shape, value, context);\n this.validateUri(shape, value, context);\n }\n },\n\n validateUri: function validateUri(shape, value, context) {\n if (shape['location'] === 'uri') {\n if (value.length === 0) {\n this.fail('UriParameterError', 'Expected uri parameter to have length >= 1,'\n + ' but found \"' + value +'\" for ' + context);\n }\n }\n },\n\n validatePattern: function validatePattern(shape, value, context) {\n if (this.validation['pattern'] && shape['pattern'] !== undefined) {\n if (!(new RegExp(shape['pattern'])).test(value)) {\n this.fail('PatternMatchError', 'Provided value \"' + value + '\" '\n + 'does not match regex pattern /' + shape['pattern'] + '/ for '\n + context);\n }\n }\n },\n\n validateRange: function validateRange(shape, value, context, descriptor) {\n if (this.validation['min']) {\n if (shape['min'] !== undefined && value < shape['min']) {\n this.fail('MinRangeError', 'Expected ' + descriptor + ' >= '\n + shape['min'] + ', but found ' + value + ' for ' + context);\n }\n }\n if (this.validation['max']) {\n if (shape['max'] !== undefined && value > shape['max']) {\n this.fail('MaxRangeError', 'Expected ' + descriptor + ' <= '\n + shape['max'] + ', but found ' + value + ' for ' + context);\n }\n }\n },\n\n validateEnum: function validateRange(shape, value, context) {\n if (this.validation['enum'] && shape['enum'] !== undefined) {\n // Fail if the string value is not present in the enum list\n if (shape['enum'].indexOf(value) === -1) {\n this.fail('EnumError', 'Found string value of ' + value + ', but '\n + 'expected ' + shape['enum'].join('|') + ' for ' + context);\n }\n }\n },\n\n validateType: function validateType(value, context, acceptedTypes, type) {\n // We will not log an error for null or undefined, but we will return\n // false so that callers know that the expected type was not strictly met.\n if (value === null || value === undefined) return false;\n\n var foundInvalidType = false;\n for (var i = 0; i < acceptedTypes.length; i++) {\n if (typeof acceptedTypes[i] === 'string') {\n if (typeof value === acceptedTypes[i]) return true;\n } else if (acceptedTypes[i] instanceof RegExp) {\n if ((value || '').toString().match(acceptedTypes[i])) return true;\n } else {\n if (value instanceof acceptedTypes[i]) return true;\n if (AWS.util.isType(value, acceptedTypes[i])) return true;\n if (!type && !foundInvalidType) acceptedTypes = acceptedTypes.slice();\n acceptedTypes[i] = AWS.util.typeName(acceptedTypes[i]);\n }\n foundInvalidType = true;\n }\n\n var acceptedType = type;\n if (!acceptedType) {\n acceptedType = acceptedTypes.join(', ').replace(/,([^,]+)$/, ', or$1');\n }\n\n var vowel = acceptedType.match(/^[aeiou]/i) ? 'n' : '';\n this.fail('InvalidParameterType', 'Expected ' + context + ' to be a' +\n vowel + ' ' + acceptedType);\n return false;\n },\n\n validateNumber: function validateNumber(shape, value, context) {\n if (value === null || value === undefined) return;\n if (typeof value === 'string') {\n var castedValue = parseFloat(value);\n if (castedValue.toString() === value) value = castedValue;\n }\n if (this.validateType(value, context, ['number'])) {\n this.validateRange(shape, value, context, 'numeric value');\n }\n },\n\n validatePayload: function validatePayload(value, context) {\n if (value === null || value === undefined) return;\n if (typeof value === 'string') return;\n if (value && typeof value.byteLength === 'number') return; // typed arrays\n if (AWS.util.isNode()) { // special check for buffer/stream in Node.js\n var Stream = AWS.util.stream.Stream;\n if (AWS.util.Buffer.isBuffer(value) || value instanceof Stream) return;\n } else {\n if (typeof Blob !== void 0 && value instanceof Blob) return;\n }\n\n var types = ['Buffer', 'Stream', 'File', 'Blob', 'ArrayBuffer', 'DataView'];\n if (value) {\n for (var i = 0; i < types.length; i++) {\n if (AWS.util.isType(value, types[i])) return;\n if (AWS.util.typeName(value.constructor) === types[i]) return;\n }\n }\n\n this.fail('InvalidParameterType', 'Expected ' + context + ' to be a ' +\n 'string, Buffer, Stream, Blob, or typed array object');\n }\n});\n","var AWS = require('../core');\nvar rest = AWS.Protocol.Rest;\n\n/**\n * A presigner object can be used to generate presigned urls for the Polly service.\n */\nAWS.Polly.Presigner = AWS.util.inherit({\n /**\n * Creates a presigner object with a set of configuration options.\n *\n * @option options params [map] An optional map of parameters to bind to every\n * request sent by this service object.\n * @option options service [AWS.Polly] An optional pre-configured instance\n * of the AWS.Polly service object to use for requests. The object may\n * bound parameters used by the presigner.\n * @see AWS.Polly.constructor\n */\n constructor: function Signer(options) {\n options = options || {};\n this.options = options;\n this.service = options.service;\n this.bindServiceObject(options);\n this._operations = {};\n },\n\n /**\n * @api private\n */\n bindServiceObject: function bindServiceObject(options) {\n options = options || {};\n if (!this.service) {\n this.service = new AWS.Polly(options);\n } else {\n var config = AWS.util.copy(this.service.config);\n this.service = new this.service.constructor.__super__(config);\n this.service.config.params = AWS.util.merge(this.service.config.params || {}, options.params);\n }\n },\n\n /**\n * @api private\n */\n modifyInputMembers: function modifyInputMembers(input) {\n // make copies of the input so we don't overwrite the api\n // need to be careful to copy anything we access/modify\n var modifiedInput = AWS.util.copy(input);\n modifiedInput.members = AWS.util.copy(input.members);\n AWS.util.each(input.members, function(name, member) {\n modifiedInput.members[name] = AWS.util.copy(member);\n // update location and locationName\n if (!member.location || member.location === 'body') {\n modifiedInput.members[name].location = 'querystring';\n modifiedInput.members[name].locationName = name;\n }\n });\n return modifiedInput;\n },\n\n /**\n * @api private\n */\n convertPostToGet: function convertPostToGet(req) {\n // convert method\n req.httpRequest.method = 'GET';\n\n var operation = req.service.api.operations[req.operation];\n // get cached operation input first\n var input = this._operations[req.operation];\n if (!input) {\n // modify the original input\n this._operations[req.operation] = input = this.modifyInputMembers(operation.input);\n }\n\n var uri = rest.generateURI(req.httpRequest.endpoint.path, operation.httpPath, input, req.params);\n\n req.httpRequest.path = uri;\n req.httpRequest.body = '';\n\n // don't need these headers on a GET request\n delete req.httpRequest.headers['Content-Length'];\n delete req.httpRequest.headers['Content-Type'];\n },\n\n /**\n * @overload getSynthesizeSpeechUrl(params = {}, [expires = 3600], [callback])\n * Generate a presigned url for {AWS.Polly.synthesizeSpeech}.\n * @note You must ensure that you have static or previously resolved\n * credentials if you call this method synchronously (with no callback),\n * otherwise it may not properly sign the request. If you cannot guarantee\n * this (you are using an asynchronous credential provider, i.e., EC2\n * IAM roles), you should always call this method with an asynchronous\n * callback.\n * @param params [map] parameters to pass to the operation. See the {AWS.Polly.synthesizeSpeech}\n * operation for the expected operation parameters.\n * @param expires [Integer] (3600) the number of seconds to expire the pre-signed URL operation in.\n * Defaults to 1 hour.\n * @return [string] if called synchronously (with no callback), returns the signed URL.\n * @return [null] nothing is returned if a callback is provided.\n * @callback callback function (err, url)\n * If a callback is supplied, it is called when a signed URL has been generated.\n * @param err [Error] the error object returned from the presigner.\n * @param url [String] the signed URL.\n * @see AWS.Polly.synthesizeSpeech\n */\n getSynthesizeSpeechUrl: function getSynthesizeSpeechUrl(params, expires, callback) {\n var self = this;\n var request = this.service.makeRequest('synthesizeSpeech', params);\n // remove existing build listeners\n request.removeAllListeners('build');\n request.on('build', function(req) {\n self.convertPostToGet(req);\n });\n return request.presign(expires, callback);\n }\n});\n","var util = require('../util');\nvar AWS = require('../core');\n\n/**\n * Prepend prefix defined by API model to endpoint that's already\n * constructed. This feature does not apply to operations using\n * endpoint discovery and can be disabled.\n * @api private\n */\nfunction populateHostPrefix(request) {\n var enabled = request.service.config.hostPrefixEnabled;\n if (!enabled) return request;\n var operationModel = request.service.api.operations[request.operation];\n //don't marshal host prefix when operation has endpoint discovery traits\n if (hasEndpointDiscover(request)) return request;\n if (operationModel.endpoint && operationModel.endpoint.hostPrefix) {\n var hostPrefixNotation = operationModel.endpoint.hostPrefix;\n var hostPrefix = expandHostPrefix(hostPrefixNotation, request.params, operationModel.input);\n prependEndpointPrefix(request.httpRequest.endpoint, hostPrefix);\n validateHostname(request.httpRequest.endpoint.hostname);\n }\n return request;\n}\n\n/**\n * @api private\n */\nfunction hasEndpointDiscover(request) {\n var api = request.service.api;\n var operationModel = api.operations[request.operation];\n var isEndpointOperation = api.endpointOperation && (api.endpointOperation === util.string.lowerFirst(operationModel.name));\n return (operationModel.endpointDiscoveryRequired !== 'NULL' || isEndpointOperation === true);\n}\n\n/**\n * @api private\n */\nfunction expandHostPrefix(hostPrefixNotation, params, shape) {\n util.each(shape.members, function(name, member) {\n if (member.hostLabel === true) {\n if (typeof params[name] !== 'string' || params[name] === '') {\n throw util.error(new Error(), {\n message: 'Parameter ' + name + ' should be a non-empty string.',\n code: 'InvalidParameter'\n });\n }\n var regex = new RegExp('\\\\{' + name + '\\\\}', 'g');\n hostPrefixNotation = hostPrefixNotation.replace(regex, params[name]);\n }\n });\n return hostPrefixNotation;\n}\n\n/**\n * @api private\n */\nfunction prependEndpointPrefix(endpoint, prefix) {\n if (endpoint.host) {\n endpoint.host = prefix + endpoint.host;\n }\n if (endpoint.hostname) {\n endpoint.hostname = prefix + endpoint.hostname;\n }\n}\n\n/**\n * @api private\n */\nfunction validateHostname(hostname) {\n var labels = hostname.split('.');\n //Reference: https://tools.ietf.org/html/rfc1123#section-2\n var hostPattern = /^[a-zA-Z0-9]{1}$|^[a-zA-Z0-9][a-zA-Z0-9\\-]*[a-zA-Z0-9]$/;\n util.arrayEach(labels, function(label) {\n if (!label.length || label.length < 1 || label.length > 63) {\n throw util.error(new Error(), {\n code: 'ValidationError',\n message: 'Hostname label length should be between 1 to 63 characters, inclusive.'\n });\n }\n if (!hostPattern.test(label)) {\n throw AWS.util.error(new Error(),\n {code: 'ValidationError', message: label + ' is not hostname compatible.'});\n }\n });\n}\n\nmodule.exports = {\n populateHostPrefix: populateHostPrefix\n};\n","var util = require('../util');\nvar JsonBuilder = require('../json/builder');\nvar JsonParser = require('../json/parser');\nvar populateHostPrefix = require('./helpers').populateHostPrefix;\n\nfunction buildRequest(req) {\n var httpRequest = req.httpRequest;\n var api = req.service.api;\n var target = api.targetPrefix + '.' + api.operations[req.operation].name;\n var version = api.jsonVersion || '1.0';\n var input = api.operations[req.operation].input;\n var builder = new JsonBuilder();\n\n if (version === 1) version = '1.0';\n httpRequest.body = builder.build(req.params || {}, input);\n httpRequest.headers['Content-Type'] = 'application/x-amz-json-' + version;\n httpRequest.headers['X-Amz-Target'] = target;\n\n populateHostPrefix(req);\n}\n\nfunction extractError(resp) {\n var error = {};\n var httpResponse = resp.httpResponse;\n\n error.code = httpResponse.headers['x-amzn-errortype'] || 'UnknownError';\n if (typeof error.code === 'string') {\n error.code = error.code.split(':')[0];\n }\n\n if (httpResponse.body.length > 0) {\n try {\n var e = JSON.parse(httpResponse.body.toString());\n var code = e.__type || e.code || e.Code;\n if (code) {\n error.code = code.split('#').pop();\n }\n if (error.code === 'RequestEntityTooLarge') {\n error.message = 'Request body must be less than 1 MB';\n } else {\n error.message = (e.message || e.Message || null);\n }\n } catch (e) {\n error.statusCode = httpResponse.statusCode;\n error.message = httpResponse.statusMessage;\n }\n } else {\n error.statusCode = httpResponse.statusCode;\n error.message = httpResponse.statusCode.toString();\n }\n\n resp.error = util.error(new Error(), error);\n}\n\nfunction extractData(resp) {\n var body = resp.httpResponse.body.toString() || '{}';\n if (resp.request.service.config.convertResponseTypes === false) {\n resp.data = JSON.parse(body);\n } else {\n var operation = resp.request.service.api.operations[resp.request.operation];\n var shape = operation.output || {};\n var parser = new JsonParser();\n resp.data = parser.parse(body, shape);\n }\n}\n\n/**\n * @api private\n */\nmodule.exports = {\n buildRequest: buildRequest,\n extractError: extractError,\n extractData: extractData\n};\n","var AWS = require('../core');\nvar util = require('../util');\nvar QueryParamSerializer = require('../query/query_param_serializer');\nvar Shape = require('../model/shape');\nvar populateHostPrefix = require('./helpers').populateHostPrefix;\n\nfunction buildRequest(req) {\n var operation = req.service.api.operations[req.operation];\n var httpRequest = req.httpRequest;\n httpRequest.headers['Content-Type'] =\n 'application/x-www-form-urlencoded; charset=utf-8';\n httpRequest.params = {\n Version: req.service.api.apiVersion,\n Action: operation.name\n };\n\n // convert the request parameters into a list of query params,\n // e.g. Deeply.NestedParam.0.Name=value\n var builder = new QueryParamSerializer();\n builder.serialize(req.params, operation.input, function(name, value) {\n httpRequest.params[name] = value;\n });\n httpRequest.body = util.queryParamsToString(httpRequest.params);\n\n populateHostPrefix(req);\n}\n\nfunction extractError(resp) {\n var data, body = resp.httpResponse.body.toString();\n if (body.match('= 0 ? '&' : '?');\n var parts = [];\n util.arrayEach(Object.keys(queryString).sort(), function(key) {\n if (!Array.isArray(queryString[key])) {\n queryString[key] = [queryString[key]];\n }\n for (var i = 0; i < queryString[key].length; i++) {\n parts.push(util.uriEscape(String(key)) + '=' + queryString[key][i]);\n }\n });\n uri += parts.join('&');\n }\n\n return uri;\n}\n\nfunction populateURI(req) {\n var operation = req.service.api.operations[req.operation];\n var input = operation.input;\n\n var uri = generateURI(req.httpRequest.endpoint.path, operation.httpPath, input, req.params);\n req.httpRequest.path = uri;\n}\n\nfunction populateHeaders(req) {\n var operation = req.service.api.operations[req.operation];\n util.each(operation.input.members, function (name, member) {\n var value = req.params[name];\n if (value === null || value === undefined) return;\n\n if (member.location === 'headers' && member.type === 'map') {\n util.each(value, function(key, memberValue) {\n req.httpRequest.headers[member.name + key] = memberValue;\n });\n } else if (member.location === 'header') {\n value = member.toWireFormat(value).toString();\n if (member.isJsonValue) {\n value = util.base64.encode(value);\n }\n req.httpRequest.headers[member.name] = value;\n }\n });\n}\n\nfunction buildRequest(req) {\n populateMethod(req);\n populateURI(req);\n populateHeaders(req);\n populateHostPrefix(req);\n}\n\nfunction extractError() {\n}\n\nfunction extractData(resp) {\n var req = resp.request;\n var data = {};\n var r = resp.httpResponse;\n var operation = req.service.api.operations[req.operation];\n var output = operation.output;\n\n // normalize headers names to lower-cased keys for matching\n var headers = {};\n util.each(r.headers, function (k, v) {\n headers[k.toLowerCase()] = v;\n });\n\n util.each(output.members, function(name, member) {\n var header = (member.name || name).toLowerCase();\n if (member.location === 'headers' && member.type === 'map') {\n data[name] = {};\n var location = member.isLocationName ? member.name : '';\n var pattern = new RegExp('^' + location + '(.+)', 'i');\n util.each(r.headers, function (k, v) {\n var result = k.match(pattern);\n if (result !== null) {\n data[name][result[1]] = v;\n }\n });\n } else if (member.location === 'header') {\n if (headers[header] !== undefined) {\n var value = member.isJsonValue ?\n util.base64.decode(headers[header]) :\n headers[header];\n data[name] = member.toType(value);\n }\n } else if (member.location === 'statusCode') {\n data[name] = parseInt(r.statusCode, 10);\n }\n });\n\n resp.data = data;\n}\n\n/**\n * @api private\n */\nmodule.exports = {\n buildRequest: buildRequest,\n extractError: extractError,\n extractData: extractData,\n generateURI: generateURI\n};\n","var util = require('../util');\nvar Rest = require('./rest');\nvar Json = require('./json');\nvar JsonBuilder = require('../json/builder');\nvar JsonParser = require('../json/parser');\n\nfunction populateBody(req) {\n var builder = new JsonBuilder();\n var input = req.service.api.operations[req.operation].input;\n\n if (input.payload) {\n var params = {};\n var payloadShape = input.members[input.payload];\n params = req.params[input.payload];\n\n if (payloadShape.type === 'structure') {\n req.httpRequest.body = builder.build(params || {}, payloadShape);\n applyContentTypeHeader(req);\n } else if (params !== undefined) {\n // non-JSON payload\n req.httpRequest.body = params;\n if (payloadShape.type === 'binary' || payloadShape.isStreaming) {\n applyContentTypeHeader(req, true);\n }\n }\n } else {\n req.httpRequest.body = builder.build(req.params, input);\n applyContentTypeHeader(req);\n }\n}\n\nfunction applyContentTypeHeader(req, isBinary) {\n if (!req.httpRequest.headers['Content-Type']) {\n var type = isBinary ? 'binary/octet-stream' : 'application/json';\n req.httpRequest.headers['Content-Type'] = type;\n }\n}\n\nfunction buildRequest(req) {\n Rest.buildRequest(req);\n\n // never send body payload on GET/HEAD/DELETE\n if (['GET', 'HEAD', 'DELETE'].indexOf(req.httpRequest.method) < 0) {\n populateBody(req);\n }\n}\n\nfunction extractError(resp) {\n Json.extractError(resp);\n}\n\nfunction extractData(resp) {\n Rest.extractData(resp);\n\n var req = resp.request;\n var operation = req.service.api.operations[req.operation];\n var rules = req.service.api.operations[req.operation].output || {};\n var parser;\n var hasEventOutput = operation.hasEventOutput;\n\n if (rules.payload) {\n var payloadMember = rules.members[rules.payload];\n var body = resp.httpResponse.body;\n if (payloadMember.isEventStream) {\n parser = new JsonParser();\n resp.data[payload] = util.createEventStream(\n AWS.HttpClient.streamsApiVersion === 2 ? resp.httpResponse.stream : body,\n parser,\n payloadMember\n );\n } else if (payloadMember.type === 'structure' || payloadMember.type === 'list') {\n var parser = new JsonParser();\n resp.data[rules.payload] = parser.parse(body, payloadMember);\n } else if (payloadMember.type === 'binary' || payloadMember.isStreaming) {\n resp.data[rules.payload] = body;\n } else {\n resp.data[rules.payload] = payloadMember.toType(body);\n }\n } else {\n var data = resp.data;\n Json.extractData(resp);\n resp.data = util.merge(data, resp.data);\n }\n}\n\n/**\n * @api private\n */\nmodule.exports = {\n buildRequest: buildRequest,\n extractError: extractError,\n extractData: extractData\n};\n","var AWS = require('../core');\nvar util = require('../util');\nvar Rest = require('./rest');\n\nfunction populateBody(req) {\n var input = req.service.api.operations[req.operation].input;\n var builder = new AWS.XML.Builder();\n var params = req.params;\n\n var payload = input.payload;\n if (payload) {\n var payloadMember = input.members[payload];\n params = params[payload];\n if (params === undefined) return;\n\n if (payloadMember.type === 'structure') {\n var rootElement = payloadMember.name;\n req.httpRequest.body = builder.toXML(params, payloadMember, rootElement, true);\n } else { // non-xml payload\n req.httpRequest.body = params;\n }\n } else {\n req.httpRequest.body = builder.toXML(params, input, input.name ||\n input.shape || util.string.upperFirst(req.operation) + 'Request');\n }\n}\n\nfunction buildRequest(req) {\n Rest.buildRequest(req);\n\n // never send body payload on GET/HEAD\n if (['GET', 'HEAD'].indexOf(req.httpRequest.method) < 0) {\n populateBody(req);\n }\n}\n\nfunction extractError(resp) {\n Rest.extractError(resp);\n\n var data;\n try {\n data = new AWS.XML.Parser().parse(resp.httpResponse.body.toString());\n } catch (e) {\n data = {\n Code: resp.httpResponse.statusCode,\n Message: resp.httpResponse.statusMessage\n };\n }\n\n if (data.Errors) data = data.Errors;\n if (data.Error) data = data.Error;\n if (data.Code) {\n resp.error = util.error(new Error(), {\n code: data.Code,\n message: data.Message\n });\n } else {\n resp.error = util.error(new Error(), {\n code: resp.httpResponse.statusCode,\n message: null\n });\n }\n}\n\nfunction extractData(resp) {\n Rest.extractData(resp);\n\n var parser;\n var req = resp.request;\n var body = resp.httpResponse.body;\n var operation = req.service.api.operations[req.operation];\n var output = operation.output;\n\n var hasEventOutput = operation.hasEventOutput;\n\n var payload = output.payload;\n if (payload) {\n var payloadMember = output.members[payload];\n if (payloadMember.isEventStream) {\n parser = new AWS.XML.Parser();\n resp.data[payload] = util.createEventStream(\n AWS.HttpClient.streamsApiVersion === 2 ? resp.httpResponse.stream : resp.httpResponse.body,\n parser,\n payloadMember\n );\n } else if (payloadMember.type === 'structure') {\n parser = new AWS.XML.Parser();\n resp.data[payload] = parser.parse(body.toString(), payloadMember);\n } else if (payloadMember.type === 'binary' || payloadMember.isStreaming) {\n resp.data[payload] = body;\n } else {\n resp.data[payload] = payloadMember.toType(body);\n }\n } else if (body.length > 0) {\n parser = new AWS.XML.Parser();\n var data = parser.parse(body.toString(), output);\n util.update(resp.data, data);\n }\n}\n\n/**\n * @api private\n */\nmodule.exports = {\n buildRequest: buildRequest,\n extractError: extractError,\n extractData: extractData\n};\n","var AWS = require('../core');\n\n/**\n * Resolve client-side monitoring configuration from either environmental variables\n * or shared config file. Configurations from environmental variables have higher priority\n * than those from shared config file. The resolver will try to read the shared config file\n * no matter whether the AWS_SDK_LOAD_CONFIG variable is set.\n * @api private\n */\nfunction resolveMonitoringConfig() {\n var config = {\n port: undefined,\n clientId: undefined,\n enabled: undefined,\n host: undefined\n };\n if (fromEnvironment(config) || fromConfigFile(config)) return toJSType(config);\n return toJSType(config);\n}\n\n/**\n * Resolve configurations from environmental variables.\n * @param {object} client side monitoring config object needs to be resolved\n * @returns {boolean} whether resolving configurations is done\n * @api private\n */\nfunction fromEnvironment(config) {\n config.port = config.port || process.env.AWS_CSM_PORT;\n config.enabled = config.enabled || process.env.AWS_CSM_ENABLED;\n config.clientId = config.clientId || process.env.AWS_CSM_CLIENT_ID;\n config.host = config.host || process.env.AWS_CSM_HOST;\n return config.port && config.enabled && config.clientId && config.host ||\n ['false', '0'].indexOf(config.enabled) >= 0; //no need to read shared config file if explicitely disabled\n}\n\n/**\n * Resolve cofigurations from shared config file with specified role name\n * @param {object} client side monitoring config object needs to be resolved\n * @returns {boolean} whether resolving configurations is done\n * @api private\n */\nfunction fromConfigFile(config) {\n var sharedFileConfig;\n try {\n var configFile = AWS.util.iniLoader.loadFrom({\n isConfig: true,\n filename: process.env[AWS.util.sharedConfigFileEnv]\n });\n var sharedFileConfig = configFile[\n process.env.AWS_PROFILE || AWS.util.defaultProfile\n ];\n } catch (err) {\n return false;\n }\n if (!sharedFileConfig) return config;\n config.port = config.port || sharedFileConfig.csm_port;\n config.enabled = config.enabled || sharedFileConfig.csm_enabled;\n config.clientId = config.clientId || sharedFileConfig.csm_client_id;\n config.host = config.host || sharedFileConfig.csm_host;\n return config.port && config.enabled && config.clientId && config.host;\n}\n\n/**\n * Transfer the resolved configuration value to proper types: port as number, enabled\n * as boolean and clientId as string. The 'enabled' flag is valued to false when set\n * to 'false' or '0'.\n * @param {object} resolved client side monitoring config\n * @api private\n */\nfunction toJSType(config) {\n //config.XXX is either undefined or string\n var falsyNotations = ['false', '0', undefined];\n if (!config.enabled || falsyNotations.indexOf(config.enabled.toLowerCase()) >= 0) {\n config.enabled = false;\n } else {\n config.enabled = true;\n }\n config.port = config.port ? parseInt(config.port, 10) : undefined;\n return config;\n}\n\nmodule.exports = resolveMonitoringConfig;\n","var util = require('../core').util;\nvar dgram = require('dgram');\nvar stringToBuffer = util.buffer.toBuffer;\n\nvar MAX_MESSAGE_SIZE = 1024 * 8; // 8 KB\n\n/**\n * Publishes metrics via udp.\n * @param {object} options Paramters for Publisher constructor\n * @param {number} [options.port = 31000] Port number\n * @param {string} [options.clientId = ''] Client Identifier\n * @param {boolean} [options.enabled = false] enable sending metrics datagram\n * @api private\n */\nfunction Publisher(options) {\n // handle configuration\n options = options || {};\n this.enabled = options.enabled || false;\n this.port = options.port || 31000;\n this.clientId = options.clientId || '';\n this.address = options.host || '127.0.0.1';\n if (this.clientId.length > 255) {\n // ClientId has a max length of 255\n this.clientId = this.clientId.substr(0, 255);\n }\n this.messagesInFlight = 0;\n}\n\nPublisher.prototype.fieldsToTrim = {\n UserAgent: 256,\n SdkException: 128,\n SdkExceptionMessage: 512,\n AwsException: 128,\n AwsExceptionMessage: 512,\n FinalSdkException: 128,\n FinalSdkExceptionMessage: 512,\n FinalAwsException: 128,\n FinalAwsExceptionMessage: 512\n\n};\n\n/**\n * Trims fields that have a specified max length.\n * @param {object} event ApiCall or ApiCallAttempt event.\n * @returns {object}\n * @api private\n */\nPublisher.prototype.trimFields = function(event) {\n var trimmableFields = Object.keys(this.fieldsToTrim);\n for (var i = 0, iLen = trimmableFields.length; i < iLen; i++) {\n var field = trimmableFields[i];\n if (event.hasOwnProperty(field)) {\n var maxLength = this.fieldsToTrim[field];\n var value = event[field];\n if (value && value.length > maxLength) {\n event[field] = value.substr(0, maxLength);\n }\n }\n }\n return event;\n};\n\n/**\n * Handles ApiCall and ApiCallAttempt events.\n * @param {Object} event apiCall or apiCallAttempt event.\n * @api private\n */\nPublisher.prototype.eventHandler = function(event) {\n // set the clientId\n event.ClientId = this.clientId;\n\n this.trimFields(event);\n\n var message = stringToBuffer(JSON.stringify(event));\n if (!this.enabled || message.length > MAX_MESSAGE_SIZE) {\n // drop the message if publisher not enabled or it is too large\n return;\n }\n\n this.publishDatagram(message);\n};\n\n/**\n * Publishes message to an agent.\n * @param {Buffer} message JSON message to send to agent.\n * @api private\n */\nPublisher.prototype.publishDatagram = function(message) {\n var self = this;\n var client = this.getClient();\n\n this.messagesInFlight++;\n this.client.send(message, 0, message.length, this.port, this.address, function(err, bytes) {\n if (--self.messagesInFlight <= 0) {\n // destroy existing client so the event loop isn't kept open\n self.destroyClient();\n }\n });\n};\n\n/**\n * Returns an existing udp socket, or creates one if it doesn't already exist.\n * @api private\n */\nPublisher.prototype.getClient = function() {\n if (!this.client) {\n this.client = dgram.createSocket('udp4');\n }\n return this.client;\n};\n\n/**\n * Destroys the udp socket.\n * @api private\n */\nPublisher.prototype.destroyClient = function() {\n if (this.client) {\n this.client.close();\n this.client = void 0;\n }\n};\n\nmodule.exports = {\n Publisher: Publisher\n};\n","var util = require('../util');\n\nfunction QueryParamSerializer() {\n}\n\nQueryParamSerializer.prototype.serialize = function(params, shape, fn) {\n serializeStructure('', params, shape, fn);\n};\n\nfunction ucfirst(shape) {\n if (shape.isQueryName || shape.api.protocol !== 'ec2') {\n return shape.name;\n } else {\n return shape.name[0].toUpperCase() + shape.name.substr(1);\n }\n}\n\nfunction serializeStructure(prefix, struct, rules, fn) {\n util.each(rules.members, function(name, member) {\n var value = struct[name];\n if (value === null || value === undefined) return;\n\n var memberName = ucfirst(member);\n memberName = prefix ? prefix + '.' + memberName : memberName;\n serializeMember(memberName, value, member, fn);\n });\n}\n\nfunction serializeMap(name, map, rules, fn) {\n var i = 1;\n util.each(map, function (key, value) {\n var prefix = rules.flattened ? '.' : '.entry.';\n var position = prefix + (i++) + '.';\n var keyName = position + (rules.key.name || 'key');\n var valueName = position + (rules.value.name || 'value');\n serializeMember(name + keyName, key, rules.key, fn);\n serializeMember(name + valueName, value, rules.value, fn);\n });\n}\n\nfunction serializeList(name, list, rules, fn) {\n var memberRules = rules.member || {};\n\n if (list.length === 0) {\n fn.call(this, name, null);\n return;\n }\n\n util.arrayEach(list, function (v, n) {\n var suffix = '.' + (n + 1);\n if (rules.api.protocol === 'ec2') {\n // Do nothing for EC2\n suffix = suffix + ''; // make linter happy\n } else if (rules.flattened) {\n if (memberRules.name) {\n var parts = name.split('.');\n parts.pop();\n parts.push(ucfirst(memberRules));\n name = parts.join('.');\n }\n } else {\n suffix = '.' + (memberRules.name ? memberRules.name : 'member') + suffix;\n }\n serializeMember(name + suffix, v, memberRules, fn);\n });\n}\n\nfunction serializeMember(name, value, rules, fn) {\n if (value === null || value === undefined) return;\n if (rules.type === 'structure') {\n serializeStructure(name, value, rules, fn);\n } else if (rules.type === 'list') {\n serializeList(name, value, rules, fn);\n } else if (rules.type === 'map') {\n serializeMap(name, value, rules, fn);\n } else {\n fn(name, rules.toWireFormat(value).toString());\n }\n}\n\n/**\n * @api private\n */\nmodule.exports = QueryParamSerializer;\n","var AWS = require('../core');\n\n/**\n * @api private\n */\nvar service = null;\n\n/**\n * @api private\n */\nvar api = {\n signatureVersion: 'v4',\n signingName: 'rds-db',\n operations: {}\n};\n\n/**\n * @api private\n */\nvar requiredAuthTokenOptions = {\n region: 'string',\n hostname: 'string',\n port: 'number',\n username: 'string'\n};\n\n/**\n * A signer object can be used to generate an auth token to a database.\n */\nAWS.RDS.Signer = AWS.util.inherit({\n /**\n * Creates a signer object can be used to generate an auth token.\n *\n * @option options credentials [AWS.Credentials] the AWS credentials\n * to sign requests with. Uses the default credential provider chain\n * if not specified.\n * @option options hostname [String] the hostname of the database to connect to.\n * @option options port [Number] the port number the database is listening on.\n * @option options region [String] the region the database is located in.\n * @option options username [String] the username to login as.\n * @example Passing in options to constructor\n * var signer = new AWS.RDS.Signer({\n * credentials: new AWS.SharedIniFileCredentials({profile: 'default'}),\n * region: 'us-east-1',\n * hostname: 'db.us-east-1.rds.amazonaws.com',\n * port: 8000,\n * username: 'name'\n * });\n */\n constructor: function Signer(options) {\n this.options = options || {};\n },\n\n /**\n * @api private\n * Strips the protocol from a url.\n */\n convertUrlToAuthToken: function convertUrlToAuthToken(url) {\n // we are always using https as the protocol\n var protocol = 'https://';\n if (url.indexOf(protocol) === 0) {\n return url.substring(protocol.length);\n }\n },\n\n /**\n * @overload getAuthToken(options = {}, [callback])\n * Generate an auth token to a database.\n * @note You must ensure that you have static or previously resolved\n * credentials if you call this method synchronously (with no callback),\n * otherwise it may not properly sign the request. If you cannot guarantee\n * this (you are using an asynchronous credential provider, i.e., EC2\n * IAM roles), you should always call this method with an asynchronous\n * callback.\n *\n * @param options [map] The fields to use when generating an auth token.\n * Any options specified here will be merged on top of any options passed\n * to AWS.RDS.Signer:\n *\n * * **credentials** (AWS.Credentials) — the AWS credentials\n * to sign requests with. Uses the default credential provider chain\n * if not specified.\n * * **hostname** (String) — the hostname of the database to connect to.\n * * **port** (Number) — the port number the database is listening on.\n * * **region** (String) — the region the database is located in.\n * * **username** (String) — the username to login as.\n * @return [String] if called synchronously (with no callback), returns the\n * auth token.\n * @return [null] nothing is returned if a callback is provided.\n * @callback callback function (err, token)\n * If a callback is supplied, it is called when an auth token has been generated.\n * @param err [Error] the error object returned from the signer.\n * @param token [String] the auth token.\n *\n * @example Generating an auth token synchronously\n * var signer = new AWS.RDS.Signer({\n * // configure options\n * region: 'us-east-1',\n * username: 'default',\n * hostname: 'db.us-east-1.amazonaws.com',\n * port: 8000\n * });\n * var token = signer.getAuthToken({\n * // these options are merged with those defined when creating the signer, overriding in the case of a duplicate option\n * // credentials are not specified here or when creating the signer, so default credential provider will be used\n * username: 'test' // overriding username\n * });\n * @example Generating an auth token asynchronously\n * var signer = new AWS.RDS.Signer({\n * // configure options\n * region: 'us-east-1',\n * username: 'default',\n * hostname: 'db.us-east-1.amazonaws.com',\n * port: 8000\n * });\n * signer.getAuthToken({\n * // these options are merged with those defined when creating the signer, overriding in the case of a duplicate option\n * // credentials are not specified here or when creating the signer, so default credential provider will be used\n * username: 'test' // overriding username\n * }, function(err, token) {\n * if (err) {\n * // handle error\n * } else {\n * // use token\n * }\n * });\n *\n */\n getAuthToken: function getAuthToken(options, callback) {\n if (typeof options === 'function' && callback === undefined) {\n callback = options;\n options = {};\n }\n var self = this;\n var hasCallback = typeof callback === 'function';\n // merge options with existing options\n options = AWS.util.merge(this.options, options);\n // validate options\n var optionsValidation = this.validateAuthTokenOptions(options);\n if (optionsValidation !== true) {\n if (hasCallback) {\n return callback(optionsValidation, null);\n }\n throw optionsValidation;\n }\n\n // 15 minutes\n var expires = 900;\n // create service to generate a request from\n var serviceOptions = {\n region: options.region,\n endpoint: new AWS.Endpoint(options.hostname + ':' + options.port),\n paramValidation: false,\n signatureVersion: 'v4'\n };\n if (options.credentials) {\n serviceOptions.credentials = options.credentials;\n }\n service = new AWS.Service(serviceOptions);\n // ensure the SDK is using sigv4 signing (config is not enough)\n service.api = api;\n\n var request = service.makeRequest();\n // add listeners to request to properly build auth token\n this.modifyRequestForAuthToken(request, options);\n\n if (hasCallback) {\n request.presign(expires, function(err, url) {\n if (url) {\n url = self.convertUrlToAuthToken(url);\n }\n callback(err, url);\n });\n } else {\n var url = request.presign(expires);\n return this.convertUrlToAuthToken(url);\n }\n },\n\n /**\n * @api private\n * Modifies a request to allow the presigner to generate an auth token.\n */\n modifyRequestForAuthToken: function modifyRequestForAuthToken(request, options) {\n request.on('build', request.buildAsGet);\n var httpRequest = request.httpRequest;\n httpRequest.body = AWS.util.queryParamsToString({\n Action: 'connect',\n DBUser: options.username\n });\n },\n\n /**\n * @api private\n * Validates that the options passed in contain all the keys with values of the correct type that\n * are needed to generate an auth token.\n */\n validateAuthTokenOptions: function validateAuthTokenOptions(options) {\n // iterate over all keys in options\n var message = '';\n options = options || {};\n for (var key in requiredAuthTokenOptions) {\n if (!Object.prototype.hasOwnProperty.call(requiredAuthTokenOptions, key)) {\n continue;\n }\n if (typeof options[key] !== requiredAuthTokenOptions[key]) {\n message += 'option \\'' + key + '\\' should have been type \\'' + requiredAuthTokenOptions[key] + '\\', was \\'' + typeof options[key] + '\\'.\\n';\n }\n }\n if (message.length) {\n return AWS.util.error(new Error(), {\n code: 'InvalidParameter',\n message: message\n });\n }\n return true;\n }\n});\n","module.exports = {\n //provide realtime clock for performance measurement\n now: function now() {\n var second = process.hrtime();\n return second[0] * 1000 + (second[1] / 1000000);\n }\n};\n","function isFipsRegion(region) {\n return typeof region === 'string' && (region.startsWith('fips-') || region.endsWith('-fips'));\n}\n\nfunction isGlobalRegion(region) {\n return typeof region === 'string' && ['aws-global', 'aws-us-gov-global'].includes(region);\n}\n\nfunction getRealRegion(region) {\n return ['fips-aws-global', 'aws-fips', 'aws-global'].includes(region)\n ? 'us-east-1'\n : ['fips-aws-us-gov-global', 'aws-us-gov-global'].includes(region)\n ? 'us-gov-west-1'\n : region.replace(/fips-(dkr-|prod-)?|-fips/, '');\n}\n\nmodule.exports = {\n isFipsRegion: isFipsRegion,\n isGlobalRegion: isGlobalRegion,\n getRealRegion: getRealRegion\n};\n","var util = require('./util');\nvar regionConfig = require('./region_config_data.json');\n\nfunction generateRegionPrefix(region) {\n if (!region) return null;\n var parts = region.split('-');\n if (parts.length < 3) return null;\n return parts.slice(0, parts.length - 2).join('-') + '-*';\n}\n\nfunction derivedKeys(service) {\n var region = service.config.region;\n var regionPrefix = generateRegionPrefix(region);\n var endpointPrefix = service.api.endpointPrefix;\n\n return [\n [region, endpointPrefix],\n [regionPrefix, endpointPrefix],\n [region, '*'],\n [regionPrefix, '*'],\n ['*', endpointPrefix],\n ['*', '*']\n ].map(function(item) {\n return item[0] && item[1] ? item.join('/') : null;\n });\n}\n\nfunction applyConfig(service, config) {\n util.each(config, function(key, value) {\n if (key === 'globalEndpoint') return;\n if (service.config[key] === undefined || service.config[key] === null) {\n service.config[key] = value;\n }\n });\n}\n\nfunction configureEndpoint(service) {\n var keys = derivedKeys(service);\n var useFipsEndpoint = service.config.useFipsEndpoint;\n var useDualstackEndpoint = service.config.useDualstackEndpoint;\n for (var i = 0; i < keys.length; i++) {\n var key = keys[i];\n if (!key) continue;\n\n var rules = useFipsEndpoint\n ? useDualstackEndpoint\n ? regionConfig.dualstackFipsRules\n : regionConfig.fipsRules\n : useDualstackEndpoint\n ? regionConfig.dualstackRules\n : regionConfig.rules;\n\n if (Object.prototype.hasOwnProperty.call(rules, key)) {\n var config = rules[key];\n if (typeof config === 'string') {\n config = regionConfig.patterns[config];\n }\n\n // set global endpoint\n service.isGlobalEndpoint = !!config.globalEndpoint;\n if (config.signingRegion) {\n service.signingRegion = config.signingRegion;\n }\n\n // signature version\n if (!config.signatureVersion) config.signatureVersion = 'v4';\n\n // merge config\n applyConfig(service, config);\n return;\n }\n }\n}\n\nfunction getEndpointSuffix(region) {\n var regionRegexes = {\n '^(us|eu|ap|sa|ca|me)\\\\-\\\\w+\\\\-\\\\d+$': 'amazonaws.com',\n '^cn\\\\-\\\\w+\\\\-\\\\d+$': 'amazonaws.com.cn',\n '^us\\\\-gov\\\\-\\\\w+\\\\-\\\\d+$': 'amazonaws.com',\n '^us\\\\-iso\\\\-\\\\w+\\\\-\\\\d+$': 'c2s.ic.gov',\n '^us\\\\-isob\\\\-\\\\w+\\\\-\\\\d+$': 'sc2s.sgov.gov'\n };\n var defaultSuffix = 'amazonaws.com';\n var regexes = Object.keys(regionRegexes);\n for (var i = 0; i < regexes.length; i++) {\n var regionPattern = RegExp(regexes[i]);\n var dnsSuffix = regionRegexes[regexes[i]];\n if (regionPattern.test(region)) return dnsSuffix;\n }\n return defaultSuffix;\n}\n\n/**\n * @api private\n */\nmodule.exports = {\n configureEndpoint: configureEndpoint,\n getEndpointSuffix: getEndpointSuffix,\n};\n","var AWS = require('./core');\nvar AcceptorStateMachine = require('./state_machine');\nvar inherit = AWS.util.inherit;\nvar domain = AWS.util.domain;\nvar jmespath = require('jmespath');\n\n/**\n * @api private\n */\nvar hardErrorStates = {success: 1, error: 1, complete: 1};\n\nfunction isTerminalState(machine) {\n return Object.prototype.hasOwnProperty.call(hardErrorStates, machine._asm.currentState);\n}\n\nvar fsm = new AcceptorStateMachine();\nfsm.setupStates = function() {\n var transition = function(_, done) {\n var self = this;\n self._haltHandlersOnError = false;\n\n self.emit(self._asm.currentState, function(err) {\n if (err) {\n if (isTerminalState(self)) {\n if (domain && self.domain instanceof domain.Domain) {\n err.domainEmitter = self;\n err.domain = self.domain;\n err.domainThrown = false;\n self.domain.emit('error', err);\n } else {\n throw err;\n }\n } else {\n self.response.error = err;\n done(err);\n }\n } else {\n done(self.response.error);\n }\n });\n\n };\n\n this.addState('validate', 'build', 'error', transition);\n this.addState('build', 'afterBuild', 'restart', transition);\n this.addState('afterBuild', 'sign', 'restart', transition);\n this.addState('sign', 'send', 'retry', transition);\n this.addState('retry', 'afterRetry', 'afterRetry', transition);\n this.addState('afterRetry', 'sign', 'error', transition);\n this.addState('send', 'validateResponse', 'retry', transition);\n this.addState('validateResponse', 'extractData', 'extractError', transition);\n this.addState('extractError', 'extractData', 'retry', transition);\n this.addState('extractData', 'success', 'retry', transition);\n this.addState('restart', 'build', 'error', transition);\n this.addState('success', 'complete', 'complete', transition);\n this.addState('error', 'complete', 'complete', transition);\n this.addState('complete', null, null, transition);\n};\nfsm.setupStates();\n\n/**\n * ## Asynchronous Requests\n *\n * All requests made through the SDK are asynchronous and use a\n * callback interface. Each service method that kicks off a request\n * returns an `AWS.Request` object that you can use to register\n * callbacks.\n *\n * For example, the following service method returns the request\n * object as \"request\", which can be used to register callbacks:\n *\n * ```javascript\n * // request is an AWS.Request object\n * var request = ec2.describeInstances();\n *\n * // register callbacks on request to retrieve response data\n * request.on('success', function(response) {\n * console.log(response.data);\n * });\n * ```\n *\n * When a request is ready to be sent, the {send} method should\n * be called:\n *\n * ```javascript\n * request.send();\n * ```\n *\n * Since registered callbacks may or may not be idempotent, requests should only\n * be sent once. To perform the same operation multiple times, you will need to\n * create multiple request objects, each with its own registered callbacks.\n *\n * ## Removing Default Listeners for Events\n *\n * Request objects are built with default listeners for the various events,\n * depending on the service type. In some cases, you may want to remove\n * some built-in listeners to customize behaviour. Doing this requires\n * access to the built-in listener functions, which are exposed through\n * the {AWS.EventListeners.Core} namespace. For instance, you may\n * want to customize the HTTP handler used when sending a request. In this\n * case, you can remove the built-in listener associated with the 'send'\n * event, the {AWS.EventListeners.Core.SEND} listener and add your own.\n *\n * ## Multiple Callbacks and Chaining\n *\n * You can register multiple callbacks on any request object. The\n * callbacks can be registered for different events, or all for the\n * same event. In addition, you can chain callback registration, for\n * example:\n *\n * ```javascript\n * request.\n * on('success', function(response) {\n * console.log(\"Success!\");\n * }).\n * on('error', function(error, response) {\n * console.log(\"Error!\");\n * }).\n * on('complete', function(response) {\n * console.log(\"Always!\");\n * }).\n * send();\n * ```\n *\n * The above example will print either \"Success! Always!\", or \"Error! Always!\",\n * depending on whether the request succeeded or not.\n *\n * @!attribute httpRequest\n * @readonly\n * @!group HTTP Properties\n * @return [AWS.HttpRequest] the raw HTTP request object\n * containing request headers and body information\n * sent by the service.\n *\n * @!attribute startTime\n * @readonly\n * @!group Operation Properties\n * @return [Date] the time that the request started\n *\n * @!group Request Building Events\n *\n * @!event validate(request)\n * Triggered when a request is being validated. Listeners\n * should throw an error if the request should not be sent.\n * @param request [Request] the request object being sent\n * @see AWS.EventListeners.Core.VALIDATE_CREDENTIALS\n * @see AWS.EventListeners.Core.VALIDATE_REGION\n * @example Ensuring that a certain parameter is set before sending a request\n * var req = s3.putObject(params);\n * req.on('validate', function() {\n * if (!req.params.Body.match(/^Hello\\s/)) {\n * throw new Error('Body must start with \"Hello \"');\n * }\n * });\n * req.send(function(err, data) { ... });\n *\n * @!event build(request)\n * Triggered when the request payload is being built. Listeners\n * should fill the necessary information to send the request\n * over HTTP.\n * @param (see AWS.Request~validate)\n * @example Add a custom HTTP header to a request\n * var req = s3.putObject(params);\n * req.on('build', function() {\n * req.httpRequest.headers['Custom-Header'] = 'value';\n * });\n * req.send(function(err, data) { ... });\n *\n * @!event sign(request)\n * Triggered when the request is being signed. Listeners should\n * add the correct authentication headers and/or adjust the body,\n * depending on the authentication mechanism being used.\n * @param (see AWS.Request~validate)\n *\n * @!group Request Sending Events\n *\n * @!event send(response)\n * Triggered when the request is ready to be sent. Listeners\n * should call the underlying transport layer to initiate\n * the sending of the request.\n * @param response [Response] the response object\n * @context [Request] the request object that was sent\n * @see AWS.EventListeners.Core.SEND\n *\n * @!event retry(response)\n * Triggered when a request failed and might need to be retried or redirected.\n * If the response is retryable, the listener should set the\n * `response.error.retryable` property to `true`, and optionally set\n * `response.error.retryDelay` to the millisecond delay for the next attempt.\n * In the case of a redirect, `response.error.redirect` should be set to\n * `true` with `retryDelay` set to an optional delay on the next request.\n *\n * If a listener decides that a request should not be retried,\n * it should set both `retryable` and `redirect` to false.\n *\n * Note that a retryable error will be retried at most\n * {AWS.Config.maxRetries} times (based on the service object's config).\n * Similarly, a request that is redirected will only redirect at most\n * {AWS.Config.maxRedirects} times.\n *\n * @param (see AWS.Request~send)\n * @context (see AWS.Request~send)\n * @example Adding a custom retry for a 404 response\n * request.on('retry', function(response) {\n * // this resource is not yet available, wait 10 seconds to get it again\n * if (response.httpResponse.statusCode === 404 && response.error) {\n * response.error.retryable = true; // retry this error\n * response.error.retryDelay = 10000; // wait 10 seconds\n * }\n * });\n *\n * @!group Data Parsing Events\n *\n * @!event extractError(response)\n * Triggered on all non-2xx requests so that listeners can extract\n * error details from the response body. Listeners to this event\n * should set the `response.error` property.\n * @param (see AWS.Request~send)\n * @context (see AWS.Request~send)\n *\n * @!event extractData(response)\n * Triggered in successful requests to allow listeners to\n * de-serialize the response body into `response.data`.\n * @param (see AWS.Request~send)\n * @context (see AWS.Request~send)\n *\n * @!group Completion Events\n *\n * @!event success(response)\n * Triggered when the request completed successfully.\n * `response.data` will contain the response data and\n * `response.error` will be null.\n * @param (see AWS.Request~send)\n * @context (see AWS.Request~send)\n *\n * @!event error(error, response)\n * Triggered when an error occurs at any point during the\n * request. `response.error` will contain details about the error\n * that occurred. `response.data` will be null.\n * @param error [Error] the error object containing details about\n * the error that occurred.\n * @param (see AWS.Request~send)\n * @context (see AWS.Request~send)\n *\n * @!event complete(response)\n * Triggered whenever a request cycle completes. `response.error`\n * should be checked, since the request may have failed.\n * @param (see AWS.Request~send)\n * @context (see AWS.Request~send)\n *\n * @!group HTTP Events\n *\n * @!event httpHeaders(statusCode, headers, response, statusMessage)\n * Triggered when headers are sent by the remote server\n * @param statusCode [Integer] the HTTP response code\n * @param headers [map] the response headers\n * @param (see AWS.Request~send)\n * @param statusMessage [String] A status message corresponding to the HTTP\n * response code\n * @context (see AWS.Request~send)\n *\n * @!event httpData(chunk, response)\n * Triggered when data is sent by the remote server\n * @param chunk [Buffer] the buffer data containing the next data chunk\n * from the server\n * @param (see AWS.Request~send)\n * @context (see AWS.Request~send)\n * @see AWS.EventListeners.Core.HTTP_DATA\n *\n * @!event httpUploadProgress(progress, response)\n * Triggered when the HTTP request has uploaded more data\n * @param progress [map] An object containing the `loaded` and `total` bytes\n * of the request.\n * @param (see AWS.Request~send)\n * @context (see AWS.Request~send)\n * @note This event will not be emitted in Node.js 0.8.x.\n *\n * @!event httpDownloadProgress(progress, response)\n * Triggered when the HTTP request has downloaded more data\n * @param progress [map] An object containing the `loaded` and `total` bytes\n * of the request.\n * @param (see AWS.Request~send)\n * @context (see AWS.Request~send)\n * @note This event will not be emitted in Node.js 0.8.x.\n *\n * @!event httpError(error, response)\n * Triggered when the HTTP request failed\n * @param error [Error] the error object that was thrown\n * @param (see AWS.Request~send)\n * @context (see AWS.Request~send)\n *\n * @!event httpDone(response)\n * Triggered when the server is finished sending data\n * @param (see AWS.Request~send)\n * @context (see AWS.Request~send)\n *\n * @see AWS.Response\n */\nAWS.Request = inherit({\n\n /**\n * Creates a request for an operation on a given service with\n * a set of input parameters.\n *\n * @param service [AWS.Service] the service to perform the operation on\n * @param operation [String] the operation to perform on the service\n * @param params [Object] parameters to send to the operation.\n * See the operation's documentation for the format of the\n * parameters.\n */\n constructor: function Request(service, operation, params) {\n var endpoint = service.endpoint;\n var region = service.config.region;\n var customUserAgent = service.config.customUserAgent;\n\n if (service.signingRegion) {\n region = service.signingRegion;\n } else if (service.isGlobalEndpoint) {\n region = 'us-east-1';\n }\n\n this.domain = domain && domain.active;\n this.service = service;\n this.operation = operation;\n this.params = params || {};\n this.httpRequest = new AWS.HttpRequest(endpoint, region);\n this.httpRequest.appendToUserAgent(customUserAgent);\n this.startTime = service.getSkewCorrectedDate();\n\n this.response = new AWS.Response(this);\n this._asm = new AcceptorStateMachine(fsm.states, 'validate');\n this._haltHandlersOnError = false;\n\n AWS.SequentialExecutor.call(this);\n this.emit = this.emitEvent;\n },\n\n /**\n * @!group Sending a Request\n */\n\n /**\n * @overload send(callback = null)\n * Sends the request object.\n *\n * @callback callback function(err, data)\n * If a callback is supplied, it is called when a response is returned\n * from the service.\n * @context [AWS.Request] the request object being sent.\n * @param err [Error] the error object returned from the request.\n * Set to `null` if the request is successful.\n * @param data [Object] the de-serialized data returned from\n * the request. Set to `null` if a request error occurs.\n * @example Sending a request with a callback\n * request = s3.putObject({Bucket: 'bucket', Key: 'key'});\n * request.send(function(err, data) { console.log(err, data); });\n * @example Sending a request with no callback (using event handlers)\n * request = s3.putObject({Bucket: 'bucket', Key: 'key'});\n * request.on('complete', function(response) { ... }); // register a callback\n * request.send();\n */\n send: function send(callback) {\n if (callback) {\n // append to user agent\n this.httpRequest.appendToUserAgent('callback');\n this.on('complete', function (resp) {\n callback.call(resp, resp.error, resp.data);\n });\n }\n this.runTo();\n\n return this.response;\n },\n\n /**\n * @!method promise()\n * Sends the request and returns a 'thenable' promise.\n *\n * Two callbacks can be provided to the `then` method on the returned promise.\n * The first callback will be called if the promise is fulfilled, and the second\n * callback will be called if the promise is rejected.\n * @callback fulfilledCallback function(data)\n * Called if the promise is fulfilled.\n * @param data [Object] the de-serialized data returned from the request.\n * @callback rejectedCallback function(error)\n * Called if the promise is rejected.\n * @param error [Error] the error object returned from the request.\n * @return [Promise] A promise that represents the state of the request.\n * @example Sending a request using promises.\n * var request = s3.putObject({Bucket: 'bucket', Key: 'key'});\n * var result = request.promise();\n * result.then(function(data) { ... }, function(error) { ... });\n */\n\n /**\n * @api private\n */\n build: function build(callback) {\n return this.runTo('send', callback);\n },\n\n /**\n * @api private\n */\n runTo: function runTo(state, done) {\n this._asm.runTo(state, done, this);\n return this;\n },\n\n /**\n * Aborts a request, emitting the error and complete events.\n *\n * @!macro nobrowser\n * @example Aborting a request after sending\n * var params = {\n * Bucket: 'bucket', Key: 'key',\n * Body: Buffer.alloc(1024 * 1024 * 5) // 5MB payload\n * };\n * var request = s3.putObject(params);\n * request.send(function (err, data) {\n * if (err) console.log(\"Error:\", err.code, err.message);\n * else console.log(data);\n * });\n *\n * // abort request in 1 second\n * setTimeout(request.abort.bind(request), 1000);\n *\n * // prints \"Error: RequestAbortedError Request aborted by user\"\n * @return [AWS.Request] the same request object, for chaining.\n * @since v1.4.0\n */\n abort: function abort() {\n this.removeAllListeners('validateResponse');\n this.removeAllListeners('extractError');\n this.on('validateResponse', function addAbortedError(resp) {\n resp.error = AWS.util.error(new Error('Request aborted by user'), {\n code: 'RequestAbortedError', retryable: false\n });\n });\n\n if (this.httpRequest.stream && !this.httpRequest.stream.didCallback) { // abort HTTP stream\n this.httpRequest.stream.abort();\n if (this.httpRequest._abortCallback) {\n this.httpRequest._abortCallback();\n } else {\n this.removeAllListeners('send'); // haven't sent yet, so let's not\n }\n }\n\n return this;\n },\n\n /**\n * Iterates over each page of results given a pageable request, calling\n * the provided callback with each page of data. After all pages have been\n * retrieved, the callback is called with `null` data.\n *\n * @note This operation can generate multiple requests to a service.\n * @example Iterating over multiple pages of objects in an S3 bucket\n * var pages = 1;\n * s3.listObjects().eachPage(function(err, data) {\n * if (err) return;\n * console.log(\"Page\", pages++);\n * console.log(data);\n * });\n * @example Iterating over multiple pages with an asynchronous callback\n * s3.listObjects(params).eachPage(function(err, data, done) {\n * doSomethingAsyncAndOrExpensive(function() {\n * // The next page of results isn't fetched until done is called\n * done();\n * });\n * });\n * @callback callback function(err, data, [doneCallback])\n * Called with each page of resulting data from the request. If the\n * optional `doneCallback` is provided in the function, it must be called\n * when the callback is complete.\n *\n * @param err [Error] an error object, if an error occurred.\n * @param data [Object] a single page of response data. If there is no\n * more data, this object will be `null`.\n * @param doneCallback [Function] an optional done callback. If this\n * argument is defined in the function declaration, it should be called\n * when the next page is ready to be retrieved. This is useful for\n * controlling serial pagination across asynchronous operations.\n * @return [Boolean] if the callback returns `false`, pagination will\n * stop.\n *\n * @see AWS.Request.eachItem\n * @see AWS.Response.nextPage\n * @since v1.4.0\n */\n eachPage: function eachPage(callback) {\n // Make all callbacks async-ish\n callback = AWS.util.fn.makeAsync(callback, 3);\n\n function wrappedCallback(response) {\n callback.call(response, response.error, response.data, function (result) {\n if (result === false) return;\n\n if (response.hasNextPage()) {\n response.nextPage().on('complete', wrappedCallback).send();\n } else {\n callback.call(response, null, null, AWS.util.fn.noop);\n }\n });\n }\n\n this.on('complete', wrappedCallback).send();\n },\n\n /**\n * Enumerates over individual items of a request, paging the responses if\n * necessary.\n *\n * @api experimental\n * @since v1.4.0\n */\n eachItem: function eachItem(callback) {\n var self = this;\n function wrappedCallback(err, data) {\n if (err) return callback(err, null);\n if (data === null) return callback(null, null);\n\n var config = self.service.paginationConfig(self.operation);\n var resultKey = config.resultKey;\n if (Array.isArray(resultKey)) resultKey = resultKey[0];\n var items = jmespath.search(data, resultKey);\n var continueIteration = true;\n AWS.util.arrayEach(items, function(item) {\n continueIteration = callback(null, item);\n if (continueIteration === false) {\n return AWS.util.abort;\n }\n });\n return continueIteration;\n }\n\n this.eachPage(wrappedCallback);\n },\n\n /**\n * @return [Boolean] whether the operation can return multiple pages of\n * response data.\n * @see AWS.Response.eachPage\n * @since v1.4.0\n */\n isPageable: function isPageable() {\n return this.service.paginationConfig(this.operation) ? true : false;\n },\n\n /**\n * Sends the request and converts the request object into a readable stream\n * that can be read from or piped into a writable stream.\n *\n * @note The data read from a readable stream contains only\n * the raw HTTP body contents.\n * @example Manually reading from a stream\n * request.createReadStream().on('data', function(data) {\n * console.log(\"Got data:\", data.toString());\n * });\n * @example Piping a request body into a file\n * var out = fs.createWriteStream('/path/to/outfile.jpg');\n * s3.service.getObject(params).createReadStream().pipe(out);\n * @return [Stream] the readable stream object that can be piped\n * or read from (by registering 'data' event listeners).\n * @!macro nobrowser\n */\n createReadStream: function createReadStream() {\n var streams = AWS.util.stream;\n var req = this;\n var stream = null;\n\n if (AWS.HttpClient.streamsApiVersion === 2) {\n stream = new streams.PassThrough();\n process.nextTick(function() { req.send(); });\n } else {\n stream = new streams.Stream();\n stream.readable = true;\n\n stream.sent = false;\n stream.on('newListener', function(event) {\n if (!stream.sent && event === 'data') {\n stream.sent = true;\n process.nextTick(function() { req.send(); });\n }\n });\n }\n\n this.on('error', function(err) {\n stream.emit('error', err);\n });\n\n this.on('httpHeaders', function streamHeaders(statusCode, headers, resp) {\n if (statusCode < 300) {\n req.removeListener('httpData', AWS.EventListeners.Core.HTTP_DATA);\n req.removeListener('httpError', AWS.EventListeners.Core.HTTP_ERROR);\n req.on('httpError', function streamHttpError(error) {\n resp.error = error;\n resp.error.retryable = false;\n });\n\n var shouldCheckContentLength = false;\n var expectedLen;\n if (req.httpRequest.method !== 'HEAD') {\n expectedLen = parseInt(headers['content-length'], 10);\n }\n if (expectedLen !== undefined && !isNaN(expectedLen) && expectedLen >= 0) {\n shouldCheckContentLength = true;\n var receivedLen = 0;\n }\n\n var checkContentLengthAndEmit = function checkContentLengthAndEmit() {\n if (shouldCheckContentLength && receivedLen !== expectedLen) {\n stream.emit('error', AWS.util.error(\n new Error('Stream content length mismatch. Received ' +\n receivedLen + ' of ' + expectedLen + ' bytes.'),\n { code: 'StreamContentLengthMismatch' }\n ));\n } else if (AWS.HttpClient.streamsApiVersion === 2) {\n stream.end();\n } else {\n stream.emit('end');\n }\n };\n\n var httpStream = resp.httpResponse.createUnbufferedStream();\n\n if (AWS.HttpClient.streamsApiVersion === 2) {\n if (shouldCheckContentLength) {\n var lengthAccumulator = new streams.PassThrough();\n lengthAccumulator._write = function(chunk) {\n if (chunk && chunk.length) {\n receivedLen += chunk.length;\n }\n return streams.PassThrough.prototype._write.apply(this, arguments);\n };\n\n lengthAccumulator.on('end', checkContentLengthAndEmit);\n stream.on('error', function(err) {\n shouldCheckContentLength = false;\n httpStream.unpipe(lengthAccumulator);\n lengthAccumulator.emit('end');\n lengthAccumulator.end();\n });\n httpStream.pipe(lengthAccumulator).pipe(stream, { end: false });\n } else {\n httpStream.pipe(stream);\n }\n } else {\n\n if (shouldCheckContentLength) {\n httpStream.on('data', function(arg) {\n if (arg && arg.length) {\n receivedLen += arg.length;\n }\n });\n }\n\n httpStream.on('data', function(arg) {\n stream.emit('data', arg);\n });\n httpStream.on('end', checkContentLengthAndEmit);\n }\n\n httpStream.on('error', function(err) {\n shouldCheckContentLength = false;\n stream.emit('error', err);\n });\n }\n });\n\n return stream;\n },\n\n /**\n * @param [Array,Response] args This should be the response object,\n * or an array of args to send to the event.\n * @api private\n */\n emitEvent: function emit(eventName, args, done) {\n if (typeof args === 'function') { done = args; args = null; }\n if (!done) done = function() { };\n if (!args) args = this.eventParameters(eventName, this.response);\n\n var origEmit = AWS.SequentialExecutor.prototype.emit;\n origEmit.call(this, eventName, args, function (err) {\n if (err) this.response.error = err;\n done.call(this, err);\n });\n },\n\n /**\n * @api private\n */\n eventParameters: function eventParameters(eventName) {\n switch (eventName) {\n case 'restart':\n case 'validate':\n case 'sign':\n case 'build':\n case 'afterValidate':\n case 'afterBuild':\n return [this];\n case 'error':\n return [this.response.error, this.response];\n default:\n return [this.response];\n }\n },\n\n /**\n * @api private\n */\n presign: function presign(expires, callback) {\n if (!callback && typeof expires === 'function') {\n callback = expires;\n expires = null;\n }\n return new AWS.Signers.Presign().sign(this.toGet(), expires, callback);\n },\n\n /**\n * @api private\n */\n isPresigned: function isPresigned() {\n return Object.prototype.hasOwnProperty.call(this.httpRequest.headers, 'presigned-expires');\n },\n\n /**\n * @api private\n */\n toUnauthenticated: function toUnauthenticated() {\n this._unAuthenticated = true;\n this.removeListener('validate', AWS.EventListeners.Core.VALIDATE_CREDENTIALS);\n this.removeListener('sign', AWS.EventListeners.Core.SIGN);\n return this;\n },\n\n /**\n * @api private\n */\n toGet: function toGet() {\n if (this.service.api.protocol === 'query' ||\n this.service.api.protocol === 'ec2') {\n this.removeListener('build', this.buildAsGet);\n this.addListener('build', this.buildAsGet);\n }\n return this;\n },\n\n /**\n * @api private\n */\n buildAsGet: function buildAsGet(request) {\n request.httpRequest.method = 'GET';\n request.httpRequest.path = request.service.endpoint.path +\n '?' + request.httpRequest.body;\n request.httpRequest.body = '';\n\n // don't need these headers on a GET request\n delete request.httpRequest.headers['Content-Length'];\n delete request.httpRequest.headers['Content-Type'];\n },\n\n /**\n * @api private\n */\n haltHandlersOnError: function haltHandlersOnError() {\n this._haltHandlersOnError = true;\n }\n});\n\n/**\n * @api private\n */\nAWS.Request.addPromisesToClass = function addPromisesToClass(PromiseDependency) {\n this.prototype.promise = function promise() {\n var self = this;\n // append to user agent\n this.httpRequest.appendToUserAgent('promise');\n return new PromiseDependency(function(resolve, reject) {\n self.on('complete', function(resp) {\n if (resp.error) {\n reject(resp.error);\n } else {\n // define $response property so that it is not enumerable\n // this prevents circular reference errors when stringifying the JSON object\n resolve(Object.defineProperty(\n resp.data || {},\n '$response',\n {value: resp}\n ));\n }\n });\n self.runTo();\n });\n };\n};\n\n/**\n * @api private\n */\nAWS.Request.deletePromisesFromClass = function deletePromisesFromClass() {\n delete this.prototype.promise;\n};\n\nAWS.util.addPromises(AWS.Request);\n\nAWS.util.mixin(AWS.Request, AWS.SequentialExecutor);\n","/**\n * Copyright 2012-2013 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\"). You\n * may not use this file except in compliance with the License. A copy of\n * the License is located at\n *\n * http://aws.amazon.com/apache2.0/\n *\n * or in the \"license\" file accompanying this file. This file is\n * distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF\n * ANY KIND, either express or implied. See the License for the specific\n * language governing permissions and limitations under the License.\n */\n\nvar AWS = require('./core');\nvar inherit = AWS.util.inherit;\nvar jmespath = require('jmespath');\n\n/**\n * @api private\n */\nfunction CHECK_ACCEPTORS(resp) {\n var waiter = resp.request._waiter;\n var acceptors = waiter.config.acceptors;\n var acceptorMatched = false;\n var state = 'retry';\n\n acceptors.forEach(function(acceptor) {\n if (!acceptorMatched) {\n var matcher = waiter.matchers[acceptor.matcher];\n if (matcher && matcher(resp, acceptor.expected, acceptor.argument)) {\n acceptorMatched = true;\n state = acceptor.state;\n }\n }\n });\n\n if (!acceptorMatched && resp.error) state = 'failure';\n\n if (state === 'success') {\n waiter.setSuccess(resp);\n } else {\n waiter.setError(resp, state === 'retry');\n }\n}\n\n/**\n * @api private\n */\nAWS.ResourceWaiter = inherit({\n /**\n * Waits for a given state on a service object\n * @param service [Service] the service object to wait on\n * @param state [String] the state (defined in waiter configuration) to wait\n * for.\n * @example Create a waiter for running EC2 instances\n * var ec2 = new AWS.EC2;\n * var waiter = new AWS.ResourceWaiter(ec2, 'instanceRunning');\n */\n constructor: function constructor(service, state) {\n this.service = service;\n this.state = state;\n this.loadWaiterConfig(this.state);\n },\n\n service: null,\n\n state: null,\n\n config: null,\n\n matchers: {\n path: function(resp, expected, argument) {\n try {\n var result = jmespath.search(resp.data, argument);\n } catch (err) {\n return false;\n }\n\n return jmespath.strictDeepEqual(result,expected);\n },\n\n pathAll: function(resp, expected, argument) {\n try {\n var results = jmespath.search(resp.data, argument);\n } catch (err) {\n return false;\n }\n\n if (!Array.isArray(results)) results = [results];\n var numResults = results.length;\n if (!numResults) return false;\n for (var ind = 0 ; ind < numResults; ind++) {\n if (!jmespath.strictDeepEqual(results[ind], expected)) {\n return false;\n }\n }\n return true;\n },\n\n pathAny: function(resp, expected, argument) {\n try {\n var results = jmespath.search(resp.data, argument);\n } catch (err) {\n return false;\n }\n\n if (!Array.isArray(results)) results = [results];\n var numResults = results.length;\n for (var ind = 0 ; ind < numResults; ind++) {\n if (jmespath.strictDeepEqual(results[ind], expected)) {\n return true;\n }\n }\n return false;\n },\n\n status: function(resp, expected) {\n var statusCode = resp.httpResponse.statusCode;\n return (typeof statusCode === 'number') && (statusCode === expected);\n },\n\n error: function(resp, expected) {\n if (typeof expected === 'string' && resp.error) {\n return expected === resp.error.code;\n }\n // if expected is not string, can be boolean indicating presence of error\n return expected === !!resp.error;\n }\n },\n\n listeners: new AWS.SequentialExecutor().addNamedListeners(function(add) {\n add('RETRY_CHECK', 'retry', function(resp) {\n var waiter = resp.request._waiter;\n if (resp.error && resp.error.code === 'ResourceNotReady') {\n resp.error.retryDelay = (waiter.config.delay || 0) * 1000;\n }\n });\n\n add('CHECK_OUTPUT', 'extractData', CHECK_ACCEPTORS);\n\n add('CHECK_ERROR', 'extractError', CHECK_ACCEPTORS);\n }),\n\n /**\n * @return [AWS.Request]\n */\n wait: function wait(params, callback) {\n if (typeof params === 'function') {\n callback = params; params = undefined;\n }\n\n if (params && params.$waiter) {\n params = AWS.util.copy(params);\n if (typeof params.$waiter.delay === 'number') {\n this.config.delay = params.$waiter.delay;\n }\n if (typeof params.$waiter.maxAttempts === 'number') {\n this.config.maxAttempts = params.$waiter.maxAttempts;\n }\n delete params.$waiter;\n }\n\n var request = this.service.makeRequest(this.config.operation, params);\n request._waiter = this;\n request.response.maxRetries = this.config.maxAttempts;\n request.addListeners(this.listeners);\n\n if (callback) request.send(callback);\n return request;\n },\n\n setSuccess: function setSuccess(resp) {\n resp.error = null;\n resp.data = resp.data || {};\n resp.request.removeAllListeners('extractData');\n },\n\n setError: function setError(resp, retryable) {\n resp.data = null;\n resp.error = AWS.util.error(resp.error || new Error(), {\n code: 'ResourceNotReady',\n message: 'Resource is not in the state ' + this.state,\n retryable: retryable\n });\n },\n\n /**\n * Loads waiter configuration from API configuration\n *\n * @api private\n */\n loadWaiterConfig: function loadWaiterConfig(state) {\n if (!this.service.api.waiters[state]) {\n throw new AWS.util.error(new Error(), {\n code: 'StateNotFoundError',\n message: 'State ' + state + ' not found.'\n });\n }\n\n this.config = AWS.util.copy(this.service.api.waiters[state]);\n }\n});\n","var AWS = require('./core');\nvar inherit = AWS.util.inherit;\nvar jmespath = require('jmespath');\n\n/**\n * This class encapsulates the response information\n * from a service request operation sent through {AWS.Request}.\n * The response object has two main properties for getting information\n * back from a request:\n *\n * ## The `data` property\n *\n * The `response.data` property contains the serialized object data\n * retrieved from the service request. For instance, for an\n * Amazon DynamoDB `listTables` method call, the response data might\n * look like:\n *\n * ```\n * > resp.data\n * { TableNames:\n * [ 'table1', 'table2', ... ] }\n * ```\n *\n * The `data` property can be null if an error occurs (see below).\n *\n * ## The `error` property\n *\n * In the event of a service error (or transfer error), the\n * `response.error` property will be filled with the given\n * error data in the form:\n *\n * ```\n * { code: 'SHORT_UNIQUE_ERROR_CODE',\n * message: 'Some human readable error message' }\n * ```\n *\n * In the case of an error, the `data` property will be `null`.\n * Note that if you handle events that can be in a failure state,\n * you should always check whether `response.error` is set\n * before attempting to access the `response.data` property.\n *\n * @!attribute data\n * @readonly\n * @!group Data Properties\n * @note Inside of a {AWS.Request~httpData} event, this\n * property contains a single raw packet instead of the\n * full de-serialized service response.\n * @return [Object] the de-serialized response data\n * from the service.\n *\n * @!attribute error\n * An structure containing information about a service\n * or networking error.\n * @readonly\n * @!group Data Properties\n * @note This attribute is only filled if a service or\n * networking error occurs.\n * @return [Error]\n * * code [String] a unique short code representing the\n * error that was emitted.\n * * message [String] a longer human readable error message\n * * retryable [Boolean] whether the error message is\n * retryable.\n * * statusCode [Numeric] in the case of a request that reached the service,\n * this value contains the response status code.\n * * time [Date] the date time object when the error occurred.\n * * hostname [String] set when a networking error occurs to easily\n * identify the endpoint of the request.\n * * region [String] set when a networking error occurs to easily\n * identify the region of the request.\n *\n * @!attribute requestId\n * @readonly\n * @!group Data Properties\n * @return [String] the unique request ID associated with the response.\n * Log this value when debugging requests for AWS support.\n *\n * @!attribute retryCount\n * @readonly\n * @!group Operation Properties\n * @return [Integer] the number of retries that were\n * attempted before the request was completed.\n *\n * @!attribute redirectCount\n * @readonly\n * @!group Operation Properties\n * @return [Integer] the number of redirects that were\n * followed before the request was completed.\n *\n * @!attribute httpResponse\n * @readonly\n * @!group HTTP Properties\n * @return [AWS.HttpResponse] the raw HTTP response object\n * containing the response headers and body information\n * from the server.\n *\n * @see AWS.Request\n */\nAWS.Response = inherit({\n\n /**\n * @api private\n */\n constructor: function Response(request) {\n this.request = request;\n this.data = null;\n this.error = null;\n this.retryCount = 0;\n this.redirectCount = 0;\n this.httpResponse = new AWS.HttpResponse();\n if (request) {\n this.maxRetries = request.service.numRetries();\n this.maxRedirects = request.service.config.maxRedirects;\n }\n },\n\n /**\n * Creates a new request for the next page of response data, calling the\n * callback with the page data if a callback is provided.\n *\n * @callback callback function(err, data)\n * Called when a page of data is returned from the next request.\n *\n * @param err [Error] an error object, if an error occurred in the request\n * @param data [Object] the next page of data, or null, if there are no\n * more pages left.\n * @return [AWS.Request] the request object for the next page of data\n * @return [null] if no callback is provided and there are no pages left\n * to retrieve.\n * @since v1.4.0\n */\n nextPage: function nextPage(callback) {\n var config;\n var service = this.request.service;\n var operation = this.request.operation;\n try {\n config = service.paginationConfig(operation, true);\n } catch (e) { this.error = e; }\n\n if (!this.hasNextPage()) {\n if (callback) callback(this.error, null);\n else if (this.error) throw this.error;\n return null;\n }\n\n var params = AWS.util.copy(this.request.params);\n if (!this.nextPageTokens) {\n return callback ? callback(null, null) : null;\n } else {\n var inputTokens = config.inputToken;\n if (typeof inputTokens === 'string') inputTokens = [inputTokens];\n for (var i = 0; i < inputTokens.length; i++) {\n params[inputTokens[i]] = this.nextPageTokens[i];\n }\n return service.makeRequest(this.request.operation, params, callback);\n }\n },\n\n /**\n * @return [Boolean] whether more pages of data can be returned by further\n * requests\n * @since v1.4.0\n */\n hasNextPage: function hasNextPage() {\n this.cacheNextPageTokens();\n if (this.nextPageTokens) return true;\n if (this.nextPageTokens === undefined) return undefined;\n else return false;\n },\n\n /**\n * @api private\n */\n cacheNextPageTokens: function cacheNextPageTokens() {\n if (Object.prototype.hasOwnProperty.call(this, 'nextPageTokens')) return this.nextPageTokens;\n this.nextPageTokens = undefined;\n\n var config = this.request.service.paginationConfig(this.request.operation);\n if (!config) return this.nextPageTokens;\n\n this.nextPageTokens = null;\n if (config.moreResults) {\n if (!jmespath.search(this.data, config.moreResults)) {\n return this.nextPageTokens;\n }\n }\n\n var exprs = config.outputToken;\n if (typeof exprs === 'string') exprs = [exprs];\n AWS.util.arrayEach.call(this, exprs, function (expr) {\n var output = jmespath.search(this.data, expr);\n if (output) {\n this.nextPageTokens = this.nextPageTokens || [];\n this.nextPageTokens.push(output);\n }\n });\n\n return this.nextPageTokens;\n }\n\n});\n","var AWS = require('../core');\nvar byteLength = AWS.util.string.byteLength;\nvar Buffer = AWS.util.Buffer;\n\n/**\n * The managed uploader allows for easy and efficient uploading of buffers,\n * blobs, or streams, using a configurable amount of concurrency to perform\n * multipart uploads where possible. This abstraction also enables uploading\n * streams of unknown size due to the use of multipart uploads.\n *\n * To construct a managed upload object, see the {constructor} function.\n *\n * ## Tracking upload progress\n *\n * The managed upload object can also track progress by attaching an\n * 'httpUploadProgress' listener to the upload manager. This event is similar\n * to {AWS.Request~httpUploadProgress} but groups all concurrent upload progress\n * into a single event. See {AWS.S3.ManagedUpload~httpUploadProgress} for more\n * information.\n *\n * ## Handling Multipart Cleanup\n *\n * By default, this class will automatically clean up any multipart uploads\n * when an individual part upload fails. This behavior can be disabled in order\n * to manually handle failures by setting the `leavePartsOnError` configuration\n * option to `true` when initializing the upload object.\n *\n * @!event httpUploadProgress(progress)\n * Triggered when the uploader has uploaded more data.\n * @note The `total` property may not be set if the stream being uploaded has\n * not yet finished chunking. In this case the `total` will be undefined\n * until the total stream size is known.\n * @note This event will not be emitted in Node.js 0.8.x.\n * @param progress [map] An object containing the `loaded` and `total` bytes\n * of the request and the `key` of the S3 object. Note that `total` may be undefined until the payload\n * size is known.\n * @context (see AWS.Request~send)\n */\nAWS.S3.ManagedUpload = AWS.util.inherit({\n /**\n * Creates a managed upload object with a set of configuration options.\n *\n * @note A \"Body\" parameter is required to be set prior to calling {send}.\n * @note In Node.js, sending \"Body\" as {https://nodejs.org/dist/latest/docs/api/stream.html#stream_object_mode object-mode stream}\n * may result in upload hangs. Using buffer stream is preferable.\n * @option options params [map] a map of parameters to pass to the upload\n * requests. The \"Body\" parameter is required to be specified either on\n * the service or in the params option.\n * @note ContentMD5 should not be provided when using the managed upload object.\n * Instead, setting \"computeChecksums\" to true will enable automatic ContentMD5 generation\n * by the managed upload object.\n * @option options queueSize [Number] (4) the size of the concurrent queue\n * manager to upload parts in parallel. Set to 1 for synchronous uploading\n * of parts. Note that the uploader will buffer at most queueSize * partSize\n * bytes into memory at any given time.\n * @option options partSize [Number] (5mb) the size in bytes for each\n * individual part to be uploaded. Adjust the part size to ensure the number\n * of parts does not exceed {maxTotalParts}. See {minPartSize} for the\n * minimum allowed part size.\n * @option options leavePartsOnError [Boolean] (false) whether to abort the\n * multipart upload if an error occurs. Set to true if you want to handle\n * failures manually.\n * @option options service [AWS.S3] an optional S3 service object to use for\n * requests. This object might have bound parameters used by the uploader.\n * @option options tags [Array] The tags to apply to the uploaded object.\n * Each tag should have a `Key` and `Value` keys.\n * @example Creating a default uploader for a stream object\n * var upload = new AWS.S3.ManagedUpload({\n * params: {Bucket: 'bucket', Key: 'key', Body: stream}\n * });\n * @example Creating an uploader with concurrency of 1 and partSize of 10mb\n * var upload = new AWS.S3.ManagedUpload({\n * partSize: 10 * 1024 * 1024, queueSize: 1,\n * params: {Bucket: 'bucket', Key: 'key', Body: stream}\n * });\n * @example Creating an uploader with tags\n * var upload = new AWS.S3.ManagedUpload({\n * params: {Bucket: 'bucket', Key: 'key', Body: stream},\n * tags: [{Key: 'tag1', Value: 'value1'}, {Key: 'tag2', Value: 'value2'}]\n * });\n * @see send\n */\n constructor: function ManagedUpload(options) {\n var self = this;\n AWS.SequentialExecutor.call(self);\n self.body = null;\n self.sliceFn = null;\n self.callback = null;\n self.parts = {};\n self.completeInfo = [];\n self.fillQueue = function() {\n self.callback(new Error('Unsupported body payload ' + typeof self.body));\n };\n\n self.configure(options);\n },\n\n /**\n * @api private\n */\n configure: function configure(options) {\n options = options || {};\n this.partSize = this.minPartSize;\n\n if (options.queueSize) this.queueSize = options.queueSize;\n if (options.partSize) this.partSize = options.partSize;\n if (options.leavePartsOnError) this.leavePartsOnError = true;\n if (options.tags) {\n if (!Array.isArray(options.tags)) {\n throw new Error('Tags must be specified as an array; ' +\n typeof options.tags + ' provided.');\n }\n this.tags = options.tags;\n }\n\n if (this.partSize < this.minPartSize) {\n throw new Error('partSize must be greater than ' +\n this.minPartSize);\n }\n\n this.service = options.service;\n this.bindServiceObject(options.params);\n this.validateBody();\n this.adjustTotalBytes();\n },\n\n /**\n * @api private\n */\n leavePartsOnError: false,\n\n /**\n * @api private\n */\n queueSize: 4,\n\n /**\n * @api private\n */\n partSize: null,\n\n /**\n * @readonly\n * @return [Number] the minimum number of bytes for an individual part\n * upload.\n */\n minPartSize: 1024 * 1024 * 5,\n\n /**\n * @readonly\n * @return [Number] the maximum allowed number of parts in a multipart upload.\n */\n maxTotalParts: 10000,\n\n /**\n * Initiates the managed upload for the payload.\n *\n * @callback callback function(err, data)\n * @param err [Error] an error or null if no error occurred.\n * @param data [map] The response data from the successful upload:\n * * `Location` (String) the URL of the uploaded object\n * * `ETag` (String) the ETag of the uploaded object\n * * `Bucket` (String) the bucket to which the object was uploaded\n * * `Key` (String) the key to which the object was uploaded\n * @example Sending a managed upload object\n * var params = {Bucket: 'bucket', Key: 'key', Body: stream};\n * var upload = new AWS.S3.ManagedUpload({params: params});\n * upload.send(function(err, data) {\n * console.log(err, data);\n * });\n */\n send: function(callback) {\n var self = this;\n self.failed = false;\n self.callback = callback || function(err) { if (err) throw err; };\n\n var runFill = true;\n if (self.sliceFn) {\n self.fillQueue = self.fillBuffer;\n } else if (AWS.util.isNode()) {\n var Stream = AWS.util.stream.Stream;\n if (self.body instanceof Stream) {\n runFill = false;\n self.fillQueue = self.fillStream;\n self.partBuffers = [];\n self.body.\n on('error', function(err) { self.cleanup(err); }).\n on('readable', function() { self.fillQueue(); }).\n on('end', function() {\n self.isDoneChunking = true;\n self.numParts = self.totalPartNumbers;\n self.fillQueue.call(self);\n\n if (self.isDoneChunking && self.totalPartNumbers >= 1 && self.doneParts === self.numParts) {\n self.finishMultiPart();\n }\n });\n }\n }\n\n if (runFill) self.fillQueue.call(self);\n },\n\n /**\n * @!method promise()\n * Returns a 'thenable' promise.\n *\n * Two callbacks can be provided to the `then` method on the returned promise.\n * The first callback will be called if the promise is fulfilled, and the second\n * callback will be called if the promise is rejected.\n * @callback fulfilledCallback function(data)\n * Called if the promise is fulfilled.\n * @param data [map] The response data from the successful upload:\n * `Location` (String) the URL of the uploaded object\n * `ETag` (String) the ETag of the uploaded object\n * `Bucket` (String) the bucket to which the object was uploaded\n * `Key` (String) the key to which the object was uploaded\n * @callback rejectedCallback function(err)\n * Called if the promise is rejected.\n * @param err [Error] an error or null if no error occurred.\n * @return [Promise] A promise that represents the state of the upload request.\n * @example Sending an upload request using promises.\n * var upload = s3.upload({Bucket: 'bucket', Key: 'key', Body: stream});\n * var promise = upload.promise();\n * promise.then(function(data) { ... }, function(err) { ... });\n */\n\n /**\n * Aborts a managed upload, including all concurrent upload requests.\n * @note By default, calling this function will cleanup a multipart upload\n * if one was created. To leave the multipart upload around after aborting\n * a request, configure `leavePartsOnError` to `true` in the {constructor}.\n * @note Calling {abort} in the browser environment will not abort any requests\n * that are already in flight. If a multipart upload was created, any parts\n * not yet uploaded will not be sent, and the multipart upload will be cleaned up.\n * @example Aborting an upload\n * var params = {\n * Bucket: 'bucket', Key: 'key',\n * Body: Buffer.alloc(1024 * 1024 * 25) // 25MB payload\n * };\n * var upload = s3.upload(params);\n * upload.send(function (err, data) {\n * if (err) console.log(\"Error:\", err.code, err.message);\n * else console.log(data);\n * });\n *\n * // abort request in 1 second\n * setTimeout(upload.abort.bind(upload), 1000);\n */\n abort: function() {\n var self = this;\n //abort putObject request\n if (self.isDoneChunking === true && self.totalPartNumbers === 1 && self.singlePart) {\n self.singlePart.abort();\n } else {\n self.cleanup(AWS.util.error(new Error('Request aborted by user'), {\n code: 'RequestAbortedError', retryable: false\n }));\n }\n },\n\n /**\n * @api private\n */\n validateBody: function validateBody() {\n var self = this;\n self.body = self.service.config.params.Body;\n if (typeof self.body === 'string') {\n self.body = AWS.util.buffer.toBuffer(self.body);\n } else if (!self.body) {\n throw new Error('params.Body is required');\n }\n self.sliceFn = AWS.util.arraySliceFn(self.body);\n },\n\n /**\n * @api private\n */\n bindServiceObject: function bindServiceObject(params) {\n params = params || {};\n var self = this;\n // bind parameters to new service object\n if (!self.service) {\n self.service = new AWS.S3({params: params});\n } else {\n // Create a new S3 client from the supplied client's constructor.\n var service = self.service;\n var config = AWS.util.copy(service.config);\n config.signatureVersion = service.getSignatureVersion();\n self.service = new service.constructor.__super__(config);\n self.service.config.params =\n AWS.util.merge(self.service.config.params || {}, params);\n Object.defineProperty(self.service, '_originalConfig', {\n get: function() { return service._originalConfig; },\n enumerable: false,\n configurable: true\n });\n }\n },\n\n /**\n * @api private\n */\n adjustTotalBytes: function adjustTotalBytes() {\n var self = this;\n try { // try to get totalBytes\n self.totalBytes = byteLength(self.body);\n } catch (e) { }\n\n // try to adjust partSize if we know payload length\n if (self.totalBytes) {\n var newPartSize = Math.ceil(self.totalBytes / self.maxTotalParts);\n if (newPartSize > self.partSize) self.partSize = newPartSize;\n } else {\n self.totalBytes = undefined;\n }\n },\n\n /**\n * @api private\n */\n isDoneChunking: false,\n\n /**\n * @api private\n */\n partPos: 0,\n\n /**\n * @api private\n */\n totalChunkedBytes: 0,\n\n /**\n * @api private\n */\n totalUploadedBytes: 0,\n\n /**\n * @api private\n */\n totalBytes: undefined,\n\n /**\n * @api private\n */\n numParts: 0,\n\n /**\n * @api private\n */\n totalPartNumbers: 0,\n\n /**\n * @api private\n */\n activeParts: 0,\n\n /**\n * @api private\n */\n doneParts: 0,\n\n /**\n * @api private\n */\n parts: null,\n\n /**\n * @api private\n */\n completeInfo: null,\n\n /**\n * @api private\n */\n failed: false,\n\n /**\n * @api private\n */\n multipartReq: null,\n\n /**\n * @api private\n */\n partBuffers: null,\n\n /**\n * @api private\n */\n partBufferLength: 0,\n\n /**\n * @api private\n */\n fillBuffer: function fillBuffer() {\n var self = this;\n var bodyLen = byteLength(self.body);\n\n if (bodyLen === 0) {\n self.isDoneChunking = true;\n self.numParts = 1;\n self.nextChunk(self.body);\n return;\n }\n\n while (self.activeParts < self.queueSize && self.partPos < bodyLen) {\n var endPos = Math.min(self.partPos + self.partSize, bodyLen);\n var buf = self.sliceFn.call(self.body, self.partPos, endPos);\n self.partPos += self.partSize;\n\n if (byteLength(buf) < self.partSize || self.partPos === bodyLen) {\n self.isDoneChunking = true;\n self.numParts = self.totalPartNumbers + 1;\n }\n self.nextChunk(buf);\n }\n },\n\n /**\n * @api private\n */\n fillStream: function fillStream() {\n var self = this;\n if (self.activeParts >= self.queueSize) return;\n\n var buf = self.body.read(self.partSize - self.partBufferLength) ||\n self.body.read();\n if (buf) {\n self.partBuffers.push(buf);\n self.partBufferLength += buf.length;\n self.totalChunkedBytes += buf.length;\n }\n\n if (self.partBufferLength >= self.partSize) {\n // if we have single buffer we avoid copyfull concat\n var pbuf = self.partBuffers.length === 1 ?\n self.partBuffers[0] : Buffer.concat(self.partBuffers);\n self.partBuffers = [];\n self.partBufferLength = 0;\n\n // if we have more than partSize, push the rest back on the queue\n if (pbuf.length > self.partSize) {\n var rest = pbuf.slice(self.partSize);\n self.partBuffers.push(rest);\n self.partBufferLength += rest.length;\n pbuf = pbuf.slice(0, self.partSize);\n }\n\n self.nextChunk(pbuf);\n }\n\n if (self.isDoneChunking && !self.isDoneSending) {\n // if we have single buffer we avoid copyfull concat\n pbuf = self.partBuffers.length === 1 ?\n self.partBuffers[0] : Buffer.concat(self.partBuffers);\n self.partBuffers = [];\n self.partBufferLength = 0;\n self.totalBytes = self.totalChunkedBytes;\n self.isDoneSending = true;\n\n if (self.numParts === 0 || pbuf.length > 0) {\n self.numParts++;\n self.nextChunk(pbuf);\n }\n }\n\n self.body.read(0);\n },\n\n /**\n * @api private\n */\n nextChunk: function nextChunk(chunk) {\n var self = this;\n if (self.failed) return null;\n\n var partNumber = ++self.totalPartNumbers;\n if (self.isDoneChunking && partNumber === 1) {\n var params = {Body: chunk};\n if (this.tags) {\n params.Tagging = this.getTaggingHeader();\n }\n var req = self.service.putObject(params);\n req._managedUpload = self;\n req.on('httpUploadProgress', self.progress).send(self.finishSinglePart);\n self.singlePart = req; //save the single part request\n return null;\n } else if (self.service.config.params.ContentMD5) {\n var err = AWS.util.error(new Error('The Content-MD5 you specified is invalid for multi-part uploads.'), {\n code: 'InvalidDigest', retryable: false\n });\n\n self.cleanup(err);\n return null;\n }\n\n if (self.completeInfo[partNumber] && self.completeInfo[partNumber].ETag !== null) {\n return null; // Already uploaded this part.\n }\n\n self.activeParts++;\n if (!self.service.config.params.UploadId) {\n\n if (!self.multipartReq) { // create multipart\n self.multipartReq = self.service.createMultipartUpload();\n self.multipartReq.on('success', function(resp) {\n self.service.config.params.UploadId = resp.data.UploadId;\n self.multipartReq = null;\n });\n self.queueChunks(chunk, partNumber);\n self.multipartReq.on('error', function(err) {\n self.cleanup(err);\n });\n self.multipartReq.send();\n } else {\n self.queueChunks(chunk, partNumber);\n }\n } else { // multipart is created, just send\n self.uploadPart(chunk, partNumber);\n }\n },\n\n /**\n * @api private\n */\n getTaggingHeader: function getTaggingHeader() {\n var kvPairStrings = [];\n for (var i = 0; i < this.tags.length; i++) {\n kvPairStrings.push(AWS.util.uriEscape(this.tags[i].Key) + '=' +\n AWS.util.uriEscape(this.tags[i].Value));\n }\n\n return kvPairStrings.join('&');\n },\n\n /**\n * @api private\n */\n uploadPart: function uploadPart(chunk, partNumber) {\n var self = this;\n\n var partParams = {\n Body: chunk,\n ContentLength: AWS.util.string.byteLength(chunk),\n PartNumber: partNumber\n };\n\n var partInfo = {ETag: null, PartNumber: partNumber};\n self.completeInfo[partNumber] = partInfo;\n\n var req = self.service.uploadPart(partParams);\n self.parts[partNumber] = req;\n req._lastUploadedBytes = 0;\n req._managedUpload = self;\n req.on('httpUploadProgress', self.progress);\n req.send(function(err, data) {\n delete self.parts[partParams.PartNumber];\n self.activeParts--;\n\n if (!err && (!data || !data.ETag)) {\n var message = 'No access to ETag property on response.';\n if (AWS.util.isBrowser()) {\n message += ' Check CORS configuration to expose ETag header.';\n }\n\n err = AWS.util.error(new Error(message), {\n code: 'ETagMissing', retryable: false\n });\n }\n if (err) return self.cleanup(err);\n //prevent sending part being returned twice (https://github.com/aws/aws-sdk-js/issues/2304)\n if (self.completeInfo[partNumber] && self.completeInfo[partNumber].ETag !== null) return null;\n partInfo.ETag = data.ETag;\n self.doneParts++;\n if (self.isDoneChunking && self.doneParts === self.numParts) {\n self.finishMultiPart();\n } else {\n self.fillQueue.call(self);\n }\n });\n },\n\n /**\n * @api private\n */\n queueChunks: function queueChunks(chunk, partNumber) {\n var self = this;\n self.multipartReq.on('success', function() {\n self.uploadPart(chunk, partNumber);\n });\n },\n\n /**\n * @api private\n */\n cleanup: function cleanup(err) {\n var self = this;\n if (self.failed) return;\n\n // clean up stream\n if (typeof self.body.removeAllListeners === 'function' &&\n typeof self.body.resume === 'function') {\n self.body.removeAllListeners('readable');\n self.body.removeAllListeners('end');\n self.body.resume();\n }\n\n // cleanup multipartReq listeners\n if (self.multipartReq) {\n self.multipartReq.removeAllListeners('success');\n self.multipartReq.removeAllListeners('error');\n self.multipartReq.removeAllListeners('complete');\n delete self.multipartReq;\n }\n\n if (self.service.config.params.UploadId && !self.leavePartsOnError) {\n self.service.abortMultipartUpload().send();\n } else if (self.leavePartsOnError) {\n self.isDoneChunking = false;\n }\n\n AWS.util.each(self.parts, function(partNumber, part) {\n part.removeAllListeners('complete');\n part.abort();\n });\n\n self.activeParts = 0;\n self.partPos = 0;\n self.numParts = 0;\n self.totalPartNumbers = 0;\n self.parts = {};\n self.failed = true;\n self.callback(err);\n },\n\n /**\n * @api private\n */\n finishMultiPart: function finishMultiPart() {\n var self = this;\n var completeParams = { MultipartUpload: { Parts: self.completeInfo.slice(1) } };\n self.service.completeMultipartUpload(completeParams, function(err, data) {\n if (err) {\n return self.cleanup(err);\n }\n\n if (data && typeof data.Location === 'string') {\n data.Location = data.Location.replace(/%2F/g, '/');\n }\n\n if (Array.isArray(self.tags)) {\n for (var i = 0; i < self.tags.length; i++) {\n self.tags[i].Value = String(self.tags[i].Value);\n }\n self.service.putObjectTagging(\n {Tagging: {TagSet: self.tags}},\n function(e, d) {\n if (e) {\n self.callback(e);\n } else {\n self.callback(e, data);\n }\n }\n );\n } else {\n self.callback(err, data);\n }\n });\n },\n\n /**\n * @api private\n */\n finishSinglePart: function finishSinglePart(err, data) {\n var upload = this.request._managedUpload;\n var httpReq = this.request.httpRequest;\n var endpoint = httpReq.endpoint;\n if (err) return upload.callback(err);\n data.Location =\n [endpoint.protocol, '//', endpoint.host, httpReq.path].join('');\n data.key = this.request.params.Key; // will stay undocumented\n data.Key = this.request.params.Key;\n data.Bucket = this.request.params.Bucket;\n upload.callback(err, data);\n },\n\n /**\n * @api private\n */\n progress: function progress(info) {\n var upload = this._managedUpload;\n if (this.operation === 'putObject') {\n info.part = 1;\n info.key = this.params.Key;\n } else {\n upload.totalUploadedBytes += info.loaded - this._lastUploadedBytes;\n this._lastUploadedBytes = info.loaded;\n info = {\n loaded: upload.totalUploadedBytes,\n total: upload.totalBytes,\n part: this.params.PartNumber,\n key: this.params.Key\n };\n }\n upload.emit('httpUploadProgress', [info]);\n }\n});\n\nAWS.util.mixin(AWS.S3.ManagedUpload, AWS.SequentialExecutor);\n\n/**\n * @api private\n */\nAWS.S3.ManagedUpload.addPromisesToClass = function addPromisesToClass(PromiseDependency) {\n this.prototype.promise = AWS.util.promisifyMethod('send', PromiseDependency);\n};\n\n/**\n * @api private\n */\nAWS.S3.ManagedUpload.deletePromisesFromClass = function deletePromisesFromClass() {\n delete this.prototype.promise;\n};\n\nAWS.util.addPromises(AWS.S3.ManagedUpload);\n\n/**\n * @api private\n */\nmodule.exports = AWS.S3.ManagedUpload;\n","var AWS = require('./core');\n\n/**\n * @api private\n * @!method on(eventName, callback)\n * Registers an event listener callback for the event given by `eventName`.\n * Parameters passed to the callback function depend on the individual event\n * being triggered. See the event documentation for those parameters.\n *\n * @param eventName [String] the event name to register the listener for\n * @param callback [Function] the listener callback function\n * @param toHead [Boolean] attach the listener callback to the head of callback array if set to true.\n * Default to be false.\n * @return [AWS.SequentialExecutor] the same object for chaining\n */\nAWS.SequentialExecutor = AWS.util.inherit({\n\n constructor: function SequentialExecutor() {\n this._events = {};\n },\n\n /**\n * @api private\n */\n listeners: function listeners(eventName) {\n return this._events[eventName] ? this._events[eventName].slice(0) : [];\n },\n\n on: function on(eventName, listener, toHead) {\n if (this._events[eventName]) {\n toHead ?\n this._events[eventName].unshift(listener) :\n this._events[eventName].push(listener);\n } else {\n this._events[eventName] = [listener];\n }\n return this;\n },\n\n onAsync: function onAsync(eventName, listener, toHead) {\n listener._isAsync = true;\n return this.on(eventName, listener, toHead);\n },\n\n removeListener: function removeListener(eventName, listener) {\n var listeners = this._events[eventName];\n if (listeners) {\n var length = listeners.length;\n var position = -1;\n for (var i = 0; i < length; ++i) {\n if (listeners[i] === listener) {\n position = i;\n }\n }\n if (position > -1) {\n listeners.splice(position, 1);\n }\n }\n return this;\n },\n\n removeAllListeners: function removeAllListeners(eventName) {\n if (eventName) {\n delete this._events[eventName];\n } else {\n this._events = {};\n }\n return this;\n },\n\n /**\n * @api private\n */\n emit: function emit(eventName, eventArgs, doneCallback) {\n if (!doneCallback) doneCallback = function() { };\n var listeners = this.listeners(eventName);\n var count = listeners.length;\n this.callListeners(listeners, eventArgs, doneCallback);\n return count > 0;\n },\n\n /**\n * @api private\n */\n callListeners: function callListeners(listeners, args, doneCallback, prevError) {\n var self = this;\n var error = prevError || null;\n\n function callNextListener(err) {\n if (err) {\n error = AWS.util.error(error || new Error(), err);\n if (self._haltHandlersOnError) {\n return doneCallback.call(self, error);\n }\n }\n self.callListeners(listeners, args, doneCallback, error);\n }\n\n while (listeners.length > 0) {\n var listener = listeners.shift();\n if (listener._isAsync) { // asynchronous listener\n listener.apply(self, args.concat([callNextListener]));\n return; // stop here, callNextListener will continue\n } else { // synchronous listener\n try {\n listener.apply(self, args);\n } catch (err) {\n error = AWS.util.error(error || new Error(), err);\n }\n if (error && self._haltHandlersOnError) {\n doneCallback.call(self, error);\n return;\n }\n }\n }\n doneCallback.call(self, error);\n },\n\n /**\n * Adds or copies a set of listeners from another list of\n * listeners or SequentialExecutor object.\n *\n * @param listeners [map>, AWS.SequentialExecutor]\n * a list of events and callbacks, or an event emitter object\n * containing listeners to add to this emitter object.\n * @return [AWS.SequentialExecutor] the emitter object, for chaining.\n * @example Adding listeners from a map of listeners\n * emitter.addListeners({\n * event1: [function() { ... }, function() { ... }],\n * event2: [function() { ... }]\n * });\n * emitter.emit('event1'); // emitter has event1\n * emitter.emit('event2'); // emitter has event2\n * @example Adding listeners from another emitter object\n * var emitter1 = new AWS.SequentialExecutor();\n * emitter1.on('event1', function() { ... });\n * emitter1.on('event2', function() { ... });\n * var emitter2 = new AWS.SequentialExecutor();\n * emitter2.addListeners(emitter1);\n * emitter2.emit('event1'); // emitter2 has event1\n * emitter2.emit('event2'); // emitter2 has event2\n */\n addListeners: function addListeners(listeners) {\n var self = this;\n\n // extract listeners if parameter is an SequentialExecutor object\n if (listeners._events) listeners = listeners._events;\n\n AWS.util.each(listeners, function(event, callbacks) {\n if (typeof callbacks === 'function') callbacks = [callbacks];\n AWS.util.arrayEach(callbacks, function(callback) {\n self.on(event, callback);\n });\n });\n\n return self;\n },\n\n /**\n * Registers an event with {on} and saves the callback handle function\n * as a property on the emitter object using a given `name`.\n *\n * @param name [String] the property name to set on this object containing\n * the callback function handle so that the listener can be removed in\n * the future.\n * @param (see on)\n * @return (see on)\n * @example Adding a named listener DATA_CALLBACK\n * var listener = function() { doSomething(); };\n * emitter.addNamedListener('DATA_CALLBACK', 'data', listener);\n *\n * // the following prints: true\n * console.log(emitter.DATA_CALLBACK == listener);\n */\n addNamedListener: function addNamedListener(name, eventName, callback, toHead) {\n this[name] = callback;\n this.addListener(eventName, callback, toHead);\n return this;\n },\n\n /**\n * @api private\n */\n addNamedAsyncListener: function addNamedAsyncListener(name, eventName, callback, toHead) {\n callback._isAsync = true;\n return this.addNamedListener(name, eventName, callback, toHead);\n },\n\n /**\n * Helper method to add a set of named listeners using\n * {addNamedListener}. The callback contains a parameter\n * with a handle to the `addNamedListener` method.\n *\n * @callback callback function(add)\n * The callback function is called immediately in order to provide\n * the `add` function to the block. This simplifies the addition of\n * a large group of named listeners.\n * @param add [Function] the {addNamedListener} function to call\n * when registering listeners.\n * @example Adding a set of named listeners\n * emitter.addNamedListeners(function(add) {\n * add('DATA_CALLBACK', 'data', function() { ... });\n * add('OTHER', 'otherEvent', function() { ... });\n * add('LAST', 'lastEvent', function() { ... });\n * });\n *\n * // these properties are now set:\n * emitter.DATA_CALLBACK;\n * emitter.OTHER;\n * emitter.LAST;\n */\n addNamedListeners: function addNamedListeners(callback) {\n var self = this;\n callback(\n function() {\n self.addNamedListener.apply(self, arguments);\n },\n function() {\n self.addNamedAsyncListener.apply(self, arguments);\n }\n );\n return this;\n }\n});\n\n/**\n * {on} is the prefered method.\n * @api private\n */\nAWS.SequentialExecutor.prototype.addListener = AWS.SequentialExecutor.prototype.on;\n\n/**\n * @api private\n */\nmodule.exports = AWS.SequentialExecutor;\n","var AWS = require('./core');\nvar Api = require('./model/api');\nvar regionConfig = require('./region_config');\n\nvar inherit = AWS.util.inherit;\nvar clientCount = 0;\nvar region_utils = require('./region/utils');\n\n/**\n * The service class representing an AWS service.\n *\n * @class_abstract This class is an abstract class.\n *\n * @!attribute apiVersions\n * @return [Array] the list of API versions supported by this service.\n * @readonly\n */\nAWS.Service = inherit({\n /**\n * Create a new service object with a configuration object\n *\n * @param config [map] a map of configuration options\n */\n constructor: function Service(config) {\n if (!this.loadServiceClass) {\n throw AWS.util.error(new Error(),\n 'Service must be constructed with `new\\' operator');\n }\n\n if (config) {\n if (config.region) {\n var region = config.region;\n if (region_utils.isFipsRegion(region)) {\n config.region = region_utils.getRealRegion(region);\n config.useFipsEndpoint = true;\n }\n if (region_utils.isGlobalRegion(region)) {\n config.region = region_utils.getRealRegion(region);\n }\n }\n if (typeof config.useDualstack === 'boolean'\n && typeof config.useDualstackEndpoint !== 'boolean') {\n config.useDualstackEndpoint = config.useDualstack;\n }\n }\n\n var ServiceClass = this.loadServiceClass(config || {});\n if (ServiceClass) {\n var originalConfig = AWS.util.copy(config);\n var svc = new ServiceClass(config);\n Object.defineProperty(svc, '_originalConfig', {\n get: function() { return originalConfig; },\n enumerable: false,\n configurable: true\n });\n svc._clientId = ++clientCount;\n return svc;\n }\n this.initialize(config);\n },\n\n /**\n * @api private\n */\n initialize: function initialize(config) {\n var svcConfig = AWS.config[this.serviceIdentifier];\n this.config = new AWS.Config(AWS.config);\n if (svcConfig) this.config.update(svcConfig, true);\n if (config) this.config.update(config, true);\n\n this.validateService();\n if (!this.config.endpoint) regionConfig.configureEndpoint(this);\n\n this.config.endpoint = this.endpointFromTemplate(this.config.endpoint);\n this.setEndpoint(this.config.endpoint);\n //enable attaching listeners to service client\n AWS.SequentialExecutor.call(this);\n AWS.Service.addDefaultMonitoringListeners(this);\n if ((this.config.clientSideMonitoring || AWS.Service._clientSideMonitoring) && this.publisher) {\n var publisher = this.publisher;\n this.addNamedListener('PUBLISH_API_CALL', 'apiCall', function PUBLISH_API_CALL(event) {\n process.nextTick(function() {publisher.eventHandler(event);});\n });\n this.addNamedListener('PUBLISH_API_ATTEMPT', 'apiCallAttempt', function PUBLISH_API_ATTEMPT(event) {\n process.nextTick(function() {publisher.eventHandler(event);});\n });\n }\n },\n\n /**\n * @api private\n */\n validateService: function validateService() {\n },\n\n /**\n * @api private\n */\n loadServiceClass: function loadServiceClass(serviceConfig) {\n var config = serviceConfig;\n if (!AWS.util.isEmpty(this.api)) {\n return null;\n } else if (config.apiConfig) {\n return AWS.Service.defineServiceApi(this.constructor, config.apiConfig);\n } else if (!this.constructor.services) {\n return null;\n } else {\n config = new AWS.Config(AWS.config);\n config.update(serviceConfig, true);\n var version = config.apiVersions[this.constructor.serviceIdentifier];\n version = version || config.apiVersion;\n return this.getLatestServiceClass(version);\n }\n },\n\n /**\n * @api private\n */\n getLatestServiceClass: function getLatestServiceClass(version) {\n version = this.getLatestServiceVersion(version);\n if (this.constructor.services[version] === null) {\n AWS.Service.defineServiceApi(this.constructor, version);\n }\n\n return this.constructor.services[version];\n },\n\n /**\n * @api private\n */\n getLatestServiceVersion: function getLatestServiceVersion(version) {\n if (!this.constructor.services || this.constructor.services.length === 0) {\n throw new Error('No services defined on ' +\n this.constructor.serviceIdentifier);\n }\n\n if (!version) {\n version = 'latest';\n } else if (AWS.util.isType(version, Date)) {\n version = AWS.util.date.iso8601(version).split('T')[0];\n }\n\n if (Object.hasOwnProperty(this.constructor.services, version)) {\n return version;\n }\n\n var keys = Object.keys(this.constructor.services).sort();\n var selectedVersion = null;\n for (var i = keys.length - 1; i >= 0; i--) {\n // versions that end in \"*\" are not available on disk and can be\n // skipped, so do not choose these as selectedVersions\n if (keys[i][keys[i].length - 1] !== '*') {\n selectedVersion = keys[i];\n }\n if (keys[i].substr(0, 10) <= version) {\n return selectedVersion;\n }\n }\n\n throw new Error('Could not find ' + this.constructor.serviceIdentifier +\n ' API to satisfy version constraint `' + version + '\\'');\n },\n\n /**\n * @api private\n */\n api: {},\n\n /**\n * @api private\n */\n defaultRetryCount: 3,\n\n /**\n * @api private\n */\n customizeRequests: function customizeRequests(callback) {\n if (!callback) {\n this.customRequestHandler = null;\n } else if (typeof callback === 'function') {\n this.customRequestHandler = callback;\n } else {\n throw new Error('Invalid callback type \\'' + typeof callback + '\\' provided in customizeRequests');\n }\n },\n\n /**\n * Calls an operation on a service with the given input parameters.\n *\n * @param operation [String] the name of the operation to call on the service.\n * @param params [map] a map of input options for the operation\n * @callback callback function(err, data)\n * If a callback is supplied, it is called when a response is returned\n * from the service.\n * @param err [Error] the error object returned from the request.\n * Set to `null` if the request is successful.\n * @param data [Object] the de-serialized data returned from\n * the request. Set to `null` if a request error occurs.\n */\n makeRequest: function makeRequest(operation, params, callback) {\n if (typeof params === 'function') {\n callback = params;\n params = null;\n }\n\n params = params || {};\n if (this.config.params) { // copy only toplevel bound params\n var rules = this.api.operations[operation];\n if (rules) {\n params = AWS.util.copy(params);\n AWS.util.each(this.config.params, function(key, value) {\n if (rules.input.members[key]) {\n if (params[key] === undefined || params[key] === null) {\n params[key] = value;\n }\n }\n });\n }\n }\n\n var request = new AWS.Request(this, operation, params);\n this.addAllRequestListeners(request);\n this.attachMonitoringEmitter(request);\n if (callback) request.send(callback);\n return request;\n },\n\n /**\n * Calls an operation on a service with the given input parameters, without\n * any authentication data. This method is useful for \"public\" API operations.\n *\n * @param operation [String] the name of the operation to call on the service.\n * @param params [map] a map of input options for the operation\n * @callback callback function(err, data)\n * If a callback is supplied, it is called when a response is returned\n * from the service.\n * @param err [Error] the error object returned from the request.\n * Set to `null` if the request is successful.\n * @param data [Object] the de-serialized data returned from\n * the request. Set to `null` if a request error occurs.\n */\n makeUnauthenticatedRequest: function makeUnauthenticatedRequest(operation, params, callback) {\n if (typeof params === 'function') {\n callback = params;\n params = {};\n }\n\n var request = this.makeRequest(operation, params).toUnauthenticated();\n return callback ? request.send(callback) : request;\n },\n\n /**\n * Waits for a given state\n *\n * @param state [String] the state on the service to wait for\n * @param params [map] a map of parameters to pass with each request\n * @option params $waiter [map] a map of configuration options for the waiter\n * @option params $waiter.delay [Number] The number of seconds to wait between\n * requests\n * @option params $waiter.maxAttempts [Number] The maximum number of requests\n * to send while waiting\n * @callback callback function(err, data)\n * If a callback is supplied, it is called when a response is returned\n * from the service.\n * @param err [Error] the error object returned from the request.\n * Set to `null` if the request is successful.\n * @param data [Object] the de-serialized data returned from\n * the request. Set to `null` if a request error occurs.\n */\n waitFor: function waitFor(state, params, callback) {\n var waiter = new AWS.ResourceWaiter(this, state);\n return waiter.wait(params, callback);\n },\n\n /**\n * @api private\n */\n addAllRequestListeners: function addAllRequestListeners(request) {\n var list = [AWS.events, AWS.EventListeners.Core, this.serviceInterface(),\n AWS.EventListeners.CorePost];\n for (var i = 0; i < list.length; i++) {\n if (list[i]) request.addListeners(list[i]);\n }\n\n // disable parameter validation\n if (!this.config.paramValidation) {\n request.removeListener('validate',\n AWS.EventListeners.Core.VALIDATE_PARAMETERS);\n }\n\n if (this.config.logger) { // add logging events\n request.addListeners(AWS.EventListeners.Logger);\n }\n\n this.setupRequestListeners(request);\n // call prototype's customRequestHandler\n if (typeof this.constructor.prototype.customRequestHandler === 'function') {\n this.constructor.prototype.customRequestHandler(request);\n }\n // call instance's customRequestHandler\n if (Object.prototype.hasOwnProperty.call(this, 'customRequestHandler') && typeof this.customRequestHandler === 'function') {\n this.customRequestHandler(request);\n }\n },\n\n /**\n * Event recording metrics for a whole API call.\n * @returns {object} a subset of api call metrics\n * @api private\n */\n apiCallEvent: function apiCallEvent(request) {\n var api = request.service.api.operations[request.operation];\n var monitoringEvent = {\n Type: 'ApiCall',\n Api: api ? api.name : request.operation,\n Version: 1,\n Service: request.service.api.serviceId || request.service.api.endpointPrefix,\n Region: request.httpRequest.region,\n MaxRetriesExceeded: 0,\n UserAgent: request.httpRequest.getUserAgent(),\n };\n var response = request.response;\n if (response.httpResponse.statusCode) {\n monitoringEvent.FinalHttpStatusCode = response.httpResponse.statusCode;\n }\n if (response.error) {\n var error = response.error;\n var statusCode = response.httpResponse.statusCode;\n if (statusCode > 299) {\n if (error.code) monitoringEvent.FinalAwsException = error.code;\n if (error.message) monitoringEvent.FinalAwsExceptionMessage = error.message;\n } else {\n if (error.code || error.name) monitoringEvent.FinalSdkException = error.code || error.name;\n if (error.message) monitoringEvent.FinalSdkExceptionMessage = error.message;\n }\n }\n return monitoringEvent;\n },\n\n /**\n * Event recording metrics for an API call attempt.\n * @returns {object} a subset of api call attempt metrics\n * @api private\n */\n apiAttemptEvent: function apiAttemptEvent(request) {\n var api = request.service.api.operations[request.operation];\n var monitoringEvent = {\n Type: 'ApiCallAttempt',\n Api: api ? api.name : request.operation,\n Version: 1,\n Service: request.service.api.serviceId || request.service.api.endpointPrefix,\n Fqdn: request.httpRequest.endpoint.hostname,\n UserAgent: request.httpRequest.getUserAgent(),\n };\n var response = request.response;\n if (response.httpResponse.statusCode) {\n monitoringEvent.HttpStatusCode = response.httpResponse.statusCode;\n }\n if (\n !request._unAuthenticated &&\n request.service.config.credentials &&\n request.service.config.credentials.accessKeyId\n ) {\n monitoringEvent.AccessKey = request.service.config.credentials.accessKeyId;\n }\n if (!response.httpResponse.headers) return monitoringEvent;\n if (request.httpRequest.headers['x-amz-security-token']) {\n monitoringEvent.SessionToken = request.httpRequest.headers['x-amz-security-token'];\n }\n if (response.httpResponse.headers['x-amzn-requestid']) {\n monitoringEvent.XAmznRequestId = response.httpResponse.headers['x-amzn-requestid'];\n }\n if (response.httpResponse.headers['x-amz-request-id']) {\n monitoringEvent.XAmzRequestId = response.httpResponse.headers['x-amz-request-id'];\n }\n if (response.httpResponse.headers['x-amz-id-2']) {\n monitoringEvent.XAmzId2 = response.httpResponse.headers['x-amz-id-2'];\n }\n return monitoringEvent;\n },\n\n /**\n * Add metrics of failed request.\n * @api private\n */\n attemptFailEvent: function attemptFailEvent(request) {\n var monitoringEvent = this.apiAttemptEvent(request);\n var response = request.response;\n var error = response.error;\n if (response.httpResponse.statusCode > 299 ) {\n if (error.code) monitoringEvent.AwsException = error.code;\n if (error.message) monitoringEvent.AwsExceptionMessage = error.message;\n } else {\n if (error.code || error.name) monitoringEvent.SdkException = error.code || error.name;\n if (error.message) monitoringEvent.SdkExceptionMessage = error.message;\n }\n return monitoringEvent;\n },\n\n /**\n * Attach listeners to request object to fetch metrics of each request\n * and emit data object through \\'ApiCall\\' and \\'ApiCallAttempt\\' events.\n * @api private\n */\n attachMonitoringEmitter: function attachMonitoringEmitter(request) {\n var attemptTimestamp; //timestamp marking the beginning of a request attempt\n var attemptStartRealTime; //Start time of request attempt. Used to calculating attemptLatency\n var attemptLatency; //latency from request sent out to http response reaching SDK\n var callStartRealTime; //Start time of API call. Used to calculating API call latency\n var attemptCount = 0; //request.retryCount is not reliable here\n var region; //region cache region for each attempt since it can be updated in plase (e.g. s3)\n var callTimestamp; //timestamp when the request is created\n var self = this;\n var addToHead = true;\n\n request.on('validate', function () {\n callStartRealTime = AWS.util.realClock.now();\n callTimestamp = Date.now();\n }, addToHead);\n request.on('sign', function () {\n attemptStartRealTime = AWS.util.realClock.now();\n attemptTimestamp = Date.now();\n region = request.httpRequest.region;\n attemptCount++;\n }, addToHead);\n request.on('validateResponse', function() {\n attemptLatency = Math.round(AWS.util.realClock.now() - attemptStartRealTime);\n });\n request.addNamedListener('API_CALL_ATTEMPT', 'success', function API_CALL_ATTEMPT() {\n var apiAttemptEvent = self.apiAttemptEvent(request);\n apiAttemptEvent.Timestamp = attemptTimestamp;\n apiAttemptEvent.AttemptLatency = attemptLatency >= 0 ? attemptLatency : 0;\n apiAttemptEvent.Region = region;\n self.emit('apiCallAttempt', [apiAttemptEvent]);\n });\n request.addNamedListener('API_CALL_ATTEMPT_RETRY', 'retry', function API_CALL_ATTEMPT_RETRY() {\n var apiAttemptEvent = self.attemptFailEvent(request);\n apiAttemptEvent.Timestamp = attemptTimestamp;\n //attemptLatency may not be available if fail before response\n attemptLatency = attemptLatency ||\n Math.round(AWS.util.realClock.now() - attemptStartRealTime);\n apiAttemptEvent.AttemptLatency = attemptLatency >= 0 ? attemptLatency : 0;\n apiAttemptEvent.Region = region;\n self.emit('apiCallAttempt', [apiAttemptEvent]);\n });\n request.addNamedListener('API_CALL', 'complete', function API_CALL() {\n var apiCallEvent = self.apiCallEvent(request);\n apiCallEvent.AttemptCount = attemptCount;\n if (apiCallEvent.AttemptCount <= 0) return;\n apiCallEvent.Timestamp = callTimestamp;\n var latency = Math.round(AWS.util.realClock.now() - callStartRealTime);\n apiCallEvent.Latency = latency >= 0 ? latency : 0;\n var response = request.response;\n if (\n response.error &&\n response.error.retryable &&\n typeof response.retryCount === 'number' &&\n typeof response.maxRetries === 'number' &&\n (response.retryCount >= response.maxRetries)\n ) {\n apiCallEvent.MaxRetriesExceeded = 1;\n }\n self.emit('apiCall', [apiCallEvent]);\n });\n },\n\n /**\n * Override this method to setup any custom request listeners for each\n * new request to the service.\n *\n * @method_abstract This is an abstract method.\n */\n setupRequestListeners: function setupRequestListeners(request) {\n },\n\n /**\n * Gets the signing name for a given request\n * @api private\n */\n getSigningName: function getSigningName() {\n return this.api.signingName || this.api.endpointPrefix;\n },\n\n /**\n * Gets the signer class for a given request\n * @api private\n */\n getSignerClass: function getSignerClass(request) {\n var version;\n // get operation authtype if present\n var operation = null;\n var authtype = '';\n if (request) {\n var operations = request.service.api.operations || {};\n operation = operations[request.operation] || null;\n authtype = operation ? operation.authtype : '';\n }\n if (this.config.signatureVersion) {\n version = this.config.signatureVersion;\n } else if (authtype === 'v4' || authtype === 'v4-unsigned-body') {\n version = 'v4';\n } else {\n version = this.api.signatureVersion;\n }\n return AWS.Signers.RequestSigner.getVersion(version);\n },\n\n /**\n * @api private\n */\n serviceInterface: function serviceInterface() {\n switch (this.api.protocol) {\n case 'ec2': return AWS.EventListeners.Query;\n case 'query': return AWS.EventListeners.Query;\n case 'json': return AWS.EventListeners.Json;\n case 'rest-json': return AWS.EventListeners.RestJson;\n case 'rest-xml': return AWS.EventListeners.RestXml;\n }\n if (this.api.protocol) {\n throw new Error('Invalid service `protocol\\' ' +\n this.api.protocol + ' in API config');\n }\n },\n\n /**\n * @api private\n */\n successfulResponse: function successfulResponse(resp) {\n return resp.httpResponse.statusCode < 300;\n },\n\n /**\n * How many times a failed request should be retried before giving up.\n * the defaultRetryCount can be overriden by service classes.\n *\n * @api private\n */\n numRetries: function numRetries() {\n if (this.config.maxRetries !== undefined) {\n return this.config.maxRetries;\n } else {\n return this.defaultRetryCount;\n }\n },\n\n /**\n * @api private\n */\n retryDelays: function retryDelays(retryCount, err) {\n return AWS.util.calculateRetryDelay(retryCount, this.config.retryDelayOptions, err);\n },\n\n /**\n * @api private\n */\n retryableError: function retryableError(error) {\n if (this.timeoutError(error)) return true;\n if (this.networkingError(error)) return true;\n if (this.expiredCredentialsError(error)) return true;\n if (this.throttledError(error)) return true;\n if (error.statusCode >= 500) return true;\n return false;\n },\n\n /**\n * @api private\n */\n networkingError: function networkingError(error) {\n return error.code === 'NetworkingError';\n },\n\n /**\n * @api private\n */\n timeoutError: function timeoutError(error) {\n return error.code === 'TimeoutError';\n },\n\n /**\n * @api private\n */\n expiredCredentialsError: function expiredCredentialsError(error) {\n // TODO : this only handles *one* of the expired credential codes\n return (error.code === 'ExpiredTokenException');\n },\n\n /**\n * @api private\n */\n clockSkewError: function clockSkewError(error) {\n switch (error.code) {\n case 'RequestTimeTooSkewed':\n case 'RequestExpired':\n case 'InvalidSignatureException':\n case 'SignatureDoesNotMatch':\n case 'AuthFailure':\n case 'RequestInTheFuture':\n return true;\n default: return false;\n }\n },\n\n /**\n * @api private\n */\n getSkewCorrectedDate: function getSkewCorrectedDate() {\n return new Date(Date.now() + this.config.systemClockOffset);\n },\n\n /**\n * @api private\n */\n applyClockOffset: function applyClockOffset(newServerTime) {\n if (newServerTime) {\n this.config.systemClockOffset = newServerTime - Date.now();\n }\n },\n\n /**\n * @api private\n */\n isClockSkewed: function isClockSkewed(newServerTime) {\n if (newServerTime) {\n return Math.abs(this.getSkewCorrectedDate().getTime() - newServerTime) >= 300000;\n }\n },\n\n /**\n * @api private\n */\n throttledError: function throttledError(error) {\n // this logic varies between services\n if (error.statusCode === 429) return true;\n switch (error.code) {\n case 'ProvisionedThroughputExceededException':\n case 'Throttling':\n case 'ThrottlingException':\n case 'RequestLimitExceeded':\n case 'RequestThrottled':\n case 'RequestThrottledException':\n case 'TooManyRequestsException':\n case 'TransactionInProgressException': //dynamodb\n case 'EC2ThrottledException':\n return true;\n default:\n return false;\n }\n },\n\n /**\n * @api private\n */\n endpointFromTemplate: function endpointFromTemplate(endpoint) {\n if (typeof endpoint !== 'string') return endpoint;\n\n var e = endpoint;\n e = e.replace(/\\{service\\}/g, this.api.endpointPrefix);\n e = e.replace(/\\{region\\}/g, this.config.region);\n e = e.replace(/\\{scheme\\}/g, this.config.sslEnabled ? 'https' : 'http');\n return e;\n },\n\n /**\n * @api private\n */\n setEndpoint: function setEndpoint(endpoint) {\n this.endpoint = new AWS.Endpoint(endpoint, this.config);\n },\n\n /**\n * @api private\n */\n paginationConfig: function paginationConfig(operation, throwException) {\n var paginator = this.api.operations[operation].paginator;\n if (!paginator) {\n if (throwException) {\n var e = new Error();\n throw AWS.util.error(e, 'No pagination configuration for ' + operation);\n }\n return null;\n }\n\n return paginator;\n }\n});\n\nAWS.util.update(AWS.Service, {\n\n /**\n * Adds one method for each operation described in the api configuration\n *\n * @api private\n */\n defineMethods: function defineMethods(svc) {\n AWS.util.each(svc.prototype.api.operations, function iterator(method) {\n if (svc.prototype[method]) return;\n var operation = svc.prototype.api.operations[method];\n if (operation.authtype === 'none') {\n svc.prototype[method] = function (params, callback) {\n return this.makeUnauthenticatedRequest(method, params, callback);\n };\n } else {\n svc.prototype[method] = function (params, callback) {\n return this.makeRequest(method, params, callback);\n };\n }\n });\n },\n\n /**\n * Defines a new Service class using a service identifier and list of versions\n * including an optional set of features (functions) to apply to the class\n * prototype.\n *\n * @param serviceIdentifier [String] the identifier for the service\n * @param versions [Array] a list of versions that work with this\n * service\n * @param features [Object] an object to attach to the prototype\n * @return [Class] the service class defined by this function.\n */\n defineService: function defineService(serviceIdentifier, versions, features) {\n AWS.Service._serviceMap[serviceIdentifier] = true;\n if (!Array.isArray(versions)) {\n features = versions;\n versions = [];\n }\n\n var svc = inherit(AWS.Service, features || {});\n\n if (typeof serviceIdentifier === 'string') {\n AWS.Service.addVersions(svc, versions);\n\n var identifier = svc.serviceIdentifier || serviceIdentifier;\n svc.serviceIdentifier = identifier;\n } else { // defineService called with an API\n svc.prototype.api = serviceIdentifier;\n AWS.Service.defineMethods(svc);\n }\n AWS.SequentialExecutor.call(this.prototype);\n //util.clientSideMonitoring is only available in node\n if (!this.prototype.publisher && AWS.util.clientSideMonitoring) {\n var Publisher = AWS.util.clientSideMonitoring.Publisher;\n var configProvider = AWS.util.clientSideMonitoring.configProvider;\n var publisherConfig = configProvider();\n this.prototype.publisher = new Publisher(publisherConfig);\n if (publisherConfig.enabled) {\n //if csm is enabled in environment, SDK should send all metrics\n AWS.Service._clientSideMonitoring = true;\n }\n }\n AWS.SequentialExecutor.call(svc.prototype);\n AWS.Service.addDefaultMonitoringListeners(svc.prototype);\n return svc;\n },\n\n /**\n * @api private\n */\n addVersions: function addVersions(svc, versions) {\n if (!Array.isArray(versions)) versions = [versions];\n\n svc.services = svc.services || {};\n for (var i = 0; i < versions.length; i++) {\n if (svc.services[versions[i]] === undefined) {\n svc.services[versions[i]] = null;\n }\n }\n\n svc.apiVersions = Object.keys(svc.services).sort();\n },\n\n /**\n * @api private\n */\n defineServiceApi: function defineServiceApi(superclass, version, apiConfig) {\n var svc = inherit(superclass, {\n serviceIdentifier: superclass.serviceIdentifier\n });\n\n function setApi(api) {\n if (api.isApi) {\n svc.prototype.api = api;\n } else {\n svc.prototype.api = new Api(api, {\n serviceIdentifier: superclass.serviceIdentifier\n });\n }\n }\n\n if (typeof version === 'string') {\n if (apiConfig) {\n setApi(apiConfig);\n } else {\n try {\n setApi(AWS.apiLoader(superclass.serviceIdentifier, version));\n } catch (err) {\n throw AWS.util.error(err, {\n message: 'Could not find API configuration ' +\n superclass.serviceIdentifier + '-' + version\n });\n }\n }\n if (!Object.prototype.hasOwnProperty.call(superclass.services, version)) {\n superclass.apiVersions = superclass.apiVersions.concat(version).sort();\n }\n superclass.services[version] = svc;\n } else {\n setApi(version);\n }\n\n AWS.Service.defineMethods(svc);\n return svc;\n },\n\n /**\n * @api private\n */\n hasService: function(identifier) {\n return Object.prototype.hasOwnProperty.call(AWS.Service._serviceMap, identifier);\n },\n\n /**\n * @param attachOn attach default monitoring listeners to object\n *\n * Each monitoring event should be emitted from service client to service constructor prototype and then\n * to global service prototype like bubbling up. These default monitoring events listener will transfer\n * the monitoring events to the upper layer.\n * @api private\n */\n addDefaultMonitoringListeners: function addDefaultMonitoringListeners(attachOn) {\n attachOn.addNamedListener('MONITOR_EVENTS_BUBBLE', 'apiCallAttempt', function EVENTS_BUBBLE(event) {\n var baseClass = Object.getPrototypeOf(attachOn);\n if (baseClass._events) baseClass.emit('apiCallAttempt', [event]);\n });\n attachOn.addNamedListener('CALL_EVENTS_BUBBLE', 'apiCall', function CALL_EVENTS_BUBBLE(event) {\n var baseClass = Object.getPrototypeOf(attachOn);\n if (baseClass._events) baseClass.emit('apiCall', [event]);\n });\n },\n\n /**\n * @api private\n */\n _serviceMap: {}\n});\n\nAWS.util.mixin(AWS.Service, AWS.SequentialExecutor);\n\n/**\n * @api private\n */\nmodule.exports = AWS.Service;\n","var AWS = require('../core');\n\nAWS.util.update(AWS.APIGateway.prototype, {\n/**\n * Sets the Accept header to application/json.\n *\n * @api private\n */\n setAcceptHeader: function setAcceptHeader(req) {\n var httpRequest = req.httpRequest;\n if (!httpRequest.headers.Accept) {\n httpRequest.headers['Accept'] = 'application/json';\n }\n },\n\n /**\n * @api private\n */\n setupRequestListeners: function setupRequestListeners(request) {\n request.addListener('build', this.setAcceptHeader);\n if (request.operation === 'getExport') {\n var params = request.params || {};\n if (params.exportType === 'swagger') {\n request.addListener('extractData', AWS.util.convertPayloadToString);\n }\n }\n }\n});\n\n","var AWS = require('../core');\n\n// pull in CloudFront signer\nrequire('../cloudfront/signer');\n\nAWS.util.update(AWS.CloudFront.prototype, {\n\n setupRequestListeners: function setupRequestListeners(request) {\n request.addListener('extractData', AWS.util.hoistPayloadMember);\n }\n\n});\n","var AWS = require('../core');\n\n/**\n * Constructs a service interface object. Each API operation is exposed as a\n * function on service.\n *\n * ### Sending a Request Using CloudSearchDomain\n *\n * ```javascript\n * var csd = new AWS.CloudSearchDomain({endpoint: 'my.host.tld'});\n * csd.search(params, function (err, data) {\n * if (err) console.log(err, err.stack); // an error occurred\n * else console.log(data); // successful response\n * });\n * ```\n *\n * ### Locking the API Version\n *\n * In order to ensure that the CloudSearchDomain object uses this specific API,\n * you can construct the object by passing the `apiVersion` option to the\n * constructor:\n *\n * ```javascript\n * var csd = new AWS.CloudSearchDomain({\n * endpoint: 'my.host.tld',\n * apiVersion: '2013-01-01'\n * });\n * ```\n *\n * You can also set the API version globally in `AWS.config.apiVersions` using\n * the **cloudsearchdomain** service identifier:\n *\n * ```javascript\n * AWS.config.apiVersions = {\n * cloudsearchdomain: '2013-01-01',\n * // other service API versions\n * };\n *\n * var csd = new AWS.CloudSearchDomain({endpoint: 'my.host.tld'});\n * ```\n *\n * @note You *must* provide an `endpoint` configuration parameter when\n * constructing this service. See {constructor} for more information.\n *\n * @!method constructor(options = {})\n * Constructs a service object. This object has one method for each\n * API operation.\n *\n * @example Constructing a CloudSearchDomain object\n * var csd = new AWS.CloudSearchDomain({endpoint: 'my.host.tld'});\n * @note You *must* provide an `endpoint` when constructing this service.\n * @option (see AWS.Config.constructor)\n *\n * @service cloudsearchdomain\n * @version 2013-01-01\n */\nAWS.util.update(AWS.CloudSearchDomain.prototype, {\n /**\n * @api private\n */\n validateService: function validateService() {\n if (!this.config.endpoint || this.config.endpoint.indexOf('{') >= 0) {\n var msg = 'AWS.CloudSearchDomain requires an explicit ' +\n '`endpoint\\' configuration option.';\n throw AWS.util.error(new Error(),\n {name: 'InvalidEndpoint', message: msg});\n }\n },\n\n /**\n * @api private\n */\n setupRequestListeners: function setupRequestListeners(request) {\n request.removeListener('validate',\n AWS.EventListeners.Core.VALIDATE_CREDENTIALS\n );\n request.onAsync('validate', this.validateCredentials);\n request.addListener('validate', this.updateRegion);\n if (request.operation === 'search') {\n request.addListener('build', this.convertGetToPost);\n }\n },\n\n /**\n * @api private\n */\n validateCredentials: function(req, done) {\n if (!req.service.api.signatureVersion) return done(); // none\n req.service.config.getCredentials(function(err) {\n if (err) {\n req.removeListener('sign', AWS.EventListeners.Core.SIGN);\n }\n done();\n });\n },\n\n /**\n * @api private\n */\n convertGetToPost: function(request) {\n var httpRequest = request.httpRequest;\n // convert queries to POST to avoid length restrictions\n var path = httpRequest.path.split('?');\n httpRequest.method = 'POST';\n httpRequest.path = path[0];\n httpRequest.body = path[1];\n httpRequest.headers['Content-Length'] = httpRequest.body.length;\n httpRequest.headers['Content-Type'] = 'application/x-www-form-urlencoded';\n },\n\n /**\n * @api private\n */\n updateRegion: function updateRegion(request) {\n var endpoint = request.httpRequest.endpoint.hostname;\n var zones = endpoint.split('.');\n request.httpRequest.region = zones[1] || request.httpRequest.region;\n }\n\n});\n","var AWS = require('../core');\nvar rdsutil = require('./rdsutil');\n\n/**\n* @api private\n*/\nvar crossRegionOperations = ['createDBCluster', 'copyDBClusterSnapshot'];\n\nAWS.util.update(AWS.DocDB.prototype, {\n /**\n * @api private\n */\n setupRequestListeners: function setupRequestListeners(request) {\n if (\n crossRegionOperations.indexOf(request.operation) !== -1 &&\n this.config.params &&\n this.config.params.SourceRegion &&\n request.params &&\n !request.params.SourceRegion\n ) {\n request.params.SourceRegion = this.config.params.SourceRegion;\n }\n rdsutil.setupRequestListeners(this, request, crossRegionOperations);\n },\n});\n","var AWS = require('../core');\nrequire('../dynamodb/document_client');\n\nAWS.util.update(AWS.DynamoDB.prototype, {\n /**\n * @api private\n */\n setupRequestListeners: function setupRequestListeners(request) {\n if (request.service.config.dynamoDbCrc32) {\n request.removeListener('extractData', AWS.EventListeners.Json.EXTRACT_DATA);\n request.addListener('extractData', this.checkCrc32);\n request.addListener('extractData', AWS.EventListeners.Json.EXTRACT_DATA);\n }\n },\n\n /**\n * @api private\n */\n checkCrc32: function checkCrc32(resp) {\n if (!resp.httpResponse.streaming && !resp.request.service.crc32IsValid(resp)) {\n resp.data = null;\n resp.error = AWS.util.error(new Error(), {\n code: 'CRC32CheckFailed',\n message: 'CRC32 integrity check failed',\n retryable: true\n });\n resp.request.haltHandlersOnError();\n throw (resp.error);\n }\n },\n\n /**\n * @api private\n */\n crc32IsValid: function crc32IsValid(resp) {\n var crc = resp.httpResponse.headers['x-amz-crc32'];\n if (!crc) return true; // no (valid) CRC32 header\n return parseInt(crc, 10) === AWS.util.crypto.crc32(resp.httpResponse.body);\n },\n\n /**\n * @api private\n */\n defaultRetryCount: 10,\n\n /**\n * @api private\n */\n retryDelays: function retryDelays(retryCount, err) {\n var retryDelayOptions = AWS.util.copy(this.config.retryDelayOptions);\n\n if (typeof retryDelayOptions.base !== 'number') {\n retryDelayOptions.base = 50; // default for dynamodb\n }\n var delay = AWS.util.calculateRetryDelay(retryCount, retryDelayOptions, err);\n return delay;\n }\n});\n","var AWS = require('../core');\n\nAWS.util.update(AWS.EC2.prototype, {\n /**\n * @api private\n */\n setupRequestListeners: function setupRequestListeners(request) {\n request.removeListener('extractError', AWS.EventListeners.Query.EXTRACT_ERROR);\n request.addListener('extractError', this.extractError);\n\n if (request.operation === 'copySnapshot') {\n request.onAsync('validate', this.buildCopySnapshotPresignedUrl);\n }\n },\n\n /**\n * @api private\n */\n buildCopySnapshotPresignedUrl: function buildCopySnapshotPresignedUrl(req, done) {\n if (req.params.PresignedUrl || req._subRequest) {\n return done();\n }\n\n req.params = AWS.util.copy(req.params);\n req.params.DestinationRegion = req.service.config.region;\n\n var config = AWS.util.copy(req.service.config);\n delete config.endpoint;\n config.region = req.params.SourceRegion;\n var svc = new req.service.constructor(config);\n var newReq = svc[req.operation](req.params);\n newReq._subRequest = true;\n newReq.presign(function(err, url) {\n if (err) done(err);\n else {\n req.params.PresignedUrl = url;\n done();\n }\n });\n },\n\n /**\n * @api private\n */\n extractError: function extractError(resp) {\n // EC2 nests the error code and message deeper than other AWS Query services.\n var httpResponse = resp.httpResponse;\n var data = new AWS.XML.Parser().parse(httpResponse.body.toString() || '');\n if (data.Errors) {\n resp.error = AWS.util.error(new Error(), {\n code: data.Errors.Error.Code,\n message: data.Errors.Error.Message\n });\n } else {\n resp.error = AWS.util.error(new Error(), {\n code: httpResponse.statusCode,\n message: null\n });\n }\n resp.error.requestId = data.RequestID || null;\n }\n});\n","var AWS = require('../core');\n\nAWS.util.update(AWS.Glacier.prototype, {\n /**\n * @api private\n */\n setupRequestListeners: function setupRequestListeners(request) {\n if (Array.isArray(request._events.validate)) {\n request._events.validate.unshift(this.validateAccountId);\n } else {\n request.on('validate', this.validateAccountId);\n }\n request.removeListener('afterBuild',\n AWS.EventListeners.Core.COMPUTE_SHA256);\n request.on('build', this.addGlacierApiVersion);\n request.on('build', this.addTreeHashHeaders);\n },\n\n /**\n * @api private\n */\n validateAccountId: function validateAccountId(request) {\n if (request.params.accountId !== undefined) return;\n request.params = AWS.util.copy(request.params);\n request.params.accountId = '-';\n },\n\n /**\n * @api private\n */\n addGlacierApiVersion: function addGlacierApiVersion(request) {\n var version = request.service.api.apiVersion;\n request.httpRequest.headers['x-amz-glacier-version'] = version;\n },\n\n /**\n * @api private\n */\n addTreeHashHeaders: function addTreeHashHeaders(request) {\n if (request.params.body === undefined) return;\n\n var hashes = request.service.computeChecksums(request.params.body);\n request.httpRequest.headers['X-Amz-Content-Sha256'] = hashes.linearHash;\n\n if (!request.httpRequest.headers['x-amz-sha256-tree-hash']) {\n request.httpRequest.headers['x-amz-sha256-tree-hash'] = hashes.treeHash;\n }\n },\n\n /**\n * @!group Computing Checksums\n */\n\n /**\n * Computes the SHA-256 linear and tree hash checksums for a given\n * block of Buffer data. Pass the tree hash of the computed checksums\n * as the checksum input to the {completeMultipartUpload} when performing\n * a multi-part upload.\n *\n * @example Calculate checksum of 5.5MB data chunk\n * var glacier = new AWS.Glacier();\n * var data = Buffer.alloc(5.5 * 1024 * 1024);\n * data.fill('0'); // fill with zeros\n * var results = glacier.computeChecksums(data);\n * // Result: { linearHash: '68aff0c5a9...', treeHash: '154e26c78f...' }\n * @param data [Buffer, String] data to calculate the checksum for\n * @return [map] a map containing\n * the linearHash and treeHash properties representing hex based digests\n * of the respective checksums.\n * @see completeMultipartUpload\n */\n computeChecksums: function computeChecksums(data) {\n if (!AWS.util.Buffer.isBuffer(data)) data = AWS.util.buffer.toBuffer(data);\n\n var mb = 1024 * 1024;\n var hashes = [];\n var hash = AWS.util.crypto.createHash('sha256');\n\n // build leaf nodes in 1mb chunks\n for (var i = 0; i < data.length; i += mb) {\n var chunk = data.slice(i, Math.min(i + mb, data.length));\n hash.update(chunk);\n hashes.push(AWS.util.crypto.sha256(chunk));\n }\n\n return {\n linearHash: hash.digest('hex'),\n treeHash: this.buildHashTree(hashes)\n };\n },\n\n /**\n * @api private\n */\n buildHashTree: function buildHashTree(hashes) {\n // merge leaf nodes\n while (hashes.length > 1) {\n var tmpHashes = [];\n for (var i = 0; i < hashes.length; i += 2) {\n if (hashes[i + 1]) {\n var tmpHash = AWS.util.buffer.alloc(64);\n tmpHash.write(hashes[i], 0, 32, 'binary');\n tmpHash.write(hashes[i + 1], 32, 32, 'binary');\n tmpHashes.push(AWS.util.crypto.sha256(tmpHash));\n } else {\n tmpHashes.push(hashes[i]);\n }\n }\n hashes = tmpHashes;\n }\n\n return AWS.util.crypto.toHex(hashes[0]);\n }\n});\n","var AWS = require('../core');\n\n/**\n * @api private\n */\nvar blobPayloadOutputOps = [\n 'deleteThingShadow',\n 'getThingShadow',\n 'updateThingShadow'\n];\n\n/**\n * Constructs a service interface object. Each API operation is exposed as a\n * function on service.\n *\n * ### Sending a Request Using IotData\n *\n * ```javascript\n * var iotdata = new AWS.IotData({endpoint: 'my.host.tld'});\n * iotdata.getThingShadow(params, function (err, data) {\n * if (err) console.log(err, err.stack); // an error occurred\n * else console.log(data); // successful response\n * });\n * ```\n *\n * ### Locking the API Version\n *\n * In order to ensure that the IotData object uses this specific API,\n * you can construct the object by passing the `apiVersion` option to the\n * constructor:\n *\n * ```javascript\n * var iotdata = new AWS.IotData({\n * endpoint: 'my.host.tld',\n * apiVersion: '2015-05-28'\n * });\n * ```\n *\n * You can also set the API version globally in `AWS.config.apiVersions` using\n * the **iotdata** service identifier:\n *\n * ```javascript\n * AWS.config.apiVersions = {\n * iotdata: '2015-05-28',\n * // other service API versions\n * };\n *\n * var iotdata = new AWS.IotData({endpoint: 'my.host.tld'});\n * ```\n *\n * @note You *must* provide an `endpoint` configuration parameter when\n * constructing this service. See {constructor} for more information.\n *\n * @!method constructor(options = {})\n * Constructs a service object. This object has one method for each\n * API operation.\n *\n * @example Constructing a IotData object\n * var iotdata = new AWS.IotData({endpoint: 'my.host.tld'});\n * @note You *must* provide an `endpoint` when constructing this service.\n * @option (see AWS.Config.constructor)\n *\n * @service iotdata\n * @version 2015-05-28\n */\nAWS.util.update(AWS.IotData.prototype, {\n /**\n * @api private\n */\n validateService: function validateService() {\n if (!this.config.endpoint || this.config.endpoint.indexOf('{') >= 0) {\n var msg = 'AWS.IotData requires an explicit ' +\n '`endpoint\\' configuration option.';\n throw AWS.util.error(new Error(),\n {name: 'InvalidEndpoint', message: msg});\n }\n },\n\n /**\n * @api private\n */\n setupRequestListeners: function setupRequestListeners(request) {\n request.addListener('validateResponse', this.validateResponseBody);\n if (blobPayloadOutputOps.indexOf(request.operation) > -1) {\n request.addListener('extractData', AWS.util.convertPayloadToString);\n }\n },\n\n /**\n * @api private\n */\n validateResponseBody: function validateResponseBody(resp) {\n var body = resp.httpResponse.body.toString() || '{}';\n var bodyCheck = body.trim();\n if (!bodyCheck || bodyCheck.charAt(0) !== '{') {\n resp.httpResponse.body = '';\n }\n }\n\n});\n","var AWS = require('../core');\n\nAWS.util.update(AWS.Lambda.prototype, {\n /**\n * @api private\n */\n setupRequestListeners: function setupRequestListeners(request) {\n if (request.operation === 'invoke') {\n request.addListener('extractData', AWS.util.convertPayloadToString);\n }\n }\n});\n\n","var AWS = require('../core');\n\nAWS.util.update(AWS.MachineLearning.prototype, {\n /**\n * @api private\n */\n setupRequestListeners: function setupRequestListeners(request) {\n if (request.operation === 'predict') {\n request.addListener('build', this.buildEndpoint);\n }\n },\n\n /**\n * Updates request endpoint from PredictEndpoint\n * @api private\n */\n buildEndpoint: function buildEndpoint(request) {\n var url = request.params.PredictEndpoint;\n if (url) {\n request.httpRequest.endpoint = new AWS.Endpoint(url);\n }\n }\n\n});\n","var AWS = require('../core');\nvar rdsutil = require('./rdsutil');\n\n/**\n* @api private\n*/\nvar crossRegionOperations = ['createDBCluster', 'copyDBClusterSnapshot'];\n\nAWS.util.update(AWS.Neptune.prototype, {\n /**\n * @api private\n */\n setupRequestListeners: function setupRequestListeners(request) {\n if (\n crossRegionOperations.indexOf(request.operation) !== -1 &&\n this.config.params &&\n this.config.params.SourceRegion &&\n request.params &&\n !request.params.SourceRegion\n ) {\n request.params.SourceRegion = this.config.params.SourceRegion;\n }\n rdsutil.setupRequestListeners(this, request, crossRegionOperations);\n },\n});\n","require('../polly/presigner');\n","var AWS = require('../core');\nvar rdsutil = require('./rdsutil');\nrequire('../rds/signer');\n /**\n * @api private\n */\n var crossRegionOperations = ['copyDBSnapshot', 'createDBInstanceReadReplica', 'createDBCluster', 'copyDBClusterSnapshot', 'startDBInstanceAutomatedBackupsReplication'];\n\n AWS.util.update(AWS.RDS.prototype, {\n /**\n * @api private\n */\n setupRequestListeners: function setupRequestListeners(request) {\n rdsutil.setupRequestListeners(this, request, crossRegionOperations);\n },\n });\n","var AWS = require('../core');\n\nAWS.util.update(AWS.RDSDataService.prototype, {\n /**\n * @return [Boolean] whether the error can be retried\n * @api private\n */\n retryableError: function retryableError(error) {\n if (error.code === 'BadRequestException' &&\n error.message &&\n error.message.match(/^Communications link failure/) &&\n error.statusCode === 400) {\n return true;\n } else {\n var _super = AWS.Service.prototype.retryableError;\n return _super.call(this, error);\n }\n }\n});\n","var AWS = require('../core');\n\nvar rdsutil = {\n /**\n * @api private\n */\n setupRequestListeners: function setupRequestListeners(service, request, crossRegionOperations) {\n if (crossRegionOperations.indexOf(request.operation) !== -1 &&\n request.params.SourceRegion) {\n request.params = AWS.util.copy(request.params);\n if (request.params.PreSignedUrl ||\n request.params.SourceRegion === service.config.region) {\n delete request.params.SourceRegion;\n } else {\n var doesParamValidation = !!service.config.paramValidation;\n // remove the validate parameters listener so we can re-add it after we build the URL\n if (doesParamValidation) {\n request.removeListener('validate', AWS.EventListeners.Core.VALIDATE_PARAMETERS);\n }\n request.onAsync('validate', rdsutil.buildCrossRegionPresignedUrl);\n if (doesParamValidation) {\n request.addListener('validate', AWS.EventListeners.Core.VALIDATE_PARAMETERS);\n }\n }\n }\n },\n\n /**\n * @api private\n */\n buildCrossRegionPresignedUrl: function buildCrossRegionPresignedUrl(req, done) {\n var config = AWS.util.copy(req.service.config);\n config.region = req.params.SourceRegion;\n delete req.params.SourceRegion;\n delete config.endpoint;\n // relevant params for the operation will already be in req.params\n delete config.params;\n config.signatureVersion = 'v4';\n var destinationRegion = req.service.config.region;\n\n var svc = new req.service.constructor(config);\n var newReq = svc[req.operation](AWS.util.copy(req.params));\n newReq.on('build', function addDestinationRegionParam(request) {\n var httpRequest = request.httpRequest;\n httpRequest.params.DestinationRegion = destinationRegion;\n httpRequest.body = AWS.util.queryParamsToString(httpRequest.params);\n });\n newReq.presign(function(err, url) {\n if (err) done(err);\n else {\n req.params.PreSignedUrl = url;\n done();\n }\n });\n }\n};\n\n/**\n * @api private\n */\nmodule.exports = rdsutil;\n","var AWS = require('../core');\n\nAWS.util.update(AWS.Route53.prototype, {\n /**\n * @api private\n */\n setupRequestListeners: function setupRequestListeners(request) {\n request.on('build', this.sanitizeUrl);\n },\n\n /**\n * @api private\n */\n sanitizeUrl: function sanitizeUrl(request) {\n var path = request.httpRequest.path;\n request.httpRequest.path = path.replace(/\\/%2F\\w+%2F/, '/');\n },\n\n /**\n * @return [Boolean] whether the error can be retried\n * @api private\n */\n retryableError: function retryableError(error) {\n if (error.code === 'PriorRequestNotComplete' &&\n error.statusCode === 400) {\n return true;\n } else {\n var _super = AWS.Service.prototype.retryableError;\n return _super.call(this, error);\n }\n }\n});\n","var AWS = require('../core');\nvar v4Credentials = require('../signers/v4_credentials');\nvar resolveRegionalEndpointsFlag = require('../config_regional_endpoint');\nvar s3util = require('./s3util');\nvar regionUtil = require('../region_config');\n\n// Pull in managed upload extension\nrequire('../s3/managed_upload');\n\n/**\n * @api private\n */\nvar operationsWith200StatusCodeError = {\n 'completeMultipartUpload': true,\n 'copyObject': true,\n 'uploadPartCopy': true\n};\n\n/**\n * @api private\n */\n var regionRedirectErrorCodes = [\n 'AuthorizationHeaderMalformed', // non-head operations on virtual-hosted global bucket endpoints\n 'BadRequest', // head operations on virtual-hosted global bucket endpoints\n 'PermanentRedirect', // non-head operations on path-style or regional endpoints\n 301 // head operations on path-style or regional endpoints\n ];\n\nvar OBJECT_LAMBDA_SERVICE = 's3-object-lambda';\n\nAWS.util.update(AWS.S3.prototype, {\n /**\n * @api private\n */\n getSignatureVersion: function getSignatureVersion(request) {\n var defaultApiVersion = this.api.signatureVersion;\n var userDefinedVersion = this._originalConfig ? this._originalConfig.signatureVersion : null;\n var regionDefinedVersion = this.config.signatureVersion;\n var isPresigned = request ? request.isPresigned() : false;\n /*\n 1) User defined version specified:\n a) always return user defined version\n 2) No user defined version specified:\n a) If not using presigned urls, default to V4\n b) If using presigned urls, default to lowest version the region supports\n */\n if (userDefinedVersion) {\n userDefinedVersion = userDefinedVersion === 'v2' ? 's3' : userDefinedVersion;\n return userDefinedVersion;\n }\n if (isPresigned !== true) {\n defaultApiVersion = 'v4';\n } else if (regionDefinedVersion) {\n defaultApiVersion = regionDefinedVersion;\n }\n return defaultApiVersion;\n },\n\n /**\n * @api private\n */\n getSigningName: function getSigningName(req) {\n if (req && req.operation === 'writeGetObjectResponse') {\n return OBJECT_LAMBDA_SERVICE;\n }\n\n var _super = AWS.Service.prototype.getSigningName;\n return (req && req._parsedArn && req._parsedArn.service)\n ? req._parsedArn.service\n : _super.call(this);\n },\n\n /**\n * @api private\n */\n getSignerClass: function getSignerClass(request) {\n var signatureVersion = this.getSignatureVersion(request);\n return AWS.Signers.RequestSigner.getVersion(signatureVersion);\n },\n\n /**\n * @api private\n */\n validateService: function validateService() {\n var msg;\n var messages = [];\n\n // default to us-east-1 when no region is provided\n if (!this.config.region) this.config.region = 'us-east-1';\n\n if (!this.config.endpoint && this.config.s3BucketEndpoint) {\n messages.push('An endpoint must be provided when configuring ' +\n '`s3BucketEndpoint` to true.');\n }\n if (messages.length === 1) {\n msg = messages[0];\n } else if (messages.length > 1) {\n msg = 'Multiple configuration errors:\\n' + messages.join('\\n');\n }\n if (msg) {\n throw AWS.util.error(new Error(),\n {name: 'InvalidEndpoint', message: msg});\n }\n },\n\n /**\n * @api private\n */\n shouldDisableBodySigning: function shouldDisableBodySigning(request) {\n var signerClass = this.getSignerClass();\n if (this.config.s3DisableBodySigning === true && signerClass === AWS.Signers.V4\n && request.httpRequest.endpoint.protocol === 'https:') {\n return true;\n }\n return false;\n },\n\n /**\n * @api private\n */\n setupRequestListeners: function setupRequestListeners(request) {\n var prependListener = true;\n request.addListener('validate', this.validateScheme);\n request.addListener('validate', this.validateBucketName, prependListener);\n request.addListener('validate', this.optInUsEast1RegionalEndpoint, prependListener);\n\n request.removeListener('validate',\n AWS.EventListeners.Core.VALIDATE_REGION);\n request.addListener('build', this.addContentType);\n request.addListener('build', this.computeContentMd5);\n request.addListener('build', this.computeSseCustomerKeyMd5);\n request.addListener('build', this.populateURI);\n request.addListener('afterBuild', this.addExpect100Continue);\n request.addListener('extractError', this.extractError);\n request.addListener('extractData', AWS.util.hoistPayloadMember);\n request.addListener('extractData', this.extractData);\n request.addListener('extractData', this.extractErrorFrom200Response);\n request.addListener('beforePresign', this.prepareSignedUrl);\n if (this.shouldDisableBodySigning(request)) {\n request.removeListener('afterBuild', AWS.EventListeners.Core.COMPUTE_SHA256);\n request.addListener('afterBuild', this.disableBodySigning);\n }\n //deal with ARNs supplied to Bucket\n if (request.operation !== 'createBucket' && s3util.isArnInParam(request, 'Bucket')) {\n // avoid duplicate parsing in the future\n request._parsedArn = AWS.util.ARN.parse(request.params.Bucket);\n\n request.removeListener('validate', this.validateBucketName);\n request.removeListener('build', this.populateURI);\n if (request._parsedArn.service === 's3') {\n request.addListener('validate', s3util.validateS3AccessPointArn);\n request.addListener('validate', this.validateArnResourceType);\n request.addListener('validate', this.validateArnRegion);\n } else if (request._parsedArn.service === 's3-outposts') {\n request.addListener('validate', s3util.validateOutpostsAccessPointArn);\n request.addListener('validate', s3util.validateOutpostsArn);\n request.addListener('validate', s3util.validateArnRegion);\n }\n request.addListener('validate', s3util.validateArnAccount);\n request.addListener('validate', s3util.validateArnService);\n request.addListener('build', this.populateUriFromAccessPointArn);\n request.addListener('build', s3util.validatePopulateUriFromArn);\n return;\n }\n //listeners regarding region inference\n request.addListener('validate', this.validateBucketEndpoint);\n request.addListener('validate', this.correctBucketRegionFromCache);\n request.onAsync('extractError', this.requestBucketRegion);\n if (AWS.util.isBrowser()) {\n request.onAsync('retry', this.reqRegionForNetworkingError);\n }\n },\n\n /**\n * @api private\n */\n validateScheme: function(req) {\n var params = req.params,\n scheme = req.httpRequest.endpoint.protocol,\n sensitive = params.SSECustomerKey || params.CopySourceSSECustomerKey;\n if (sensitive && scheme !== 'https:') {\n var msg = 'Cannot send SSE keys over HTTP. Set \\'sslEnabled\\'' +\n 'to \\'true\\' in your configuration';\n throw AWS.util.error(new Error(),\n { code: 'ConfigError', message: msg });\n }\n },\n\n /**\n * @api private\n */\n validateBucketEndpoint: function(req) {\n if (!req.params.Bucket && req.service.config.s3BucketEndpoint) {\n var msg = 'Cannot send requests to root API with `s3BucketEndpoint` set.';\n throw AWS.util.error(new Error(),\n { code: 'ConfigError', message: msg });\n }\n },\n\n /**\n * @api private\n */\n validateArnRegion: function validateArnRegion(req) {\n s3util.validateArnRegion(req, { allowFipsEndpoint: true });\n },\n\n /**\n * Validate resource-type supplied in S3 ARN\n */\n validateArnResourceType: function validateArnResourceType(req) {\n var resource = req._parsedArn.resource;\n\n if (\n resource.indexOf('accesspoint:') !== 0 &&\n resource.indexOf('accesspoint/') !== 0\n ) {\n throw AWS.util.error(new Error(), {\n code: 'InvalidARN',\n message: 'ARN resource should begin with \\'accesspoint/\\''\n });\n }\n },\n\n /**\n * @api private\n */\n validateBucketName: function validateBucketName(req) {\n var service = req.service;\n var signatureVersion = service.getSignatureVersion(req);\n var bucket = req.params && req.params.Bucket;\n var key = req.params && req.params.Key;\n var slashIndex = bucket && bucket.indexOf('/');\n if (bucket && slashIndex >= 0) {\n if (typeof key === 'string' && slashIndex > 0) {\n req.params = AWS.util.copy(req.params);\n // Need to include trailing slash to match sigv2 behavior\n var prefix = bucket.substr(slashIndex + 1) || '';\n req.params.Key = prefix + '/' + key;\n req.params.Bucket = bucket.substr(0, slashIndex);\n } else if (signatureVersion === 'v4') {\n var msg = 'Bucket names cannot contain forward slashes. Bucket: ' + bucket;\n throw AWS.util.error(new Error(),\n { code: 'InvalidBucket', message: msg });\n }\n }\n },\n\n /**\n * @api private\n */\n isValidAccelerateOperation: function isValidAccelerateOperation(operation) {\n var invalidOperations = [\n 'createBucket',\n 'deleteBucket',\n 'listBuckets'\n ];\n return invalidOperations.indexOf(operation) === -1;\n },\n\n /**\n * When us-east-1 region endpoint configuration is set, in stead of sending request to\n * global endpoint(e.g. 's3.amazonaws.com'), we will send request to\n * 's3.us-east-1.amazonaws.com'.\n * @api private\n */\n optInUsEast1RegionalEndpoint: function optInUsEast1RegionalEndpoint(req) {\n var service = req.service;\n var config = service.config;\n config.s3UsEast1RegionalEndpoint = resolveRegionalEndpointsFlag(service._originalConfig, {\n env: 'AWS_S3_US_EAST_1_REGIONAL_ENDPOINT',\n sharedConfig: 's3_us_east_1_regional_endpoint',\n clientConfig: 's3UsEast1RegionalEndpoint'\n });\n if (\n !(service._originalConfig || {}).endpoint &&\n req.httpRequest.region === 'us-east-1' &&\n config.s3UsEast1RegionalEndpoint === 'regional' &&\n req.httpRequest.endpoint.hostname.indexOf('s3.amazonaws.com') >= 0\n ) {\n var insertPoint = config.endpoint.indexOf('.amazonaws.com');\n regionalEndpoint = config.endpoint.substring(0, insertPoint) +\n '.us-east-1' + config.endpoint.substring(insertPoint);\n req.httpRequest.updateEndpoint(regionalEndpoint);\n }\n },\n\n /**\n * S3 prefers dns-compatible bucket names to be moved from the uri path\n * to the hostname as a sub-domain. This is not possible, even for dns-compat\n * buckets when using SSL and the bucket name contains a dot ('.'). The\n * ssl wildcard certificate is only 1-level deep.\n *\n * @api private\n */\n populateURI: function populateURI(req) {\n var httpRequest = req.httpRequest;\n var b = req.params.Bucket;\n var service = req.service;\n var endpoint = httpRequest.endpoint;\n if (b) {\n if (!service.pathStyleBucketName(b)) {\n if (service.config.useAccelerateEndpoint && service.isValidAccelerateOperation(req.operation)) {\n if (service.config.useDualstackEndpoint) {\n endpoint.hostname = b + '.s3-accelerate.dualstack.amazonaws.com';\n } else {\n endpoint.hostname = b + '.s3-accelerate.amazonaws.com';\n }\n } else if (!service.config.s3BucketEndpoint) {\n endpoint.hostname =\n b + '.' + endpoint.hostname;\n }\n\n var port = endpoint.port;\n if (port !== 80 && port !== 443) {\n endpoint.host = endpoint.hostname + ':' +\n endpoint.port;\n } else {\n endpoint.host = endpoint.hostname;\n }\n\n httpRequest.virtualHostedBucket = b; // needed for signing the request\n service.removeVirtualHostedBucketFromPath(req);\n }\n }\n },\n\n /**\n * Takes the bucket name out of the path if bucket is virtual-hosted\n *\n * @api private\n */\n removeVirtualHostedBucketFromPath: function removeVirtualHostedBucketFromPath(req) {\n var httpRequest = req.httpRequest;\n var bucket = httpRequest.virtualHostedBucket;\n if (bucket && httpRequest.path) {\n if (req.params && req.params.Key) {\n var encodedS3Key = '/' + AWS.util.uriEscapePath(req.params.Key);\n if (httpRequest.path.indexOf(encodedS3Key) === 0 && (httpRequest.path.length === encodedS3Key.length || httpRequest.path[encodedS3Key.length] === '?')) {\n //path only contains key or path contains only key and querystring\n return;\n }\n }\n httpRequest.path = httpRequest.path.replace(new RegExp('/' + bucket), '');\n if (httpRequest.path[0] !== '/') {\n httpRequest.path = '/' + httpRequest.path;\n }\n }\n },\n\n /**\n * When user supply an access point ARN in the Bucket parameter, we need to\n * populate the URI according to the ARN.\n */\n populateUriFromAccessPointArn: function populateUriFromAccessPointArn(req) {\n var accessPointArn = req._parsedArn;\n\n var isOutpostArn = accessPointArn.service === 's3-outposts';\n var isObjectLambdaArn = accessPointArn.service === 's3-object-lambda';\n\n var outpostsSuffix = isOutpostArn ? '.' + accessPointArn.outpostId: '';\n var serviceName = isOutpostArn ? 's3-outposts': 's3-accesspoint';\n var fipsSuffix = !isOutpostArn && req.service.config.useFipsEndpoint ? '-fips': '';\n var dualStackSuffix = !isOutpostArn &&\n req.service.config.useDualstackEndpoint ? '.dualstack' : '';\n\n var endpoint = req.httpRequest.endpoint;\n var dnsSuffix = regionUtil.getEndpointSuffix(accessPointArn.region);\n var useArnRegion = req.service.config.s3UseArnRegion;\n\n endpoint.hostname = [\n accessPointArn.accessPoint + '-' + accessPointArn.accountId + outpostsSuffix,\n serviceName + fipsSuffix + dualStackSuffix,\n useArnRegion ? accessPointArn.region : req.service.config.region,\n dnsSuffix\n ].join('.');\n\n if (isObjectLambdaArn) {\n // should be in the format: \"accesspoint/${accesspointName}\"\n var serviceName = 's3-object-lambda';\n var accesspointName = accessPointArn.resource.split('/')[1];\n var fipsSuffix = req.service.config.useFipsEndpoint ? '-fips': '';\n endpoint.hostname = [\n accesspointName + '-' + accessPointArn.accountId,\n serviceName + fipsSuffix,\n useArnRegion ? accessPointArn.region : req.service.config.region,\n dnsSuffix\n ].join('.');\n }\n endpoint.host = endpoint.hostname;\n var encodedArn = AWS.util.uriEscape(req.params.Bucket);\n var path = req.httpRequest.path;\n //remove the Bucket value from path\n req.httpRequest.path = path.replace(new RegExp('/' + encodedArn), '');\n if (req.httpRequest.path[0] !== '/') {\n req.httpRequest.path = '/' + req.httpRequest.path;\n }\n req.httpRequest.region = accessPointArn.region; //region used to sign\n },\n\n /**\n * Adds Expect: 100-continue header if payload is greater-or-equal 1MB\n * @api private\n */\n addExpect100Continue: function addExpect100Continue(req) {\n var len = req.httpRequest.headers['Content-Length'];\n if (AWS.util.isNode() && (len >= 1024 * 1024 || req.params.Body instanceof AWS.util.stream.Stream)) {\n req.httpRequest.headers['Expect'] = '100-continue';\n }\n },\n\n /**\n * Adds a default content type if none is supplied.\n *\n * @api private\n */\n addContentType: function addContentType(req) {\n var httpRequest = req.httpRequest;\n if (httpRequest.method === 'GET' || httpRequest.method === 'HEAD') {\n // Content-Type is not set in GET/HEAD requests\n delete httpRequest.headers['Content-Type'];\n return;\n }\n\n if (!httpRequest.headers['Content-Type']) { // always have a Content-Type\n httpRequest.headers['Content-Type'] = 'application/octet-stream';\n }\n\n var contentType = httpRequest.headers['Content-Type'];\n if (AWS.util.isBrowser()) {\n if (typeof httpRequest.body === 'string' && !contentType.match(/;\\s*charset=/)) {\n var charset = '; charset=UTF-8';\n httpRequest.headers['Content-Type'] += charset;\n } else {\n var replaceFn = function(_, prefix, charsetName) {\n return prefix + charsetName.toUpperCase();\n };\n\n httpRequest.headers['Content-Type'] =\n contentType.replace(/(;\\s*charset=)(.+)$/, replaceFn);\n }\n }\n },\n\n /**\n * Checks whether checksums should be computed for the request if it's not\n * already set by {AWS.EventListeners.Core.COMPUTE_CHECKSUM}. It depends on\n * whether {AWS.Config.computeChecksums} is set.\n *\n * @param req [AWS.Request] the request to check against\n * @return [Boolean] whether to compute checksums for a request.\n * @api private\n */\n willComputeChecksums: function willComputeChecksums(req) {\n var rules = req.service.api.operations[req.operation].input.members;\n var body = req.httpRequest.body;\n var needsContentMD5 = rules.ContentMD5 &&\n !req.params.ContentMD5 &&\n body &&\n (AWS.util.Buffer.isBuffer(req.httpRequest.body) || typeof req.httpRequest.body === 'string');\n\n // Sha256 signing disabled, and not a presigned url\n if (needsContentMD5 && req.service.shouldDisableBodySigning(req) && !req.isPresigned()) {\n return true;\n }\n\n // SigV2 and presign, for backwards compatibility purpose.\n if (needsContentMD5 && this.getSignatureVersion(req) === 's3' && req.isPresigned()) {\n return true;\n }\n\n return false;\n },\n\n /**\n * A listener that computes the Content-MD5 and sets it in the header.\n * This listener is to support S3-specific features like\n * s3DisableBodySigning and SigV2 presign. Content MD5 logic for SigV4 is\n * handled in AWS.EventListeners.Core.COMPUTE_CHECKSUM\n *\n * @api private\n */\n computeContentMd5: function computeContentMd5(req) {\n if (req.service.willComputeChecksums(req)) {\n var md5 = AWS.util.crypto.md5(req.httpRequest.body, 'base64');\n req.httpRequest.headers['Content-MD5'] = md5;\n }\n },\n\n /**\n * @api private\n */\n computeSseCustomerKeyMd5: function computeSseCustomerKeyMd5(req) {\n var keys = {\n SSECustomerKey: 'x-amz-server-side-encryption-customer-key-MD5',\n CopySourceSSECustomerKey: 'x-amz-copy-source-server-side-encryption-customer-key-MD5'\n };\n AWS.util.each(keys, function(key, header) {\n if (req.params[key]) {\n var value = AWS.util.crypto.md5(req.params[key], 'base64');\n req.httpRequest.headers[header] = value;\n }\n });\n },\n\n /**\n * Returns true if the bucket name should be left in the URI path for\n * a request to S3. This function takes into account the current\n * endpoint protocol (e.g. http or https).\n *\n * @api private\n */\n pathStyleBucketName: function pathStyleBucketName(bucketName) {\n // user can force path style requests via the configuration\n if (this.config.s3ForcePathStyle) return true;\n if (this.config.s3BucketEndpoint) return false;\n\n if (s3util.dnsCompatibleBucketName(bucketName)) {\n return (this.config.sslEnabled && bucketName.match(/\\./)) ? true : false;\n } else {\n return true; // not dns compatible names must always use path style\n }\n },\n\n /**\n * For COPY operations, some can be error even with status code 200.\n * SDK treats the response as exception when response body indicates\n * an exception or body is empty.\n *\n * @api private\n */\n extractErrorFrom200Response: function extractErrorFrom200Response(resp) {\n if (!operationsWith200StatusCodeError[resp.request.operation]) return;\n var httpResponse = resp.httpResponse;\n if (httpResponse.body && httpResponse.body.toString().match('')) {\n // Response body with '...' indicates an exception.\n // Get S3 client object. In ManagedUpload, this.service refers to\n // S3 client object.\n resp.data = null;\n var service = this.service ? this.service : this;\n service.extractError(resp);\n throw resp.error;\n } else if (!httpResponse.body || !httpResponse.body.toString().match(/<[\\w_]/)) {\n // When body is empty or incomplete, S3 might stop the request on detecting client\n // side aborting the request.\n resp.data = null;\n throw AWS.util.error(new Error(), {\n code: 'InternalError',\n message: 'S3 aborted request'\n });\n }\n },\n\n /**\n * @return [Boolean] whether the error can be retried\n * @api private\n */\n retryableError: function retryableError(error, request) {\n if (operationsWith200StatusCodeError[request.operation] &&\n error.statusCode === 200) {\n return true;\n } else if (request._requestRegionForBucket &&\n request.service.bucketRegionCache[request._requestRegionForBucket]) {\n return false;\n } else if (error && error.code === 'RequestTimeout') {\n return true;\n } else if (error &&\n regionRedirectErrorCodes.indexOf(error.code) != -1 &&\n error.region && error.region != request.httpRequest.region) {\n request.httpRequest.region = error.region;\n if (error.statusCode === 301) {\n request.service.updateReqBucketRegion(request);\n }\n return true;\n } else {\n var _super = AWS.Service.prototype.retryableError;\n return _super.call(this, error, request);\n }\n },\n\n /**\n * Updates httpRequest with region. If region is not provided, then\n * the httpRequest will be updated based on httpRequest.region\n *\n * @api private\n */\n updateReqBucketRegion: function updateReqBucketRegion(request, region) {\n var httpRequest = request.httpRequest;\n if (typeof region === 'string' && region.length) {\n httpRequest.region = region;\n }\n if (!httpRequest.endpoint.host.match(/s3(?!-accelerate).*\\.amazonaws\\.com$/)) {\n return;\n }\n var service = request.service;\n var s3Config = service.config;\n var s3BucketEndpoint = s3Config.s3BucketEndpoint;\n if (s3BucketEndpoint) {\n delete s3Config.s3BucketEndpoint;\n }\n var newConfig = AWS.util.copy(s3Config);\n delete newConfig.endpoint;\n newConfig.region = httpRequest.region;\n\n httpRequest.endpoint = (new AWS.S3(newConfig)).endpoint;\n service.populateURI(request);\n s3Config.s3BucketEndpoint = s3BucketEndpoint;\n httpRequest.headers.Host = httpRequest.endpoint.host;\n\n if (request._asm.currentState === 'validate') {\n request.removeListener('build', service.populateURI);\n request.addListener('build', service.removeVirtualHostedBucketFromPath);\n }\n },\n\n /**\n * Provides a specialized parser for getBucketLocation -- all other\n * operations are parsed by the super class.\n *\n * @api private\n */\n extractData: function extractData(resp) {\n var req = resp.request;\n if (req.operation === 'getBucketLocation') {\n var match = resp.httpResponse.body.toString().match(/>(.+)<\\/Location/);\n delete resp.data['_'];\n if (match) {\n resp.data.LocationConstraint = match[1];\n } else {\n resp.data.LocationConstraint = '';\n }\n }\n var bucket = req.params.Bucket || null;\n if (req.operation === 'deleteBucket' && typeof bucket === 'string' && !resp.error) {\n req.service.clearBucketRegionCache(bucket);\n } else {\n var headers = resp.httpResponse.headers || {};\n var region = headers['x-amz-bucket-region'] || null;\n if (!region && req.operation === 'createBucket' && !resp.error) {\n var createBucketConfiguration = req.params.CreateBucketConfiguration;\n if (!createBucketConfiguration) {\n region = 'us-east-1';\n } else if (createBucketConfiguration.LocationConstraint === 'EU') {\n region = 'eu-west-1';\n } else {\n region = createBucketConfiguration.LocationConstraint;\n }\n }\n if (region) {\n if (bucket && region !== req.service.bucketRegionCache[bucket]) {\n req.service.bucketRegionCache[bucket] = region;\n }\n }\n }\n req.service.extractRequestIds(resp);\n },\n\n /**\n * Extracts an error object from the http response.\n *\n * @api private\n */\n extractError: function extractError(resp) {\n var codes = {\n 304: 'NotModified',\n 403: 'Forbidden',\n 400: 'BadRequest',\n 404: 'NotFound'\n };\n\n var req = resp.request;\n var code = resp.httpResponse.statusCode;\n var body = resp.httpResponse.body || '';\n\n var headers = resp.httpResponse.headers || {};\n var region = headers['x-amz-bucket-region'] || null;\n var bucket = req.params.Bucket || null;\n var bucketRegionCache = req.service.bucketRegionCache;\n if (region && bucket && region !== bucketRegionCache[bucket]) {\n bucketRegionCache[bucket] = region;\n }\n\n var cachedRegion;\n if (codes[code] && body.length === 0) {\n if (bucket && !region) {\n cachedRegion = bucketRegionCache[bucket] || null;\n if (cachedRegion !== req.httpRequest.region) {\n region = cachedRegion;\n }\n }\n resp.error = AWS.util.error(new Error(), {\n code: codes[code],\n message: null,\n region: region\n });\n } else {\n var data = new AWS.XML.Parser().parse(body.toString());\n\n if (data.Region && !region) {\n region = data.Region;\n if (bucket && region !== bucketRegionCache[bucket]) {\n bucketRegionCache[bucket] = region;\n }\n } else if (bucket && !region && !data.Region) {\n cachedRegion = bucketRegionCache[bucket] || null;\n if (cachedRegion !== req.httpRequest.region) {\n region = cachedRegion;\n }\n }\n\n resp.error = AWS.util.error(new Error(), {\n code: data.Code || code,\n message: data.Message || null,\n region: region\n });\n }\n req.service.extractRequestIds(resp);\n },\n\n /**\n * If region was not obtained synchronously, then send async request\n * to get bucket region for errors resulting from wrong region.\n *\n * @api private\n */\n requestBucketRegion: function requestBucketRegion(resp, done) {\n var error = resp.error;\n var req = resp.request;\n var bucket = req.params.Bucket || null;\n\n if (!error || !bucket || error.region || req.operation === 'listObjects' ||\n (AWS.util.isNode() && req.operation === 'headBucket') ||\n (error.statusCode === 400 && req.operation !== 'headObject') ||\n regionRedirectErrorCodes.indexOf(error.code) === -1) {\n return done();\n }\n var reqOperation = AWS.util.isNode() ? 'headBucket' : 'listObjects';\n var reqParams = {Bucket: bucket};\n if (reqOperation === 'listObjects') reqParams.MaxKeys = 0;\n var regionReq = req.service[reqOperation](reqParams);\n regionReq._requestRegionForBucket = bucket;\n regionReq.send(function() {\n var region = req.service.bucketRegionCache[bucket] || null;\n error.region = region;\n done();\n });\n },\n\n /**\n * For browser only. If NetworkingError received, will attempt to obtain\n * the bucket region.\n *\n * @api private\n */\n reqRegionForNetworkingError: function reqRegionForNetworkingError(resp, done) {\n if (!AWS.util.isBrowser()) {\n return done();\n }\n var error = resp.error;\n var request = resp.request;\n var bucket = request.params.Bucket;\n if (!error || error.code !== 'NetworkingError' || !bucket ||\n request.httpRequest.region === 'us-east-1') {\n return done();\n }\n var service = request.service;\n var bucketRegionCache = service.bucketRegionCache;\n var cachedRegion = bucketRegionCache[bucket] || null;\n\n if (cachedRegion && cachedRegion !== request.httpRequest.region) {\n service.updateReqBucketRegion(request, cachedRegion);\n done();\n } else if (!s3util.dnsCompatibleBucketName(bucket)) {\n service.updateReqBucketRegion(request, 'us-east-1');\n if (bucketRegionCache[bucket] !== 'us-east-1') {\n bucketRegionCache[bucket] = 'us-east-1';\n }\n done();\n } else if (request.httpRequest.virtualHostedBucket) {\n var getRegionReq = service.listObjects({Bucket: bucket, MaxKeys: 0});\n service.updateReqBucketRegion(getRegionReq, 'us-east-1');\n getRegionReq._requestRegionForBucket = bucket;\n\n getRegionReq.send(function() {\n var region = service.bucketRegionCache[bucket] || null;\n if (region && region !== request.httpRequest.region) {\n service.updateReqBucketRegion(request, region);\n }\n done();\n });\n } else {\n // DNS-compatible path-style\n // (s3ForcePathStyle or bucket name with dot over https)\n // Cannot obtain region information for this case\n done();\n }\n },\n\n /**\n * Cache for bucket region.\n *\n * @api private\n */\n bucketRegionCache: {},\n\n /**\n * Clears bucket region cache.\n *\n * @api private\n */\n clearBucketRegionCache: function(buckets) {\n var bucketRegionCache = this.bucketRegionCache;\n if (!buckets) {\n buckets = Object.keys(bucketRegionCache);\n } else if (typeof buckets === 'string') {\n buckets = [buckets];\n }\n for (var i = 0; i < buckets.length; i++) {\n delete bucketRegionCache[buckets[i]];\n }\n return bucketRegionCache;\n },\n\n /**\n * Corrects request region if bucket's cached region is different\n *\n * @api private\n */\n correctBucketRegionFromCache: function correctBucketRegionFromCache(req) {\n var bucket = req.params.Bucket || null;\n if (bucket) {\n var service = req.service;\n var requestRegion = req.httpRequest.region;\n var cachedRegion = service.bucketRegionCache[bucket];\n if (cachedRegion && cachedRegion !== requestRegion) {\n service.updateReqBucketRegion(req, cachedRegion);\n }\n }\n },\n\n /**\n * Extracts S3 specific request ids from the http response.\n *\n * @api private\n */\n extractRequestIds: function extractRequestIds(resp) {\n var extendedRequestId = resp.httpResponse.headers ? resp.httpResponse.headers['x-amz-id-2'] : null;\n var cfId = resp.httpResponse.headers ? resp.httpResponse.headers['x-amz-cf-id'] : null;\n resp.extendedRequestId = extendedRequestId;\n resp.cfId = cfId;\n\n if (resp.error) {\n resp.error.requestId = resp.requestId || null;\n resp.error.extendedRequestId = extendedRequestId;\n resp.error.cfId = cfId;\n }\n },\n\n /**\n * Get a pre-signed URL for a given operation name.\n *\n * @note You must ensure that you have static or previously resolved\n * credentials if you call this method synchronously (with no callback),\n * otherwise it may not properly sign the request. If you cannot guarantee\n * this (you are using an asynchronous credential provider, i.e., EC2\n * IAM roles), you should always call this method with an asynchronous\n * callback.\n * @note Not all operation parameters are supported when using pre-signed\n * URLs. Certain parameters, such as `SSECustomerKey`, `ACL`, `Expires`,\n * `ContentLength`, or `Tagging` must be provided as headers when sending a\n * request. If you are using pre-signed URLs to upload from a browser and\n * need to use these fields, see {createPresignedPost}.\n * @note The default signer allows altering the request by adding corresponding\n * headers to set some parameters (e.g. Range) and these added parameters\n * won't be signed. You must use signatureVersion v4 to to include these\n * parameters in the signed portion of the URL and enforce exact matching\n * between headers and signed params in the URL.\n * @note This operation cannot be used with a promise. See note above regarding\n * asynchronous credentials and use with a callback.\n * @param operation [String] the name of the operation to call\n * @param params [map] parameters to pass to the operation. See the given\n * operation for the expected operation parameters. In addition, you can\n * also pass the \"Expires\" parameter to inform S3 how long the URL should\n * work for.\n * @option params Expires [Integer] (900) the number of seconds to expire\n * the pre-signed URL operation in. Defaults to 15 minutes.\n * @param callback [Function] if a callback is provided, this function will\n * pass the URL as the second parameter (after the error parameter) to\n * the callback function.\n * @return [String] if called synchronously (with no callback), returns the\n * signed URL.\n * @return [null] nothing is returned if a callback is provided.\n * @example Pre-signing a getObject operation (synchronously)\n * var params = {Bucket: 'bucket', Key: 'key'};\n * var url = s3.getSignedUrl('getObject', params);\n * console.log('The URL is', url);\n * @example Pre-signing a putObject (asynchronously)\n * var params = {Bucket: 'bucket', Key: 'key'};\n * s3.getSignedUrl('putObject', params, function (err, url) {\n * console.log('The URL is', url);\n * });\n * @example Pre-signing a putObject operation with a specific payload\n * var params = {Bucket: 'bucket', Key: 'key', Body: 'body'};\n * var url = s3.getSignedUrl('putObject', params);\n * console.log('The URL is', url);\n * @example Passing in a 1-minute expiry time for a pre-signed URL\n * var params = {Bucket: 'bucket', Key: 'key', Expires: 60};\n * var url = s3.getSignedUrl('getObject', params);\n * console.log('The URL is', url); // expires in 60 seconds\n */\n getSignedUrl: function getSignedUrl(operation, params, callback) {\n params = AWS.util.copy(params || {});\n var expires = params.Expires || 900;\n\n if (typeof expires !== 'number') {\n throw AWS.util.error(new Error(),\n { code: 'InvalidParameterException', message: 'The expiration must be a number, received ' + typeof expires });\n }\n\n delete params.Expires; // we can't validate this\n var request = this.makeRequest(operation, params);\n\n if (callback) {\n AWS.util.defer(function() {\n request.presign(expires, callback);\n });\n } else {\n return request.presign(expires, callback);\n }\n },\n\n /**\n * @!method getSignedUrlPromise()\n * Returns a 'thenable' promise that will be resolved with a pre-signed URL\n * for a given operation name.\n *\n * Two callbacks can be provided to the `then` method on the returned promise.\n * The first callback will be called if the promise is fulfilled, and the second\n * callback will be called if the promise is rejected.\n * @note Not all operation parameters are supported when using pre-signed\n * URLs. Certain parameters, such as `SSECustomerKey`, `ACL`, `Expires`,\n * `ContentLength`, or `Tagging` must be provided as headers when sending a\n * request. If you are using pre-signed URLs to upload from a browser and\n * need to use these fields, see {createPresignedPost}.\n * @param operation [String] the name of the operation to call\n * @param params [map] parameters to pass to the operation. See the given\n * operation for the expected operation parameters. In addition, you can\n * also pass the \"Expires\" parameter to inform S3 how long the URL should\n * work for.\n * @option params Expires [Integer] (900) the number of seconds to expire\n * the pre-signed URL operation in. Defaults to 15 minutes.\n * @callback fulfilledCallback function(url)\n * Called if the promise is fulfilled.\n * @param url [String] the signed url\n * @callback rejectedCallback function(err)\n * Called if the promise is rejected.\n * @param err [Error] if an error occurred, this value will be filled\n * @return [Promise] A promise that represents the state of the `refresh` call.\n * @example Pre-signing a getObject operation\n * var params = {Bucket: 'bucket', Key: 'key'};\n * var promise = s3.getSignedUrlPromise('getObject', params);\n * promise.then(function(url) {\n * console.log('The URL is', url);\n * }, function(err) { ... });\n * @example Pre-signing a putObject operation with a specific payload\n * var params = {Bucket: 'bucket', Key: 'key', Body: 'body'};\n * var promise = s3.getSignedUrlPromise('putObject', params);\n * promise.then(function(url) {\n * console.log('The URL is', url);\n * }, function(err) { ... });\n * @example Passing in a 1-minute expiry time for a pre-signed URL\n * var params = {Bucket: 'bucket', Key: 'key', Expires: 60};\n * var promise = s3.getSignedUrlPromise('getObject', params);\n * promise.then(function(url) {\n * console.log('The URL is', url);\n * }, function(err) { ... });\n */\n\n /**\n * Get a pre-signed POST policy to support uploading to S3 directly from an\n * HTML form.\n *\n * @param params [map]\n * @option params Bucket [String] The bucket to which the post should be\n * uploaded\n * @option params Expires [Integer] (3600) The number of seconds for which\n * the presigned policy should be valid.\n * @option params Conditions [Array] An array of conditions that must be met\n * for the presigned policy to allow the\n * upload. This can include required tags,\n * the accepted range for content lengths,\n * etc.\n * @see http://docs.aws.amazon.com/AmazonS3/latest/API/sigv4-HTTPPOSTConstructPolicy.html\n * @option params Fields [map] Fields to include in the form. All\n * values passed in as fields will be\n * signed as exact match conditions.\n * @param callback [Function]\n *\n * @note All fields passed in when creating presigned post data will be signed\n * as exact match conditions. Any fields that will be interpolated by S3\n * must be added to the fields hash after signing, and an appropriate\n * condition for such fields must be explicitly added to the Conditions\n * array passed to this function before signing.\n *\n * @example Presiging post data with a known key\n * var params = {\n * Bucket: 'bucket',\n * Fields: {\n * key: 'key'\n * }\n * };\n * s3.createPresignedPost(params, function(err, data) {\n * if (err) {\n * console.error('Presigning post data encountered an error', err);\n * } else {\n * console.log('The post data is', data);\n * }\n * });\n *\n * @example Presigning post data with an interpolated key\n * var params = {\n * Bucket: 'bucket',\n * Conditions: [\n * ['starts-with', '$key', 'path/to/uploads/']\n * ]\n * };\n * s3.createPresignedPost(params, function(err, data) {\n * if (err) {\n * console.error('Presigning post data encountered an error', err);\n * } else {\n * data.Fields.key = 'path/to/uploads/${filename}';\n * console.log('The post data is', data);\n * }\n * });\n *\n * @note You must ensure that you have static or previously resolved\n * credentials if you call this method synchronously (with no callback),\n * otherwise it may not properly sign the request. If you cannot guarantee\n * this (you are using an asynchronous credential provider, i.e., EC2\n * IAM roles), you should always call this method with an asynchronous\n * callback.\n *\n * @return [map] If called synchronously (with no callback), returns a hash\n * with the url to set as the form action and a hash of fields\n * to include in the form.\n * @return [null] Nothing is returned if a callback is provided.\n *\n * @callback callback function (err, data)\n * @param err [Error] the error object returned from the policy signer\n * @param data [map] The data necessary to construct an HTML form\n * @param data.url [String] The URL to use as the action of the form\n * @param data.fields [map] A hash of fields that must be included in the\n * form for the upload to succeed. This hash will\n * include the signed POST policy, your access key\n * ID and security token (if present), etc. These\n * may be safely included as input elements of type\n * 'hidden.'\n */\n createPresignedPost: function createPresignedPost(params, callback) {\n if (typeof params === 'function' && callback === undefined) {\n callback = params;\n params = null;\n }\n\n params = AWS.util.copy(params || {});\n var boundParams = this.config.params || {};\n var bucket = params.Bucket || boundParams.Bucket,\n self = this,\n config = this.config,\n endpoint = AWS.util.copy(this.endpoint);\n if (!config.s3BucketEndpoint) {\n endpoint.pathname = '/' + bucket;\n }\n\n function finalizePost() {\n return {\n url: AWS.util.urlFormat(endpoint),\n fields: self.preparePostFields(\n config.credentials,\n config.region,\n bucket,\n params.Fields,\n params.Conditions,\n params.Expires\n )\n };\n }\n\n if (callback) {\n config.getCredentials(function (err) {\n if (err) {\n callback(err);\n } else {\n try {\n callback(null, finalizePost());\n } catch (err) {\n callback(err);\n }\n }\n });\n } else {\n return finalizePost();\n }\n },\n\n /**\n * @api private\n */\n preparePostFields: function preparePostFields(\n credentials,\n region,\n bucket,\n fields,\n conditions,\n expiresInSeconds\n ) {\n var now = this.getSkewCorrectedDate();\n if (!credentials || !region || !bucket) {\n throw new Error('Unable to create a POST object policy without a bucket,'\n + ' region, and credentials');\n }\n fields = AWS.util.copy(fields || {});\n conditions = (conditions || []).slice(0);\n expiresInSeconds = expiresInSeconds || 3600;\n\n var signingDate = AWS.util.date.iso8601(now).replace(/[:\\-]|\\.\\d{3}/g, '');\n var shortDate = signingDate.substr(0, 8);\n var scope = v4Credentials.createScope(shortDate, region, 's3');\n var credential = credentials.accessKeyId + '/' + scope;\n\n fields['bucket'] = bucket;\n fields['X-Amz-Algorithm'] = 'AWS4-HMAC-SHA256';\n fields['X-Amz-Credential'] = credential;\n fields['X-Amz-Date'] = signingDate;\n if (credentials.sessionToken) {\n fields['X-Amz-Security-Token'] = credentials.sessionToken;\n }\n for (var field in fields) {\n if (fields.hasOwnProperty(field)) {\n var condition = {};\n condition[field] = fields[field];\n conditions.push(condition);\n }\n }\n\n fields.Policy = this.preparePostPolicy(\n new Date(now.valueOf() + expiresInSeconds * 1000),\n conditions\n );\n fields['X-Amz-Signature'] = AWS.util.crypto.hmac(\n v4Credentials.getSigningKey(credentials, shortDate, region, 's3', true),\n fields.Policy,\n 'hex'\n );\n\n return fields;\n },\n\n /**\n * @api private\n */\n preparePostPolicy: function preparePostPolicy(expiration, conditions) {\n return AWS.util.base64.encode(JSON.stringify({\n expiration: AWS.util.date.iso8601(expiration),\n conditions: conditions\n }));\n },\n\n /**\n * @api private\n */\n prepareSignedUrl: function prepareSignedUrl(request) {\n request.addListener('validate', request.service.noPresignedContentLength);\n request.removeListener('build', request.service.addContentType);\n if (!request.params.Body) {\n // no Content-MD5/SHA-256 if body is not provided\n request.removeListener('build', request.service.computeContentMd5);\n } else {\n request.addListener('afterBuild', AWS.EventListeners.Core.COMPUTE_SHA256);\n }\n },\n\n /**\n * @api private\n * @param request\n */\n disableBodySigning: function disableBodySigning(request) {\n var headers = request.httpRequest.headers;\n // Add the header to anything that isn't a presigned url, unless that presigned url had a body defined\n if (!Object.prototype.hasOwnProperty.call(headers, 'presigned-expires')) {\n headers['X-Amz-Content-Sha256'] = 'UNSIGNED-PAYLOAD';\n }\n },\n\n /**\n * @api private\n */\n noPresignedContentLength: function noPresignedContentLength(request) {\n if (request.params.ContentLength !== undefined) {\n throw AWS.util.error(new Error(), {code: 'UnexpectedParameter',\n message: 'ContentLength is not supported in pre-signed URLs.'});\n }\n },\n\n createBucket: function createBucket(params, callback) {\n // When creating a bucket *outside* the classic region, the location\n // constraint must be set for the bucket and it must match the endpoint.\n // This chunk of code will set the location constraint param based\n // on the region (when possible), but it will not override a passed-in\n // location constraint.\n if (typeof params === 'function' || !params) {\n callback = callback || params;\n params = {};\n }\n var hostname = this.endpoint.hostname;\n // copy params so that appending keys does not unintentioinallly\n // mutate params object argument passed in by user\n var copiedParams = AWS.util.copy(params);\n\n if (hostname !== this.api.globalEndpoint && !params.CreateBucketConfiguration) {\n copiedParams.CreateBucketConfiguration = { LocationConstraint: this.config.region };\n }\n return this.makeRequest('createBucket', copiedParams, callback);\n },\n\n writeGetObjectResponse: function writeGetObjectResponse(params, callback) {\n\n var request = this.makeRequest('writeGetObjectResponse', AWS.util.copy(params), callback);\n var hostname = this.endpoint.hostname;\n if (hostname.indexOf(this.config.region) !== -1) {\n // hostname specifies a region already\n hostname = hostname.replace('s3.', OBJECT_LAMBDA_SERVICE + '.');\n } else {\n // Hostname doesn't have a region.\n // Object Lambda requires an explicit region.\n hostname = hostname.replace('s3.', OBJECT_LAMBDA_SERVICE + '.' + this.config.region + '.');\n }\n\n request.httpRequest.endpoint = new AWS.Endpoint(hostname, this.config);\n return request;\n },\n\n /**\n * @see AWS.S3.ManagedUpload\n * @overload upload(params = {}, [options], [callback])\n * Uploads an arbitrarily sized buffer, blob, or stream, using intelligent\n * concurrent handling of parts if the payload is large enough. You can\n * configure the concurrent queue size by setting `options`. Note that this\n * is the only operation for which the SDK can retry requests with stream\n * bodies.\n *\n * @param (see AWS.S3.putObject)\n * @option (see AWS.S3.ManagedUpload.constructor)\n * @return [AWS.S3.ManagedUpload] the managed upload object that can call\n * `send()` or track progress.\n * @example Uploading a stream object\n * var params = {Bucket: 'bucket', Key: 'key', Body: stream};\n * s3.upload(params, function(err, data) {\n * console.log(err, data);\n * });\n * @example Uploading a stream with concurrency of 1 and partSize of 10mb\n * var params = {Bucket: 'bucket', Key: 'key', Body: stream};\n * var options = {partSize: 10 * 1024 * 1024, queueSize: 1};\n * s3.upload(params, options, function(err, data) {\n * console.log(err, data);\n * });\n * @callback callback function(err, data)\n * @param err [Error] an error or null if no error occurred.\n * @param data [map] The response data from the successful upload:\n * @param data.Location [String] the URL of the uploaded object\n * @param data.ETag [String] the ETag of the uploaded object\n * @param data.Bucket [String] the bucket to which the object was uploaded\n * @param data.Key [String] the key to which the object was uploaded\n */\n upload: function upload(params, options, callback) {\n if (typeof options === 'function' && callback === undefined) {\n callback = options;\n options = null;\n }\n\n options = options || {};\n options = AWS.util.merge(options || {}, {service: this, params: params});\n\n var uploader = new AWS.S3.ManagedUpload(options);\n if (typeof callback === 'function') uploader.send(callback);\n return uploader;\n }\n});\n\n/**\n * @api private\n */\nAWS.S3.addPromisesToClass = function addPromisesToClass(PromiseDependency) {\n this.prototype.getSignedUrlPromise = AWS.util.promisifyMethod('getSignedUrl', PromiseDependency);\n};\n\n/**\n * @api private\n */\nAWS.S3.deletePromisesFromClass = function deletePromisesFromClass() {\n delete this.prototype.getSignedUrlPromise;\n};\n\nAWS.util.addPromises(AWS.S3);\n","var AWS = require('../core');\nvar s3util = require('./s3util');\nvar regionUtil = require('../region_config');\n\nAWS.util.update(AWS.S3Control.prototype, {\n /**\n * @api private\n */\n setupRequestListeners: function setupRequestListeners(request) {\n request.addListener('extractError', this.extractHostId);\n request.addListener('extractData', this.extractHostId);\n request.addListener('validate', this.validateAccountId);\n\n var isArnInBucket = s3util.isArnInParam(request, 'Bucket');\n var isArnInName = s3util.isArnInParam(request, 'Name');\n\n if (isArnInBucket) {\n request._parsedArn = AWS.util.ARN.parse(request.params['Bucket']);\n request.addListener('validate', this.validateOutpostsBucketArn);\n request.addListener('validate', s3util.validateOutpostsArn);\n request.addListener('afterBuild', this.addOutpostIdHeader);\n } else if (isArnInName) {\n request._parsedArn = AWS.util.ARN.parse(request.params['Name']);\n request.addListener('validate', s3util.validateOutpostsAccessPointArn);\n request.addListener('validate', s3util.validateOutpostsArn);\n request.addListener('afterBuild', this.addOutpostIdHeader);\n }\n\n if (isArnInBucket || isArnInName) {\n request.addListener('validate', this.validateArnRegion);\n request.addListener('validate', this.validateArnAccountWithParams, true);\n request.addListener('validate', s3util.validateArnAccount);\n request.addListener('validate', s3util.validateArnService);\n request.addListener('build', this.populateParamFromArn, true);\n request.addListener('build', this.populateUriFromArn);\n request.addListener('build', s3util.validatePopulateUriFromArn);\n }\n\n if (request.params.OutpostId &&\n (request.operation === 'createBucket' ||\n request.operation === 'listRegionalBuckets')) {\n request.addListener('build', this.populateEndpointForOutpostId);\n }\n },\n\n /**\n * Adds outpostId header\n */\n addOutpostIdHeader: function addOutpostIdHeader(req) {\n req.httpRequest.headers['x-amz-outpost-id'] = req._parsedArn.outpostId;\n },\n\n /**\n * Validate Outposts ARN supplied in Bucket parameter is a valid bucket name\n */\n validateOutpostsBucketArn: function validateOutpostsBucketArn(req) {\n var parsedArn = req._parsedArn;\n\n //can be ':' or '/'\n var delimiter = parsedArn.resource['outpost'.length];\n\n if (parsedArn.resource.split(delimiter).length !== 4) {\n throw AWS.util.error(new Error(), {\n code: 'InvalidARN',\n message: 'Bucket ARN should have two resources outpost/{outpostId}/bucket/{accesspointName}'\n });\n }\n\n var bucket = parsedArn.resource.split(delimiter)[3];\n if (!s3util.dnsCompatibleBucketName(bucket) || bucket.match(/\\./)) {\n throw AWS.util.error(new Error(), {\n code: 'InvalidARN',\n message: 'Bucket ARN is not DNS compatible. Got ' + bucket\n });\n }\n\n //set parsed valid bucket\n req._parsedArn.bucket = bucket;\n },\n\n /**\n * @api private\n */\n populateParamFromArn: function populateParamFromArn(req) {\n var parsedArn = req._parsedArn;\n if (s3util.isArnInParam(req, 'Bucket')) {\n req.params.Bucket = parsedArn.bucket;\n } else if (s3util.isArnInParam(req, 'Name')) {\n req.params.Name = parsedArn.accessPoint;\n }\n },\n\n /**\n * Populate URI according to the ARN\n */\n populateUriFromArn: function populateUriFromArn(req) {\n var parsedArn = req._parsedArn;\n\n var endpoint = req.httpRequest.endpoint;\n var useArnRegion = req.service.config.s3UseArnRegion;\n var useFipsEndpoint = req.service.config.useFipsEndpoint;\n\n endpoint.hostname = [\n 's3-outposts' + (useFipsEndpoint ? '-fips': ''),\n useArnRegion ? parsedArn.region : req.service.config.region,\n 'amazonaws.com'\n ].join('.');\n endpoint.host = endpoint.hostname;\n },\n\n /**\n * @api private\n */\n populateEndpointForOutpostId: function populateEndpointForOutpostId(req) {\n var endpoint = req.httpRequest.endpoint;\n var useFipsEndpoint = req.service.config.useFipsEndpoint;\n endpoint.hostname = [\n 's3-outposts' + (useFipsEndpoint ? '-fips': ''),\n req.service.config.region,\n 'amazonaws.com'\n ].join('.');\n endpoint.host = endpoint.hostname;\n },\n\n /**\n * @api private\n */\n extractHostId: function(response) {\n var hostId = response.httpResponse.headers ? response.httpResponse.headers['x-amz-id-2'] : null;\n response.extendedRequestId = hostId;\n if (response.error) {\n response.error.extendedRequestId = hostId;\n }\n },\n\n /**\n * @api private\n */\n validateArnRegion: function validateArnRegion(req) {\n s3util.validateArnRegion(req, { allowFipsEndpoint: true });\n },\n\n /**\n * @api private\n */\n validateArnAccountWithParams: function validateArnAccountWithParams(req) {\n var params = req.params;\n var inputModel = req.service.api.operations[req.operation].input;\n if (inputModel.members.AccountId) {\n var parsedArn = req._parsedArn;\n if (parsedArn.accountId) {\n if (params.AccountId) {\n if (params.AccountId !== parsedArn.accountId) {\n throw AWS.util.error(\n new Error(),\n {code: 'ValidationError', message: 'AccountId in ARN and request params should be same.'}\n );\n }\n } else {\n // Store accountId from ARN in params\n params.AccountId = parsedArn.accountId;\n }\n }\n }\n },\n\n /**\n * @api private\n */\n validateAccountId: function(request) {\n var params = request.params;\n if (!Object.prototype.hasOwnProperty.call(params, 'AccountId')) return;\n var accountId = params.AccountId;\n //validate type\n if (typeof accountId !== 'string') {\n throw AWS.util.error(\n new Error(),\n {code: 'ValidationError', message: 'AccountId must be a string.'}\n );\n }\n //validate length\n if (accountId.length < 1 || accountId.length > 63) {\n throw AWS.util.error(\n new Error(),\n {code: 'ValidationError', message: 'AccountId length should be between 1 to 63 characters, inclusive.'}\n );\n }\n //validate pattern\n var hostPattern = /^[a-zA-Z0-9]{1}$|^[a-zA-Z0-9][a-zA-Z0-9\\-]*[a-zA-Z0-9]$/;\n if (!hostPattern.test(accountId)) {\n throw AWS.util.error(new Error(),\n {code: 'ValidationError', message: 'AccountId should be hostname compatible. AccountId: ' + accountId});\n }\n },\n\n /**\n * @api private\n */\n getSigningName: function getSigningName(req) {\n var _super = AWS.Service.prototype.getSigningName;\n if (req && req._parsedArn && req._parsedArn.service) {\n return req._parsedArn.service;\n } else if (req.params.OutpostId &&\n (req.operation === 'createBucket' ||\n req.operation === 'listRegionalBuckets')) {\n return 's3-outposts';\n } else {\n return _super.call(this, req);\n }\n },\n});\n","var AWS = require('../core');\nvar regionUtil = require('../region_config');\n\nvar s3util = {\n /**\n * @api private\n */\n isArnInParam: function isArnInParam(req, paramName) {\n var inputShape = (req.service.api.operations[req.operation] || {}).input || {};\n var inputMembers = inputShape.members || {};\n if (!req.params[paramName] || !inputMembers[paramName]) return false;\n return AWS.util.ARN.validate(req.params[paramName]);\n },\n\n /**\n * Validate service component from ARN supplied in Bucket parameter\n */\n validateArnService: function validateArnService(req) {\n var parsedArn = req._parsedArn;\n\n if (parsedArn.service !== 's3'\n && parsedArn.service !== 's3-outposts'\n && parsedArn.service !== 's3-object-lambda') {\n throw AWS.util.error(new Error(), {\n code: 'InvalidARN',\n message: 'expect \\'s3\\' or \\'s3-outposts\\' or \\'s3-object-lambda\\' in ARN service component'\n });\n }\n },\n\n /**\n * Validate account ID from ARN supplied in Bucket parameter is a valid account\n */\n validateArnAccount: function validateArnAccount(req) {\n var parsedArn = req._parsedArn;\n\n if (!/[0-9]{12}/.exec(parsedArn.accountId)) {\n throw AWS.util.error(new Error(), {\n code: 'InvalidARN',\n message: 'ARN accountID does not match regex \"[0-9]{12}\"'\n });\n }\n },\n\n /**\n * Validate ARN supplied in Bucket parameter is a valid access point ARN\n */\n validateS3AccessPointArn: function validateS3AccessPointArn(req) {\n var parsedArn = req._parsedArn;\n\n //can be ':' or '/'\n var delimiter = parsedArn.resource['accesspoint'.length];\n\n if (parsedArn.resource.split(delimiter).length !== 2) {\n throw AWS.util.error(new Error(), {\n code: 'InvalidARN',\n message: 'Access Point ARN should have one resource accesspoint/{accesspointName}'\n });\n }\n\n var accessPoint = parsedArn.resource.split(delimiter)[1];\n var accessPointPrefix = accessPoint + '-' + parsedArn.accountId;\n if (!s3util.dnsCompatibleBucketName(accessPointPrefix) || accessPointPrefix.match(/\\./)) {\n throw AWS.util.error(new Error(), {\n code: 'InvalidARN',\n message: 'Access point resource in ARN is not DNS compatible. Got ' + accessPoint\n });\n }\n\n //set parsed valid access point\n req._parsedArn.accessPoint = accessPoint;\n },\n\n /**\n * Validate Outposts ARN supplied in Bucket parameter is a valid outposts ARN\n */\n validateOutpostsArn: function validateOutpostsArn(req) {\n var parsedArn = req._parsedArn;\n\n if (\n parsedArn.resource.indexOf('outpost:') !== 0 &&\n parsedArn.resource.indexOf('outpost/') !== 0\n ) {\n throw AWS.util.error(new Error(), {\n code: 'InvalidARN',\n message: 'ARN resource should begin with \\'outpost/\\''\n });\n }\n\n //can be ':' or '/'\n var delimiter = parsedArn.resource['outpost'.length];\n var outpostId = parsedArn.resource.split(delimiter)[1];\n var dnsHostRegex = new RegExp(/^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]{0,61}[a-zA-Z0-9])$/);\n if (!dnsHostRegex.test(outpostId)) {\n throw AWS.util.error(new Error(), {\n code: 'InvalidARN',\n message: 'Outpost resource in ARN is not DNS compatible. Got ' + outpostId\n });\n }\n req._parsedArn.outpostId = outpostId;\n },\n\n /**\n * Validate Outposts ARN supplied in Bucket parameter is a valid outposts ARN\n */\n validateOutpostsAccessPointArn: function validateOutpostsAccessPointArn(req) {\n var parsedArn = req._parsedArn;\n\n //can be ':' or '/'\n var delimiter = parsedArn.resource['outpost'.length];\n\n if (parsedArn.resource.split(delimiter).length !== 4) {\n throw AWS.util.error(new Error(), {\n code: 'InvalidARN',\n message: 'Outposts ARN should have two resources outpost/{outpostId}/accesspoint/{accesspointName}'\n });\n }\n\n var accessPoint = parsedArn.resource.split(delimiter)[3];\n var accessPointPrefix = accessPoint + '-' + parsedArn.accountId;\n if (!s3util.dnsCompatibleBucketName(accessPointPrefix) || accessPointPrefix.match(/\\./)) {\n throw AWS.util.error(new Error(), {\n code: 'InvalidARN',\n message: 'Access point resource in ARN is not DNS compatible. Got ' + accessPoint\n });\n }\n\n //set parsed valid access point\n req._parsedArn.accessPoint = accessPoint;\n },\n\n /**\n * Validate region field in ARN supplied in Bucket parameter is a valid region\n */\n validateArnRegion: function validateArnRegion(req, options) {\n if (options === undefined) {\n options = {};\n }\n\n var useArnRegion = s3util.loadUseArnRegionConfig(req);\n var regionFromArn = req._parsedArn.region;\n var clientRegion = req.service.config.region;\n var useFipsEndpoint = req.service.config.useFipsEndpoint;\n var allowFipsEndpoint = options.allowFipsEndpoint || false;\n\n if (!regionFromArn) {\n throw AWS.util.error(new Error(), {\n code: 'InvalidARN',\n message: 'ARN region is empty'\n });\n }\n\n if (useFipsEndpoint && !allowFipsEndpoint) {\n throw AWS.util.error(new Error(), {\n code: 'InvalidConfiguration',\n message: 'ARN endpoint is not compatible with FIPS region'\n });\n }\n\n if (regionFromArn.indexOf('fips') >= 0) {\n throw AWS.util.error(new Error(), {\n code: 'InvalidConfiguration',\n message: 'FIPS region not allowed in ARN'\n });\n }\n\n if (!useArnRegion && regionFromArn !== clientRegion) {\n throw AWS.util.error(new Error(), {\n code: 'InvalidConfiguration',\n message: 'Configured region conflicts with access point region'\n });\n } else if (\n useArnRegion &&\n regionUtil.getEndpointSuffix(regionFromArn) !== regionUtil.getEndpointSuffix(clientRegion)\n ) {\n throw AWS.util.error(new Error(), {\n code: 'InvalidConfiguration',\n message: 'Configured region and access point region not in same partition'\n });\n }\n\n if (req.service.config.useAccelerateEndpoint) {\n throw AWS.util.error(new Error(), {\n code: 'InvalidConfiguration',\n message: 'useAccelerateEndpoint config is not supported with access point ARN'\n });\n }\n\n if (req._parsedArn.service === 's3-outposts' && req.service.config.useDualstackEndpoint) {\n throw AWS.util.error(new Error(), {\n code: 'InvalidConfiguration',\n message: 'Dualstack is not supported with outposts access point ARN'\n });\n }\n },\n\n loadUseArnRegionConfig: function loadUseArnRegionConfig(req) {\n var envName = 'AWS_S3_USE_ARN_REGION';\n var configName = 's3_use_arn_region';\n var useArnRegion = true;\n var originalConfig = req.service._originalConfig || {};\n if (req.service.config.s3UseArnRegion !== undefined) {\n return req.service.config.s3UseArnRegion;\n } else if (originalConfig.s3UseArnRegion !== undefined) {\n useArnRegion = originalConfig.s3UseArnRegion === true;\n } else if (AWS.util.isNode()) {\n //load from environmental variable AWS_USE_ARN_REGION\n if (process.env[envName]) {\n var value = process.env[envName].trim().toLowerCase();\n if (['false', 'true'].indexOf(value) < 0) {\n throw AWS.util.error(new Error(), {\n code: 'InvalidConfiguration',\n message: envName + ' only accepts true or false. Got ' + process.env[envName],\n retryable: false\n });\n }\n useArnRegion = value === 'true';\n } else { //load from shared config property use_arn_region\n var profiles = {};\n var profile = {};\n try {\n profiles = AWS.util.getProfilesFromSharedConfig(AWS.util.iniLoader);\n profile = profiles[process.env.AWS_PROFILE || AWS.util.defaultProfile];\n } catch (e) {}\n if (profile[configName]) {\n if (['false', 'true'].indexOf(profile[configName].trim().toLowerCase()) < 0) {\n throw AWS.util.error(new Error(), {\n code: 'InvalidConfiguration',\n message: configName + ' only accepts true or false. Got ' + profile[configName],\n retryable: false\n });\n }\n useArnRegion = profile[configName].trim().toLowerCase() === 'true';\n }\n }\n }\n req.service.config.s3UseArnRegion = useArnRegion;\n return useArnRegion;\n },\n\n /**\n * Validations before URI can be populated\n */\n validatePopulateUriFromArn: function validatePopulateUriFromArn(req) {\n if (req.service._originalConfig && req.service._originalConfig.endpoint) {\n throw AWS.util.error(new Error(), {\n code: 'InvalidConfiguration',\n message: 'Custom endpoint is not compatible with access point ARN'\n });\n }\n\n if (req.service.config.s3ForcePathStyle) {\n throw AWS.util.error(new Error(), {\n code: 'InvalidConfiguration',\n message: 'Cannot construct path-style endpoint with access point'\n });\n }\n },\n\n /**\n * Returns true if the bucket name is DNS compatible. Buckets created\n * outside of the classic region MUST be DNS compatible.\n *\n * @api private\n */\n dnsCompatibleBucketName: function dnsCompatibleBucketName(bucketName) {\n var b = bucketName;\n var domain = new RegExp(/^[a-z0-9][a-z0-9\\.\\-]{1,61}[a-z0-9]$/);\n var ipAddress = new RegExp(/(\\d+\\.){3}\\d+/);\n var dots = new RegExp(/\\.\\./);\n return (b.match(domain) && !b.match(ipAddress) && !b.match(dots)) ? true : false;\n },\n};\n\n/**\n * @api private\n */\nmodule.exports = s3util;\n","var AWS = require('../core');\n\nAWS.util.update(AWS.SQS.prototype, {\n /**\n * @api private\n */\n setupRequestListeners: function setupRequestListeners(request) {\n request.addListener('build', this.buildEndpoint);\n\n if (request.service.config.computeChecksums) {\n if (request.operation === 'sendMessage') {\n request.addListener('extractData', this.verifySendMessageChecksum);\n } else if (request.operation === 'sendMessageBatch') {\n request.addListener('extractData', this.verifySendMessageBatchChecksum);\n } else if (request.operation === 'receiveMessage') {\n request.addListener('extractData', this.verifyReceiveMessageChecksum);\n }\n }\n },\n\n /**\n * @api private\n */\n verifySendMessageChecksum: function verifySendMessageChecksum(response) {\n if (!response.data) return;\n\n var md5 = response.data.MD5OfMessageBody;\n var body = this.params.MessageBody;\n var calculatedMd5 = this.service.calculateChecksum(body);\n if (calculatedMd5 !== md5) {\n var msg = 'Got \"' + response.data.MD5OfMessageBody +\n '\", expecting \"' + calculatedMd5 + '\".';\n this.service.throwInvalidChecksumError(response,\n [response.data.MessageId], msg);\n }\n },\n\n /**\n * @api private\n */\n verifySendMessageBatchChecksum: function verifySendMessageBatchChecksum(response) {\n if (!response.data) return;\n\n var service = this.service;\n var entries = {};\n var errors = [];\n var messageIds = [];\n AWS.util.arrayEach(response.data.Successful, function (entry) {\n entries[entry.Id] = entry;\n });\n AWS.util.arrayEach(this.params.Entries, function (entry) {\n if (entries[entry.Id]) {\n var md5 = entries[entry.Id].MD5OfMessageBody;\n var body = entry.MessageBody;\n if (!service.isChecksumValid(md5, body)) {\n errors.push(entry.Id);\n messageIds.push(entries[entry.Id].MessageId);\n }\n }\n });\n\n if (errors.length > 0) {\n service.throwInvalidChecksumError(response, messageIds,\n 'Invalid messages: ' + errors.join(', '));\n }\n },\n\n /**\n * @api private\n */\n verifyReceiveMessageChecksum: function verifyReceiveMessageChecksum(response) {\n if (!response.data) return;\n\n var service = this.service;\n var messageIds = [];\n AWS.util.arrayEach(response.data.Messages, function(message) {\n var md5 = message.MD5OfBody;\n var body = message.Body;\n if (!service.isChecksumValid(md5, body)) {\n messageIds.push(message.MessageId);\n }\n });\n\n if (messageIds.length > 0) {\n service.throwInvalidChecksumError(response, messageIds,\n 'Invalid messages: ' + messageIds.join(', '));\n }\n },\n\n /**\n * @api private\n */\n throwInvalidChecksumError: function throwInvalidChecksumError(response, ids, message) {\n response.error = AWS.util.error(new Error(), {\n retryable: true,\n code: 'InvalidChecksum',\n messageIds: ids,\n message: response.request.operation +\n ' returned an invalid MD5 response. ' + message\n });\n },\n\n /**\n * @api private\n */\n isChecksumValid: function isChecksumValid(checksum, data) {\n return this.calculateChecksum(data) === checksum;\n },\n\n /**\n * @api private\n */\n calculateChecksum: function calculateChecksum(data) {\n return AWS.util.crypto.md5(data, 'hex');\n },\n\n /**\n * @api private\n */\n buildEndpoint: function buildEndpoint(request) {\n var url = request.httpRequest.params.QueueUrl;\n if (url) {\n request.httpRequest.endpoint = new AWS.Endpoint(url);\n\n // signature version 4 requires the region name to be set,\n // sqs queue urls contain the region name\n var matches = request.httpRequest.endpoint.host.match(/^sqs\\.(.+?)\\./);\n if (matches) request.httpRequest.region = matches[1];\n }\n }\n});\n","var AWS = require('../core');\nvar resolveRegionalEndpointsFlag = require('../config_regional_endpoint');\nvar ENV_REGIONAL_ENDPOINT_ENABLED = 'AWS_STS_REGIONAL_ENDPOINTS';\nvar CONFIG_REGIONAL_ENDPOINT_ENABLED = 'sts_regional_endpoints';\n\nAWS.util.update(AWS.STS.prototype, {\n /**\n * @overload credentialsFrom(data, credentials = null)\n * Creates a credentials object from STS response data containing\n * credentials information. Useful for quickly setting AWS credentials.\n *\n * @note This is a low-level utility function. If you want to load temporary\n * credentials into your process for subsequent requests to AWS resources,\n * you should use {AWS.TemporaryCredentials} instead.\n * @param data [map] data retrieved from a call to {getFederatedToken},\n * {getSessionToken}, {assumeRole}, or {assumeRoleWithWebIdentity}.\n * @param credentials [AWS.Credentials] an optional credentials object to\n * fill instead of creating a new object. Useful when modifying an\n * existing credentials object from a refresh call.\n * @return [AWS.TemporaryCredentials] the set of temporary credentials\n * loaded from a raw STS operation response.\n * @example Using credentialsFrom to load global AWS credentials\n * var sts = new AWS.STS();\n * sts.getSessionToken(function (err, data) {\n * if (err) console.log(\"Error getting credentials\");\n * else {\n * AWS.config.credentials = sts.credentialsFrom(data);\n * }\n * });\n * @see AWS.TemporaryCredentials\n */\n credentialsFrom: function credentialsFrom(data, credentials) {\n if (!data) return null;\n if (!credentials) credentials = new AWS.TemporaryCredentials();\n credentials.expired = false;\n credentials.accessKeyId = data.Credentials.AccessKeyId;\n credentials.secretAccessKey = data.Credentials.SecretAccessKey;\n credentials.sessionToken = data.Credentials.SessionToken;\n credentials.expireTime = data.Credentials.Expiration;\n return credentials;\n },\n\n assumeRoleWithWebIdentity: function assumeRoleWithWebIdentity(params, callback) {\n return this.makeUnauthenticatedRequest('assumeRoleWithWebIdentity', params, callback);\n },\n\n assumeRoleWithSAML: function assumeRoleWithSAML(params, callback) {\n return this.makeUnauthenticatedRequest('assumeRoleWithSAML', params, callback);\n },\n\n /**\n * @api private\n */\n setupRequestListeners: function setupRequestListeners(request) {\n request.addListener('validate', this.optInRegionalEndpoint, true);\n },\n\n /**\n * @api private\n */\n optInRegionalEndpoint: function optInRegionalEndpoint(req) {\n var service = req.service;\n var config = service.config;\n config.stsRegionalEndpoints = resolveRegionalEndpointsFlag(service._originalConfig, {\n env: ENV_REGIONAL_ENDPOINT_ENABLED,\n sharedConfig: CONFIG_REGIONAL_ENDPOINT_ENABLED,\n clientConfig: 'stsRegionalEndpoints'\n });\n if (\n config.stsRegionalEndpoints === 'regional' &&\n service.isGlobalEndpoint\n ) {\n //client will throw if region is not supplied; request will be signed with specified region\n if (!config.region) {\n throw AWS.util.error(new Error(),\n {code: 'ConfigError', message: 'Missing region in config'});\n }\n var insertPoint = config.endpoint.indexOf('.amazonaws.com');\n var regionalEndpoint = config.endpoint.substring(0, insertPoint) +\n '.' + config.region + config.endpoint.substring(insertPoint);\n req.httpRequest.updateEndpoint(regionalEndpoint);\n req.httpRequest.region = config.region;\n }\n }\n\n});\n","var AWS = require('../core');\n\nAWS.util.hideProperties(AWS, ['SimpleWorkflow']);\n\n/**\n * @constant\n * @readonly\n * Backwards compatibility for access to the {AWS.SWF} service class.\n */\nAWS.SimpleWorkflow = AWS.SWF;\n","var IniLoader = require('./ini-loader').IniLoader;\n/**\n * Singleton object to load specified config/credentials files.\n * It will cache all the files ever loaded;\n */\nmodule.exports.iniLoader = new IniLoader();\n","var AWS = require('../core');\nvar os = require('os');\nvar path = require('path');\n\nfunction parseFile(filename, isConfig) {\n var content = AWS.util.ini.parse(AWS.util.readFileSync(filename));\n var tmpContent = {};\n Object.keys(content).forEach(function(profileName) {\n var profileContent = content[profileName];\n profileName = isConfig ? profileName.replace(/^profile\\s/, '') : profileName;\n Object.defineProperty(tmpContent, profileName, {\n value: profileContent,\n enumerable: true\n });\n });\n return tmpContent;\n}\n\n/**\n * Ini file loader class the same as that used in the SDK. It loads and\n * parses config and credentials files in .ini format and cache the content\n * to assure files are only read once.\n * Note that calling operations on the instance instantiated from this class\n * won't affect the behavior of SDK since SDK uses an internal singleton of\n * this class.\n * @!macro nobrowser\n */\nAWS.IniLoader = AWS.util.inherit({\n constructor: function IniLoader() {\n this.resolvedProfiles = {};\n },\n\n /** Remove all cached files. Used after config files are updated. */\n clearCachedFiles: function clearCachedFiles() {\n this.resolvedProfiles = {};\n },\n\n/**\n * Load configurations from config/credentials files and cache them\n * for later use. If no file is specified it will try to load default\n * files.\n * @param options [map] information describing the file\n * @option options filename [String] ('~/.aws/credentials' or defined by\n * AWS_SHARED_CREDENTIALS_FILE process env var or '~/.aws/config' if\n * isConfig is set to true)\n * path to the file to be read.\n * @option options isConfig [Boolean] (false) True to read config file.\n * @return [map] object containing contents from file in key-value\n * pairs.\n */\n loadFrom: function loadFrom(options) {\n options = options || {};\n var isConfig = options.isConfig === true;\n var filename = options.filename || this.getDefaultFilePath(isConfig);\n if (!this.resolvedProfiles[filename]) {\n var fileContent = this.parseFile(filename, isConfig);\n Object.defineProperty(this.resolvedProfiles, filename, { value: fileContent });\n }\n return this.resolvedProfiles[filename];\n },\n\n /**\n * @api private\n */\n parseFile: parseFile,\n\n /**\n * @api private\n */\n getDefaultFilePath: function getDefaultFilePath(isConfig) {\n return path.join(\n this.getHomeDir(),\n '.aws',\n isConfig ? 'config' : 'credentials'\n );\n },\n\n /**\n * @api private\n */\n getHomeDir: function getHomeDir() {\n var env = process.env;\n var home = env.HOME ||\n env.USERPROFILE ||\n (env.HOMEPATH ? ((env.HOMEDRIVE || 'C:/') + env.HOMEPATH) : null);\n\n if (home) {\n return home;\n }\n\n if (typeof os.homedir === 'function') {\n return os.homedir();\n }\n\n throw AWS.util.error(\n new Error('Cannot load credentials, HOME path not set')\n );\n }\n});\n\nvar IniLoader = AWS.IniLoader;\n\nmodule.exports = {\n IniLoader: IniLoader,\n parseFile: parseFile,\n};\n","var AWS = require('../core');\nvar inherit = AWS.util.inherit;\n\n/**\n * @api private\n */\nvar expiresHeader = 'presigned-expires';\n\n/**\n * @api private\n */\nfunction signedUrlBuilder(request) {\n var expires = request.httpRequest.headers[expiresHeader];\n var signerClass = request.service.getSignerClass(request);\n\n delete request.httpRequest.headers['User-Agent'];\n delete request.httpRequest.headers['X-Amz-User-Agent'];\n\n if (signerClass === AWS.Signers.V4) {\n if (expires > 604800) { // one week expiry is invalid\n var message = 'Presigning does not support expiry time greater ' +\n 'than a week with SigV4 signing.';\n throw AWS.util.error(new Error(), {\n code: 'InvalidExpiryTime', message: message, retryable: false\n });\n }\n request.httpRequest.headers[expiresHeader] = expires;\n } else if (signerClass === AWS.Signers.S3) {\n var now = request.service ? request.service.getSkewCorrectedDate() : AWS.util.date.getDate();\n request.httpRequest.headers[expiresHeader] = parseInt(\n AWS.util.date.unixTimestamp(now) + expires, 10).toString();\n } else {\n throw AWS.util.error(new Error(), {\n message: 'Presigning only supports S3 or SigV4 signing.',\n code: 'UnsupportedSigner', retryable: false\n });\n }\n}\n\n/**\n * @api private\n */\nfunction signedUrlSigner(request) {\n var endpoint = request.httpRequest.endpoint;\n var parsedUrl = AWS.util.urlParse(request.httpRequest.path);\n var queryParams = {};\n\n if (parsedUrl.search) {\n queryParams = AWS.util.queryStringParse(parsedUrl.search.substr(1));\n }\n\n var auth = request.httpRequest.headers['Authorization'].split(' ');\n if (auth[0] === 'AWS') {\n auth = auth[1].split(':');\n queryParams['Signature'] = auth.pop();\n queryParams['AWSAccessKeyId'] = auth.join(':');\n\n AWS.util.each(request.httpRequest.headers, function (key, value) {\n if (key === expiresHeader) key = 'Expires';\n if (key.indexOf('x-amz-meta-') === 0) {\n // Delete existing, potentially not normalized key\n delete queryParams[key];\n key = key.toLowerCase();\n }\n queryParams[key] = value;\n });\n delete request.httpRequest.headers[expiresHeader];\n delete queryParams['Authorization'];\n delete queryParams['Host'];\n } else if (auth[0] === 'AWS4-HMAC-SHA256') { // SigV4 signing\n auth.shift();\n var rest = auth.join(' ');\n var signature = rest.match(/Signature=(.*?)(?:,|\\s|\\r?\\n|$)/)[1];\n queryParams['X-Amz-Signature'] = signature;\n delete queryParams['Expires'];\n }\n\n // build URL\n endpoint.pathname = parsedUrl.pathname;\n endpoint.search = AWS.util.queryParamsToString(queryParams);\n}\n\n/**\n * @api private\n */\nAWS.Signers.Presign = inherit({\n /**\n * @api private\n */\n sign: function sign(request, expireTime, callback) {\n request.httpRequest.headers[expiresHeader] = expireTime || 3600;\n request.on('build', signedUrlBuilder);\n request.on('sign', signedUrlSigner);\n request.removeListener('afterBuild',\n AWS.EventListeners.Core.SET_CONTENT_LENGTH);\n request.removeListener('afterBuild',\n AWS.EventListeners.Core.COMPUTE_SHA256);\n\n request.emit('beforePresign', [request]);\n\n if (callback) {\n request.build(function() {\n if (this.response.error) callback(this.response.error);\n else {\n callback(null, AWS.util.urlFormat(request.httpRequest.endpoint));\n }\n });\n } else {\n request.build();\n if (request.response.error) throw request.response.error;\n return AWS.util.urlFormat(request.httpRequest.endpoint);\n }\n }\n});\n\n/**\n * @api private\n */\nmodule.exports = AWS.Signers.Presign;\n","var AWS = require('../core');\n\nvar inherit = AWS.util.inherit;\n\n/**\n * @api private\n */\nAWS.Signers.RequestSigner = inherit({\n constructor: function RequestSigner(request) {\n this.request = request;\n },\n\n setServiceClientId: function setServiceClientId(id) {\n this.serviceClientId = id;\n },\n\n getServiceClientId: function getServiceClientId() {\n return this.serviceClientId;\n }\n});\n\nAWS.Signers.RequestSigner.getVersion = function getVersion(version) {\n switch (version) {\n case 'v2': return AWS.Signers.V2;\n case 'v3': return AWS.Signers.V3;\n case 's3v4': return AWS.Signers.V4;\n case 'v4': return AWS.Signers.V4;\n case 's3': return AWS.Signers.S3;\n case 'v3https': return AWS.Signers.V3Https;\n }\n throw new Error('Unknown signing version ' + version);\n};\n\nrequire('./v2');\nrequire('./v3');\nrequire('./v3https');\nrequire('./v4');\nrequire('./s3');\nrequire('./presign');\n","var AWS = require('../core');\nvar inherit = AWS.util.inherit;\n\n/**\n * @api private\n */\nAWS.Signers.S3 = inherit(AWS.Signers.RequestSigner, {\n /**\n * When building the stringToSign, these sub resource params should be\n * part of the canonical resource string with their NON-decoded values\n */\n subResources: {\n 'acl': 1,\n 'accelerate': 1,\n 'analytics': 1,\n 'cors': 1,\n 'lifecycle': 1,\n 'delete': 1,\n 'inventory': 1,\n 'location': 1,\n 'logging': 1,\n 'metrics': 1,\n 'notification': 1,\n 'partNumber': 1,\n 'policy': 1,\n 'requestPayment': 1,\n 'replication': 1,\n 'restore': 1,\n 'tagging': 1,\n 'torrent': 1,\n 'uploadId': 1,\n 'uploads': 1,\n 'versionId': 1,\n 'versioning': 1,\n 'versions': 1,\n 'website': 1\n },\n\n // when building the stringToSign, these querystring params should be\n // part of the canonical resource string with their NON-encoded values\n responseHeaders: {\n 'response-content-type': 1,\n 'response-content-language': 1,\n 'response-expires': 1,\n 'response-cache-control': 1,\n 'response-content-disposition': 1,\n 'response-content-encoding': 1\n },\n\n addAuthorization: function addAuthorization(credentials, date) {\n if (!this.request.headers['presigned-expires']) {\n this.request.headers['X-Amz-Date'] = AWS.util.date.rfc822(date);\n }\n\n if (credentials.sessionToken) {\n // presigned URLs require this header to be lowercased\n this.request.headers['x-amz-security-token'] = credentials.sessionToken;\n }\n\n var signature = this.sign(credentials.secretAccessKey, this.stringToSign());\n var auth = 'AWS ' + credentials.accessKeyId + ':' + signature;\n\n this.request.headers['Authorization'] = auth;\n },\n\n stringToSign: function stringToSign() {\n var r = this.request;\n\n var parts = [];\n parts.push(r.method);\n parts.push(r.headers['Content-MD5'] || '');\n parts.push(r.headers['Content-Type'] || '');\n\n // This is the \"Date\" header, but we use X-Amz-Date.\n // The S3 signing mechanism requires us to pass an empty\n // string for this Date header regardless.\n parts.push(r.headers['presigned-expires'] || '');\n\n var headers = this.canonicalizedAmzHeaders();\n if (headers) parts.push(headers);\n parts.push(this.canonicalizedResource());\n\n return parts.join('\\n');\n\n },\n\n canonicalizedAmzHeaders: function canonicalizedAmzHeaders() {\n\n var amzHeaders = [];\n\n AWS.util.each(this.request.headers, function (name) {\n if (name.match(/^x-amz-/i))\n amzHeaders.push(name);\n });\n\n amzHeaders.sort(function (a, b) {\n return a.toLowerCase() < b.toLowerCase() ? -1 : 1;\n });\n\n var parts = [];\n AWS.util.arrayEach.call(this, amzHeaders, function (name) {\n parts.push(name.toLowerCase() + ':' + String(this.request.headers[name]));\n });\n\n return parts.join('\\n');\n\n },\n\n canonicalizedResource: function canonicalizedResource() {\n\n var r = this.request;\n\n var parts = r.path.split('?');\n var path = parts[0];\n var querystring = parts[1];\n\n var resource = '';\n\n if (r.virtualHostedBucket)\n resource += '/' + r.virtualHostedBucket;\n\n resource += path;\n\n if (querystring) {\n\n // collect a list of sub resources and query params that need to be signed\n var resources = [];\n\n AWS.util.arrayEach.call(this, querystring.split('&'), function (param) {\n var name = param.split('=')[0];\n var value = param.split('=')[1];\n if (this.subResources[name] || this.responseHeaders[name]) {\n var subresource = { name: name };\n if (value !== undefined) {\n if (this.subResources[name]) {\n subresource.value = value;\n } else {\n subresource.value = decodeURIComponent(value);\n }\n }\n resources.push(subresource);\n }\n });\n\n resources.sort(function (a, b) { return a.name < b.name ? -1 : 1; });\n\n if (resources.length) {\n\n querystring = [];\n AWS.util.arrayEach(resources, function (res) {\n if (res.value === undefined) {\n querystring.push(res.name);\n } else {\n querystring.push(res.name + '=' + res.value);\n }\n });\n\n resource += '?' + querystring.join('&');\n }\n\n }\n\n return resource;\n\n },\n\n sign: function sign(secret, string) {\n return AWS.util.crypto.hmac(secret, string, 'base64', 'sha1');\n }\n});\n\n/**\n * @api private\n */\nmodule.exports = AWS.Signers.S3;\n","var AWS = require('../core');\nvar inherit = AWS.util.inherit;\n\n/**\n * @api private\n */\nAWS.Signers.V2 = inherit(AWS.Signers.RequestSigner, {\n addAuthorization: function addAuthorization(credentials, date) {\n\n if (!date) date = AWS.util.date.getDate();\n\n var r = this.request;\n\n r.params.Timestamp = AWS.util.date.iso8601(date);\n r.params.SignatureVersion = '2';\n r.params.SignatureMethod = 'HmacSHA256';\n r.params.AWSAccessKeyId = credentials.accessKeyId;\n\n if (credentials.sessionToken) {\n r.params.SecurityToken = credentials.sessionToken;\n }\n\n delete r.params.Signature; // delete old Signature for re-signing\n r.params.Signature = this.signature(credentials);\n\n r.body = AWS.util.queryParamsToString(r.params);\n r.headers['Content-Length'] = r.body.length;\n },\n\n signature: function signature(credentials) {\n return AWS.util.crypto.hmac(credentials.secretAccessKey, this.stringToSign(), 'base64');\n },\n\n stringToSign: function stringToSign() {\n var parts = [];\n parts.push(this.request.method);\n parts.push(this.request.endpoint.host.toLowerCase());\n parts.push(this.request.pathname());\n parts.push(AWS.util.queryParamsToString(this.request.params));\n return parts.join('\\n');\n }\n\n});\n\n/**\n * @api private\n */\nmodule.exports = AWS.Signers.V2;\n","var AWS = require('../core');\nvar inherit = AWS.util.inherit;\n\n/**\n * @api private\n */\nAWS.Signers.V3 = inherit(AWS.Signers.RequestSigner, {\n addAuthorization: function addAuthorization(credentials, date) {\n\n var datetime = AWS.util.date.rfc822(date);\n\n this.request.headers['X-Amz-Date'] = datetime;\n\n if (credentials.sessionToken) {\n this.request.headers['x-amz-security-token'] = credentials.sessionToken;\n }\n\n this.request.headers['X-Amzn-Authorization'] =\n this.authorization(credentials, datetime);\n\n },\n\n authorization: function authorization(credentials) {\n return 'AWS3 ' +\n 'AWSAccessKeyId=' + credentials.accessKeyId + ',' +\n 'Algorithm=HmacSHA256,' +\n 'SignedHeaders=' + this.signedHeaders() + ',' +\n 'Signature=' + this.signature(credentials);\n },\n\n signedHeaders: function signedHeaders() {\n var headers = [];\n AWS.util.arrayEach(this.headersToSign(), function iterator(h) {\n headers.push(h.toLowerCase());\n });\n return headers.sort().join(';');\n },\n\n canonicalHeaders: function canonicalHeaders() {\n var headers = this.request.headers;\n var parts = [];\n AWS.util.arrayEach(this.headersToSign(), function iterator(h) {\n parts.push(h.toLowerCase().trim() + ':' + String(headers[h]).trim());\n });\n return parts.sort().join('\\n') + '\\n';\n },\n\n headersToSign: function headersToSign() {\n var headers = [];\n AWS.util.each(this.request.headers, function iterator(k) {\n if (k === 'Host' || k === 'Content-Encoding' || k.match(/^X-Amz/i)) {\n headers.push(k);\n }\n });\n return headers;\n },\n\n signature: function signature(credentials) {\n return AWS.util.crypto.hmac(credentials.secretAccessKey, this.stringToSign(), 'base64');\n },\n\n stringToSign: function stringToSign() {\n var parts = [];\n parts.push(this.request.method);\n parts.push('/');\n parts.push('');\n parts.push(this.canonicalHeaders());\n parts.push(this.request.body);\n return AWS.util.crypto.sha256(parts.join('\\n'));\n }\n\n});\n\n/**\n * @api private\n */\nmodule.exports = AWS.Signers.V3;\n","var AWS = require('../core');\nvar inherit = AWS.util.inherit;\n\nrequire('./v3');\n\n/**\n * @api private\n */\nAWS.Signers.V3Https = inherit(AWS.Signers.V3, {\n authorization: function authorization(credentials) {\n return 'AWS3-HTTPS ' +\n 'AWSAccessKeyId=' + credentials.accessKeyId + ',' +\n 'Algorithm=HmacSHA256,' +\n 'Signature=' + this.signature(credentials);\n },\n\n stringToSign: function stringToSign() {\n return this.request.headers['X-Amz-Date'];\n }\n});\n\n/**\n * @api private\n */\nmodule.exports = AWS.Signers.V3Https;\n","var AWS = require('../core');\nvar v4Credentials = require('./v4_credentials');\nvar inherit = AWS.util.inherit;\n\n/**\n * @api private\n */\nvar expiresHeader = 'presigned-expires';\n\n/**\n * @api private\n */\nAWS.Signers.V4 = inherit(AWS.Signers.RequestSigner, {\n constructor: function V4(request, serviceName, options) {\n AWS.Signers.RequestSigner.call(this, request);\n this.serviceName = serviceName;\n options = options || {};\n this.signatureCache = typeof options.signatureCache === 'boolean' ? options.signatureCache : true;\n this.operation = options.operation;\n this.signatureVersion = options.signatureVersion;\n },\n\n algorithm: 'AWS4-HMAC-SHA256',\n\n addAuthorization: function addAuthorization(credentials, date) {\n var datetime = AWS.util.date.iso8601(date).replace(/[:\\-]|\\.\\d{3}/g, '');\n\n if (this.isPresigned()) {\n this.updateForPresigned(credentials, datetime);\n } else {\n this.addHeaders(credentials, datetime);\n }\n\n this.request.headers['Authorization'] =\n this.authorization(credentials, datetime);\n },\n\n addHeaders: function addHeaders(credentials, datetime) {\n this.request.headers['X-Amz-Date'] = datetime;\n if (credentials.sessionToken) {\n this.request.headers['x-amz-security-token'] = credentials.sessionToken;\n }\n },\n\n updateForPresigned: function updateForPresigned(credentials, datetime) {\n var credString = this.credentialString(datetime);\n var qs = {\n 'X-Amz-Date': datetime,\n 'X-Amz-Algorithm': this.algorithm,\n 'X-Amz-Credential': credentials.accessKeyId + '/' + credString,\n 'X-Amz-Expires': this.request.headers[expiresHeader],\n 'X-Amz-SignedHeaders': this.signedHeaders()\n };\n\n if (credentials.sessionToken) {\n qs['X-Amz-Security-Token'] = credentials.sessionToken;\n }\n\n if (this.request.headers['Content-Type']) {\n qs['Content-Type'] = this.request.headers['Content-Type'];\n }\n if (this.request.headers['Content-MD5']) {\n qs['Content-MD5'] = this.request.headers['Content-MD5'];\n }\n if (this.request.headers['Cache-Control']) {\n qs['Cache-Control'] = this.request.headers['Cache-Control'];\n }\n\n // need to pull in any other X-Amz-* headers\n AWS.util.each.call(this, this.request.headers, function(key, value) {\n if (key === expiresHeader) return;\n if (this.isSignableHeader(key)) {\n var lowerKey = key.toLowerCase();\n // Metadata should be normalized\n if (lowerKey.indexOf('x-amz-meta-') === 0) {\n qs[lowerKey] = value;\n } else if (lowerKey.indexOf('x-amz-') === 0) {\n qs[key] = value;\n }\n }\n });\n\n var sep = this.request.path.indexOf('?') >= 0 ? '&' : '?';\n this.request.path += sep + AWS.util.queryParamsToString(qs);\n },\n\n authorization: function authorization(credentials, datetime) {\n var parts = [];\n var credString = this.credentialString(datetime);\n parts.push(this.algorithm + ' Credential=' +\n credentials.accessKeyId + '/' + credString);\n parts.push('SignedHeaders=' + this.signedHeaders());\n parts.push('Signature=' + this.signature(credentials, datetime));\n return parts.join(', ');\n },\n\n signature: function signature(credentials, datetime) {\n var signingKey = v4Credentials.getSigningKey(\n credentials,\n datetime.substr(0, 8),\n this.request.region,\n this.serviceName,\n this.signatureCache\n );\n return AWS.util.crypto.hmac(signingKey, this.stringToSign(datetime), 'hex');\n },\n\n stringToSign: function stringToSign(datetime) {\n var parts = [];\n parts.push('AWS4-HMAC-SHA256');\n parts.push(datetime);\n parts.push(this.credentialString(datetime));\n parts.push(this.hexEncodedHash(this.canonicalString()));\n return parts.join('\\n');\n },\n\n canonicalString: function canonicalString() {\n var parts = [], pathname = this.request.pathname();\n if (this.serviceName !== 's3' && this.signatureVersion !== 's3v4') pathname = AWS.util.uriEscapePath(pathname);\n\n parts.push(this.request.method);\n parts.push(pathname);\n parts.push(this.request.search());\n parts.push(this.canonicalHeaders() + '\\n');\n parts.push(this.signedHeaders());\n parts.push(this.hexEncodedBodyHash());\n return parts.join('\\n');\n },\n\n canonicalHeaders: function canonicalHeaders() {\n var headers = [];\n AWS.util.each.call(this, this.request.headers, function (key, item) {\n headers.push([key, item]);\n });\n headers.sort(function (a, b) {\n return a[0].toLowerCase() < b[0].toLowerCase() ? -1 : 1;\n });\n var parts = [];\n AWS.util.arrayEach.call(this, headers, function (item) {\n var key = item[0].toLowerCase();\n if (this.isSignableHeader(key)) {\n var value = item[1];\n if (typeof value === 'undefined' || value === null || typeof value.toString !== 'function') {\n throw AWS.util.error(new Error('Header ' + key + ' contains invalid value'), {\n code: 'InvalidHeader'\n });\n }\n parts.push(key + ':' +\n this.canonicalHeaderValues(value.toString()));\n }\n });\n return parts.join('\\n');\n },\n\n canonicalHeaderValues: function canonicalHeaderValues(values) {\n return values.replace(/\\s+/g, ' ').replace(/^\\s+|\\s+$/g, '');\n },\n\n signedHeaders: function signedHeaders() {\n var keys = [];\n AWS.util.each.call(this, this.request.headers, function (key) {\n key = key.toLowerCase();\n if (this.isSignableHeader(key)) keys.push(key);\n });\n return keys.sort().join(';');\n },\n\n credentialString: function credentialString(datetime) {\n return v4Credentials.createScope(\n datetime.substr(0, 8),\n this.request.region,\n this.serviceName\n );\n },\n\n hexEncodedHash: function hash(string) {\n return AWS.util.crypto.sha256(string, 'hex');\n },\n\n hexEncodedBodyHash: function hexEncodedBodyHash() {\n var request = this.request;\n if (this.isPresigned() && (['s3', 's3-object-lambda'].indexOf(this.serviceName) > -1) && !request.body) {\n return 'UNSIGNED-PAYLOAD';\n } else if (request.headers['X-Amz-Content-Sha256']) {\n return request.headers['X-Amz-Content-Sha256'];\n } else {\n return this.hexEncodedHash(this.request.body || '');\n }\n },\n\n unsignableHeaders: [\n 'authorization',\n 'content-type',\n 'content-length',\n 'user-agent',\n expiresHeader,\n 'expect',\n 'x-amzn-trace-id'\n ],\n\n isSignableHeader: function isSignableHeader(key) {\n if (key.toLowerCase().indexOf('x-amz-') === 0) return true;\n return this.unsignableHeaders.indexOf(key) < 0;\n },\n\n isPresigned: function isPresigned() {\n return this.request.headers[expiresHeader] ? true : false;\n }\n\n});\n\n/**\n * @api private\n */\nmodule.exports = AWS.Signers.V4;\n","var AWS = require('../core');\n\n/**\n * @api private\n */\nvar cachedSecret = {};\n\n/**\n * @api private\n */\nvar cacheQueue = [];\n\n/**\n * @api private\n */\nvar maxCacheEntries = 50;\n\n/**\n * @api private\n */\nvar v4Identifier = 'aws4_request';\n\n/**\n * @api private\n */\nmodule.exports = {\n /**\n * @api private\n *\n * @param date [String]\n * @param region [String]\n * @param serviceName [String]\n * @return [String]\n */\n createScope: function createScope(date, region, serviceName) {\n return [\n date.substr(0, 8),\n region,\n serviceName,\n v4Identifier\n ].join('/');\n },\n\n /**\n * @api private\n *\n * @param credentials [Credentials]\n * @param date [String]\n * @param region [String]\n * @param service [String]\n * @param shouldCache [Boolean]\n * @return [String]\n */\n getSigningKey: function getSigningKey(\n credentials,\n date,\n region,\n service,\n shouldCache\n ) {\n var credsIdentifier = AWS.util.crypto\n .hmac(credentials.secretAccessKey, credentials.accessKeyId, 'base64');\n var cacheKey = [credsIdentifier, date, region, service].join('_');\n shouldCache = shouldCache !== false;\n if (shouldCache && (cacheKey in cachedSecret)) {\n return cachedSecret[cacheKey];\n }\n\n var kDate = AWS.util.crypto.hmac(\n 'AWS4' + credentials.secretAccessKey,\n date,\n 'buffer'\n );\n var kRegion = AWS.util.crypto.hmac(kDate, region, 'buffer');\n var kService = AWS.util.crypto.hmac(kRegion, service, 'buffer');\n\n var signingKey = AWS.util.crypto.hmac(kService, v4Identifier, 'buffer');\n if (shouldCache) {\n cachedSecret[cacheKey] = signingKey;\n cacheQueue.push(cacheKey);\n if (cacheQueue.length > maxCacheEntries) {\n // remove the oldest entry (not the least recently used)\n delete cachedSecret[cacheQueue.shift()];\n }\n }\n\n return signingKey;\n },\n\n /**\n * @api private\n *\n * Empties the derived signing key cache. Made available for testing purposes\n * only.\n */\n emptyCache: function emptyCache() {\n cachedSecret = {};\n cacheQueue = [];\n }\n};\n","function AcceptorStateMachine(states, state) {\n this.currentState = state || null;\n this.states = states || {};\n}\n\nAcceptorStateMachine.prototype.runTo = function runTo(finalState, done, bindObject, inputError) {\n if (typeof finalState === 'function') {\n inputError = bindObject; bindObject = done;\n done = finalState; finalState = null;\n }\n\n var self = this;\n var state = self.states[self.currentState];\n state.fn.call(bindObject || self, inputError, function(err) {\n if (err) {\n if (state.fail) self.currentState = state.fail;\n else return done ? done.call(bindObject, err) : null;\n } else {\n if (state.accept) self.currentState = state.accept;\n else return done ? done.call(bindObject) : null;\n }\n if (self.currentState === finalState) {\n return done ? done.call(bindObject, err) : null;\n }\n\n self.runTo(finalState, done, bindObject, err);\n });\n};\n\nAcceptorStateMachine.prototype.addState = function addState(name, acceptState, failState, fn) {\n if (typeof acceptState === 'function') {\n fn = acceptState; acceptState = null; failState = null;\n } else if (typeof failState === 'function') {\n fn = failState; failState = null;\n }\n\n if (!this.currentState) this.currentState = name;\n this.states[name] = { accept: acceptState, fail: failState, fn: fn };\n return this;\n};\n\n/**\n * @api private\n */\nmodule.exports = AcceptorStateMachine;\n","/* eslint guard-for-in:0 */\nvar AWS;\n\n/**\n * A set of utility methods for use with the AWS SDK.\n *\n * @!attribute abort\n * Return this value from an iterator function {each} or {arrayEach}\n * to break out of the iteration.\n * @example Breaking out of an iterator function\n * AWS.util.each({a: 1, b: 2, c: 3}, function(key, value) {\n * if (key == 'b') return AWS.util.abort;\n * });\n * @see each\n * @see arrayEach\n * @api private\n */\nvar util = {\n environment: 'nodejs',\n engine: function engine() {\n if (util.isBrowser() && typeof navigator !== 'undefined') {\n return navigator.userAgent;\n } else {\n var engine = process.platform + '/' + process.version;\n if (process.env.AWS_EXECUTION_ENV) {\n engine += ' exec-env/' + process.env.AWS_EXECUTION_ENV;\n }\n return engine;\n }\n },\n\n userAgent: function userAgent() {\n var name = util.environment;\n var agent = 'aws-sdk-' + name + '/' + require('./core').VERSION;\n if (name === 'nodejs') agent += ' ' + util.engine();\n return agent;\n },\n\n uriEscape: function uriEscape(string) {\n var output = encodeURIComponent(string);\n output = output.replace(/[^A-Za-z0-9_.~\\-%]+/g, escape);\n\n // AWS percent-encodes some extra non-standard characters in a URI\n output = output.replace(/[*]/g, function(ch) {\n return '%' + ch.charCodeAt(0).toString(16).toUpperCase();\n });\n\n return output;\n },\n\n uriEscapePath: function uriEscapePath(string) {\n var parts = [];\n util.arrayEach(string.split('/'), function (part) {\n parts.push(util.uriEscape(part));\n });\n return parts.join('/');\n },\n\n urlParse: function urlParse(url) {\n return util.url.parse(url);\n },\n\n urlFormat: function urlFormat(url) {\n return util.url.format(url);\n },\n\n queryStringParse: function queryStringParse(qs) {\n return util.querystring.parse(qs);\n },\n\n queryParamsToString: function queryParamsToString(params) {\n var items = [];\n var escape = util.uriEscape;\n var sortedKeys = Object.keys(params).sort();\n\n util.arrayEach(sortedKeys, function(name) {\n var value = params[name];\n var ename = escape(name);\n var result = ename + '=';\n if (Array.isArray(value)) {\n var vals = [];\n util.arrayEach(value, function(item) { vals.push(escape(item)); });\n result = ename + '=' + vals.sort().join('&' + ename + '=');\n } else if (value !== undefined && value !== null) {\n result = ename + '=' + escape(value);\n }\n items.push(result);\n });\n\n return items.join('&');\n },\n\n readFileSync: function readFileSync(path) {\n if (util.isBrowser()) return null;\n return require('fs').readFileSync(path, 'utf-8');\n },\n\n base64: {\n encode: function encode64(string) {\n if (typeof string === 'number') {\n throw util.error(new Error('Cannot base64 encode number ' + string));\n }\n if (string === null || typeof string === 'undefined') {\n return string;\n }\n var buf = util.buffer.toBuffer(string);\n return buf.toString('base64');\n },\n\n decode: function decode64(string) {\n if (typeof string === 'number') {\n throw util.error(new Error('Cannot base64 decode number ' + string));\n }\n if (string === null || typeof string === 'undefined') {\n return string;\n }\n return util.buffer.toBuffer(string, 'base64');\n }\n\n },\n\n buffer: {\n /**\n * Buffer constructor for Node buffer and buffer pollyfill\n */\n toBuffer: function(data, encoding) {\n return (typeof util.Buffer.from === 'function' && util.Buffer.from !== Uint8Array.from) ?\n util.Buffer.from(data, encoding) : new util.Buffer(data, encoding);\n },\n\n alloc: function(size, fill, encoding) {\n if (typeof size !== 'number') {\n throw new Error('size passed to alloc must be a number.');\n }\n if (typeof util.Buffer.alloc === 'function') {\n return util.Buffer.alloc(size, fill, encoding);\n } else {\n var buf = new util.Buffer(size);\n if (fill !== undefined && typeof buf.fill === 'function') {\n buf.fill(fill, undefined, undefined, encoding);\n }\n return buf;\n }\n },\n\n toStream: function toStream(buffer) {\n if (!util.Buffer.isBuffer(buffer)) buffer = util.buffer.toBuffer(buffer);\n\n var readable = new (util.stream.Readable)();\n var pos = 0;\n readable._read = function(size) {\n if (pos >= buffer.length) return readable.push(null);\n\n var end = pos + size;\n if (end > buffer.length) end = buffer.length;\n readable.push(buffer.slice(pos, end));\n pos = end;\n };\n\n return readable;\n },\n\n /**\n * Concatenates a list of Buffer objects.\n */\n concat: function(buffers) {\n var length = 0,\n offset = 0,\n buffer = null, i;\n\n for (i = 0; i < buffers.length; i++) {\n length += buffers[i].length;\n }\n\n buffer = util.buffer.alloc(length);\n\n for (i = 0; i < buffers.length; i++) {\n buffers[i].copy(buffer, offset);\n offset += buffers[i].length;\n }\n\n return buffer;\n }\n },\n\n string: {\n byteLength: function byteLength(string) {\n if (string === null || string === undefined) return 0;\n if (typeof string === 'string') string = util.buffer.toBuffer(string);\n\n if (typeof string.byteLength === 'number') {\n return string.byteLength;\n } else if (typeof string.length === 'number') {\n return string.length;\n } else if (typeof string.size === 'number') {\n return string.size;\n } else if (typeof string.path === 'string') {\n return require('fs').lstatSync(string.path).size;\n } else {\n throw util.error(new Error('Cannot determine length of ' + string),\n { object: string });\n }\n },\n\n upperFirst: function upperFirst(string) {\n return string[0].toUpperCase() + string.substr(1);\n },\n\n lowerFirst: function lowerFirst(string) {\n return string[0].toLowerCase() + string.substr(1);\n }\n },\n\n ini: {\n parse: function string(ini) {\n var currentSection, map = {};\n util.arrayEach(ini.split(/\\r?\\n/), function(line) {\n line = line.split(/(^|\\s)[;#]/)[0]; // remove comments\n var section = line.match(/^\\s*\\[([^\\[\\]]+)\\]\\s*$/);\n if (section) {\n currentSection = section[1];\n if (currentSection === '__proto__' || currentSection.split(/\\s/)[1] === '__proto__') {\n throw util.error(\n new Error('Cannot load profile name \\'' + currentSection + '\\' from shared ini file.')\n );\n }\n } else if (currentSection) {\n var item = line.match(/^\\s*(.+?)\\s*=\\s*(.+?)\\s*$/);\n if (item) {\n map[currentSection] = map[currentSection] || {};\n map[currentSection][item[1]] = item[2];\n }\n }\n });\n\n return map;\n }\n },\n\n fn: {\n noop: function() {},\n callback: function (err) { if (err) throw err; },\n\n /**\n * Turn a synchronous function into as \"async\" function by making it call\n * a callback. The underlying function is called with all but the last argument,\n * which is treated as the callback. The callback is passed passed a first argument\n * of null on success to mimick standard node callbacks.\n */\n makeAsync: function makeAsync(fn, expectedArgs) {\n if (expectedArgs && expectedArgs <= fn.length) {\n return fn;\n }\n\n return function() {\n var args = Array.prototype.slice.call(arguments, 0);\n var callback = args.pop();\n var result = fn.apply(null, args);\n callback(result);\n };\n }\n },\n\n /**\n * Date and time utility functions.\n */\n date: {\n\n /**\n * @return [Date] the current JavaScript date object. Since all\n * AWS services rely on this date object, you can override\n * this function to provide a special time value to AWS service\n * requests.\n */\n getDate: function getDate() {\n if (!AWS) AWS = require('./core');\n if (AWS.config.systemClockOffset) { // use offset when non-zero\n return new Date(new Date().getTime() + AWS.config.systemClockOffset);\n } else {\n return new Date();\n }\n },\n\n /**\n * @return [String] the date in ISO-8601 format\n */\n iso8601: function iso8601(date) {\n if (date === undefined) { date = util.date.getDate(); }\n return date.toISOString().replace(/\\.\\d{3}Z$/, 'Z');\n },\n\n /**\n * @return [String] the date in RFC 822 format\n */\n rfc822: function rfc822(date) {\n if (date === undefined) { date = util.date.getDate(); }\n return date.toUTCString();\n },\n\n /**\n * @return [Integer] the UNIX timestamp value for the current time\n */\n unixTimestamp: function unixTimestamp(date) {\n if (date === undefined) { date = util.date.getDate(); }\n return date.getTime() / 1000;\n },\n\n /**\n * @param [String,number,Date] date\n * @return [Date]\n */\n from: function format(date) {\n if (typeof date === 'number') {\n return new Date(date * 1000); // unix timestamp\n } else {\n return new Date(date);\n }\n },\n\n /**\n * Given a Date or date-like value, this function formats the\n * date into a string of the requested value.\n * @param [String,number,Date] date\n * @param [String] formatter Valid formats are:\n # * 'iso8601'\n # * 'rfc822'\n # * 'unixTimestamp'\n * @return [String]\n */\n format: function format(date, formatter) {\n if (!formatter) formatter = 'iso8601';\n return util.date[formatter](util.date.from(date));\n },\n\n parseTimestamp: function parseTimestamp(value) {\n if (typeof value === 'number') { // unix timestamp (number)\n return new Date(value * 1000);\n } else if (value.match(/^\\d+$/)) { // unix timestamp\n return new Date(value * 1000);\n } else if (value.match(/^\\d{4}/)) { // iso8601\n return new Date(value);\n } else if (value.match(/^\\w{3},/)) { // rfc822\n return new Date(value);\n } else {\n throw util.error(\n new Error('unhandled timestamp format: ' + value),\n {code: 'TimestampParserError'});\n }\n }\n\n },\n\n crypto: {\n crc32Table: [\n 0x00000000, 0x77073096, 0xEE0E612C, 0x990951BA, 0x076DC419,\n 0x706AF48F, 0xE963A535, 0x9E6495A3, 0x0EDB8832, 0x79DCB8A4,\n 0xE0D5E91E, 0x97D2D988, 0x09B64C2B, 0x7EB17CBD, 0xE7B82D07,\n 0x90BF1D91, 0x1DB71064, 0x6AB020F2, 0xF3B97148, 0x84BE41DE,\n 0x1ADAD47D, 0x6DDDE4EB, 0xF4D4B551, 0x83D385C7, 0x136C9856,\n 0x646BA8C0, 0xFD62F97A, 0x8A65C9EC, 0x14015C4F, 0x63066CD9,\n 0xFA0F3D63, 0x8D080DF5, 0x3B6E20C8, 0x4C69105E, 0xD56041E4,\n 0xA2677172, 0x3C03E4D1, 0x4B04D447, 0xD20D85FD, 0xA50AB56B,\n 0x35B5A8FA, 0x42B2986C, 0xDBBBC9D6, 0xACBCF940, 0x32D86CE3,\n 0x45DF5C75, 0xDCD60DCF, 0xABD13D59, 0x26D930AC, 0x51DE003A,\n 0xC8D75180, 0xBFD06116, 0x21B4F4B5, 0x56B3C423, 0xCFBA9599,\n 0xB8BDA50F, 0x2802B89E, 0x5F058808, 0xC60CD9B2, 0xB10BE924,\n 0x2F6F7C87, 0x58684C11, 0xC1611DAB, 0xB6662D3D, 0x76DC4190,\n 0x01DB7106, 0x98D220BC, 0xEFD5102A, 0x71B18589, 0x06B6B51F,\n 0x9FBFE4A5, 0xE8B8D433, 0x7807C9A2, 0x0F00F934, 0x9609A88E,\n 0xE10E9818, 0x7F6A0DBB, 0x086D3D2D, 0x91646C97, 0xE6635C01,\n 0x6B6B51F4, 0x1C6C6162, 0x856530D8, 0xF262004E, 0x6C0695ED,\n 0x1B01A57B, 0x8208F4C1, 0xF50FC457, 0x65B0D9C6, 0x12B7E950,\n 0x8BBEB8EA, 0xFCB9887C, 0x62DD1DDF, 0x15DA2D49, 0x8CD37CF3,\n 0xFBD44C65, 0x4DB26158, 0x3AB551CE, 0xA3BC0074, 0xD4BB30E2,\n 0x4ADFA541, 0x3DD895D7, 0xA4D1C46D, 0xD3D6F4FB, 0x4369E96A,\n 0x346ED9FC, 0xAD678846, 0xDA60B8D0, 0x44042D73, 0x33031DE5,\n 0xAA0A4C5F, 0xDD0D7CC9, 0x5005713C, 0x270241AA, 0xBE0B1010,\n 0xC90C2086, 0x5768B525, 0x206F85B3, 0xB966D409, 0xCE61E49F,\n 0x5EDEF90E, 0x29D9C998, 0xB0D09822, 0xC7D7A8B4, 0x59B33D17,\n 0x2EB40D81, 0xB7BD5C3B, 0xC0BA6CAD, 0xEDB88320, 0x9ABFB3B6,\n 0x03B6E20C, 0x74B1D29A, 0xEAD54739, 0x9DD277AF, 0x04DB2615,\n 0x73DC1683, 0xE3630B12, 0x94643B84, 0x0D6D6A3E, 0x7A6A5AA8,\n 0xE40ECF0B, 0x9309FF9D, 0x0A00AE27, 0x7D079EB1, 0xF00F9344,\n 0x8708A3D2, 0x1E01F268, 0x6906C2FE, 0xF762575D, 0x806567CB,\n 0x196C3671, 0x6E6B06E7, 0xFED41B76, 0x89D32BE0, 0x10DA7A5A,\n 0x67DD4ACC, 0xF9B9DF6F, 0x8EBEEFF9, 0x17B7BE43, 0x60B08ED5,\n 0xD6D6A3E8, 0xA1D1937E, 0x38D8C2C4, 0x4FDFF252, 0xD1BB67F1,\n 0xA6BC5767, 0x3FB506DD, 0x48B2364B, 0xD80D2BDA, 0xAF0A1B4C,\n 0x36034AF6, 0x41047A60, 0xDF60EFC3, 0xA867DF55, 0x316E8EEF,\n 0x4669BE79, 0xCB61B38C, 0xBC66831A, 0x256FD2A0, 0x5268E236,\n 0xCC0C7795, 0xBB0B4703, 0x220216B9, 0x5505262F, 0xC5BA3BBE,\n 0xB2BD0B28, 0x2BB45A92, 0x5CB36A04, 0xC2D7FFA7, 0xB5D0CF31,\n 0x2CD99E8B, 0x5BDEAE1D, 0x9B64C2B0, 0xEC63F226, 0x756AA39C,\n 0x026D930A, 0x9C0906A9, 0xEB0E363F, 0x72076785, 0x05005713,\n 0x95BF4A82, 0xE2B87A14, 0x7BB12BAE, 0x0CB61B38, 0x92D28E9B,\n 0xE5D5BE0D, 0x7CDCEFB7, 0x0BDBDF21, 0x86D3D2D4, 0xF1D4E242,\n 0x68DDB3F8, 0x1FDA836E, 0x81BE16CD, 0xF6B9265B, 0x6FB077E1,\n 0x18B74777, 0x88085AE6, 0xFF0F6A70, 0x66063BCA, 0x11010B5C,\n 0x8F659EFF, 0xF862AE69, 0x616BFFD3, 0x166CCF45, 0xA00AE278,\n 0xD70DD2EE, 0x4E048354, 0x3903B3C2, 0xA7672661, 0xD06016F7,\n 0x4969474D, 0x3E6E77DB, 0xAED16A4A, 0xD9D65ADC, 0x40DF0B66,\n 0x37D83BF0, 0xA9BCAE53, 0xDEBB9EC5, 0x47B2CF7F, 0x30B5FFE9,\n 0xBDBDF21C, 0xCABAC28A, 0x53B39330, 0x24B4A3A6, 0xBAD03605,\n 0xCDD70693, 0x54DE5729, 0x23D967BF, 0xB3667A2E, 0xC4614AB8,\n 0x5D681B02, 0x2A6F2B94, 0xB40BBE37, 0xC30C8EA1, 0x5A05DF1B,\n 0x2D02EF8D],\n\n crc32: function crc32(data) {\n var tbl = util.crypto.crc32Table;\n var crc = 0 ^ -1;\n\n if (typeof data === 'string') {\n data = util.buffer.toBuffer(data);\n }\n\n for (var i = 0; i < data.length; i++) {\n var code = data.readUInt8(i);\n crc = (crc >>> 8) ^ tbl[(crc ^ code) & 0xFF];\n }\n return (crc ^ -1) >>> 0;\n },\n\n hmac: function hmac(key, string, digest, fn) {\n if (!digest) digest = 'binary';\n if (digest === 'buffer') { digest = undefined; }\n if (!fn) fn = 'sha256';\n if (typeof string === 'string') string = util.buffer.toBuffer(string);\n return util.crypto.lib.createHmac(fn, key).update(string).digest(digest);\n },\n\n md5: function md5(data, digest, callback) {\n return util.crypto.hash('md5', data, digest, callback);\n },\n\n sha256: function sha256(data, digest, callback) {\n return util.crypto.hash('sha256', data, digest, callback);\n },\n\n hash: function(algorithm, data, digest, callback) {\n var hash = util.crypto.createHash(algorithm);\n if (!digest) { digest = 'binary'; }\n if (digest === 'buffer') { digest = undefined; }\n if (typeof data === 'string') data = util.buffer.toBuffer(data);\n var sliceFn = util.arraySliceFn(data);\n var isBuffer = util.Buffer.isBuffer(data);\n //Identifying objects with an ArrayBuffer as buffers\n if (util.isBrowser() && typeof ArrayBuffer !== 'undefined' && data && data.buffer instanceof ArrayBuffer) isBuffer = true;\n\n if (callback && typeof data === 'object' &&\n typeof data.on === 'function' && !isBuffer) {\n data.on('data', function(chunk) { hash.update(chunk); });\n data.on('error', function(err) { callback(err); });\n data.on('end', function() { callback(null, hash.digest(digest)); });\n } else if (callback && sliceFn && !isBuffer &&\n typeof FileReader !== 'undefined') {\n // this might be a File/Blob\n var index = 0, size = 1024 * 512;\n var reader = new FileReader();\n reader.onerror = function() {\n callback(new Error('Failed to read data.'));\n };\n reader.onload = function() {\n var buf = new util.Buffer(new Uint8Array(reader.result));\n hash.update(buf);\n index += buf.length;\n reader._continueReading();\n };\n reader._continueReading = function() {\n if (index >= data.size) {\n callback(null, hash.digest(digest));\n return;\n }\n\n var back = index + size;\n if (back > data.size) back = data.size;\n reader.readAsArrayBuffer(sliceFn.call(data, index, back));\n };\n\n reader._continueReading();\n } else {\n if (util.isBrowser() && typeof data === 'object' && !isBuffer) {\n data = new util.Buffer(new Uint8Array(data));\n }\n var out = hash.update(data).digest(digest);\n if (callback) callback(null, out);\n return out;\n }\n },\n\n toHex: function toHex(data) {\n var out = [];\n for (var i = 0; i < data.length; i++) {\n out.push(('0' + data.charCodeAt(i).toString(16)).substr(-2, 2));\n }\n return out.join('');\n },\n\n createHash: function createHash(algorithm) {\n return util.crypto.lib.createHash(algorithm);\n }\n\n },\n\n /** @!ignore */\n\n /* Abort constant */\n abort: {},\n\n each: function each(object, iterFunction) {\n for (var key in object) {\n if (Object.prototype.hasOwnProperty.call(object, key)) {\n var ret = iterFunction.call(this, key, object[key]);\n if (ret === util.abort) break;\n }\n }\n },\n\n arrayEach: function arrayEach(array, iterFunction) {\n for (var idx in array) {\n if (Object.prototype.hasOwnProperty.call(array, idx)) {\n var ret = iterFunction.call(this, array[idx], parseInt(idx, 10));\n if (ret === util.abort) break;\n }\n }\n },\n\n update: function update(obj1, obj2) {\n util.each(obj2, function iterator(key, item) {\n obj1[key] = item;\n });\n return obj1;\n },\n\n merge: function merge(obj1, obj2) {\n return util.update(util.copy(obj1), obj2);\n },\n\n copy: function copy(object) {\n if (object === null || object === undefined) return object;\n var dupe = {};\n // jshint forin:false\n for (var key in object) {\n dupe[key] = object[key];\n }\n return dupe;\n },\n\n isEmpty: function isEmpty(obj) {\n for (var prop in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, prop)) {\n return false;\n }\n }\n return true;\n },\n\n arraySliceFn: function arraySliceFn(obj) {\n var fn = obj.slice || obj.webkitSlice || obj.mozSlice;\n return typeof fn === 'function' ? fn : null;\n },\n\n isType: function isType(obj, type) {\n // handle cross-\"frame\" objects\n if (typeof type === 'function') type = util.typeName(type);\n return Object.prototype.toString.call(obj) === '[object ' + type + ']';\n },\n\n typeName: function typeName(type) {\n if (Object.prototype.hasOwnProperty.call(type, 'name')) return type.name;\n var str = type.toString();\n var match = str.match(/^\\s*function (.+)\\(/);\n return match ? match[1] : str;\n },\n\n error: function error(err, options) {\n var originalError = null;\n if (typeof err.message === 'string' && err.message !== '') {\n if (typeof options === 'string' || (options && options.message)) {\n originalError = util.copy(err);\n originalError.message = err.message;\n }\n }\n err.message = err.message || null;\n\n if (typeof options === 'string') {\n err.message = options;\n } else if (typeof options === 'object' && options !== null) {\n util.update(err, options);\n if (options.message)\n err.message = options.message;\n if (options.code || options.name)\n err.code = options.code || options.name;\n if (options.stack)\n err.stack = options.stack;\n }\n\n if (typeof Object.defineProperty === 'function') {\n Object.defineProperty(err, 'name', {writable: true, enumerable: false});\n Object.defineProperty(err, 'message', {enumerable: true});\n }\n\n err.name = String(options && options.name || err.name || err.code || 'Error');\n err.time = new Date();\n\n if (originalError) err.originalError = originalError;\n\n return err;\n },\n\n /**\n * @api private\n */\n inherit: function inherit(klass, features) {\n var newObject = null;\n if (features === undefined) {\n features = klass;\n klass = Object;\n newObject = {};\n } else {\n var ctor = function ConstructorWrapper() {};\n ctor.prototype = klass.prototype;\n newObject = new ctor();\n }\n\n // constructor not supplied, create pass-through ctor\n if (features.constructor === Object) {\n features.constructor = function() {\n if (klass !== Object) {\n return klass.apply(this, arguments);\n }\n };\n }\n\n features.constructor.prototype = newObject;\n util.update(features.constructor.prototype, features);\n features.constructor.__super__ = klass;\n return features.constructor;\n },\n\n /**\n * @api private\n */\n mixin: function mixin() {\n var klass = arguments[0];\n for (var i = 1; i < arguments.length; i++) {\n // jshint forin:false\n for (var prop in arguments[i].prototype) {\n var fn = arguments[i].prototype[prop];\n if (prop !== 'constructor') {\n klass.prototype[prop] = fn;\n }\n }\n }\n return klass;\n },\n\n /**\n * @api private\n */\n hideProperties: function hideProperties(obj, props) {\n if (typeof Object.defineProperty !== 'function') return;\n\n util.arrayEach(props, function (key) {\n Object.defineProperty(obj, key, {\n enumerable: false, writable: true, configurable: true });\n });\n },\n\n /**\n * @api private\n */\n property: function property(obj, name, value, enumerable, isValue) {\n var opts = {\n configurable: true,\n enumerable: enumerable !== undefined ? enumerable : true\n };\n if (typeof value === 'function' && !isValue) {\n opts.get = value;\n }\n else {\n opts.value = value; opts.writable = true;\n }\n\n Object.defineProperty(obj, name, opts);\n },\n\n /**\n * @api private\n */\n memoizedProperty: function memoizedProperty(obj, name, get, enumerable) {\n var cachedValue = null;\n\n // build enumerable attribute for each value with lazy accessor.\n util.property(obj, name, function() {\n if (cachedValue === null) {\n cachedValue = get();\n }\n return cachedValue;\n }, enumerable);\n },\n\n /**\n * TODO Remove in major version revision\n * This backfill populates response data without the\n * top-level payload name.\n *\n * @api private\n */\n hoistPayloadMember: function hoistPayloadMember(resp) {\n var req = resp.request;\n var operationName = req.operation;\n var operation = req.service.api.operations[operationName];\n var output = operation.output;\n if (output.payload && !operation.hasEventOutput) {\n var payloadMember = output.members[output.payload];\n var responsePayload = resp.data[output.payload];\n if (payloadMember.type === 'structure') {\n util.each(responsePayload, function(key, value) {\n util.property(resp.data, key, value, false);\n });\n }\n }\n },\n\n /**\n * Compute SHA-256 checksums of streams\n *\n * @api private\n */\n computeSha256: function computeSha256(body, done) {\n if (util.isNode()) {\n var Stream = util.stream.Stream;\n var fs = require('fs');\n if (typeof Stream === 'function' && body instanceof Stream) {\n if (typeof body.path === 'string') { // assume file object\n var settings = {};\n if (typeof body.start === 'number') {\n settings.start = body.start;\n }\n if (typeof body.end === 'number') {\n settings.end = body.end;\n }\n body = fs.createReadStream(body.path, settings);\n } else { // TODO support other stream types\n return done(new Error('Non-file stream objects are ' +\n 'not supported with SigV4'));\n }\n }\n }\n\n util.crypto.sha256(body, 'hex', function(err, sha) {\n if (err) done(err);\n else done(null, sha);\n });\n },\n\n /**\n * @api private\n */\n isClockSkewed: function isClockSkewed(serverTime) {\n if (serverTime) {\n util.property(AWS.config, 'isClockSkewed',\n Math.abs(new Date().getTime() - serverTime) >= 300000, false);\n return AWS.config.isClockSkewed;\n }\n },\n\n applyClockOffset: function applyClockOffset(serverTime) {\n if (serverTime)\n AWS.config.systemClockOffset = serverTime - new Date().getTime();\n },\n\n /**\n * @api private\n */\n extractRequestId: function extractRequestId(resp) {\n var requestId = resp.httpResponse.headers['x-amz-request-id'] ||\n resp.httpResponse.headers['x-amzn-requestid'];\n\n if (!requestId && resp.data && resp.data.ResponseMetadata) {\n requestId = resp.data.ResponseMetadata.RequestId;\n }\n\n if (requestId) {\n resp.requestId = requestId;\n }\n\n if (resp.error) {\n resp.error.requestId = requestId;\n }\n },\n\n /**\n * @api private\n */\n addPromises: function addPromises(constructors, PromiseDependency) {\n var deletePromises = false;\n if (PromiseDependency === undefined && AWS && AWS.config) {\n PromiseDependency = AWS.config.getPromisesDependency();\n }\n if (PromiseDependency === undefined && typeof Promise !== 'undefined') {\n PromiseDependency = Promise;\n }\n if (typeof PromiseDependency !== 'function') deletePromises = true;\n if (!Array.isArray(constructors)) constructors = [constructors];\n\n for (var ind = 0; ind < constructors.length; ind++) {\n var constructor = constructors[ind];\n if (deletePromises) {\n if (constructor.deletePromisesFromClass) {\n constructor.deletePromisesFromClass();\n }\n } else if (constructor.addPromisesToClass) {\n constructor.addPromisesToClass(PromiseDependency);\n }\n }\n },\n\n /**\n * @api private\n * Return a function that will return a promise whose fate is decided by the\n * callback behavior of the given method with `methodName`. The method to be\n * promisified should conform to node.js convention of accepting a callback as\n * last argument and calling that callback with error as the first argument\n * and success value on the second argument.\n */\n promisifyMethod: function promisifyMethod(methodName, PromiseDependency) {\n return function promise() {\n var self = this;\n var args = Array.prototype.slice.call(arguments);\n return new PromiseDependency(function(resolve, reject) {\n args.push(function(err, data) {\n if (err) {\n reject(err);\n } else {\n resolve(data);\n }\n });\n self[methodName].apply(self, args);\n });\n };\n },\n\n /**\n * @api private\n */\n isDualstackAvailable: function isDualstackAvailable(service) {\n if (!service) return false;\n var metadata = require('../apis/metadata.json');\n if (typeof service !== 'string') service = service.serviceIdentifier;\n if (typeof service !== 'string' || !metadata.hasOwnProperty(service)) return false;\n return !!metadata[service].dualstackAvailable;\n },\n\n /**\n * @api private\n */\n calculateRetryDelay: function calculateRetryDelay(retryCount, retryDelayOptions, err) {\n if (!retryDelayOptions) retryDelayOptions = {};\n var customBackoff = retryDelayOptions.customBackoff || null;\n if (typeof customBackoff === 'function') {\n return customBackoff(retryCount, err);\n }\n var base = typeof retryDelayOptions.base === 'number' ? retryDelayOptions.base : 100;\n var delay = Math.random() * (Math.pow(2, retryCount) * base);\n return delay;\n },\n\n /**\n * @api private\n */\n handleRequestWithRetries: function handleRequestWithRetries(httpRequest, options, cb) {\n if (!options) options = {};\n var http = AWS.HttpClient.getInstance();\n var httpOptions = options.httpOptions || {};\n var retryCount = 0;\n\n var errCallback = function(err) {\n var maxRetries = options.maxRetries || 0;\n if (err && err.code === 'TimeoutError') err.retryable = true;\n\n // Call `calculateRetryDelay()` only when relevant, see #3401\n if (err && err.retryable && retryCount < maxRetries) {\n var delay = util.calculateRetryDelay(retryCount, options.retryDelayOptions, err);\n if (delay >= 0) {\n retryCount++;\n setTimeout(sendRequest, delay + (err.retryAfter || 0));\n return;\n }\n }\n cb(err);\n };\n\n var sendRequest = function() {\n var data = '';\n http.handleRequest(httpRequest, httpOptions, function(httpResponse) {\n httpResponse.on('data', function(chunk) { data += chunk.toString(); });\n httpResponse.on('end', function() {\n var statusCode = httpResponse.statusCode;\n if (statusCode < 300) {\n cb(null, data);\n } else {\n var retryAfter = parseInt(httpResponse.headers['retry-after'], 10) * 1000 || 0;\n var err = util.error(new Error(),\n {\n statusCode: statusCode,\n retryable: statusCode >= 500 || statusCode === 429\n }\n );\n if (retryAfter && err.retryable) err.retryAfter = retryAfter;\n errCallback(err);\n }\n });\n }, errCallback);\n };\n\n AWS.util.defer(sendRequest);\n },\n\n /**\n * @api private\n */\n uuid: {\n v4: function uuidV4() {\n return require('uuid').v4();\n }\n },\n\n /**\n * @api private\n */\n convertPayloadToString: function convertPayloadToString(resp) {\n var req = resp.request;\n var operation = req.operation;\n var rules = req.service.api.operations[operation].output || {};\n if (rules.payload && resp.data[rules.payload]) {\n resp.data[rules.payload] = resp.data[rules.payload].toString();\n }\n },\n\n /**\n * @api private\n */\n defer: function defer(callback) {\n if (typeof process === 'object' && typeof process.nextTick === 'function') {\n process.nextTick(callback);\n } else if (typeof setImmediate === 'function') {\n setImmediate(callback);\n } else {\n setTimeout(callback, 0);\n }\n },\n\n /**\n * @api private\n */\n getRequestPayloadShape: function getRequestPayloadShape(req) {\n var operations = req.service.api.operations;\n if (!operations) return undefined;\n var operation = (operations || {})[req.operation];\n if (!operation || !operation.input || !operation.input.payload) return undefined;\n return operation.input.members[operation.input.payload];\n },\n\n getProfilesFromSharedConfig: function getProfilesFromSharedConfig(iniLoader, filename) {\n var profiles = {};\n var profilesFromConfig = {};\n if (process.env[util.configOptInEnv]) {\n var profilesFromConfig = iniLoader.loadFrom({\n isConfig: true,\n filename: process.env[util.sharedConfigFileEnv]\n });\n }\n var profilesFromCreds= {};\n try {\n var profilesFromCreds = iniLoader.loadFrom({\n filename: filename ||\n (process.env[util.configOptInEnv] && process.env[util.sharedCredentialsFileEnv])\n });\n } catch (error) {\n // if using config, assume it is fully descriptive without a credentials file:\n if (!process.env[util.configOptInEnv]) throw error;\n }\n for (var i = 0, profileNames = Object.keys(profilesFromConfig); i < profileNames.length; i++) {\n profiles[profileNames[i]] = objectAssign(profiles[profileNames[i]] || {}, profilesFromConfig[profileNames[i]]);\n }\n for (var i = 0, profileNames = Object.keys(profilesFromCreds); i < profileNames.length; i++) {\n profiles[profileNames[i]] = objectAssign(profiles[profileNames[i]] || {}, profilesFromCreds[profileNames[i]]);\n }\n return profiles;\n\n /**\n * Roughly the semantics of `Object.assign(target, source)`\n */\n function objectAssign(target, source) {\n for (var i = 0, keys = Object.keys(source); i < keys.length; i++) {\n target[keys[i]] = source[keys[i]];\n }\n return target;\n }\n },\n\n /**\n * @api private\n */\n ARN: {\n validate: function validateARN(str) {\n return str && str.indexOf('arn:') === 0 && str.split(':').length >= 6;\n },\n parse: function parseARN(arn) {\n var matched = arn.split(':');\n return {\n partition: matched[1],\n service: matched[2],\n region: matched[3],\n accountId: matched[4],\n resource: matched.slice(5).join(':')\n };\n },\n build: function buildARN(arnObject) {\n if (\n arnObject.service === undefined ||\n arnObject.region === undefined ||\n arnObject.accountId === undefined ||\n arnObject.resource === undefined\n ) throw util.error(new Error('Input ARN object is invalid'));\n return 'arn:'+ (arnObject.partition || 'aws') + ':' + arnObject.service +\n ':' + arnObject.region + ':' + arnObject.accountId + ':' + arnObject.resource;\n }\n },\n\n /**\n * @api private\n */\n defaultProfile: 'default',\n\n /**\n * @api private\n */\n configOptInEnv: 'AWS_SDK_LOAD_CONFIG',\n\n /**\n * @api private\n */\n sharedCredentialsFileEnv: 'AWS_SHARED_CREDENTIALS_FILE',\n\n /**\n * @api private\n */\n sharedConfigFileEnv: 'AWS_CONFIG_FILE',\n\n /**\n * @api private\n */\n imdsDisabledEnv: 'AWS_EC2_METADATA_DISABLED'\n};\n\n/**\n * @api private\n */\nmodule.exports = util;\n","var util = require('../util');\nvar XmlNode = require('./xml-node').XmlNode;\nvar XmlText = require('./xml-text').XmlText;\n\nfunction XmlBuilder() { }\n\nXmlBuilder.prototype.toXML = function(params, shape, rootElement, noEmpty) {\n var xml = new XmlNode(rootElement);\n applyNamespaces(xml, shape, true);\n serialize(xml, params, shape);\n return xml.children.length > 0 || noEmpty ? xml.toString() : '';\n};\n\nfunction serialize(xml, value, shape) {\n switch (shape.type) {\n case 'structure': return serializeStructure(xml, value, shape);\n case 'map': return serializeMap(xml, value, shape);\n case 'list': return serializeList(xml, value, shape);\n default: return serializeScalar(xml, value, shape);\n }\n}\n\nfunction serializeStructure(xml, params, shape) {\n util.arrayEach(shape.memberNames, function(memberName) {\n var memberShape = shape.members[memberName];\n if (memberShape.location !== 'body') return;\n\n var value = params[memberName];\n var name = memberShape.name;\n if (value !== undefined && value !== null) {\n if (memberShape.isXmlAttribute) {\n xml.addAttribute(name, value);\n } else if (memberShape.flattened) {\n serialize(xml, value, memberShape);\n } else {\n var element = new XmlNode(name);\n xml.addChildNode(element);\n applyNamespaces(element, memberShape);\n serialize(element, value, memberShape);\n }\n }\n });\n}\n\nfunction serializeMap(xml, map, shape) {\n var xmlKey = shape.key.name || 'key';\n var xmlValue = shape.value.name || 'value';\n\n util.each(map, function(key, value) {\n var entry = new XmlNode(shape.flattened ? shape.name : 'entry');\n xml.addChildNode(entry);\n\n var entryKey = new XmlNode(xmlKey);\n var entryValue = new XmlNode(xmlValue);\n entry.addChildNode(entryKey);\n entry.addChildNode(entryValue);\n\n serialize(entryKey, key, shape.key);\n serialize(entryValue, value, shape.value);\n });\n}\n\nfunction serializeList(xml, list, shape) {\n if (shape.flattened) {\n util.arrayEach(list, function(value) {\n var name = shape.member.name || shape.name;\n var element = new XmlNode(name);\n xml.addChildNode(element);\n serialize(element, value, shape.member);\n });\n } else {\n util.arrayEach(list, function(value) {\n var name = shape.member.name || 'member';\n var element = new XmlNode(name);\n xml.addChildNode(element);\n serialize(element, value, shape.member);\n });\n }\n}\n\nfunction serializeScalar(xml, value, shape) {\n xml.addChildNode(\n new XmlText(shape.toWireFormat(value))\n );\n}\n\nfunction applyNamespaces(xml, shape, isRoot) {\n var uri, prefix = 'xmlns';\n if (shape.xmlNamespaceUri) {\n uri = shape.xmlNamespaceUri;\n if (shape.xmlNamespacePrefix) prefix += ':' + shape.xmlNamespacePrefix;\n } else if (isRoot && shape.api.xmlNamespaceUri) {\n uri = shape.api.xmlNamespaceUri;\n }\n\n if (uri) xml.addAttribute(prefix, uri);\n}\n\n/**\n * @api private\n */\nmodule.exports = XmlBuilder;\n","/**\n * Escapes characters that can not be in an XML attribute.\n */\nfunction escapeAttribute(value) {\n return value.replace(/&/g, '&').replace(/'/g, ''').replace(//g, '>').replace(/\"/g, '"');\n}\n\n/**\n * @api private\n */\nmodule.exports = {\n escapeAttribute: escapeAttribute\n};\n","/**\n * Escapes characters that can not be in an XML element.\n */\nfunction escapeElement(value) {\n return value.replace(/&/g, '&')\n .replace(//g, '>')\n .replace(/\\r/g, ' ')\n .replace(/\\n/g, ' ')\n .replace(/\\u0085/g, '…')\n .replace(/\\u2028/, '
');\n}\n\n/**\n * @api private\n */\nmodule.exports = {\n escapeElement: escapeElement\n};\n","var AWS = require('../core');\nvar util = AWS.util;\nvar Shape = AWS.Model.Shape;\n\nvar xml2js = require('xml2js');\n\n/**\n * @api private\n */\nvar options = { // options passed to xml2js parser\n explicitCharkey: false, // undocumented\n trim: false, // trim the leading/trailing whitespace from text nodes\n normalize: false, // trim interior whitespace inside text nodes\n explicitRoot: false, // return the root node in the resulting object?\n emptyTag: null, // the default value for empty nodes\n explicitArray: true, // always put child nodes in an array\n ignoreAttrs: false, // ignore attributes, only create text nodes\n mergeAttrs: false, // merge attributes and child elements\n validator: null // a callable validator\n};\n\nfunction NodeXmlParser() { }\n\nNodeXmlParser.prototype.parse = function(xml, shape) {\n shape = shape || {};\n\n var result = null;\n var error = null;\n\n var parser = new xml2js.Parser(options);\n parser.parseString(xml, function (e, r) {\n error = e;\n result = r;\n });\n\n if (result) {\n var data = parseXml(result, shape);\n if (result.ResponseMetadata) {\n data.ResponseMetadata = parseXml(result.ResponseMetadata[0], {});\n }\n return data;\n } else if (error) {\n throw util.error(error, {code: 'XMLParserError', retryable: true});\n } else { // empty xml document\n return parseXml({}, shape);\n }\n};\n\nfunction parseXml(xml, shape) {\n switch (shape.type) {\n case 'structure': return parseStructure(xml, shape);\n case 'map': return parseMap(xml, shape);\n case 'list': return parseList(xml, shape);\n case undefined: case null: return parseUnknown(xml);\n default: return parseScalar(xml, shape);\n }\n}\n\nfunction parseStructure(xml, shape) {\n var data = {};\n if (xml === null) return data;\n\n util.each(shape.members, function(memberName, memberShape) {\n var xmlName = memberShape.name;\n if (Object.prototype.hasOwnProperty.call(xml, xmlName) && Array.isArray(xml[xmlName])) {\n var xmlChild = xml[xmlName];\n if (!memberShape.flattened) xmlChild = xmlChild[0];\n\n data[memberName] = parseXml(xmlChild, memberShape);\n } else if (memberShape.isXmlAttribute &&\n xml.$ && Object.prototype.hasOwnProperty.call(xml.$, xmlName)) {\n data[memberName] = parseScalar(xml.$[xmlName], memberShape);\n } else if (memberShape.type === 'list' && !shape.api.xmlNoDefaultLists) {\n data[memberName] = memberShape.defaultValue;\n }\n });\n\n return data;\n}\n\nfunction parseMap(xml, shape) {\n var data = {};\n if (xml === null) return data;\n\n var xmlKey = shape.key.name || 'key';\n var xmlValue = shape.value.name || 'value';\n var iterable = shape.flattened ? xml : xml.entry;\n\n if (Array.isArray(iterable)) {\n util.arrayEach(iterable, function(child) {\n data[child[xmlKey][0]] = parseXml(child[xmlValue][0], shape.value);\n });\n }\n\n return data;\n}\n\nfunction parseList(xml, shape) {\n var data = [];\n var name = shape.member.name || 'member';\n if (shape.flattened) {\n util.arrayEach(xml, function(xmlChild) {\n data.push(parseXml(xmlChild, shape.member));\n });\n } else if (xml && Array.isArray(xml[name])) {\n util.arrayEach(xml[name], function(child) {\n data.push(parseXml(child, shape.member));\n });\n }\n\n return data;\n}\n\nfunction parseScalar(text, shape) {\n if (text && text.$ && text.$.encoding === 'base64') {\n shape = new Shape.create({type: text.$.encoding});\n }\n if (text && text._) text = text._;\n\n if (typeof shape.toType === 'function') {\n return shape.toType(text);\n } else {\n return text;\n }\n}\n\nfunction parseUnknown(xml) {\n if (xml === undefined || xml === null) return '';\n if (typeof xml === 'string') return xml;\n\n // parse a list\n if (Array.isArray(xml)) {\n var arr = [];\n for (i = 0; i < xml.length; i++) {\n arr.push(parseXml(xml[i], {}));\n }\n return arr;\n }\n\n // empty object\n var keys = Object.keys(xml), i;\n if (keys.length === 0 || (keys.length === 1 && keys[0] === '$')) {\n return {};\n }\n\n // object, parse as structure\n var data = {};\n for (i = 0; i < keys.length; i++) {\n var key = keys[i], value = xml[key];\n if (key === '$') continue;\n if (value.length > 1) { // this member is a list\n data[key] = parseList(value, {member: {}});\n } else { // this member is a single item\n data[key] = parseXml(value[0], {});\n }\n }\n return data;\n}\n\n/**\n * @api private\n */\nmodule.exports = NodeXmlParser;\n","var escapeAttribute = require('./escape-attribute').escapeAttribute;\n\n/**\n * Represents an XML node.\n * @api private\n */\nfunction XmlNode(name, children) {\n if (children === void 0) { children = []; }\n this.name = name;\n this.children = children;\n this.attributes = {};\n}\nXmlNode.prototype.addAttribute = function (name, value) {\n this.attributes[name] = value;\n return this;\n};\nXmlNode.prototype.addChildNode = function (child) {\n this.children.push(child);\n return this;\n};\nXmlNode.prototype.removeAttribute = function (name) {\n delete this.attributes[name];\n return this;\n};\nXmlNode.prototype.toString = function () {\n var hasChildren = Boolean(this.children.length);\n var xmlText = '<' + this.name;\n // add attributes\n var attributes = this.attributes;\n for (var i = 0, attributeNames = Object.keys(attributes); i < attributeNames.length; i++) {\n var attributeName = attributeNames[i];\n var attribute = attributes[attributeName];\n if (typeof attribute !== 'undefined' && attribute !== null) {\n xmlText += ' ' + attributeName + '=\\\"' + escapeAttribute('' + attribute) + '\\\"';\n }\n }\n return xmlText += !hasChildren ? '/>' : '>' + this.children.map(function (c) { return c.toString(); }).join('') + '';\n};\n\n/**\n * @api private\n */\nmodule.exports = {\n XmlNode: XmlNode\n};\n","var escapeElement = require('./escape-element').escapeElement;\n\n/**\n * Represents an XML text value.\n * @api private\n */\nfunction XmlText(value) {\n this.value = value;\n}\n\nXmlText.prototype.toString = function () {\n return escapeElement('' + this.value);\n};\n\n/**\n * @api private\n */\nmodule.exports = {\n XmlText: XmlText\n};\n","var v1 = require('./v1');\nvar v4 = require('./v4');\n\nvar uuid = v4;\nuuid.v1 = v1;\nuuid.v4 = v4;\n\nmodule.exports = uuid;\n","/**\n * Convert array of 16 byte values to UUID string format of the form:\n * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX\n */\nvar byteToHex = [];\nfor (var i = 0; i < 256; ++i) {\n byteToHex[i] = (i + 0x100).toString(16).substr(1);\n}\n\nfunction bytesToUuid(buf, offset) {\n var i = offset || 0;\n var bth = byteToHex;\n // join used to fix memory issue caused by concatenation: https://bugs.chromium.org/p/v8/issues/detail?id=3175#c4\n return ([bth[buf[i++]], bth[buf[i++]], \n\tbth[buf[i++]], bth[buf[i++]], '-',\n\tbth[buf[i++]], bth[buf[i++]], '-',\n\tbth[buf[i++]], bth[buf[i++]], '-',\n\tbth[buf[i++]], bth[buf[i++]], '-',\n\tbth[buf[i++]], bth[buf[i++]],\n\tbth[buf[i++]], bth[buf[i++]],\n\tbth[buf[i++]], bth[buf[i++]]]).join('');\n}\n\nmodule.exports = bytesToUuid;\n","// Unique ID creation requires a high quality random # generator. In node.js\n// this is pretty straight-forward - we use the crypto API.\n\nvar crypto = require('crypto');\n\nmodule.exports = function nodeRNG() {\n return crypto.randomBytes(16);\n};\n","var rng = require('./lib/rng');\nvar bytesToUuid = require('./lib/bytesToUuid');\n\n// **`v1()` - Generate time-based UUID**\n//\n// Inspired by https://github.com/LiosK/UUID.js\n// and http://docs.python.org/library/uuid.html\n\nvar _nodeId;\nvar _clockseq;\n\n// Previous uuid creation time\nvar _lastMSecs = 0;\nvar _lastNSecs = 0;\n\n// See https://github.com/broofa/node-uuid for API details\nfunction v1(options, buf, offset) {\n var i = buf && offset || 0;\n var b = buf || [];\n\n options = options || {};\n var node = options.node || _nodeId;\n var clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq;\n\n // node and clockseq need to be initialized to random values if they're not\n // specified. We do this lazily to minimize issues related to insufficient\n // system entropy. See #189\n if (node == null || clockseq == null) {\n var seedBytes = rng();\n if (node == null) {\n // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1)\n node = _nodeId = [\n seedBytes[0] | 0x01,\n seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]\n ];\n }\n if (clockseq == null) {\n // Per 4.2.2, randomize (14 bit) clockseq\n clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff;\n }\n }\n\n // UUID timestamps are 100 nano-second units since the Gregorian epoch,\n // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so\n // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs'\n // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00.\n var msecs = options.msecs !== undefined ? options.msecs : new Date().getTime();\n\n // Per 4.2.1.2, use count of uuid's generated during the current clock\n // cycle to simulate higher resolution clock\n var nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1;\n\n // Time since last uuid creation (in msecs)\n var dt = (msecs - _lastMSecs) + (nsecs - _lastNSecs)/10000;\n\n // Per 4.2.1.2, Bump clockseq on clock regression\n if (dt < 0 && options.clockseq === undefined) {\n clockseq = clockseq + 1 & 0x3fff;\n }\n\n // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new\n // time interval\n if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) {\n nsecs = 0;\n }\n\n // Per 4.2.1.2 Throw error if too many uuids are requested\n if (nsecs >= 10000) {\n throw new Error('uuid.v1(): Can\\'t create more than 10M uuids/sec');\n }\n\n _lastMSecs = msecs;\n _lastNSecs = nsecs;\n _clockseq = clockseq;\n\n // Per 4.1.4 - Convert from unix epoch to Gregorian epoch\n msecs += 12219292800000;\n\n // `time_low`\n var tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000;\n b[i++] = tl >>> 24 & 0xff;\n b[i++] = tl >>> 16 & 0xff;\n b[i++] = tl >>> 8 & 0xff;\n b[i++] = tl & 0xff;\n\n // `time_mid`\n var tmh = (msecs / 0x100000000 * 10000) & 0xfffffff;\n b[i++] = tmh >>> 8 & 0xff;\n b[i++] = tmh & 0xff;\n\n // `time_high_and_version`\n b[i++] = tmh >>> 24 & 0xf | 0x10; // include version\n b[i++] = tmh >>> 16 & 0xff;\n\n // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant)\n b[i++] = clockseq >>> 8 | 0x80;\n\n // `clock_seq_low`\n b[i++] = clockseq & 0xff;\n\n // `node`\n for (var n = 0; n < 6; ++n) {\n b[i + n] = node[n];\n }\n\n return buf ? buf : bytesToUuid(b);\n}\n\nmodule.exports = v1;\n","var rng = require('./lib/rng');\nvar bytesToUuid = require('./lib/bytesToUuid');\n\nfunction v4(options, buf, offset) {\n var i = buf && offset || 0;\n\n if (typeof(options) == 'string') {\n buf = options === 'binary' ? new Array(16) : null;\n options = null;\n }\n options = options || {};\n\n var rnds = options.random || (options.rng || rng)();\n\n // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`\n rnds[6] = (rnds[6] & 0x0f) | 0x40;\n rnds[8] = (rnds[8] & 0x3f) | 0x80;\n\n // Copy bytes to buffer, if provided\n if (buf) {\n for (var ii = 0; ii < 16; ++ii) {\n buf[i + ii] = rnds[ii];\n }\n }\n\n return buf || bytesToUuid(rnds);\n}\n\nmodule.exports = v4;\n","// Generated by CoffeeScript 1.12.7\n(function() {\n \"use strict\";\n exports.stripBOM = function(str) {\n if (str[0] === '\\uFEFF') {\n return str.substring(1);\n } else {\n return str;\n }\n };\n\n}).call(this);\n","// Generated by CoffeeScript 1.12.7\n(function() {\n \"use strict\";\n var builder, defaults, escapeCDATA, requiresCDATA, wrapCDATA,\n hasProp = {}.hasOwnProperty;\n\n builder = require('xmlbuilder');\n\n defaults = require('./defaults').defaults;\n\n requiresCDATA = function(entry) {\n return typeof entry === \"string\" && (entry.indexOf('&') >= 0 || entry.indexOf('>') >= 0 || entry.indexOf('<') >= 0);\n };\n\n wrapCDATA = function(entry) {\n return \"\";\n };\n\n escapeCDATA = function(entry) {\n return entry.replace(']]>', ']]]]>');\n };\n\n exports.Builder = (function() {\n function Builder(opts) {\n var key, ref, value;\n this.options = {};\n ref = defaults[\"0.2\"];\n for (key in ref) {\n if (!hasProp.call(ref, key)) continue;\n value = ref[key];\n this.options[key] = value;\n }\n for (key in opts) {\n if (!hasProp.call(opts, key)) continue;\n value = opts[key];\n this.options[key] = value;\n }\n }\n\n Builder.prototype.buildObject = function(rootObj) {\n var attrkey, charkey, render, rootElement, rootName;\n attrkey = this.options.attrkey;\n charkey = this.options.charkey;\n if ((Object.keys(rootObj).length === 1) && (this.options.rootName === defaults['0.2'].rootName)) {\n rootName = Object.keys(rootObj)[0];\n rootObj = rootObj[rootName];\n } else {\n rootName = this.options.rootName;\n }\n render = (function(_this) {\n return function(element, obj) {\n var attr, child, entry, index, key, value;\n if (typeof obj !== 'object') {\n if (_this.options.cdata && requiresCDATA(obj)) {\n element.raw(wrapCDATA(obj));\n } else {\n element.txt(obj);\n }\n } else if (Array.isArray(obj)) {\n for (index in obj) {\n if (!hasProp.call(obj, index)) continue;\n child = obj[index];\n for (key in child) {\n entry = child[key];\n element = render(element.ele(key), entry).up();\n }\n }\n } else {\n for (key in obj) {\n if (!hasProp.call(obj, key)) continue;\n child = obj[key];\n if (key === attrkey) {\n if (typeof child === \"object\") {\n for (attr in child) {\n value = child[attr];\n element = element.att(attr, value);\n }\n }\n } else if (key === charkey) {\n if (_this.options.cdata && requiresCDATA(child)) {\n element = element.raw(wrapCDATA(child));\n } else {\n element = element.txt(child);\n }\n } else if (Array.isArray(child)) {\n for (index in child) {\n if (!hasProp.call(child, index)) continue;\n entry = child[index];\n if (typeof entry === 'string') {\n if (_this.options.cdata && requiresCDATA(entry)) {\n element = element.ele(key).raw(wrapCDATA(entry)).up();\n } else {\n element = element.ele(key, entry).up();\n }\n } else {\n element = render(element.ele(key), entry).up();\n }\n }\n } else if (typeof child === \"object\") {\n element = render(element.ele(key), child).up();\n } else {\n if (typeof child === 'string' && _this.options.cdata && requiresCDATA(child)) {\n element = element.ele(key).raw(wrapCDATA(child)).up();\n } else {\n if (child == null) {\n child = '';\n }\n element = element.ele(key, child.toString()).up();\n }\n }\n }\n }\n return element;\n };\n })(this);\n rootElement = builder.create(rootName, this.options.xmldec, this.options.doctype, {\n headless: this.options.headless,\n allowSurrogateChars: this.options.allowSurrogateChars\n });\n return render(rootElement, rootObj).end(this.options.renderOpts);\n };\n\n return Builder;\n\n })();\n\n}).call(this);\n","// Generated by CoffeeScript 1.12.7\n(function() {\n exports.defaults = {\n \"0.1\": {\n explicitCharkey: false,\n trim: true,\n normalize: true,\n normalizeTags: false,\n attrkey: \"@\",\n charkey: \"#\",\n explicitArray: false,\n ignoreAttrs: false,\n mergeAttrs: false,\n explicitRoot: false,\n validator: null,\n xmlns: false,\n explicitChildren: false,\n childkey: '@@',\n charsAsChildren: false,\n includeWhiteChars: false,\n async: false,\n strict: true,\n attrNameProcessors: null,\n attrValueProcessors: null,\n tagNameProcessors: null,\n valueProcessors: null,\n emptyTag: ''\n },\n \"0.2\": {\n explicitCharkey: false,\n trim: false,\n normalize: false,\n normalizeTags: false,\n attrkey: \"$\",\n charkey: \"_\",\n explicitArray: true,\n ignoreAttrs: false,\n mergeAttrs: false,\n explicitRoot: true,\n validator: null,\n xmlns: false,\n explicitChildren: false,\n preserveChildrenOrder: false,\n childkey: '$$',\n charsAsChildren: false,\n includeWhiteChars: false,\n async: false,\n strict: true,\n attrNameProcessors: null,\n attrValueProcessors: null,\n tagNameProcessors: null,\n valueProcessors: null,\n rootName: 'root',\n xmldec: {\n 'version': '1.0',\n 'encoding': 'UTF-8',\n 'standalone': true\n },\n doctype: null,\n renderOpts: {\n 'pretty': true,\n 'indent': ' ',\n 'newline': '\\n'\n },\n headless: false,\n chunkSize: 10000,\n emptyTag: '',\n cdata: false\n }\n };\n\n}).call(this);\n","// Generated by CoffeeScript 1.12.7\n(function() {\n \"use strict\";\n var bom, defaults, events, isEmpty, processItem, processors, sax, setImmediate,\n bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; },\n extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },\n hasProp = {}.hasOwnProperty;\n\n sax = require('sax');\n\n events = require('events');\n\n bom = require('./bom');\n\n processors = require('./processors');\n\n setImmediate = require('timers').setImmediate;\n\n defaults = require('./defaults').defaults;\n\n isEmpty = function(thing) {\n return typeof thing === \"object\" && (thing != null) && Object.keys(thing).length === 0;\n };\n\n processItem = function(processors, item, key) {\n var i, len, process;\n for (i = 0, len = processors.length; i < len; i++) {\n process = processors[i];\n item = process(item, key);\n }\n return item;\n };\n\n exports.Parser = (function(superClass) {\n extend(Parser, superClass);\n\n function Parser(opts) {\n this.parseString = bind(this.parseString, this);\n this.reset = bind(this.reset, this);\n this.assignOrPush = bind(this.assignOrPush, this);\n this.processAsync = bind(this.processAsync, this);\n var key, ref, value;\n if (!(this instanceof exports.Parser)) {\n return new exports.Parser(opts);\n }\n this.options = {};\n ref = defaults[\"0.2\"];\n for (key in ref) {\n if (!hasProp.call(ref, key)) continue;\n value = ref[key];\n this.options[key] = value;\n }\n for (key in opts) {\n if (!hasProp.call(opts, key)) continue;\n value = opts[key];\n this.options[key] = value;\n }\n if (this.options.xmlns) {\n this.options.xmlnskey = this.options.attrkey + \"ns\";\n }\n if (this.options.normalizeTags) {\n if (!this.options.tagNameProcessors) {\n this.options.tagNameProcessors = [];\n }\n this.options.tagNameProcessors.unshift(processors.normalize);\n }\n this.reset();\n }\n\n Parser.prototype.processAsync = function() {\n var chunk, err;\n try {\n if (this.remaining.length <= this.options.chunkSize) {\n chunk = this.remaining;\n this.remaining = '';\n this.saxParser = this.saxParser.write(chunk);\n return this.saxParser.close();\n } else {\n chunk = this.remaining.substr(0, this.options.chunkSize);\n this.remaining = this.remaining.substr(this.options.chunkSize, this.remaining.length);\n this.saxParser = this.saxParser.write(chunk);\n return setImmediate(this.processAsync);\n }\n } catch (error1) {\n err = error1;\n if (!this.saxParser.errThrown) {\n this.saxParser.errThrown = true;\n return this.emit(err);\n }\n }\n };\n\n Parser.prototype.assignOrPush = function(obj, key, newValue) {\n if (!(key in obj)) {\n if (!this.options.explicitArray) {\n return obj[key] = newValue;\n } else {\n return obj[key] = [newValue];\n }\n } else {\n if (!(obj[key] instanceof Array)) {\n obj[key] = [obj[key]];\n }\n return obj[key].push(newValue);\n }\n };\n\n Parser.prototype.reset = function() {\n var attrkey, charkey, ontext, stack;\n this.removeAllListeners();\n this.saxParser = sax.parser(this.options.strict, {\n trim: false,\n normalize: false,\n xmlns: this.options.xmlns\n });\n this.saxParser.errThrown = false;\n this.saxParser.onerror = (function(_this) {\n return function(error) {\n _this.saxParser.resume();\n if (!_this.saxParser.errThrown) {\n _this.saxParser.errThrown = true;\n return _this.emit(\"error\", error);\n }\n };\n })(this);\n this.saxParser.onend = (function(_this) {\n return function() {\n if (!_this.saxParser.ended) {\n _this.saxParser.ended = true;\n return _this.emit(\"end\", _this.resultObject);\n }\n };\n })(this);\n this.saxParser.ended = false;\n this.EXPLICIT_CHARKEY = this.options.explicitCharkey;\n this.resultObject = null;\n stack = [];\n attrkey = this.options.attrkey;\n charkey = this.options.charkey;\n this.saxParser.onopentag = (function(_this) {\n return function(node) {\n var key, newValue, obj, processedKey, ref;\n obj = {};\n obj[charkey] = \"\";\n if (!_this.options.ignoreAttrs) {\n ref = node.attributes;\n for (key in ref) {\n if (!hasProp.call(ref, key)) continue;\n if (!(attrkey in obj) && !_this.options.mergeAttrs) {\n obj[attrkey] = {};\n }\n newValue = _this.options.attrValueProcessors ? processItem(_this.options.attrValueProcessors, node.attributes[key], key) : node.attributes[key];\n processedKey = _this.options.attrNameProcessors ? processItem(_this.options.attrNameProcessors, key) : key;\n if (_this.options.mergeAttrs) {\n _this.assignOrPush(obj, processedKey, newValue);\n } else {\n obj[attrkey][processedKey] = newValue;\n }\n }\n }\n obj[\"#name\"] = _this.options.tagNameProcessors ? processItem(_this.options.tagNameProcessors, node.name) : node.name;\n if (_this.options.xmlns) {\n obj[_this.options.xmlnskey] = {\n uri: node.uri,\n local: node.local\n };\n }\n return stack.push(obj);\n };\n })(this);\n this.saxParser.onclosetag = (function(_this) {\n return function() {\n var cdata, emptyStr, key, node, nodeName, obj, objClone, old, s, xpath;\n obj = stack.pop();\n nodeName = obj[\"#name\"];\n if (!_this.options.explicitChildren || !_this.options.preserveChildrenOrder) {\n delete obj[\"#name\"];\n }\n if (obj.cdata === true) {\n cdata = obj.cdata;\n delete obj.cdata;\n }\n s = stack[stack.length - 1];\n if (obj[charkey].match(/^\\s*$/) && !cdata) {\n emptyStr = obj[charkey];\n delete obj[charkey];\n } else {\n if (_this.options.trim) {\n obj[charkey] = obj[charkey].trim();\n }\n if (_this.options.normalize) {\n obj[charkey] = obj[charkey].replace(/\\s{2,}/g, \" \").trim();\n }\n obj[charkey] = _this.options.valueProcessors ? processItem(_this.options.valueProcessors, obj[charkey], nodeName) : obj[charkey];\n if (Object.keys(obj).length === 1 && charkey in obj && !_this.EXPLICIT_CHARKEY) {\n obj = obj[charkey];\n }\n }\n if (isEmpty(obj)) {\n obj = _this.options.emptyTag !== '' ? _this.options.emptyTag : emptyStr;\n }\n if (_this.options.validator != null) {\n xpath = \"/\" + ((function() {\n var i, len, results;\n results = [];\n for (i = 0, len = stack.length; i < len; i++) {\n node = stack[i];\n results.push(node[\"#name\"]);\n }\n return results;\n })()).concat(nodeName).join(\"/\");\n (function() {\n var err;\n try {\n return obj = _this.options.validator(xpath, s && s[nodeName], obj);\n } catch (error1) {\n err = error1;\n return _this.emit(\"error\", err);\n }\n })();\n }\n if (_this.options.explicitChildren && !_this.options.mergeAttrs && typeof obj === 'object') {\n if (!_this.options.preserveChildrenOrder) {\n node = {};\n if (_this.options.attrkey in obj) {\n node[_this.options.attrkey] = obj[_this.options.attrkey];\n delete obj[_this.options.attrkey];\n }\n if (!_this.options.charsAsChildren && _this.options.charkey in obj) {\n node[_this.options.charkey] = obj[_this.options.charkey];\n delete obj[_this.options.charkey];\n }\n if (Object.getOwnPropertyNames(obj).length > 0) {\n node[_this.options.childkey] = obj;\n }\n obj = node;\n } else if (s) {\n s[_this.options.childkey] = s[_this.options.childkey] || [];\n objClone = {};\n for (key in obj) {\n if (!hasProp.call(obj, key)) continue;\n objClone[key] = obj[key];\n }\n s[_this.options.childkey].push(objClone);\n delete obj[\"#name\"];\n if (Object.keys(obj).length === 1 && charkey in obj && !_this.EXPLICIT_CHARKEY) {\n obj = obj[charkey];\n }\n }\n }\n if (stack.length > 0) {\n return _this.assignOrPush(s, nodeName, obj);\n } else {\n if (_this.options.explicitRoot) {\n old = obj;\n obj = {};\n obj[nodeName] = old;\n }\n _this.resultObject = obj;\n _this.saxParser.ended = true;\n return _this.emit(\"end\", _this.resultObject);\n }\n };\n })(this);\n ontext = (function(_this) {\n return function(text) {\n var charChild, s;\n s = stack[stack.length - 1];\n if (s) {\n s[charkey] += text;\n if (_this.options.explicitChildren && _this.options.preserveChildrenOrder && _this.options.charsAsChildren && (_this.options.includeWhiteChars || text.replace(/\\\\n/g, '').trim() !== '')) {\n s[_this.options.childkey] = s[_this.options.childkey] || [];\n charChild = {\n '#name': '__text__'\n };\n charChild[charkey] = text;\n if (_this.options.normalize) {\n charChild[charkey] = charChild[charkey].replace(/\\s{2,}/g, \" \").trim();\n }\n s[_this.options.childkey].push(charChild);\n }\n return s;\n }\n };\n })(this);\n this.saxParser.ontext = ontext;\n return this.saxParser.oncdata = (function(_this) {\n return function(text) {\n var s;\n s = ontext(text);\n if (s) {\n return s.cdata = true;\n }\n };\n })(this);\n };\n\n Parser.prototype.parseString = function(str, cb) {\n var err;\n if ((cb != null) && typeof cb === \"function\") {\n this.on(\"end\", function(result) {\n this.reset();\n return cb(null, result);\n });\n this.on(\"error\", function(err) {\n this.reset();\n return cb(err);\n });\n }\n try {\n str = str.toString();\n if (str.trim() === '') {\n this.emit(\"end\", null);\n return true;\n }\n str = bom.stripBOM(str);\n if (this.options.async) {\n this.remaining = str;\n setImmediate(this.processAsync);\n return this.saxParser;\n }\n return this.saxParser.write(str).close();\n } catch (error1) {\n err = error1;\n if (!(this.saxParser.errThrown || this.saxParser.ended)) {\n this.emit('error', err);\n return this.saxParser.errThrown = true;\n } else if (this.saxParser.ended) {\n throw err;\n }\n }\n };\n\n return Parser;\n\n })(events.EventEmitter);\n\n exports.parseString = function(str, a, b) {\n var cb, options, parser;\n if (b != null) {\n if (typeof b === 'function') {\n cb = b;\n }\n if (typeof a === 'object') {\n options = a;\n }\n } else {\n if (typeof a === 'function') {\n cb = a;\n }\n options = {};\n }\n parser = new exports.Parser(options);\n return parser.parseString(str, cb);\n };\n\n}).call(this);\n","// Generated by CoffeeScript 1.12.7\n(function() {\n \"use strict\";\n var prefixMatch;\n\n prefixMatch = new RegExp(/(?!xmlns)^.*:/);\n\n exports.normalize = function(str) {\n return str.toLowerCase();\n };\n\n exports.firstCharLowerCase = function(str) {\n return str.charAt(0).toLowerCase() + str.slice(1);\n };\n\n exports.stripPrefix = function(str) {\n return str.replace(prefixMatch, '');\n };\n\n exports.parseNumbers = function(str) {\n if (!isNaN(str)) {\n str = str % 1 === 0 ? parseInt(str, 10) : parseFloat(str);\n }\n return str;\n };\n\n exports.parseBooleans = function(str) {\n if (/^(?:true|false)$/i.test(str)) {\n str = str.toLowerCase() === 'true';\n }\n return str;\n };\n\n}).call(this);\n","// Generated by CoffeeScript 1.12.7\n(function() {\n \"use strict\";\n var builder, defaults, parser, processors,\n extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },\n hasProp = {}.hasOwnProperty;\n\n defaults = require('./defaults');\n\n builder = require('./builder');\n\n parser = require('./parser');\n\n processors = require('./processors');\n\n exports.defaults = defaults.defaults;\n\n exports.processors = processors;\n\n exports.ValidationError = (function(superClass) {\n extend(ValidationError, superClass);\n\n function ValidationError(message) {\n this.message = message;\n }\n\n return ValidationError;\n\n })(Error);\n\n exports.Builder = builder.Builder;\n\n exports.Parser = parser.Parser;\n\n exports.parseString = parser.parseString;\n\n}).call(this);\n",";(function (sax) { // wrapper for non-node envs\n sax.parser = function (strict, opt) { return new SAXParser(strict, opt) }\n sax.SAXParser = SAXParser\n sax.SAXStream = SAXStream\n sax.createStream = createStream\n\n // When we pass the MAX_BUFFER_LENGTH position, start checking for buffer overruns.\n // When we check, schedule the next check for MAX_BUFFER_LENGTH - (max(buffer lengths)),\n // since that's the earliest that a buffer overrun could occur. This way, checks are\n // as rare as required, but as often as necessary to ensure never crossing this bound.\n // Furthermore, buffers are only tested at most once per write(), so passing a very\n // large string into write() might have undesirable effects, but this is manageable by\n // the caller, so it is assumed to be safe. Thus, a call to write() may, in the extreme\n // edge case, result in creating at most one complete copy of the string passed in.\n // Set to Infinity to have unlimited buffers.\n sax.MAX_BUFFER_LENGTH = 64 * 1024\n\n var buffers = [\n 'comment', 'sgmlDecl', 'textNode', 'tagName', 'doctype',\n 'procInstName', 'procInstBody', 'entity', 'attribName',\n 'attribValue', 'cdata', 'script'\n ]\n\n sax.EVENTS = [\n 'text',\n 'processinginstruction',\n 'sgmldeclaration',\n 'doctype',\n 'comment',\n 'opentagstart',\n 'attribute',\n 'opentag',\n 'closetag',\n 'opencdata',\n 'cdata',\n 'closecdata',\n 'error',\n 'end',\n 'ready',\n 'script',\n 'opennamespace',\n 'closenamespace'\n ]\n\n function SAXParser (strict, opt) {\n if (!(this instanceof SAXParser)) {\n return new SAXParser(strict, opt)\n }\n\n var parser = this\n clearBuffers(parser)\n parser.q = parser.c = ''\n parser.bufferCheckPosition = sax.MAX_BUFFER_LENGTH\n parser.opt = opt || {}\n parser.opt.lowercase = parser.opt.lowercase || parser.opt.lowercasetags\n parser.looseCase = parser.opt.lowercase ? 'toLowerCase' : 'toUpperCase'\n parser.tags = []\n parser.closed = parser.closedRoot = parser.sawRoot = false\n parser.tag = parser.error = null\n parser.strict = !!strict\n parser.noscript = !!(strict || parser.opt.noscript)\n parser.state = S.BEGIN\n parser.strictEntities = parser.opt.strictEntities\n parser.ENTITIES = parser.strictEntities ? Object.create(sax.XML_ENTITIES) : Object.create(sax.ENTITIES)\n parser.attribList = []\n\n // namespaces form a prototype chain.\n // it always points at the current tag,\n // which protos to its parent tag.\n if (parser.opt.xmlns) {\n parser.ns = Object.create(rootNS)\n }\n\n // mostly just for error reporting\n parser.trackPosition = parser.opt.position !== false\n if (parser.trackPosition) {\n parser.position = parser.line = parser.column = 0\n }\n emit(parser, 'onready')\n }\n\n if (!Object.create) {\n Object.create = function (o) {\n function F () {}\n F.prototype = o\n var newf = new F()\n return newf\n }\n }\n\n if (!Object.keys) {\n Object.keys = function (o) {\n var a = []\n for (var i in o) if (o.hasOwnProperty(i)) a.push(i)\n return a\n }\n }\n\n function checkBufferLength (parser) {\n var maxAllowed = Math.max(sax.MAX_BUFFER_LENGTH, 10)\n var maxActual = 0\n for (var i = 0, l = buffers.length; i < l; i++) {\n var len = parser[buffers[i]].length\n if (len > maxAllowed) {\n // Text/cdata nodes can get big, and since they're buffered,\n // we can get here under normal conditions.\n // Avoid issues by emitting the text node now,\n // so at least it won't get any bigger.\n switch (buffers[i]) {\n case 'textNode':\n closeText(parser)\n break\n\n case 'cdata':\n emitNode(parser, 'oncdata', parser.cdata)\n parser.cdata = ''\n break\n\n case 'script':\n emitNode(parser, 'onscript', parser.script)\n parser.script = ''\n break\n\n default:\n error(parser, 'Max buffer length exceeded: ' + buffers[i])\n }\n }\n maxActual = Math.max(maxActual, len)\n }\n // schedule the next check for the earliest possible buffer overrun.\n var m = sax.MAX_BUFFER_LENGTH - maxActual\n parser.bufferCheckPosition = m + parser.position\n }\n\n function clearBuffers (parser) {\n for (var i = 0, l = buffers.length; i < l; i++) {\n parser[buffers[i]] = ''\n }\n }\n\n function flushBuffers (parser) {\n closeText(parser)\n if (parser.cdata !== '') {\n emitNode(parser, 'oncdata', parser.cdata)\n parser.cdata = ''\n }\n if (parser.script !== '') {\n emitNode(parser, 'onscript', parser.script)\n parser.script = ''\n }\n }\n\n SAXParser.prototype = {\n end: function () { end(this) },\n write: write,\n resume: function () { this.error = null; return this },\n close: function () { return this.write(null) },\n flush: function () { flushBuffers(this) }\n }\n\n var Stream\n try {\n Stream = require('stream').Stream\n } catch (ex) {\n Stream = function () {}\n }\n\n var streamWraps = sax.EVENTS.filter(function (ev) {\n return ev !== 'error' && ev !== 'end'\n })\n\n function createStream (strict, opt) {\n return new SAXStream(strict, opt)\n }\n\n function SAXStream (strict, opt) {\n if (!(this instanceof SAXStream)) {\n return new SAXStream(strict, opt)\n }\n\n Stream.apply(this)\n\n this._parser = new SAXParser(strict, opt)\n this.writable = true\n this.readable = true\n\n var me = this\n\n this._parser.onend = function () {\n me.emit('end')\n }\n\n this._parser.onerror = function (er) {\n me.emit('error', er)\n\n // if didn't throw, then means error was handled.\n // go ahead and clear error, so we can write again.\n me._parser.error = null\n }\n\n this._decoder = null\n\n streamWraps.forEach(function (ev) {\n Object.defineProperty(me, 'on' + ev, {\n get: function () {\n return me._parser['on' + ev]\n },\n set: function (h) {\n if (!h) {\n me.removeAllListeners(ev)\n me._parser['on' + ev] = h\n return h\n }\n me.on(ev, h)\n },\n enumerable: true,\n configurable: false\n })\n })\n }\n\n SAXStream.prototype = Object.create(Stream.prototype, {\n constructor: {\n value: SAXStream\n }\n })\n\n SAXStream.prototype.write = function (data) {\n if (typeof Buffer === 'function' &&\n typeof Buffer.isBuffer === 'function' &&\n Buffer.isBuffer(data)) {\n if (!this._decoder) {\n var SD = require('string_decoder').StringDecoder\n this._decoder = new SD('utf8')\n }\n data = this._decoder.write(data)\n }\n\n this._parser.write(data.toString())\n this.emit('data', data)\n return true\n }\n\n SAXStream.prototype.end = function (chunk) {\n if (chunk && chunk.length) {\n this.write(chunk)\n }\n this._parser.end()\n return true\n }\n\n SAXStream.prototype.on = function (ev, handler) {\n var me = this\n if (!me._parser['on' + ev] && streamWraps.indexOf(ev) !== -1) {\n me._parser['on' + ev] = function () {\n var args = arguments.length === 1 ? [arguments[0]] : Array.apply(null, arguments)\n args.splice(0, 0, ev)\n me.emit.apply(me, args)\n }\n }\n\n return Stream.prototype.on.call(me, ev, handler)\n }\n\n // this really needs to be replaced with character classes.\n // XML allows all manner of ridiculous numbers and digits.\n var CDATA = '[CDATA['\n var DOCTYPE = 'DOCTYPE'\n var XML_NAMESPACE = 'http://www.w3.org/XML/1998/namespace'\n var XMLNS_NAMESPACE = 'http://www.w3.org/2000/xmlns/'\n var rootNS = { xml: XML_NAMESPACE, xmlns: XMLNS_NAMESPACE }\n\n // http://www.w3.org/TR/REC-xml/#NT-NameStartChar\n // This implementation works on strings, a single character at a time\n // as such, it cannot ever support astral-plane characters (10000-EFFFF)\n // without a significant breaking change to either this parser, or the\n // JavaScript language. Implementation of an emoji-capable xml parser\n // is left as an exercise for the reader.\n var nameStart = /[:_A-Za-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD]/\n\n var nameBody = /[:_A-Za-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\u00B7\\u0300-\\u036F\\u203F-\\u2040.\\d-]/\n\n var entityStart = /[#:_A-Za-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD]/\n var entityBody = /[#:_A-Za-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\u00B7\\u0300-\\u036F\\u203F-\\u2040.\\d-]/\n\n function isWhitespace (c) {\n return c === ' ' || c === '\\n' || c === '\\r' || c === '\\t'\n }\n\n function isQuote (c) {\n return c === '\"' || c === '\\''\n }\n\n function isAttribEnd (c) {\n return c === '>' || isWhitespace(c)\n }\n\n function isMatch (regex, c) {\n return regex.test(c)\n }\n\n function notMatch (regex, c) {\n return !isMatch(regex, c)\n }\n\n var S = 0\n sax.STATE = {\n BEGIN: S++, // leading byte order mark or whitespace\n BEGIN_WHITESPACE: S++, // leading whitespace\n TEXT: S++, // general stuff\n TEXT_ENTITY: S++, // & and such.\n OPEN_WAKA: S++, // <\n SGML_DECL: S++, // \n SCRIPT: S++, //