/* tslint:disable */
/* eslint-disable */
/**
 * AssistedInstall
 * Assisted installation
 *
 * 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, AxiosRequestConfig } 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, RequestArgs, BaseAPI, RequiredError } from '../base';
// @ts-ignore
import { CreateManifestParams } from '../models';
// @ts-ignore
import { InfraError } from '../models';
// @ts-ignore
import { ListManifests } from '../models';
// @ts-ignore
import { Manifest } from '../models';
// @ts-ignore
import { ModelError } from '../models';
// @ts-ignore
import { UpdateManifestParams } from '../models';
/**
 * ManifestsApi - axios parameter creator
 * @export
 */
export const ManifestsApiAxiosParamCreator = function (configuration?: Configuration) {
  return {
    /**
     * Creates a manifest for customizing cluster installation.
     * @param {string} clusterId The cluster for which a new manifest should be created.
     * @param {CreateManifestParams} createManifestParams The new manifest to create.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    v2CreateClusterManifest: async (
      clusterId: string,
      createManifestParams: CreateManifestParams,
      options: AxiosRequestConfig = {},
    ): Promise<RequestArgs> => {
      // verify required parameter 'clusterId' is not null or undefined
      assertParamExists('v2CreateClusterManifest', 'clusterId', clusterId);
      // verify required parameter 'createManifestParams' is not null or undefined
      assertParamExists('v2CreateClusterManifest', 'createManifestParams', createManifestParams);
      const localVarPath = `/v2/clusters/{cluster_id}/manifests`.replace(
        `{${'cluster_id'}}`,
        encodeURIComponent(String(clusterId)),
      );
      // 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 userAuth required
      await setApiKeyToObject(localVarHeaderParameter, 'Authorization', 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(
        createManifestParams,
        localVarRequestOptions,
        configuration,
      );

      return {
        url: toPathString(localVarUrlObj),
        options: localVarRequestOptions,
      };
    },
    /**
     * Deletes a manifest from the cluster.
     * @param {string} clusterId The cluster whose manifest should be deleted.
     * @param {string} fileName The manifest file name to delete from the cluster.
     * @param {V2DeleteClusterManifestFolderEnum} [folder] The folder that contains the files. Manifests can be placed in \&#39;manifests\&#39; or \&#39;openshift\&#39; directories.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    v2DeleteClusterManifest: async (
      clusterId: string,
      fileName: string,
      folder?: V2DeleteClusterManifestFolderEnum,
      options: AxiosRequestConfig = {},
    ): Promise<RequestArgs> => {
      // verify required parameter 'clusterId' is not null or undefined
      assertParamExists('v2DeleteClusterManifest', 'clusterId', clusterId);
      // verify required parameter 'fileName' is not null or undefined
      assertParamExists('v2DeleteClusterManifest', 'fileName', fileName);
      const localVarPath = `/v2/clusters/{cluster_id}/manifests`.replace(
        `{${'cluster_id'}}`,
        encodeURIComponent(String(clusterId)),
      );
      // 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: 'DELETE', ...baseOptions, ...options };
      const localVarHeaderParameter = {} as any;
      const localVarQueryParameter = {} as any;

      // authentication userAuth required
      await setApiKeyToObject(localVarHeaderParameter, 'Authorization', configuration);

      if (folder !== undefined) {
        localVarQueryParameter['folder'] = folder;
      }

      if (fileName !== undefined) {
        localVarQueryParameter['file_name'] = fileName;
      }

      setSearchParams(localVarUrlObj, localVarQueryParameter);
      let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
      localVarRequestOptions.headers = {
        ...localVarHeaderParameter,
        ...headersFromBaseOptions,
        ...options.headers,
      };

      return {
        url: toPathString(localVarUrlObj),
        options: localVarRequestOptions,
      };
    },
    /**
     * Downloads cluster manifest.
     * @param {string} clusterId The cluster whose manifest should be downloaded.
     * @param {string} fileName The manifest file name to download.
     * @param {V2DownloadClusterManifestFolderEnum} [folder] The folder that contains the files. Manifests can be placed in \&#39;manifests\&#39; or \&#39;openshift\&#39; directories.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    v2DownloadClusterManifest: async (
      clusterId: string,
      fileName: string,
      folder?: V2DownloadClusterManifestFolderEnum,
      options: AxiosRequestConfig = {},
    ): Promise<RequestArgs> => {
      // verify required parameter 'clusterId' is not null or undefined
      assertParamExists('v2DownloadClusterManifest', 'clusterId', clusterId);
      // verify required parameter 'fileName' is not null or undefined
      assertParamExists('v2DownloadClusterManifest', 'fileName', fileName);
      const localVarPath = `/v2/clusters/{cluster_id}/manifests/files`.replace(
        `{${'cluster_id'}}`,
        encodeURIComponent(String(clusterId)),
      );
      // 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: 'GET', ...baseOptions, ...options };
      const localVarHeaderParameter = {} as any;
      const localVarQueryParameter = {} as any;

      // authentication userAuth required
      await setApiKeyToObject(localVarHeaderParameter, 'Authorization', configuration);

      if (folder !== undefined) {
        localVarQueryParameter['folder'] = folder;
      }

      if (fileName !== undefined) {
        localVarQueryParameter['file_name'] = fileName;
      }

      setSearchParams(localVarUrlObj, localVarQueryParameter);
      let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
      localVarRequestOptions.headers = {
        ...localVarHeaderParameter,
        ...headersFromBaseOptions,
        ...options.headers,
      };

      return {
        url: toPathString(localVarUrlObj),
        options: localVarRequestOptions,
      };
    },
    /**
     * Lists manifests for customizing cluster installation.
     * @param {string} clusterId The cluster for which the manifests should be listed.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    v2ListClusterManifests: async (
      clusterId: string,
      options: AxiosRequestConfig = {},
    ): Promise<RequestArgs> => {
      // verify required parameter 'clusterId' is not null or undefined
      assertParamExists('v2ListClusterManifests', 'clusterId', clusterId);
      const localVarPath = `/v2/clusters/{cluster_id}/manifests`.replace(
        `{${'cluster_id'}}`,
        encodeURIComponent(String(clusterId)),
      );
      // 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: 'GET', ...baseOptions, ...options };
      const localVarHeaderParameter = {} as any;
      const localVarQueryParameter = {} as any;

      // authentication userAuth required
      await setApiKeyToObject(localVarHeaderParameter, 'Authorization', configuration);

      setSearchParams(localVarUrlObj, localVarQueryParameter);
      let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
      localVarRequestOptions.headers = {
        ...localVarHeaderParameter,
        ...headersFromBaseOptions,
        ...options.headers,
      };

      return {
        url: toPathString(localVarUrlObj),
        options: localVarRequestOptions,
      };
    },
    /**
     * Updates a manifest for customizing cluster installation.
     * @param {string} clusterId The cluster for which a new manifest should be updated.
     * @param {UpdateManifestParams} updateManifestParams The manifest to be updated.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    v2UpdateClusterManifest: async (
      clusterId: string,
      updateManifestParams: UpdateManifestParams,
      options: AxiosRequestConfig = {},
    ): Promise<RequestArgs> => {
      // verify required parameter 'clusterId' is not null or undefined
      assertParamExists('v2UpdateClusterManifest', 'clusterId', clusterId);
      // verify required parameter 'updateManifestParams' is not null or undefined
      assertParamExists('v2UpdateClusterManifest', 'updateManifestParams', updateManifestParams);
      const localVarPath = `/v2/clusters/{cluster_id}/manifests`.replace(
        `{${'cluster_id'}}`,
        encodeURIComponent(String(clusterId)),
      );
      // 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: 'PATCH', ...baseOptions, ...options };
      const localVarHeaderParameter = {} as any;
      const localVarQueryParameter = {} as any;

      // authentication userAuth required
      await setApiKeyToObject(localVarHeaderParameter, 'Authorization', 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(
        updateManifestParams,
        localVarRequestOptions,
        configuration,
      );

      return {
        url: toPathString(localVarUrlObj),
        options: localVarRequestOptions,
      };
    },
  };
};

/**
 * ManifestsApi - functional programming interface
 * @export
 */
export const ManifestsApiFp = function (configuration?: Configuration) {
  const localVarAxiosParamCreator = ManifestsApiAxiosParamCreator(configuration);
  return {
    /**
     * Creates a manifest for customizing cluster installation.
     * @param {string} clusterId The cluster for which a new manifest should be created.
     * @param {CreateManifestParams} createManifestParams The new manifest to create.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    async v2CreateClusterManifest(
      clusterId: string,
      createManifestParams: CreateManifestParams,
      options?: AxiosRequestConfig,
    ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Manifest>> {
      const localVarAxiosArgs = await localVarAxiosParamCreator.v2CreateClusterManifest(
        clusterId,
        createManifestParams,
        options,
      );
      return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
    },
    /**
     * Deletes a manifest from the cluster.
     * @param {string} clusterId The cluster whose manifest should be deleted.
     * @param {string} fileName The manifest file name to delete from the cluster.
     * @param {V2DeleteClusterManifestFolderEnum} [folder] The folder that contains the files. Manifests can be placed in \&#39;manifests\&#39; or \&#39;openshift\&#39; directories.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    async v2DeleteClusterManifest(
      clusterId: string,
      fileName: string,
      folder?: V2DeleteClusterManifestFolderEnum,
      options?: AxiosRequestConfig,
    ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
      const localVarAxiosArgs = await localVarAxiosParamCreator.v2DeleteClusterManifest(
        clusterId,
        fileName,
        folder,
        options,
      );
      return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
    },
    /**
     * Downloads cluster manifest.
     * @param {string} clusterId The cluster whose manifest should be downloaded.
     * @param {string} fileName The manifest file name to download.
     * @param {V2DownloadClusterManifestFolderEnum} [folder] The folder that contains the files. Manifests can be placed in \&#39;manifests\&#39; or \&#39;openshift\&#39; directories.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    async v2DownloadClusterManifest(
      clusterId: string,
      fileName: string,
      folder?: V2DownloadClusterManifestFolderEnum,
      options?: AxiosRequestConfig,
    ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<File>> {
      const localVarAxiosArgs = await localVarAxiosParamCreator.v2DownloadClusterManifest(
        clusterId,
        fileName,
        folder,
        options,
      );
      return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
    },
    /**
     * Lists manifests for customizing cluster installation.
     * @param {string} clusterId The cluster for which the manifests should be listed.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    async v2ListClusterManifests(
      clusterId: string,
      options?: AxiosRequestConfig,
    ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ListManifests>> {
      const localVarAxiosArgs = await localVarAxiosParamCreator.v2ListClusterManifests(
        clusterId,
        options,
      );
      return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
    },
    /**
     * Updates a manifest for customizing cluster installation.
     * @param {string} clusterId The cluster for which a new manifest should be updated.
     * @param {UpdateManifestParams} updateManifestParams The manifest to be updated.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    async v2UpdateClusterManifest(
      clusterId: string,
      updateManifestParams: UpdateManifestParams,
      options?: AxiosRequestConfig,
    ): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Manifest>> {
      const localVarAxiosArgs = await localVarAxiosParamCreator.v2UpdateClusterManifest(
        clusterId,
        updateManifestParams,
        options,
      );
      return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
    },
  };
};

/**
 * ManifestsApi - factory interface
 * @export
 */
export const ManifestsApiFactory = function (
  configuration?: Configuration,
  basePath?: string,
  axios?: AxiosInstance,
) {
  const localVarFp = ManifestsApiFp(configuration);
  return {
    /**
     * Creates a manifest for customizing cluster installation.
     * @param {ManifestsApiV2CreateClusterManifestRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    v2CreateClusterManifest(
      requestParameters: ManifestsApiV2CreateClusterManifestRequest,
      options?: AxiosRequestConfig,
    ): AxiosPromise<Manifest> {
      return localVarFp
        .v2CreateClusterManifest(
          requestParameters.clusterId,
          requestParameters.createManifestParams,
          options,
        )
        .then((request) => request(axios, basePath));
    },
    /**
     * Deletes a manifest from the cluster.
     * @param {ManifestsApiV2DeleteClusterManifestRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    v2DeleteClusterManifest(
      requestParameters: ManifestsApiV2DeleteClusterManifestRequest,
      options?: AxiosRequestConfig,
    ): AxiosPromise<void> {
      return localVarFp
        .v2DeleteClusterManifest(
          requestParameters.clusterId,
          requestParameters.fileName,
          requestParameters.folder,
          options,
        )
        .then((request) => request(axios, basePath));
    },
    /**
     * Downloads cluster manifest.
     * @param {ManifestsApiV2DownloadClusterManifestRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    v2DownloadClusterManifest(
      requestParameters: ManifestsApiV2DownloadClusterManifestRequest,
      options?: AxiosRequestConfig,
    ): AxiosPromise<File> {
      return localVarFp
        .v2DownloadClusterManifest(
          requestParameters.clusterId,
          requestParameters.fileName,
          requestParameters.folder,
          options,
        )
        .then((request) => request(axios, basePath));
    },
    /**
     * Lists manifests for customizing cluster installation.
     * @param {ManifestsApiV2ListClusterManifestsRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    v2ListClusterManifests(
      requestParameters: ManifestsApiV2ListClusterManifestsRequest,
      options?: AxiosRequestConfig,
    ): AxiosPromise<ListManifests> {
      return localVarFp
        .v2ListClusterManifests(requestParameters.clusterId, options)
        .then((request) => request(axios, basePath));
    },
    /**
     * Updates a manifest for customizing cluster installation.
     * @param {ManifestsApiV2UpdateClusterManifestRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    v2UpdateClusterManifest(
      requestParameters: ManifestsApiV2UpdateClusterManifestRequest,
      options?: AxiosRequestConfig,
    ): AxiosPromise<Manifest> {
      return localVarFp
        .v2UpdateClusterManifest(
          requestParameters.clusterId,
          requestParameters.updateManifestParams,
          options,
        )
        .then((request) => request(axios, basePath));
    },
  };
};

/**
 * Request parameters for v2CreateClusterManifest operation in ManifestsApi.
 * @export
 * @interface ManifestsApiV2CreateClusterManifestRequest
 */
export interface ManifestsApiV2CreateClusterManifestRequest {
  /**
   * The cluster for which a new manifest should be created.
   * @type {string}
   * @memberof ManifestsApiV2CreateClusterManifest
   */
  readonly clusterId: string;

  /**
   * The new manifest to create.
   * @type {CreateManifestParams}
   * @memberof ManifestsApiV2CreateClusterManifest
   */
  readonly createManifestParams: CreateManifestParams;
}

/**
 * Request parameters for v2DeleteClusterManifest operation in ManifestsApi.
 * @export
 * @interface ManifestsApiV2DeleteClusterManifestRequest
 */
export interface ManifestsApiV2DeleteClusterManifestRequest {
  /**
   * The cluster whose manifest should be deleted.
   * @type {string}
   * @memberof ManifestsApiV2DeleteClusterManifest
   */
  readonly clusterId: string;

  /**
   * The manifest file name to delete from the cluster.
   * @type {string}
   * @memberof ManifestsApiV2DeleteClusterManifest
   */
  readonly fileName: string;

  /**
   * The folder that contains the files. Manifests can be placed in \&#39;manifests\&#39; or \&#39;openshift\&#39; directories.
   * @type {'manifests' | 'openshift'}
   * @memberof ManifestsApiV2DeleteClusterManifest
   */
  readonly folder?: V2DeleteClusterManifestFolderEnum;
}

/**
 * Request parameters for v2DownloadClusterManifest operation in ManifestsApi.
 * @export
 * @interface ManifestsApiV2DownloadClusterManifestRequest
 */
export interface ManifestsApiV2DownloadClusterManifestRequest {
  /**
   * The cluster whose manifest should be downloaded.
   * @type {string}
   * @memberof ManifestsApiV2DownloadClusterManifest
   */
  readonly clusterId: string;

  /**
   * The manifest file name to download.
   * @type {string}
   * @memberof ManifestsApiV2DownloadClusterManifest
   */
  readonly fileName: string;

  /**
   * The folder that contains the files. Manifests can be placed in \&#39;manifests\&#39; or \&#39;openshift\&#39; directories.
   * @type {'manifests' | 'openshift'}
   * @memberof ManifestsApiV2DownloadClusterManifest
   */
  readonly folder?: V2DownloadClusterManifestFolderEnum;
}

/**
 * Request parameters for v2ListClusterManifests operation in ManifestsApi.
 * @export
 * @interface ManifestsApiV2ListClusterManifestsRequest
 */
export interface ManifestsApiV2ListClusterManifestsRequest {
  /**
   * The cluster for which the manifests should be listed.
   * @type {string}
   * @memberof ManifestsApiV2ListClusterManifests
   */
  readonly clusterId: string;
}

/**
 * Request parameters for v2UpdateClusterManifest operation in ManifestsApi.
 * @export
 * @interface ManifestsApiV2UpdateClusterManifestRequest
 */
export interface ManifestsApiV2UpdateClusterManifestRequest {
  /**
   * The cluster for which a new manifest should be updated.
   * @type {string}
   * @memberof ManifestsApiV2UpdateClusterManifest
   */
  readonly clusterId: string;

  /**
   * The manifest to be updated.
   * @type {UpdateManifestParams}
   * @memberof ManifestsApiV2UpdateClusterManifest
   */
  readonly updateManifestParams: UpdateManifestParams;
}

/**
 * ManifestsApi - object-oriented interface
 * @export
 * @class ManifestsApi
 * @extends {BaseAPI}
 */
export class ManifestsApi extends BaseAPI {
  /**
   * Creates a manifest for customizing cluster installation.
   * @param {ManifestsApiV2CreateClusterManifestRequest} requestParameters Request parameters.
   * @param {*} [options] Override http request option.
   * @throws {RequiredError}
   * @memberof ManifestsApi
   */
  public v2CreateClusterManifest(
    requestParameters: ManifestsApiV2CreateClusterManifestRequest,
    options?: AxiosRequestConfig,
  ) {
    return ManifestsApiFp(this.configuration)
      .v2CreateClusterManifest(
        requestParameters.clusterId,
        requestParameters.createManifestParams,
        options,
      )
      .then((request) => request(this.axios, this.basePath));
  }

  /**
   * Deletes a manifest from the cluster.
   * @param {ManifestsApiV2DeleteClusterManifestRequest} requestParameters Request parameters.
   * @param {*} [options] Override http request option.
   * @throws {RequiredError}
   * @memberof ManifestsApi
   */
  public v2DeleteClusterManifest(
    requestParameters: ManifestsApiV2DeleteClusterManifestRequest,
    options?: AxiosRequestConfig,
  ) {
    return ManifestsApiFp(this.configuration)
      .v2DeleteClusterManifest(
        requestParameters.clusterId,
        requestParameters.fileName,
        requestParameters.folder,
        options,
      )
      .then((request) => request(this.axios, this.basePath));
  }

  /**
   * Downloads cluster manifest.
   * @param {ManifestsApiV2DownloadClusterManifestRequest} requestParameters Request parameters.
   * @param {*} [options] Override http request option.
   * @throws {RequiredError}
   * @memberof ManifestsApi
   */
  public v2DownloadClusterManifest(
    requestParameters: ManifestsApiV2DownloadClusterManifestRequest,
    options?: AxiosRequestConfig,
  ) {
    return ManifestsApiFp(this.configuration)
      .v2DownloadClusterManifest(
        requestParameters.clusterId,
        requestParameters.fileName,
        requestParameters.folder,
        options,
      )
      .then((request) => request(this.axios, this.basePath));
  }

  /**
   * Lists manifests for customizing cluster installation.
   * @param {ManifestsApiV2ListClusterManifestsRequest} requestParameters Request parameters.
   * @param {*} [options] Override http request option.
   * @throws {RequiredError}
   * @memberof ManifestsApi
   */
  public v2ListClusterManifests(
    requestParameters: ManifestsApiV2ListClusterManifestsRequest,
    options?: AxiosRequestConfig,
  ) {
    return ManifestsApiFp(this.configuration)
      .v2ListClusterManifests(requestParameters.clusterId, options)
      .then((request) => request(this.axios, this.basePath));
  }

  /**
   * Updates a manifest for customizing cluster installation.
   * @param {ManifestsApiV2UpdateClusterManifestRequest} requestParameters Request parameters.
   * @param {*} [options] Override http request option.
   * @throws {RequiredError}
   * @memberof ManifestsApi
   */
  public v2UpdateClusterManifest(
    requestParameters: ManifestsApiV2UpdateClusterManifestRequest,
    options?: AxiosRequestConfig,
  ) {
    return ManifestsApiFp(this.configuration)
      .v2UpdateClusterManifest(
        requestParameters.clusterId,
        requestParameters.updateManifestParams,
        options,
      )
      .then((request) => request(this.axios, this.basePath));
  }
}

/**
 * @export
 * @enum {string}
 */
export enum V2DeleteClusterManifestFolderEnum {
  Manifests = 'manifests',
  Openshift = 'openshift',
}
/**
 * @export
 * @enum {string}
 */
export enum V2DownloadClusterManifestFolderEnum {
  Manifests = 'manifests',
  Openshift = 'openshift',
}
