/* tslint:disable */
/* eslint-disable */
/**
 * Halo Next API
 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
 *
 * The version of the OpenAPI document: 2.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 { Backup } from "../models";
// @ts-ignore
import { BackupList } from "../models";
/**
 * MigrationHaloRunV1alpha1BackupApi - axios parameter creator
 * @export
 */
export const MigrationHaloRunV1alpha1BackupApiAxiosParamCreator = function (
  configuration?: Configuration
) {
  return {
    /**
     * Create migration.halo.run/v1alpha1/Backup
     * @param {Backup} [backup] Fresh backup
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    createmigrationHaloRunV1alpha1Backup: async (
      backup?: Backup,
      options: AxiosRequestConfig = {}
    ): Promise<RequestArgs> => {
      const localVarPath = `/apis/migration.halo.run/v1alpha1/backups`;
      // 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);

      // authentication BearerAuth required
      // http bearer authentication required
      await setBearerAuthToObject(localVarHeaderParameter, 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(
        backup,
        localVarRequestOptions,
        configuration
      );

      return {
        url: toPathString(localVarUrlObj),
        options: localVarRequestOptions,
      };
    },
    /**
     * Delete migration.halo.run/v1alpha1/Backup
     * @param {string} name Name of backup
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    deletemigrationHaloRunV1alpha1Backup: async (
      name: string,
      options: AxiosRequestConfig = {}
    ): Promise<RequestArgs> => {
      // verify required parameter 'name' is not null or undefined
      assertParamExists("deletemigrationHaloRunV1alpha1Backup", "name", name);
      const localVarPath =
        `/apis/migration.halo.run/v1alpha1/backups/{name}`.replace(
          `{${"name"}}`,
          encodeURIComponent(String(name))
        );
      // 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 BasicAuth required
      // http basic authentication required
      setBasicAuthToObject(localVarRequestOptions, configuration);

      // authentication BearerAuth required
      // http bearer authentication required
      await setBearerAuthToObject(localVarHeaderParameter, configuration);

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

      return {
        url: toPathString(localVarUrlObj),
        options: localVarRequestOptions,
      };
    },
    /**
     * Get migration.halo.run/v1alpha1/Backup
     * @param {string} name Name of backup
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    getmigrationHaloRunV1alpha1Backup: async (
      name: string,
      options: AxiosRequestConfig = {}
    ): Promise<RequestArgs> => {
      // verify required parameter 'name' is not null or undefined
      assertParamExists("getmigrationHaloRunV1alpha1Backup", "name", name);
      const localVarPath =
        `/apis/migration.halo.run/v1alpha1/backups/{name}`.replace(
          `{${"name"}}`,
          encodeURIComponent(String(name))
        );
      // 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 BasicAuth required
      // http basic authentication required
      setBasicAuthToObject(localVarRequestOptions, configuration);

      // authentication BearerAuth required
      // http bearer authentication required
      await setBearerAuthToObject(localVarHeaderParameter, configuration);

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

      return {
        url: toPathString(localVarUrlObj),
        options: localVarRequestOptions,
      };
    },
    /**
     * List migration.halo.run/v1alpha1/Backup
     * @param {Array<string>} [fieldSelector] Field selector for filtering.
     * @param {Array<string>} [labelSelector] Label selector for filtering.
     * @param {number} [page] The page number. Zero indicates no page.
     * @param {number} [size] Size of one page. Zero indicates no limit.
     * @param {Array<string>} [sort] Sort property and direction of the list result. Support sorting based on attribute name path.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    listmigrationHaloRunV1alpha1Backup: async (
      fieldSelector?: Array<string>,
      labelSelector?: Array<string>,
      page?: number,
      size?: number,
      sort?: Array<string>,
      options: AxiosRequestConfig = {}
    ): Promise<RequestArgs> => {
      const localVarPath = `/apis/migration.halo.run/v1alpha1/backups`;
      // 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 BasicAuth required
      // http basic authentication required
      setBasicAuthToObject(localVarRequestOptions, configuration);

      // authentication BearerAuth required
      // http bearer authentication required
      await setBearerAuthToObject(localVarHeaderParameter, configuration);

      if (fieldSelector) {
        localVarQueryParameter["fieldSelector"] = fieldSelector;
      }

      if (labelSelector) {
        localVarQueryParameter["labelSelector"] = labelSelector;
      }

      if (page !== undefined) {
        localVarQueryParameter["page"] = page;
      }

      if (size !== undefined) {
        localVarQueryParameter["size"] = size;
      }

      if (sort) {
        localVarQueryParameter["sort"] = Array.from(sort);
      }

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

      return {
        url: toPathString(localVarUrlObj),
        options: localVarRequestOptions,
      };
    },
    /**
     * Update migration.halo.run/v1alpha1/Backup
     * @param {string} name Name of backup
     * @param {Backup} [backup] Updated backup
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    updatemigrationHaloRunV1alpha1Backup: async (
      name: string,
      backup?: Backup,
      options: AxiosRequestConfig = {}
    ): Promise<RequestArgs> => {
      // verify required parameter 'name' is not null or undefined
      assertParamExists("updatemigrationHaloRunV1alpha1Backup", "name", name);
      const localVarPath =
        `/apis/migration.halo.run/v1alpha1/backups/{name}`.replace(
          `{${"name"}}`,
          encodeURIComponent(String(name))
        );
      // 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: "PUT",
        ...baseOptions,
        ...options,
      };
      const localVarHeaderParameter = {} as any;
      const localVarQueryParameter = {} as any;

      // authentication BasicAuth required
      // http basic authentication required
      setBasicAuthToObject(localVarRequestOptions, configuration);

      // authentication BearerAuth required
      // http bearer authentication required
      await setBearerAuthToObject(localVarHeaderParameter, 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(
        backup,
        localVarRequestOptions,
        configuration
      );

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

/**
 * MigrationHaloRunV1alpha1BackupApi - functional programming interface
 * @export
 */
export const MigrationHaloRunV1alpha1BackupApiFp = function (
  configuration?: Configuration
) {
  const localVarAxiosParamCreator =
    MigrationHaloRunV1alpha1BackupApiAxiosParamCreator(configuration);
  return {
    /**
     * Create migration.halo.run/v1alpha1/Backup
     * @param {Backup} [backup] Fresh backup
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    async createmigrationHaloRunV1alpha1Backup(
      backup?: Backup,
      options?: AxiosRequestConfig
    ): Promise<
      (axios?: AxiosInstance, basePath?: string) => AxiosPromise<Backup>
    > {
      const localVarAxiosArgs =
        await localVarAxiosParamCreator.createmigrationHaloRunV1alpha1Backup(
          backup,
          options
        );
      return createRequestFunction(
        localVarAxiosArgs,
        globalAxios,
        BASE_PATH,
        configuration
      );
    },
    /**
     * Delete migration.halo.run/v1alpha1/Backup
     * @param {string} name Name of backup
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    async deletemigrationHaloRunV1alpha1Backup(
      name: string,
      options?: AxiosRequestConfig
    ): Promise<
      (axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>
    > {
      const localVarAxiosArgs =
        await localVarAxiosParamCreator.deletemigrationHaloRunV1alpha1Backup(
          name,
          options
        );
      return createRequestFunction(
        localVarAxiosArgs,
        globalAxios,
        BASE_PATH,
        configuration
      );
    },
    /**
     * Get migration.halo.run/v1alpha1/Backup
     * @param {string} name Name of backup
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    async getmigrationHaloRunV1alpha1Backup(
      name: string,
      options?: AxiosRequestConfig
    ): Promise<
      (axios?: AxiosInstance, basePath?: string) => AxiosPromise<Backup>
    > {
      const localVarAxiosArgs =
        await localVarAxiosParamCreator.getmigrationHaloRunV1alpha1Backup(
          name,
          options
        );
      return createRequestFunction(
        localVarAxiosArgs,
        globalAxios,
        BASE_PATH,
        configuration
      );
    },
    /**
     * List migration.halo.run/v1alpha1/Backup
     * @param {Array<string>} [fieldSelector] Field selector for filtering.
     * @param {Array<string>} [labelSelector] Label selector for filtering.
     * @param {number} [page] The page number. Zero indicates no page.
     * @param {number} [size] Size of one page. Zero indicates no limit.
     * @param {Array<string>} [sort] Sort property and direction of the list result. Support sorting based on attribute name path.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    async listmigrationHaloRunV1alpha1Backup(
      fieldSelector?: Array<string>,
      labelSelector?: Array<string>,
      page?: number,
      size?: number,
      sort?: Array<string>,
      options?: AxiosRequestConfig
    ): Promise<
      (axios?: AxiosInstance, basePath?: string) => AxiosPromise<BackupList>
    > {
      const localVarAxiosArgs =
        await localVarAxiosParamCreator.listmigrationHaloRunV1alpha1Backup(
          fieldSelector,
          labelSelector,
          page,
          size,
          sort,
          options
        );
      return createRequestFunction(
        localVarAxiosArgs,
        globalAxios,
        BASE_PATH,
        configuration
      );
    },
    /**
     * Update migration.halo.run/v1alpha1/Backup
     * @param {string} name Name of backup
     * @param {Backup} [backup] Updated backup
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    async updatemigrationHaloRunV1alpha1Backup(
      name: string,
      backup?: Backup,
      options?: AxiosRequestConfig
    ): Promise<
      (axios?: AxiosInstance, basePath?: string) => AxiosPromise<Backup>
    > {
      const localVarAxiosArgs =
        await localVarAxiosParamCreator.updatemigrationHaloRunV1alpha1Backup(
          name,
          backup,
          options
        );
      return createRequestFunction(
        localVarAxiosArgs,
        globalAxios,
        BASE_PATH,
        configuration
      );
    },
  };
};

/**
 * MigrationHaloRunV1alpha1BackupApi - factory interface
 * @export
 */
export const MigrationHaloRunV1alpha1BackupApiFactory = function (
  configuration?: Configuration,
  basePath?: string,
  axios?: AxiosInstance
) {
  const localVarFp = MigrationHaloRunV1alpha1BackupApiFp(configuration);
  return {
    /**
     * Create migration.halo.run/v1alpha1/Backup
     * @param {MigrationHaloRunV1alpha1BackupApiCreatemigrationHaloRunV1alpha1BackupRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    createmigrationHaloRunV1alpha1Backup(
      requestParameters: MigrationHaloRunV1alpha1BackupApiCreatemigrationHaloRunV1alpha1BackupRequest = {},
      options?: AxiosRequestConfig
    ): AxiosPromise<Backup> {
      return localVarFp
        .createmigrationHaloRunV1alpha1Backup(requestParameters.backup, options)
        .then((request) => request(axios, basePath));
    },
    /**
     * Delete migration.halo.run/v1alpha1/Backup
     * @param {MigrationHaloRunV1alpha1BackupApiDeletemigrationHaloRunV1alpha1BackupRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    deletemigrationHaloRunV1alpha1Backup(
      requestParameters: MigrationHaloRunV1alpha1BackupApiDeletemigrationHaloRunV1alpha1BackupRequest,
      options?: AxiosRequestConfig
    ): AxiosPromise<void> {
      return localVarFp
        .deletemigrationHaloRunV1alpha1Backup(requestParameters.name, options)
        .then((request) => request(axios, basePath));
    },
    /**
     * Get migration.halo.run/v1alpha1/Backup
     * @param {MigrationHaloRunV1alpha1BackupApiGetmigrationHaloRunV1alpha1BackupRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    getmigrationHaloRunV1alpha1Backup(
      requestParameters: MigrationHaloRunV1alpha1BackupApiGetmigrationHaloRunV1alpha1BackupRequest,
      options?: AxiosRequestConfig
    ): AxiosPromise<Backup> {
      return localVarFp
        .getmigrationHaloRunV1alpha1Backup(requestParameters.name, options)
        .then((request) => request(axios, basePath));
    },
    /**
     * List migration.halo.run/v1alpha1/Backup
     * @param {MigrationHaloRunV1alpha1BackupApiListmigrationHaloRunV1alpha1BackupRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    listmigrationHaloRunV1alpha1Backup(
      requestParameters: MigrationHaloRunV1alpha1BackupApiListmigrationHaloRunV1alpha1BackupRequest = {},
      options?: AxiosRequestConfig
    ): AxiosPromise<BackupList> {
      return localVarFp
        .listmigrationHaloRunV1alpha1Backup(
          requestParameters.fieldSelector,
          requestParameters.labelSelector,
          requestParameters.page,
          requestParameters.size,
          requestParameters.sort,
          options
        )
        .then((request) => request(axios, basePath));
    },
    /**
     * Update migration.halo.run/v1alpha1/Backup
     * @param {MigrationHaloRunV1alpha1BackupApiUpdatemigrationHaloRunV1alpha1BackupRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    updatemigrationHaloRunV1alpha1Backup(
      requestParameters: MigrationHaloRunV1alpha1BackupApiUpdatemigrationHaloRunV1alpha1BackupRequest,
      options?: AxiosRequestConfig
    ): AxiosPromise<Backup> {
      return localVarFp
        .updatemigrationHaloRunV1alpha1Backup(
          requestParameters.name,
          requestParameters.backup,
          options
        )
        .then((request) => request(axios, basePath));
    },
  };
};

/**
 * Request parameters for createmigrationHaloRunV1alpha1Backup operation in MigrationHaloRunV1alpha1BackupApi.
 * @export
 * @interface MigrationHaloRunV1alpha1BackupApiCreatemigrationHaloRunV1alpha1BackupRequest
 */
export interface MigrationHaloRunV1alpha1BackupApiCreatemigrationHaloRunV1alpha1BackupRequest {
  /**
   * Fresh backup
   * @type {Backup}
   * @memberof MigrationHaloRunV1alpha1BackupApiCreatemigrationHaloRunV1alpha1Backup
   */
  readonly backup?: Backup;
}

/**
 * Request parameters for deletemigrationHaloRunV1alpha1Backup operation in MigrationHaloRunV1alpha1BackupApi.
 * @export
 * @interface MigrationHaloRunV1alpha1BackupApiDeletemigrationHaloRunV1alpha1BackupRequest
 */
export interface MigrationHaloRunV1alpha1BackupApiDeletemigrationHaloRunV1alpha1BackupRequest {
  /**
   * Name of backup
   * @type {string}
   * @memberof MigrationHaloRunV1alpha1BackupApiDeletemigrationHaloRunV1alpha1Backup
   */
  readonly name: string;
}

/**
 * Request parameters for getmigrationHaloRunV1alpha1Backup operation in MigrationHaloRunV1alpha1BackupApi.
 * @export
 * @interface MigrationHaloRunV1alpha1BackupApiGetmigrationHaloRunV1alpha1BackupRequest
 */
export interface MigrationHaloRunV1alpha1BackupApiGetmigrationHaloRunV1alpha1BackupRequest {
  /**
   * Name of backup
   * @type {string}
   * @memberof MigrationHaloRunV1alpha1BackupApiGetmigrationHaloRunV1alpha1Backup
   */
  readonly name: string;
}

/**
 * Request parameters for listmigrationHaloRunV1alpha1Backup operation in MigrationHaloRunV1alpha1BackupApi.
 * @export
 * @interface MigrationHaloRunV1alpha1BackupApiListmigrationHaloRunV1alpha1BackupRequest
 */
export interface MigrationHaloRunV1alpha1BackupApiListmigrationHaloRunV1alpha1BackupRequest {
  /**
   * Field selector for filtering.
   * @type {Array<string>}
   * @memberof MigrationHaloRunV1alpha1BackupApiListmigrationHaloRunV1alpha1Backup
   */
  readonly fieldSelector?: Array<string>;

  /**
   * Label selector for filtering.
   * @type {Array<string>}
   * @memberof MigrationHaloRunV1alpha1BackupApiListmigrationHaloRunV1alpha1Backup
   */
  readonly labelSelector?: Array<string>;

  /**
   * The page number. Zero indicates no page.
   * @type {number}
   * @memberof MigrationHaloRunV1alpha1BackupApiListmigrationHaloRunV1alpha1Backup
   */
  readonly page?: number;

  /**
   * Size of one page. Zero indicates no limit.
   * @type {number}
   * @memberof MigrationHaloRunV1alpha1BackupApiListmigrationHaloRunV1alpha1Backup
   */
  readonly size?: number;

  /**
   * Sort property and direction of the list result. Support sorting based on attribute name path.
   * @type {Array<string>}
   * @memberof MigrationHaloRunV1alpha1BackupApiListmigrationHaloRunV1alpha1Backup
   */
  readonly sort?: Array<string>;
}

/**
 * Request parameters for updatemigrationHaloRunV1alpha1Backup operation in MigrationHaloRunV1alpha1BackupApi.
 * @export
 * @interface MigrationHaloRunV1alpha1BackupApiUpdatemigrationHaloRunV1alpha1BackupRequest
 */
export interface MigrationHaloRunV1alpha1BackupApiUpdatemigrationHaloRunV1alpha1BackupRequest {
  /**
   * Name of backup
   * @type {string}
   * @memberof MigrationHaloRunV1alpha1BackupApiUpdatemigrationHaloRunV1alpha1Backup
   */
  readonly name: string;

  /**
   * Updated backup
   * @type {Backup}
   * @memberof MigrationHaloRunV1alpha1BackupApiUpdatemigrationHaloRunV1alpha1Backup
   */
  readonly backup?: Backup;
}

/**
 * MigrationHaloRunV1alpha1BackupApi - object-oriented interface
 * @export
 * @class MigrationHaloRunV1alpha1BackupApi
 * @extends {BaseAPI}
 */
export class MigrationHaloRunV1alpha1BackupApi extends BaseAPI {
  /**
   * Create migration.halo.run/v1alpha1/Backup
   * @param {MigrationHaloRunV1alpha1BackupApiCreatemigrationHaloRunV1alpha1BackupRequest} requestParameters Request parameters.
   * @param {*} [options] Override http request option.
   * @throws {RequiredError}
   * @memberof MigrationHaloRunV1alpha1BackupApi
   */
  public createmigrationHaloRunV1alpha1Backup(
    requestParameters: MigrationHaloRunV1alpha1BackupApiCreatemigrationHaloRunV1alpha1BackupRequest = {},
    options?: AxiosRequestConfig
  ) {
    return MigrationHaloRunV1alpha1BackupApiFp(this.configuration)
      .createmigrationHaloRunV1alpha1Backup(requestParameters.backup, options)
      .then((request) => request(this.axios, this.basePath));
  }

  /**
   * Delete migration.halo.run/v1alpha1/Backup
   * @param {MigrationHaloRunV1alpha1BackupApiDeletemigrationHaloRunV1alpha1BackupRequest} requestParameters Request parameters.
   * @param {*} [options] Override http request option.
   * @throws {RequiredError}
   * @memberof MigrationHaloRunV1alpha1BackupApi
   */
  public deletemigrationHaloRunV1alpha1Backup(
    requestParameters: MigrationHaloRunV1alpha1BackupApiDeletemigrationHaloRunV1alpha1BackupRequest,
    options?: AxiosRequestConfig
  ) {
    return MigrationHaloRunV1alpha1BackupApiFp(this.configuration)
      .deletemigrationHaloRunV1alpha1Backup(requestParameters.name, options)
      .then((request) => request(this.axios, this.basePath));
  }

  /**
   * Get migration.halo.run/v1alpha1/Backup
   * @param {MigrationHaloRunV1alpha1BackupApiGetmigrationHaloRunV1alpha1BackupRequest} requestParameters Request parameters.
   * @param {*} [options] Override http request option.
   * @throws {RequiredError}
   * @memberof MigrationHaloRunV1alpha1BackupApi
   */
  public getmigrationHaloRunV1alpha1Backup(
    requestParameters: MigrationHaloRunV1alpha1BackupApiGetmigrationHaloRunV1alpha1BackupRequest,
    options?: AxiosRequestConfig
  ) {
    return MigrationHaloRunV1alpha1BackupApiFp(this.configuration)
      .getmigrationHaloRunV1alpha1Backup(requestParameters.name, options)
      .then((request) => request(this.axios, this.basePath));
  }

  /**
   * List migration.halo.run/v1alpha1/Backup
   * @param {MigrationHaloRunV1alpha1BackupApiListmigrationHaloRunV1alpha1BackupRequest} requestParameters Request parameters.
   * @param {*} [options] Override http request option.
   * @throws {RequiredError}
   * @memberof MigrationHaloRunV1alpha1BackupApi
   */
  public listmigrationHaloRunV1alpha1Backup(
    requestParameters: MigrationHaloRunV1alpha1BackupApiListmigrationHaloRunV1alpha1BackupRequest = {},
    options?: AxiosRequestConfig
  ) {
    return MigrationHaloRunV1alpha1BackupApiFp(this.configuration)
      .listmigrationHaloRunV1alpha1Backup(
        requestParameters.fieldSelector,
        requestParameters.labelSelector,
        requestParameters.page,
        requestParameters.size,
        requestParameters.sort,
        options
      )
      .then((request) => request(this.axios, this.basePath));
  }

  /**
   * Update migration.halo.run/v1alpha1/Backup
   * @param {MigrationHaloRunV1alpha1BackupApiUpdatemigrationHaloRunV1alpha1BackupRequest} requestParameters Request parameters.
   * @param {*} [options] Override http request option.
   * @throws {RequiredError}
   * @memberof MigrationHaloRunV1alpha1BackupApi
   */
  public updatemigrationHaloRunV1alpha1Backup(
    requestParameters: MigrationHaloRunV1alpha1BackupApiUpdatemigrationHaloRunV1alpha1BackupRequest,
    options?: AxiosRequestConfig
  ) {
    return MigrationHaloRunV1alpha1BackupApiFp(this.configuration)
      .updatemigrationHaloRunV1alpha1Backup(
        requestParameters.name,
        requestParameters.backup,
        options
      )
      .then((request) => request(this.axios, this.basePath));
  }
}
