UNPKG

@kubernetes/client-node

Version:
832 lines 1.47 MB
// TODO: better import syntax? import { BaseAPIRequestFactory, RequiredError } from './baseapi.js'; import { HttpMethod, HttpInfo } from '../http/http.js'; import { ObjectSerializer } from '../models/ObjectSerializer.js'; import { ApiException } from './exception.js'; import { isCodeInRange } from '../util.js'; /** * no description */ export class CoreV1ApiRequestFactory extends BaseAPIRequestFactory { /** * connect DELETE requests to proxy of Pod * @param name name of the PodProxyOptions * @param namespace object name and auth scope, such as for teams and projects * @param path Path is the URL path to use for the current proxy request to pod. */ async connectDeleteNamespacedPodProxy(name, namespace, path, _options) { var _a; let _config = _options || this.configuration; // verify required parameter 'name' is not null or undefined if (name === null || name === undefined) { throw new RequiredError("CoreV1Api", "connectDeleteNamespacedPodProxy", "name"); } // verify required parameter 'namespace' is not null or undefined if (namespace === null || namespace === undefined) { throw new RequiredError("CoreV1Api", "connectDeleteNamespacedPodProxy", "namespace"); } // Path Params const localVarPath = '/api/v1/namespaces/{namespace}/pods/{name}/proxy' .replace('{' + 'name' + '}', encodeURIComponent(String(name))) .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.DELETE); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); // Query Params if (path !== undefined) { requestContext.setQueryParam("path", ObjectSerializer.serialize(path, "string", "")); } let authMethod; // Apply auth methods authMethod = _config.authMethods["BearerToken"]; if (authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication) { await (authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication(requestContext)); } const defaultAuth = (_a = _config === null || _config === void 0 ? void 0 : _config.authMethods) === null || _a === void 0 ? void 0 : _a.default; if (defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication) { await (defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication(requestContext)); } return requestContext; } /** * connect DELETE requests to proxy of Pod * @param name name of the PodProxyOptions * @param namespace object name and auth scope, such as for teams and projects * @param path path to the resource * @param path2 Path is the URL path to use for the current proxy request to pod. */ async connectDeleteNamespacedPodProxyWithPath(name, namespace, path, path2, _options) { var _a; let _config = _options || this.configuration; // verify required parameter 'name' is not null or undefined if (name === null || name === undefined) { throw new RequiredError("CoreV1Api", "connectDeleteNamespacedPodProxyWithPath", "name"); } // verify required parameter 'namespace' is not null or undefined if (namespace === null || namespace === undefined) { throw new RequiredError("CoreV1Api", "connectDeleteNamespacedPodProxyWithPath", "namespace"); } // verify required parameter 'path' is not null or undefined if (path === null || path === undefined) { throw new RequiredError("CoreV1Api", "connectDeleteNamespacedPodProxyWithPath", "path"); } // Path Params const localVarPath = '/api/v1/namespaces/{namespace}/pods/{name}/proxy/{path}' .replace('{' + 'name' + '}', encodeURIComponent(String(name))) .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))) .replace('{' + 'path' + '}', encodeURIComponent(String(path))); // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.DELETE); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); // Query Params if (path2 !== undefined) { requestContext.setQueryParam("path", ObjectSerializer.serialize(path2, "string", "")); } let authMethod; // Apply auth methods authMethod = _config.authMethods["BearerToken"]; if (authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication) { await (authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication(requestContext)); } const defaultAuth = (_a = _config === null || _config === void 0 ? void 0 : _config.authMethods) === null || _a === void 0 ? void 0 : _a.default; if (defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication) { await (defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication(requestContext)); } return requestContext; } /** * connect DELETE requests to proxy of Service * @param name name of the ServiceProxyOptions * @param namespace object name and auth scope, such as for teams and projects * @param path Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy. */ async connectDeleteNamespacedServiceProxy(name, namespace, path, _options) { var _a; let _config = _options || this.configuration; // verify required parameter 'name' is not null or undefined if (name === null || name === undefined) { throw new RequiredError("CoreV1Api", "connectDeleteNamespacedServiceProxy", "name"); } // verify required parameter 'namespace' is not null or undefined if (namespace === null || namespace === undefined) { throw new RequiredError("CoreV1Api", "connectDeleteNamespacedServiceProxy", "namespace"); } // Path Params const localVarPath = '/api/v1/namespaces/{namespace}/services/{name}/proxy' .replace('{' + 'name' + '}', encodeURIComponent(String(name))) .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.DELETE); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); // Query Params if (path !== undefined) { requestContext.setQueryParam("path", ObjectSerializer.serialize(path, "string", "")); } let authMethod; // Apply auth methods authMethod = _config.authMethods["BearerToken"]; if (authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication) { await (authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication(requestContext)); } const defaultAuth = (_a = _config === null || _config === void 0 ? void 0 : _config.authMethods) === null || _a === void 0 ? void 0 : _a.default; if (defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication) { await (defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication(requestContext)); } return requestContext; } /** * connect DELETE requests to proxy of Service * @param name name of the ServiceProxyOptions * @param namespace object name and auth scope, such as for teams and projects * @param path path to the resource * @param path2 Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy. */ async connectDeleteNamespacedServiceProxyWithPath(name, namespace, path, path2, _options) { var _a; let _config = _options || this.configuration; // verify required parameter 'name' is not null or undefined if (name === null || name === undefined) { throw new RequiredError("CoreV1Api", "connectDeleteNamespacedServiceProxyWithPath", "name"); } // verify required parameter 'namespace' is not null or undefined if (namespace === null || namespace === undefined) { throw new RequiredError("CoreV1Api", "connectDeleteNamespacedServiceProxyWithPath", "namespace"); } // verify required parameter 'path' is not null or undefined if (path === null || path === undefined) { throw new RequiredError("CoreV1Api", "connectDeleteNamespacedServiceProxyWithPath", "path"); } // Path Params const localVarPath = '/api/v1/namespaces/{namespace}/services/{name}/proxy/{path}' .replace('{' + 'name' + '}', encodeURIComponent(String(name))) .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))) .replace('{' + 'path' + '}', encodeURIComponent(String(path))); // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.DELETE); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); // Query Params if (path2 !== undefined) { requestContext.setQueryParam("path", ObjectSerializer.serialize(path2, "string", "")); } let authMethod; // Apply auth methods authMethod = _config.authMethods["BearerToken"]; if (authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication) { await (authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication(requestContext)); } const defaultAuth = (_a = _config === null || _config === void 0 ? void 0 : _config.authMethods) === null || _a === void 0 ? void 0 : _a.default; if (defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication) { await (defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication(requestContext)); } return requestContext; } /** * connect DELETE requests to proxy of Node * @param name name of the NodeProxyOptions * @param path Path is the URL path to use for the current proxy request to node. */ async connectDeleteNodeProxy(name, path, _options) { var _a; let _config = _options || this.configuration; // verify required parameter 'name' is not null or undefined if (name === null || name === undefined) { throw new RequiredError("CoreV1Api", "connectDeleteNodeProxy", "name"); } // Path Params const localVarPath = '/api/v1/nodes/{name}/proxy' .replace('{' + 'name' + '}', encodeURIComponent(String(name))); // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.DELETE); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); // Query Params if (path !== undefined) { requestContext.setQueryParam("path", ObjectSerializer.serialize(path, "string", "")); } let authMethod; // Apply auth methods authMethod = _config.authMethods["BearerToken"]; if (authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication) { await (authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication(requestContext)); } const defaultAuth = (_a = _config === null || _config === void 0 ? void 0 : _config.authMethods) === null || _a === void 0 ? void 0 : _a.default; if (defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication) { await (defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication(requestContext)); } return requestContext; } /** * connect DELETE requests to proxy of Node * @param name name of the NodeProxyOptions * @param path path to the resource * @param path2 Path is the URL path to use for the current proxy request to node. */ async connectDeleteNodeProxyWithPath(name, path, path2, _options) { var _a; let _config = _options || this.configuration; // verify required parameter 'name' is not null or undefined if (name === null || name === undefined) { throw new RequiredError("CoreV1Api", "connectDeleteNodeProxyWithPath", "name"); } // verify required parameter 'path' is not null or undefined if (path === null || path === undefined) { throw new RequiredError("CoreV1Api", "connectDeleteNodeProxyWithPath", "path"); } // Path Params const localVarPath = '/api/v1/nodes/{name}/proxy/{path}' .replace('{' + 'name' + '}', encodeURIComponent(String(name))) .replace('{' + 'path' + '}', encodeURIComponent(String(path))); // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.DELETE); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); // Query Params if (path2 !== undefined) { requestContext.setQueryParam("path", ObjectSerializer.serialize(path2, "string", "")); } let authMethod; // Apply auth methods authMethod = _config.authMethods["BearerToken"]; if (authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication) { await (authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication(requestContext)); } const defaultAuth = (_a = _config === null || _config === void 0 ? void 0 : _config.authMethods) === null || _a === void 0 ? void 0 : _a.default; if (defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication) { await (defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication(requestContext)); } return requestContext; } /** * connect GET requests to attach of Pod * @param name name of the PodAttachOptions * @param namespace object name and auth scope, such as for teams and projects * @param container The container in which to execute the command. Defaults to only container if there is only one container in the pod. * @param stderr Stderr if true indicates that stderr is to be redirected for the attach call. Defaults to true. * @param stdin Stdin if true, redirects the standard input stream of the pod for this call. Defaults to false. * @param stdout Stdout if true indicates that stdout is to be redirected for the attach call. Defaults to true. * @param tty TTY if true indicates that a tty will be allocated for the attach call. This is passed through the container runtime so the tty is allocated on the worker node by the container runtime. Defaults to false. */ async connectGetNamespacedPodAttach(name, namespace, container, stderr, stdin, stdout, tty, _options) { var _a; let _config = _options || this.configuration; // verify required parameter 'name' is not null or undefined if (name === null || name === undefined) { throw new RequiredError("CoreV1Api", "connectGetNamespacedPodAttach", "name"); } // verify required parameter 'namespace' is not null or undefined if (namespace === null || namespace === undefined) { throw new RequiredError("CoreV1Api", "connectGetNamespacedPodAttach", "namespace"); } // Path Params const localVarPath = '/api/v1/namespaces/{namespace}/pods/{name}/attach' .replace('{' + 'name' + '}', encodeURIComponent(String(name))) .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.GET); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); // Query Params if (container !== undefined) { requestContext.setQueryParam("container", ObjectSerializer.serialize(container, "string", "")); } // Query Params if (stderr !== undefined) { requestContext.setQueryParam("stderr", ObjectSerializer.serialize(stderr, "boolean", "")); } // Query Params if (stdin !== undefined) { requestContext.setQueryParam("stdin", ObjectSerializer.serialize(stdin, "boolean", "")); } // Query Params if (stdout !== undefined) { requestContext.setQueryParam("stdout", ObjectSerializer.serialize(stdout, "boolean", "")); } // Query Params if (tty !== undefined) { requestContext.setQueryParam("tty", ObjectSerializer.serialize(tty, "boolean", "")); } let authMethod; // Apply auth methods authMethod = _config.authMethods["BearerToken"]; if (authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication) { await (authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication(requestContext)); } const defaultAuth = (_a = _config === null || _config === void 0 ? void 0 : _config.authMethods) === null || _a === void 0 ? void 0 : _a.default; if (defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication) { await (defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication(requestContext)); } return requestContext; } /** * connect GET requests to exec of Pod * @param name name of the PodExecOptions * @param namespace object name and auth scope, such as for teams and projects * @param command Command is the remote command to execute. argv array. Not executed within a shell. * @param container Container in which to execute the command. Defaults to only container if there is only one container in the pod. * @param stderr Redirect the standard error stream of the pod for this call. * @param stdin Redirect the standard input stream of the pod for this call. Defaults to false. * @param stdout Redirect the standard output stream of the pod for this call. * @param tty TTY if true indicates that a tty will be allocated for the exec call. Defaults to false. */ async connectGetNamespacedPodExec(name, namespace, command, container, stderr, stdin, stdout, tty, _options) { var _a; let _config = _options || this.configuration; // verify required parameter 'name' is not null or undefined if (name === null || name === undefined) { throw new RequiredError("CoreV1Api", "connectGetNamespacedPodExec", "name"); } // verify required parameter 'namespace' is not null or undefined if (namespace === null || namespace === undefined) { throw new RequiredError("CoreV1Api", "connectGetNamespacedPodExec", "namespace"); } // Path Params const localVarPath = '/api/v1/namespaces/{namespace}/pods/{name}/exec' .replace('{' + 'name' + '}', encodeURIComponent(String(name))) .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.GET); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); // Query Params if (command !== undefined) { requestContext.setQueryParam("command", ObjectSerializer.serialize(command, "string", "")); } // Query Params if (container !== undefined) { requestContext.setQueryParam("container", ObjectSerializer.serialize(container, "string", "")); } // Query Params if (stderr !== undefined) { requestContext.setQueryParam("stderr", ObjectSerializer.serialize(stderr, "boolean", "")); } // Query Params if (stdin !== undefined) { requestContext.setQueryParam("stdin", ObjectSerializer.serialize(stdin, "boolean", "")); } // Query Params if (stdout !== undefined) { requestContext.setQueryParam("stdout", ObjectSerializer.serialize(stdout, "boolean", "")); } // Query Params if (tty !== undefined) { requestContext.setQueryParam("tty", ObjectSerializer.serialize(tty, "boolean", "")); } let authMethod; // Apply auth methods authMethod = _config.authMethods["BearerToken"]; if (authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication) { await (authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication(requestContext)); } const defaultAuth = (_a = _config === null || _config === void 0 ? void 0 : _config.authMethods) === null || _a === void 0 ? void 0 : _a.default; if (defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication) { await (defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication(requestContext)); } return requestContext; } /** * connect GET requests to portforward of Pod * @param name name of the PodPortForwardOptions * @param namespace object name and auth scope, such as for teams and projects * @param ports List of ports to forward Required when using WebSockets */ async connectGetNamespacedPodPortforward(name, namespace, ports, _options) { var _a; let _config = _options || this.configuration; // verify required parameter 'name' is not null or undefined if (name === null || name === undefined) { throw new RequiredError("CoreV1Api", "connectGetNamespacedPodPortforward", "name"); } // verify required parameter 'namespace' is not null or undefined if (namespace === null || namespace === undefined) { throw new RequiredError("CoreV1Api", "connectGetNamespacedPodPortforward", "namespace"); } // Path Params const localVarPath = '/api/v1/namespaces/{namespace}/pods/{name}/portforward' .replace('{' + 'name' + '}', encodeURIComponent(String(name))) .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.GET); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); // Query Params if (ports !== undefined) { requestContext.setQueryParam("ports", ObjectSerializer.serialize(ports, "number", "")); } let authMethod; // Apply auth methods authMethod = _config.authMethods["BearerToken"]; if (authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication) { await (authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication(requestContext)); } const defaultAuth = (_a = _config === null || _config === void 0 ? void 0 : _config.authMethods) === null || _a === void 0 ? void 0 : _a.default; if (defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication) { await (defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication(requestContext)); } return requestContext; } /** * connect GET requests to proxy of Pod * @param name name of the PodProxyOptions * @param namespace object name and auth scope, such as for teams and projects * @param path Path is the URL path to use for the current proxy request to pod. */ async connectGetNamespacedPodProxy(name, namespace, path, _options) { var _a; let _config = _options || this.configuration; // verify required parameter 'name' is not null or undefined if (name === null || name === undefined) { throw new RequiredError("CoreV1Api", "connectGetNamespacedPodProxy", "name"); } // verify required parameter 'namespace' is not null or undefined if (namespace === null || namespace === undefined) { throw new RequiredError("CoreV1Api", "connectGetNamespacedPodProxy", "namespace"); } // Path Params const localVarPath = '/api/v1/namespaces/{namespace}/pods/{name}/proxy' .replace('{' + 'name' + '}', encodeURIComponent(String(name))) .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.GET); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); // Query Params if (path !== undefined) { requestContext.setQueryParam("path", ObjectSerializer.serialize(path, "string", "")); } let authMethod; // Apply auth methods authMethod = _config.authMethods["BearerToken"]; if (authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication) { await (authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication(requestContext)); } const defaultAuth = (_a = _config === null || _config === void 0 ? void 0 : _config.authMethods) === null || _a === void 0 ? void 0 : _a.default; if (defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication) { await (defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication(requestContext)); } return requestContext; } /** * connect GET requests to proxy of Pod * @param name name of the PodProxyOptions * @param namespace object name and auth scope, such as for teams and projects * @param path path to the resource * @param path2 Path is the URL path to use for the current proxy request to pod. */ async connectGetNamespacedPodProxyWithPath(name, namespace, path, path2, _options) { var _a; let _config = _options || this.configuration; // verify required parameter 'name' is not null or undefined if (name === null || name === undefined) { throw new RequiredError("CoreV1Api", "connectGetNamespacedPodProxyWithPath", "name"); } // verify required parameter 'namespace' is not null or undefined if (namespace === null || namespace === undefined) { throw new RequiredError("CoreV1Api", "connectGetNamespacedPodProxyWithPath", "namespace"); } // verify required parameter 'path' is not null or undefined if (path === null || path === undefined) { throw new RequiredError("CoreV1Api", "connectGetNamespacedPodProxyWithPath", "path"); } // Path Params const localVarPath = '/api/v1/namespaces/{namespace}/pods/{name}/proxy/{path}' .replace('{' + 'name' + '}', encodeURIComponent(String(name))) .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))) .replace('{' + 'path' + '}', encodeURIComponent(String(path))); // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.GET); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); // Query Params if (path2 !== undefined) { requestContext.setQueryParam("path", ObjectSerializer.serialize(path2, "string", "")); } let authMethod; // Apply auth methods authMethod = _config.authMethods["BearerToken"]; if (authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication) { await (authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication(requestContext)); } const defaultAuth = (_a = _config === null || _config === void 0 ? void 0 : _config.authMethods) === null || _a === void 0 ? void 0 : _a.default; if (defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication) { await (defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication(requestContext)); } return requestContext; } /** * connect GET requests to proxy of Service * @param name name of the ServiceProxyOptions * @param namespace object name and auth scope, such as for teams and projects * @param path Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy. */ async connectGetNamespacedServiceProxy(name, namespace, path, _options) { var _a; let _config = _options || this.configuration; // verify required parameter 'name' is not null or undefined if (name === null || name === undefined) { throw new RequiredError("CoreV1Api", "connectGetNamespacedServiceProxy", "name"); } // verify required parameter 'namespace' is not null or undefined if (namespace === null || namespace === undefined) { throw new RequiredError("CoreV1Api", "connectGetNamespacedServiceProxy", "namespace"); } // Path Params const localVarPath = '/api/v1/namespaces/{namespace}/services/{name}/proxy' .replace('{' + 'name' + '}', encodeURIComponent(String(name))) .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.GET); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); // Query Params if (path !== undefined) { requestContext.setQueryParam("path", ObjectSerializer.serialize(path, "string", "")); } let authMethod; // Apply auth methods authMethod = _config.authMethods["BearerToken"]; if (authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication) { await (authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication(requestContext)); } const defaultAuth = (_a = _config === null || _config === void 0 ? void 0 : _config.authMethods) === null || _a === void 0 ? void 0 : _a.default; if (defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication) { await (defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication(requestContext)); } return requestContext; } /** * connect GET requests to proxy of Service * @param name name of the ServiceProxyOptions * @param namespace object name and auth scope, such as for teams and projects * @param path path to the resource * @param path2 Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy. */ async connectGetNamespacedServiceProxyWithPath(name, namespace, path, path2, _options) { var _a; let _config = _options || this.configuration; // verify required parameter 'name' is not null or undefined if (name === null || name === undefined) { throw new RequiredError("CoreV1Api", "connectGetNamespacedServiceProxyWithPath", "name"); } // verify required parameter 'namespace' is not null or undefined if (namespace === null || namespace === undefined) { throw new RequiredError("CoreV1Api", "connectGetNamespacedServiceProxyWithPath", "namespace"); } // verify required parameter 'path' is not null or undefined if (path === null || path === undefined) { throw new RequiredError("CoreV1Api", "connectGetNamespacedServiceProxyWithPath", "path"); } // Path Params const localVarPath = '/api/v1/namespaces/{namespace}/services/{name}/proxy/{path}' .replace('{' + 'name' + '}', encodeURIComponent(String(name))) .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))) .replace('{' + 'path' + '}', encodeURIComponent(String(path))); // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.GET); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); // Query Params if (path2 !== undefined) { requestContext.setQueryParam("path", ObjectSerializer.serialize(path2, "string", "")); } let authMethod; // Apply auth methods authMethod = _config.authMethods["BearerToken"]; if (authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication) { await (authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication(requestContext)); } const defaultAuth = (_a = _config === null || _config === void 0 ? void 0 : _config.authMethods) === null || _a === void 0 ? void 0 : _a.default; if (defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication) { await (defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication(requestContext)); } return requestContext; } /** * connect GET requests to proxy of Node * @param name name of the NodeProxyOptions * @param path Path is the URL path to use for the current proxy request to node. */ async connectGetNodeProxy(name, path, _options) { var _a; let _config = _options || this.configuration; // verify required parameter 'name' is not null or undefined if (name === null || name === undefined) { throw new RequiredError("CoreV1Api", "connectGetNodeProxy", "name"); } // Path Params const localVarPath = '/api/v1/nodes/{name}/proxy' .replace('{' + 'name' + '}', encodeURIComponent(String(name))); // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.GET); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); // Query Params if (path !== undefined) { requestContext.setQueryParam("path", ObjectSerializer.serialize(path, "string", "")); } let authMethod; // Apply auth methods authMethod = _config.authMethods["BearerToken"]; if (authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication) { await (authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication(requestContext)); } const defaultAuth = (_a = _config === null || _config === void 0 ? void 0 : _config.authMethods) === null || _a === void 0 ? void 0 : _a.default; if (defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication) { await (defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication(requestContext)); } return requestContext; } /** * connect GET requests to proxy of Node * @param name name of the NodeProxyOptions * @param path path to the resource * @param path2 Path is the URL path to use for the current proxy request to node. */ async connectGetNodeProxyWithPath(name, path, path2, _options) { var _a; let _config = _options || this.configuration; // verify required parameter 'name' is not null or undefined if (name === null || name === undefined) { throw new RequiredError("CoreV1Api", "connectGetNodeProxyWithPath", "name"); } // verify required parameter 'path' is not null or undefined if (path === null || path === undefined) { throw new RequiredError("CoreV1Api", "connectGetNodeProxyWithPath", "path"); } // Path Params const localVarPath = '/api/v1/nodes/{name}/proxy/{path}' .replace('{' + 'name' + '}', encodeURIComponent(String(name))) .replace('{' + 'path' + '}', encodeURIComponent(String(path))); // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.GET); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); // Query Params if (path2 !== undefined) { requestContext.setQueryParam("path", ObjectSerializer.serialize(path2, "string", "")); } let authMethod; // Apply auth methods authMethod = _config.authMethods["BearerToken"]; if (authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication) { await (authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication(requestContext)); } const defaultAuth = (_a = _config === null || _config === void 0 ? void 0 : _config.authMethods) === null || _a === void 0 ? void 0 : _a.default; if (defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication) { await (defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication(requestContext)); } return requestContext; } /** * connect HEAD requests to proxy of Pod * @param name name of the PodProxyOptions * @param namespace object name and auth scope, such as for teams and projects * @param path Path is the URL path to use for the current proxy request to pod. */ async connectHeadNamespacedPodProxy(name, namespace, path, _options) { var _a; let _config = _options || this.configuration; // verify required parameter 'name' is not null or undefined if (name === null || name === undefined) { throw new RequiredError("CoreV1Api", "connectHeadNamespacedPodProxy", "name"); } // verify required parameter 'namespace' is not null or undefined if (namespace === null || namespace === undefined) { throw new RequiredError("CoreV1Api", "connectHeadNamespacedPodProxy", "namespace"); } // Path Params const localVarPath = '/api/v1/namespaces/{namespace}/pods/{name}/proxy' .replace('{' + 'name' + '}', encodeURIComponent(String(name))) .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.HEAD); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); // Query Params if (path !== undefined) { requestContext.setQueryParam("path", ObjectSerializer.serialize(path, "string", "")); } let authMethod; // Apply auth methods authMethod = _config.authMethods["BearerToken"]; if (authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication) { await (authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication(requestContext)); } const defaultAuth = (_a = _config === null || _config === void 0 ? void 0 : _config.authMethods) === null || _a === void 0 ? void 0 : _a.default; if (defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication) { await (defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication(requestContext)); } return requestContext; } /** * connect HEAD requests to proxy of Pod * @param name name of the PodProxyOptions * @param namespace object name and auth scope, such as for teams and projects * @param path path to the resource * @param path2 Path is the URL path to use for the current proxy request to pod. */ async connectHeadNamespacedPodProxyWithPath(name, namespace, path, path2, _options) { var _a; let _config = _options || this.configuration; // verify required parameter 'name' is not null or undefined if (name === null || name === undefined) { throw new RequiredError("CoreV1Api", "connectHeadNamespacedPodProxyWithPath", "name"); } // verify required parameter 'namespace' is not null or undefined if (namespace === null || namespace === undefined) { throw new RequiredError("CoreV1Api", "connectHeadNamespacedPodProxyWithPath", "namespace"); } // verify required parameter 'path' is not null or undefined if (path === null || path === undefined) { throw new RequiredError("CoreV1Api", "connectHeadNamespacedPodProxyWithPath", "path"); } // Path Params const localVarPath = '/api/v1/namespaces/{namespace}/pods/{name}/proxy/{path}' .replace('{' + 'name' + '}', encodeURIComponent(String(name))) .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))) .replace('{' + 'path' + '}', encodeURIComponent(String(path))); // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.HEAD); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); // Query Params if (path2 !== undefined) { requestContext.setQueryParam("path", ObjectSerializer.serialize(path2, "string", "")); } let authMethod; // Apply auth methods authMethod = _config.authMethods["BearerToken"]; if (authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication) { await (authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication(requestContext)); } const defaultAuth = (_a = _config === null || _config === void 0 ? void 0 : _config.authMethods) === null || _a === void 0 ? void 0 : _a.default; if (defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication) { await (defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication(requestContext)); } return requestContext; } /** * connect HEAD requests to proxy of Service * @param name name of the ServiceProxyOptions * @param namespace object name and auth scope, such as for teams and projects * @param path Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy. */ async connectHeadNamespacedServiceProxy(name, namespace, path, _options) { var _a; let _config = _options || this.configuration; // verify required parameter 'name' is not null or undefined if (name === null || name === undefined) { throw new RequiredError("CoreV1Api", "connectHeadNamespacedServiceProxy", "name"); } // verify required parameter 'namespace' is not null or undefined if (namespace === null || namespace === undefined) { throw new RequiredError("CoreV1Api", "connectHeadNamespacedServiceProxy", "namespace"); } // Path Params const localVarPath = '/api/v1/namespaces/{namespace}/services/{name}/proxy' .replace('{' + 'name' + '}', encodeURIComponent(String(name))) .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))); // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.HEAD); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); // Query Params if (path !== undefined) { requestContext.setQueryParam("path", ObjectSerializer.serialize(path, "string", "")); } let authMethod; // Apply auth methods authMethod = _config.authMethods["BearerToken"]; if (authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication) { await (authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication(requestContext)); } const defaultAuth = (_a = _config === null || _config === void 0 ? void 0 : _config.authMethods) === null || _a === void 0 ? void 0 : _a.default; if (defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication) { await (defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication(requestContext)); } return requestContext; } /** * connect HEAD requests to proxy of Service * @param name name of the ServiceProxyOptions * @param namespace object name and auth scope, such as for teams and projects * @param path path to the resource * @param path2 Path is the part of URLs that include service endpoints, suffixes, and parameters to use for the current proxy request to service. For example, the whole request URL is http://localhost/api/v1/namespaces/kube-system/services/elasticsearch-logging/_search?q=user:kimchy. Path is _search?q=user:kimchy. */ async connectHeadNamespacedServiceProxyWithPath(name, namespace, path, path2, _options) { var _a; let _config = _options || this.configuration; // verify required parameter 'name' is not null or undefined if (name === null || name === undefined) { throw new RequiredError("CoreV1Api", "connectHeadNamespacedServiceProxyWithPath", "name"); } // verify required parameter 'namespace' is not null or undefined if (namespace === null || namespace === undefined) { throw new RequiredError("CoreV1Api", "connectHeadNamespacedServiceProxyWithPath", "namespace"); } // verify required parameter 'path' is not null or undefined if (path === null || path === undefined) { throw new RequiredError("CoreV1Api", "connectHeadNamespacedServiceProxyWithPath", "path"); } // Path Params const localVarPath = '/api/v1/namespaces/{namespace}/services/{name}/proxy/{path}' .replace('{' + 'name' + '}', encodeURIComponent(String(name))) .replace('{' + 'namespace' + '}', encodeURIComponent(String(namespace))) .replace('{' + 'path' + '}', encodeURIComponent(String(path))); // Make Request Context const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.HEAD); requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8"); // Query Params if (path2 !== undefined) { requestContext.setQueryParam("path", ObjectSerializer.serialize(path2, "string", "")); } let authMethod; // Apply auth methods authMethod = _config.authMethods["BearerToken"]; if (authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication) { await (authMethod === null || authMethod === void 0 ? void 0