/* tslint:disable */ /* eslint-disable */ /** * KubeBlocks Cloud Internal API * The Internal API is using for interaction of ApeCloud platform microservices. * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ import type { Configuration } from '../configuration'; import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios'; import globalAxios from 'axios'; // Some imports not used depending on template conditions // @ts-ignore import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common'; // @ts-ignore import { BASE_PATH, COLLECTION_FORMATS, type RequestArgs, BaseAPI, RequiredError, operationServerMap } from '../base'; // @ts-ignore import type { APIErrorResponse } from '../models'; /** * NodeplaneApi - axios parameter creator * @export */ export const NodeplaneApiAxiosParamCreator = function (configuration?: Configuration) { return { /** * Mark region & zone labels and set control plane nodes for environemnt * @summary Mark node plane for environemnt * @param {string} environmentName name of the Environment * @param {object} [body] * @param {*} [options] Override http request option. * @throws {RequiredError} */ markNodePlane: async (environmentName: string, body?: object, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'environmentName' is not null or undefined assertParamExists('markNodePlane', 'environmentName', environmentName) const localVarPath = `/internal/v1/environments/{environmentName}/nodepolane` .replace(`{${"environmentName"}}`, encodeURIComponent(String(environmentName))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication BasicAuth required // http basic authentication required setBasicAuthToObject(localVarRequestOptions, configuration) localVarHeaderParameter['Content-Type'] = 'application/json'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, } }; /** * NodeplaneApi - functional programming interface * @export */ export const NodeplaneApiFp = function(configuration?: Configuration) { const localVarAxiosParamCreator = NodeplaneApiAxiosParamCreator(configuration) return { /** * Mark region & zone labels and set control plane nodes for environemnt * @summary Mark node plane for environemnt * @param {string} environmentName name of the Environment * @param {object} [body] * @param {*} [options] Override http request option. * @throws {RequiredError} */ async markNodePlane(environmentName: string, body?: object, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.markNodePlane(environmentName, body, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['NodeplaneApi.markNodePlane']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, } }; /** * NodeplaneApi - factory interface * @export */ export const NodeplaneApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { const localVarFp = NodeplaneApiFp(configuration) return { /** * Mark region & zone labels and set control plane nodes for environemnt * @summary Mark node plane for environemnt * @param {NodeplaneApiMarkNodePlaneRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ markNodePlane(requestParameters: NodeplaneApiMarkNodePlaneRequest, options?: RawAxiosRequestConfig): AxiosPromise { return localVarFp.markNodePlane(requestParameters.environmentName, requestParameters.body, options).then((request) => request(axios, basePath)); }, }; }; /** * NodeplaneApi - interface * @export * @interface NodeplaneApi */ export interface NodeplaneApiInterface { /** * Mark region & zone labels and set control plane nodes for environemnt * @summary Mark node plane for environemnt * @param {NodeplaneApiMarkNodePlaneRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof NodeplaneApiInterface */ markNodePlane(requestParameters: NodeplaneApiMarkNodePlaneRequest, options?: RawAxiosRequestConfig): AxiosPromise; } /** * Request parameters for markNodePlane operation in NodeplaneApi. * @export * @interface NodeplaneApiMarkNodePlaneRequest */ export interface NodeplaneApiMarkNodePlaneRequest { /** * name of the Environment * @type {string} * @memberof NodeplaneApiMarkNodePlane */ readonly environmentName: string /** * * @type {object} * @memberof NodeplaneApiMarkNodePlane */ readonly body?: object } /** * NodeplaneApi - object-oriented interface * @export * @class NodeplaneApi * @extends {BaseAPI} */ export class NodeplaneApi extends BaseAPI implements NodeplaneApiInterface { /** * Mark region & zone labels and set control plane nodes for environemnt * @summary Mark node plane for environemnt * @param {NodeplaneApiMarkNodePlaneRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof NodeplaneApi */ public markNodePlane(requestParameters: NodeplaneApiMarkNodePlaneRequest, options?: RawAxiosRequestConfig) { return NodeplaneApiFp(this.configuration).markNodePlane(requestParameters.environmentName, requestParameters.body, options).then((request) => request(this.axios, this.basePath)); } }