/* 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 { ConfigMap } from "../models";
// @ts-ignore
import { InstallFromUriRequest } from "../models";
// @ts-ignore
import { Setting } from "../models";
// @ts-ignore
import { Theme } from "../models";
// @ts-ignore
import { ThemeList } from "../models";
// @ts-ignore
import { UpgradeFromUriRequest } from "../models";
/**
 * ApiConsoleHaloRunV1alpha1ThemeApi - axios parameter creator
 * @export
 */
export const ApiConsoleHaloRunV1alpha1ThemeApiAxiosParamCreator = function (
  configuration?: Configuration
) {
  return {
    /**
     * Activate a theme by name.
     * @param {string} name
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    activateTheme: async (
      name: string,
      options: AxiosRequestConfig = {}
    ): Promise<RequestArgs> => {
      // verify required parameter 'name' is not null or undefined
      assertParamExists("activateTheme", "name", name);
      const localVarPath =
        `/apis/api.console.halo.run/v1alpha1/themes/{name}/activation`.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);

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

      return {
        url: toPathString(localVarUrlObj),
        options: localVarRequestOptions,
      };
    },
    /**
     * Fetch the activated theme.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    fetchActivatedTheme: async (
      options: AxiosRequestConfig = {}
    ): Promise<RequestArgs> => {
      const localVarPath = `/apis/api.console.halo.run/v1alpha1/themes/-/activation`;
      // 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,
      };
    },
    /**
     * Fetch configMap of theme by configured configMapName.
     * @param {string} name
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    fetchThemeConfig: async (
      name: string,
      options: AxiosRequestConfig = {}
    ): Promise<RequestArgs> => {
      // verify required parameter 'name' is not null or undefined
      assertParamExists("fetchThemeConfig", "name", name);
      const localVarPath =
        `/apis/api.console.halo.run/v1alpha1/themes/{name}/config`.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,
      };
    },
    /**
     * Fetch setting of theme.
     * @param {string} name
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    fetchThemeSetting: async (
      name: string,
      options: AxiosRequestConfig = {}
    ): Promise<RequestArgs> => {
      // verify required parameter 'name' is not null or undefined
      assertParamExists("fetchThemeSetting", "name", name);
      const localVarPath =
        `/apis/api.console.halo.run/v1alpha1/themes/{name}/setting`.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,
      };
    },
    /**
     * Install a theme by uploading a zip file.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    installTheme: async (
      options: AxiosRequestConfig = {}
    ): Promise<RequestArgs> => {
      const localVarPath = `/apis/api.console.halo.run/v1alpha1/themes/install`;
      // 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);

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

      return {
        url: toPathString(localVarUrlObj),
        options: localVarRequestOptions,
      };
    },
    /**
     * Install a theme from uri.
     * @param {InstallFromUriRequest} installFromUriRequest
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    installThemeFromUri: async (
      installFromUriRequest: InstallFromUriRequest,
      options: AxiosRequestConfig = {}
    ): Promise<RequestArgs> => {
      // verify required parameter 'installFromUriRequest' is not null or undefined
      assertParamExists(
        "installThemeFromUri",
        "installFromUriRequest",
        installFromUriRequest
      );
      const localVarPath = `/apis/api.console.halo.run/v1alpha1/themes/-/install-from-uri`;
      // 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(
        installFromUriRequest,
        localVarRequestOptions,
        configuration
      );

      return {
        url: toPathString(localVarUrlObj),
        options: localVarRequestOptions,
      };
    },
    /**
     * List themes.
     * @param {boolean} uninstalled
     * @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 {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    listThemes: async (
      uninstalled: boolean,
      fieldSelector?: Array<string>,
      labelSelector?: Array<string>,
      page?: number,
      size?: number,
      options: AxiosRequestConfig = {}
    ): Promise<RequestArgs> => {
      // verify required parameter 'uninstalled' is not null or undefined
      assertParamExists("listThemes", "uninstalled", uninstalled);
      const localVarPath = `/apis/api.console.halo.run/v1alpha1/themes`;
      // 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 (uninstalled !== undefined) {
        localVarQueryParameter["uninstalled"] = uninstalled;
      }

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

      return {
        url: toPathString(localVarUrlObj),
        options: localVarRequestOptions,
      };
    },
    /**
     * Reload theme setting.
     * @param {string} name
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    reload: async (
      name: string,
      options: AxiosRequestConfig = {}
    ): Promise<RequestArgs> => {
      // verify required parameter 'name' is not null or undefined
      assertParamExists("reload", "name", name);
      const localVarPath =
        `/apis/api.console.halo.run/v1alpha1/themes/{name}/reload`.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);

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

      return {
        url: toPathString(localVarUrlObj),
        options: localVarRequestOptions,
      };
    },
    /**
     * Reset the configMap of theme setting.
     * @param {string} name
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    resetThemeConfig: async (
      name: string,
      options: AxiosRequestConfig = {}
    ): Promise<RequestArgs> => {
      // verify required parameter 'name' is not null or undefined
      assertParamExists("resetThemeConfig", "name", name);
      const localVarPath =
        `/apis/api.console.halo.run/v1alpha1/themes/{name}/reset-config`.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);

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

      return {
        url: toPathString(localVarUrlObj),
        options: localVarRequestOptions,
      };
    },
    /**
     * Update the configMap of theme setting.
     * @param {string} name
     * @param {ConfigMap} configMap
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    updateThemeConfig: async (
      name: string,
      configMap: ConfigMap,
      options: AxiosRequestConfig = {}
    ): Promise<RequestArgs> => {
      // verify required parameter 'name' is not null or undefined
      assertParamExists("updateThemeConfig", "name", name);
      // verify required parameter 'configMap' is not null or undefined
      assertParamExists("updateThemeConfig", "configMap", configMap);
      const localVarPath =
        `/apis/api.console.halo.run/v1alpha1/themes/{name}/config`.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(
        configMap,
        localVarRequestOptions,
        configuration
      );

      return {
        url: toPathString(localVarUrlObj),
        options: localVarRequestOptions,
      };
    },
    /**
     * Upgrade theme
     * @param {string} name
     * @param {File} file
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    upgradeTheme: async (
      name: string,
      file: File,
      options: AxiosRequestConfig = {}
    ): Promise<RequestArgs> => {
      // verify required parameter 'name' is not null or undefined
      assertParamExists("upgradeTheme", "name", name);
      // verify required parameter 'file' is not null or undefined
      assertParamExists("upgradeTheme", "file", file);
      const localVarPath =
        `/apis/api.console.halo.run/v1alpha1/themes/{name}/upgrade`.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: "POST",
        ...baseOptions,
        ...options,
      };
      const localVarHeaderParameter = {} as any;
      const localVarQueryParameter = {} as any;
      const localVarFormParams = new ((configuration &&
        configuration.formDataCtor) ||
        FormData)();

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

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

      if (file !== undefined) {
        localVarFormParams.append("file", file as any);
      }

      localVarHeaderParameter["Content-Type"] = "multipart/form-data";

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

      return {
        url: toPathString(localVarUrlObj),
        options: localVarRequestOptions,
      };
    },
    /**
     * Upgrade a theme from uri.
     * @param {string} name
     * @param {UpgradeFromUriRequest} upgradeFromUriRequest
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    upgradeThemeFromUri: async (
      name: string,
      upgradeFromUriRequest: UpgradeFromUriRequest,
      options: AxiosRequestConfig = {}
    ): Promise<RequestArgs> => {
      // verify required parameter 'name' is not null or undefined
      assertParamExists("upgradeThemeFromUri", "name", name);
      // verify required parameter 'upgradeFromUriRequest' is not null or undefined
      assertParamExists(
        "upgradeThemeFromUri",
        "upgradeFromUriRequest",
        upgradeFromUriRequest
      );
      const localVarPath =
        `/apis/api.console.halo.run/v1alpha1/themes/{name}/upgrade-from-uri`.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: "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(
        upgradeFromUriRequest,
        localVarRequestOptions,
        configuration
      );

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

/**
 * ApiConsoleHaloRunV1alpha1ThemeApi - functional programming interface
 * @export
 */
export const ApiConsoleHaloRunV1alpha1ThemeApiFp = function (
  configuration?: Configuration
) {
  const localVarAxiosParamCreator =
    ApiConsoleHaloRunV1alpha1ThemeApiAxiosParamCreator(configuration);
  return {
    /**
     * Activate a theme by name.
     * @param {string} name
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    async activateTheme(
      name: string,
      options?: AxiosRequestConfig
    ): Promise<
      (axios?: AxiosInstance, basePath?: string) => AxiosPromise<Theme>
    > {
      const localVarAxiosArgs = await localVarAxiosParamCreator.activateTheme(
        name,
        options
      );
      return createRequestFunction(
        localVarAxiosArgs,
        globalAxios,
        BASE_PATH,
        configuration
      );
    },
    /**
     * Fetch the activated theme.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    async fetchActivatedTheme(
      options?: AxiosRequestConfig
    ): Promise<
      (axios?: AxiosInstance, basePath?: string) => AxiosPromise<Theme>
    > {
      const localVarAxiosArgs =
        await localVarAxiosParamCreator.fetchActivatedTheme(options);
      return createRequestFunction(
        localVarAxiosArgs,
        globalAxios,
        BASE_PATH,
        configuration
      );
    },
    /**
     * Fetch configMap of theme by configured configMapName.
     * @param {string} name
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    async fetchThemeConfig(
      name: string,
      options?: AxiosRequestConfig
    ): Promise<
      (axios?: AxiosInstance, basePath?: string) => AxiosPromise<ConfigMap>
    > {
      const localVarAxiosArgs =
        await localVarAxiosParamCreator.fetchThemeConfig(name, options);
      return createRequestFunction(
        localVarAxiosArgs,
        globalAxios,
        BASE_PATH,
        configuration
      );
    },
    /**
     * Fetch setting of theme.
     * @param {string} name
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    async fetchThemeSetting(
      name: string,
      options?: AxiosRequestConfig
    ): Promise<
      (axios?: AxiosInstance, basePath?: string) => AxiosPromise<Setting>
    > {
      const localVarAxiosArgs =
        await localVarAxiosParamCreator.fetchThemeSetting(name, options);
      return createRequestFunction(
        localVarAxiosArgs,
        globalAxios,
        BASE_PATH,
        configuration
      );
    },
    /**
     * Install a theme by uploading a zip file.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    async installTheme(
      options?: AxiosRequestConfig
    ): Promise<
      (axios?: AxiosInstance, basePath?: string) => AxiosPromise<Theme>
    > {
      const localVarAxiosArgs = await localVarAxiosParamCreator.installTheme(
        options
      );
      return createRequestFunction(
        localVarAxiosArgs,
        globalAxios,
        BASE_PATH,
        configuration
      );
    },
    /**
     * Install a theme from uri.
     * @param {InstallFromUriRequest} installFromUriRequest
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    async installThemeFromUri(
      installFromUriRequest: InstallFromUriRequest,
      options?: AxiosRequestConfig
    ): Promise<
      (axios?: AxiosInstance, basePath?: string) => AxiosPromise<Theme>
    > {
      const localVarAxiosArgs =
        await localVarAxiosParamCreator.installThemeFromUri(
          installFromUriRequest,
          options
        );
      return createRequestFunction(
        localVarAxiosArgs,
        globalAxios,
        BASE_PATH,
        configuration
      );
    },
    /**
     * List themes.
     * @param {boolean} uninstalled
     * @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 {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    async listThemes(
      uninstalled: boolean,
      fieldSelector?: Array<string>,
      labelSelector?: Array<string>,
      page?: number,
      size?: number,
      options?: AxiosRequestConfig
    ): Promise<
      (axios?: AxiosInstance, basePath?: string) => AxiosPromise<ThemeList>
    > {
      const localVarAxiosArgs = await localVarAxiosParamCreator.listThemes(
        uninstalled,
        fieldSelector,
        labelSelector,
        page,
        size,
        options
      );
      return createRequestFunction(
        localVarAxiosArgs,
        globalAxios,
        BASE_PATH,
        configuration
      );
    },
    /**
     * Reload theme setting.
     * @param {string} name
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    async reload(
      name: string,
      options?: AxiosRequestConfig
    ): Promise<
      (axios?: AxiosInstance, basePath?: string) => AxiosPromise<Theme>
    > {
      const localVarAxiosArgs = await localVarAxiosParamCreator.reload(
        name,
        options
      );
      return createRequestFunction(
        localVarAxiosArgs,
        globalAxios,
        BASE_PATH,
        configuration
      );
    },
    /**
     * Reset the configMap of theme setting.
     * @param {string} name
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    async resetThemeConfig(
      name: string,
      options?: AxiosRequestConfig
    ): Promise<
      (axios?: AxiosInstance, basePath?: string) => AxiosPromise<ConfigMap>
    > {
      const localVarAxiosArgs =
        await localVarAxiosParamCreator.resetThemeConfig(name, options);
      return createRequestFunction(
        localVarAxiosArgs,
        globalAxios,
        BASE_PATH,
        configuration
      );
    },
    /**
     * Update the configMap of theme setting.
     * @param {string} name
     * @param {ConfigMap} configMap
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    async updateThemeConfig(
      name: string,
      configMap: ConfigMap,
      options?: AxiosRequestConfig
    ): Promise<
      (axios?: AxiosInstance, basePath?: string) => AxiosPromise<ConfigMap>
    > {
      const localVarAxiosArgs =
        await localVarAxiosParamCreator.updateThemeConfig(
          name,
          configMap,
          options
        );
      return createRequestFunction(
        localVarAxiosArgs,
        globalAxios,
        BASE_PATH,
        configuration
      );
    },
    /**
     * Upgrade theme
     * @param {string} name
     * @param {File} file
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    async upgradeTheme(
      name: string,
      file: File,
      options?: AxiosRequestConfig
    ): Promise<
      (axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>
    > {
      const localVarAxiosArgs = await localVarAxiosParamCreator.upgradeTheme(
        name,
        file,
        options
      );
      return createRequestFunction(
        localVarAxiosArgs,
        globalAxios,
        BASE_PATH,
        configuration
      );
    },
    /**
     * Upgrade a theme from uri.
     * @param {string} name
     * @param {UpgradeFromUriRequest} upgradeFromUriRequest
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    async upgradeThemeFromUri(
      name: string,
      upgradeFromUriRequest: UpgradeFromUriRequest,
      options?: AxiosRequestConfig
    ): Promise<
      (axios?: AxiosInstance, basePath?: string) => AxiosPromise<Theme>
    > {
      const localVarAxiosArgs =
        await localVarAxiosParamCreator.upgradeThemeFromUri(
          name,
          upgradeFromUriRequest,
          options
        );
      return createRequestFunction(
        localVarAxiosArgs,
        globalAxios,
        BASE_PATH,
        configuration
      );
    },
  };
};

/**
 * ApiConsoleHaloRunV1alpha1ThemeApi - factory interface
 * @export
 */
export const ApiConsoleHaloRunV1alpha1ThemeApiFactory = function (
  configuration?: Configuration,
  basePath?: string,
  axios?: AxiosInstance
) {
  const localVarFp = ApiConsoleHaloRunV1alpha1ThemeApiFp(configuration);
  return {
    /**
     * Activate a theme by name.
     * @param {ApiConsoleHaloRunV1alpha1ThemeApiActivateThemeRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    activateTheme(
      requestParameters: ApiConsoleHaloRunV1alpha1ThemeApiActivateThemeRequest,
      options?: AxiosRequestConfig
    ): AxiosPromise<Theme> {
      return localVarFp
        .activateTheme(requestParameters.name, options)
        .then((request) => request(axios, basePath));
    },
    /**
     * Fetch the activated theme.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    fetchActivatedTheme(options?: AxiosRequestConfig): AxiosPromise<Theme> {
      return localVarFp
        .fetchActivatedTheme(options)
        .then((request) => request(axios, basePath));
    },
    /**
     * Fetch configMap of theme by configured configMapName.
     * @param {ApiConsoleHaloRunV1alpha1ThemeApiFetchThemeConfigRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    fetchThemeConfig(
      requestParameters: ApiConsoleHaloRunV1alpha1ThemeApiFetchThemeConfigRequest,
      options?: AxiosRequestConfig
    ): AxiosPromise<ConfigMap> {
      return localVarFp
        .fetchThemeConfig(requestParameters.name, options)
        .then((request) => request(axios, basePath));
    },
    /**
     * Fetch setting of theme.
     * @param {ApiConsoleHaloRunV1alpha1ThemeApiFetchThemeSettingRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    fetchThemeSetting(
      requestParameters: ApiConsoleHaloRunV1alpha1ThemeApiFetchThemeSettingRequest,
      options?: AxiosRequestConfig
    ): AxiosPromise<Setting> {
      return localVarFp
        .fetchThemeSetting(requestParameters.name, options)
        .then((request) => request(axios, basePath));
    },
    /**
     * Install a theme by uploading a zip file.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    installTheme(options?: AxiosRequestConfig): AxiosPromise<Theme> {
      return localVarFp
        .installTheme(options)
        .then((request) => request(axios, basePath));
    },
    /**
     * Install a theme from uri.
     * @param {ApiConsoleHaloRunV1alpha1ThemeApiInstallThemeFromUriRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    installThemeFromUri(
      requestParameters: ApiConsoleHaloRunV1alpha1ThemeApiInstallThemeFromUriRequest,
      options?: AxiosRequestConfig
    ): AxiosPromise<Theme> {
      return localVarFp
        .installThemeFromUri(requestParameters.installFromUriRequest, options)
        .then((request) => request(axios, basePath));
    },
    /**
     * List themes.
     * @param {ApiConsoleHaloRunV1alpha1ThemeApiListThemesRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    listThemes(
      requestParameters: ApiConsoleHaloRunV1alpha1ThemeApiListThemesRequest,
      options?: AxiosRequestConfig
    ): AxiosPromise<ThemeList> {
      return localVarFp
        .listThemes(
          requestParameters.uninstalled,
          requestParameters.fieldSelector,
          requestParameters.labelSelector,
          requestParameters.page,
          requestParameters.size,
          options
        )
        .then((request) => request(axios, basePath));
    },
    /**
     * Reload theme setting.
     * @param {ApiConsoleHaloRunV1alpha1ThemeApiReloadRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    reload(
      requestParameters: ApiConsoleHaloRunV1alpha1ThemeApiReloadRequest,
      options?: AxiosRequestConfig
    ): AxiosPromise<Theme> {
      return localVarFp
        .reload(requestParameters.name, options)
        .then((request) => request(axios, basePath));
    },
    /**
     * Reset the configMap of theme setting.
     * @param {ApiConsoleHaloRunV1alpha1ThemeApiResetThemeConfigRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    resetThemeConfig(
      requestParameters: ApiConsoleHaloRunV1alpha1ThemeApiResetThemeConfigRequest,
      options?: AxiosRequestConfig
    ): AxiosPromise<ConfigMap> {
      return localVarFp
        .resetThemeConfig(requestParameters.name, options)
        .then((request) => request(axios, basePath));
    },
    /**
     * Update the configMap of theme setting.
     * @param {ApiConsoleHaloRunV1alpha1ThemeApiUpdateThemeConfigRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    updateThemeConfig(
      requestParameters: ApiConsoleHaloRunV1alpha1ThemeApiUpdateThemeConfigRequest,
      options?: AxiosRequestConfig
    ): AxiosPromise<ConfigMap> {
      return localVarFp
        .updateThemeConfig(
          requestParameters.name,
          requestParameters.configMap,
          options
        )
        .then((request) => request(axios, basePath));
    },
    /**
     * Upgrade theme
     * @param {ApiConsoleHaloRunV1alpha1ThemeApiUpgradeThemeRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    upgradeTheme(
      requestParameters: ApiConsoleHaloRunV1alpha1ThemeApiUpgradeThemeRequest,
      options?: AxiosRequestConfig
    ): AxiosPromise<void> {
      return localVarFp
        .upgradeTheme(requestParameters.name, requestParameters.file, options)
        .then((request) => request(axios, basePath));
    },
    /**
     * Upgrade a theme from uri.
     * @param {ApiConsoleHaloRunV1alpha1ThemeApiUpgradeThemeFromUriRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    upgradeThemeFromUri(
      requestParameters: ApiConsoleHaloRunV1alpha1ThemeApiUpgradeThemeFromUriRequest,
      options?: AxiosRequestConfig
    ): AxiosPromise<Theme> {
      return localVarFp
        .upgradeThemeFromUri(
          requestParameters.name,
          requestParameters.upgradeFromUriRequest,
          options
        )
        .then((request) => request(axios, basePath));
    },
  };
};

/**
 * Request parameters for activateTheme operation in ApiConsoleHaloRunV1alpha1ThemeApi.
 * @export
 * @interface ApiConsoleHaloRunV1alpha1ThemeApiActivateThemeRequest
 */
export interface ApiConsoleHaloRunV1alpha1ThemeApiActivateThemeRequest {
  /**
   *
   * @type {string}
   * @memberof ApiConsoleHaloRunV1alpha1ThemeApiActivateTheme
   */
  readonly name: string;
}

/**
 * Request parameters for fetchThemeConfig operation in ApiConsoleHaloRunV1alpha1ThemeApi.
 * @export
 * @interface ApiConsoleHaloRunV1alpha1ThemeApiFetchThemeConfigRequest
 */
export interface ApiConsoleHaloRunV1alpha1ThemeApiFetchThemeConfigRequest {
  /**
   *
   * @type {string}
   * @memberof ApiConsoleHaloRunV1alpha1ThemeApiFetchThemeConfig
   */
  readonly name: string;
}

/**
 * Request parameters for fetchThemeSetting operation in ApiConsoleHaloRunV1alpha1ThemeApi.
 * @export
 * @interface ApiConsoleHaloRunV1alpha1ThemeApiFetchThemeSettingRequest
 */
export interface ApiConsoleHaloRunV1alpha1ThemeApiFetchThemeSettingRequest {
  /**
   *
   * @type {string}
   * @memberof ApiConsoleHaloRunV1alpha1ThemeApiFetchThemeSetting
   */
  readonly name: string;
}

/**
 * Request parameters for installThemeFromUri operation in ApiConsoleHaloRunV1alpha1ThemeApi.
 * @export
 * @interface ApiConsoleHaloRunV1alpha1ThemeApiInstallThemeFromUriRequest
 */
export interface ApiConsoleHaloRunV1alpha1ThemeApiInstallThemeFromUriRequest {
  /**
   *
   * @type {InstallFromUriRequest}
   * @memberof ApiConsoleHaloRunV1alpha1ThemeApiInstallThemeFromUri
   */
  readonly installFromUriRequest: InstallFromUriRequest;
}

/**
 * Request parameters for listThemes operation in ApiConsoleHaloRunV1alpha1ThemeApi.
 * @export
 * @interface ApiConsoleHaloRunV1alpha1ThemeApiListThemesRequest
 */
export interface ApiConsoleHaloRunV1alpha1ThemeApiListThemesRequest {
  /**
   *
   * @type {boolean}
   * @memberof ApiConsoleHaloRunV1alpha1ThemeApiListThemes
   */
  readonly uninstalled: boolean;

  /**
   * Field selector for filtering.
   * @type {Array<string>}
   * @memberof ApiConsoleHaloRunV1alpha1ThemeApiListThemes
   */
  readonly fieldSelector?: Array<string>;

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

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

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

/**
 * Request parameters for reload operation in ApiConsoleHaloRunV1alpha1ThemeApi.
 * @export
 * @interface ApiConsoleHaloRunV1alpha1ThemeApiReloadRequest
 */
export interface ApiConsoleHaloRunV1alpha1ThemeApiReloadRequest {
  /**
   *
   * @type {string}
   * @memberof ApiConsoleHaloRunV1alpha1ThemeApiReload
   */
  readonly name: string;
}

/**
 * Request parameters for resetThemeConfig operation in ApiConsoleHaloRunV1alpha1ThemeApi.
 * @export
 * @interface ApiConsoleHaloRunV1alpha1ThemeApiResetThemeConfigRequest
 */
export interface ApiConsoleHaloRunV1alpha1ThemeApiResetThemeConfigRequest {
  /**
   *
   * @type {string}
   * @memberof ApiConsoleHaloRunV1alpha1ThemeApiResetThemeConfig
   */
  readonly name: string;
}

/**
 * Request parameters for updateThemeConfig operation in ApiConsoleHaloRunV1alpha1ThemeApi.
 * @export
 * @interface ApiConsoleHaloRunV1alpha1ThemeApiUpdateThemeConfigRequest
 */
export interface ApiConsoleHaloRunV1alpha1ThemeApiUpdateThemeConfigRequest {
  /**
   *
   * @type {string}
   * @memberof ApiConsoleHaloRunV1alpha1ThemeApiUpdateThemeConfig
   */
  readonly name: string;

  /**
   *
   * @type {ConfigMap}
   * @memberof ApiConsoleHaloRunV1alpha1ThemeApiUpdateThemeConfig
   */
  readonly configMap: ConfigMap;
}

/**
 * Request parameters for upgradeTheme operation in ApiConsoleHaloRunV1alpha1ThemeApi.
 * @export
 * @interface ApiConsoleHaloRunV1alpha1ThemeApiUpgradeThemeRequest
 */
export interface ApiConsoleHaloRunV1alpha1ThemeApiUpgradeThemeRequest {
  /**
   *
   * @type {string}
   * @memberof ApiConsoleHaloRunV1alpha1ThemeApiUpgradeTheme
   */
  readonly name: string;

  /**
   *
   * @type {File}
   * @memberof ApiConsoleHaloRunV1alpha1ThemeApiUpgradeTheme
   */
  readonly file: File;
}

/**
 * Request parameters for upgradeThemeFromUri operation in ApiConsoleHaloRunV1alpha1ThemeApi.
 * @export
 * @interface ApiConsoleHaloRunV1alpha1ThemeApiUpgradeThemeFromUriRequest
 */
export interface ApiConsoleHaloRunV1alpha1ThemeApiUpgradeThemeFromUriRequest {
  /**
   *
   * @type {string}
   * @memberof ApiConsoleHaloRunV1alpha1ThemeApiUpgradeThemeFromUri
   */
  readonly name: string;

  /**
   *
   * @type {UpgradeFromUriRequest}
   * @memberof ApiConsoleHaloRunV1alpha1ThemeApiUpgradeThemeFromUri
   */
  readonly upgradeFromUriRequest: UpgradeFromUriRequest;
}

/**
 * ApiConsoleHaloRunV1alpha1ThemeApi - object-oriented interface
 * @export
 * @class ApiConsoleHaloRunV1alpha1ThemeApi
 * @extends {BaseAPI}
 */
export class ApiConsoleHaloRunV1alpha1ThemeApi extends BaseAPI {
  /**
   * Activate a theme by name.
   * @param {ApiConsoleHaloRunV1alpha1ThemeApiActivateThemeRequest} requestParameters Request parameters.
   * @param {*} [options] Override http request option.
   * @throws {RequiredError}
   * @memberof ApiConsoleHaloRunV1alpha1ThemeApi
   */
  public activateTheme(
    requestParameters: ApiConsoleHaloRunV1alpha1ThemeApiActivateThemeRequest,
    options?: AxiosRequestConfig
  ) {
    return ApiConsoleHaloRunV1alpha1ThemeApiFp(this.configuration)
      .activateTheme(requestParameters.name, options)
      .then((request) => request(this.axios, this.basePath));
  }

  /**
   * Fetch the activated theme.
   * @param {*} [options] Override http request option.
   * @throws {RequiredError}
   * @memberof ApiConsoleHaloRunV1alpha1ThemeApi
   */
  public fetchActivatedTheme(options?: AxiosRequestConfig) {
    return ApiConsoleHaloRunV1alpha1ThemeApiFp(this.configuration)
      .fetchActivatedTheme(options)
      .then((request) => request(this.axios, this.basePath));
  }

  /**
   * Fetch configMap of theme by configured configMapName.
   * @param {ApiConsoleHaloRunV1alpha1ThemeApiFetchThemeConfigRequest} requestParameters Request parameters.
   * @param {*} [options] Override http request option.
   * @throws {RequiredError}
   * @memberof ApiConsoleHaloRunV1alpha1ThemeApi
   */
  public fetchThemeConfig(
    requestParameters: ApiConsoleHaloRunV1alpha1ThemeApiFetchThemeConfigRequest,
    options?: AxiosRequestConfig
  ) {
    return ApiConsoleHaloRunV1alpha1ThemeApiFp(this.configuration)
      .fetchThemeConfig(requestParameters.name, options)
      .then((request) => request(this.axios, this.basePath));
  }

  /**
   * Fetch setting of theme.
   * @param {ApiConsoleHaloRunV1alpha1ThemeApiFetchThemeSettingRequest} requestParameters Request parameters.
   * @param {*} [options] Override http request option.
   * @throws {RequiredError}
   * @memberof ApiConsoleHaloRunV1alpha1ThemeApi
   */
  public fetchThemeSetting(
    requestParameters: ApiConsoleHaloRunV1alpha1ThemeApiFetchThemeSettingRequest,
    options?: AxiosRequestConfig
  ) {
    return ApiConsoleHaloRunV1alpha1ThemeApiFp(this.configuration)
      .fetchThemeSetting(requestParameters.name, options)
      .then((request) => request(this.axios, this.basePath));
  }

  /**
   * Install a theme by uploading a zip file.
   * @param {*} [options] Override http request option.
   * @throws {RequiredError}
   * @memberof ApiConsoleHaloRunV1alpha1ThemeApi
   */
  public installTheme(options?: AxiosRequestConfig) {
    return ApiConsoleHaloRunV1alpha1ThemeApiFp(this.configuration)
      .installTheme(options)
      .then((request) => request(this.axios, this.basePath));
  }

  /**
   * Install a theme from uri.
   * @param {ApiConsoleHaloRunV1alpha1ThemeApiInstallThemeFromUriRequest} requestParameters Request parameters.
   * @param {*} [options] Override http request option.
   * @throws {RequiredError}
   * @memberof ApiConsoleHaloRunV1alpha1ThemeApi
   */
  public installThemeFromUri(
    requestParameters: ApiConsoleHaloRunV1alpha1ThemeApiInstallThemeFromUriRequest,
    options?: AxiosRequestConfig
  ) {
    return ApiConsoleHaloRunV1alpha1ThemeApiFp(this.configuration)
      .installThemeFromUri(requestParameters.installFromUriRequest, options)
      .then((request) => request(this.axios, this.basePath));
  }

  /**
   * List themes.
   * @param {ApiConsoleHaloRunV1alpha1ThemeApiListThemesRequest} requestParameters Request parameters.
   * @param {*} [options] Override http request option.
   * @throws {RequiredError}
   * @memberof ApiConsoleHaloRunV1alpha1ThemeApi
   */
  public listThemes(
    requestParameters: ApiConsoleHaloRunV1alpha1ThemeApiListThemesRequest,
    options?: AxiosRequestConfig
  ) {
    return ApiConsoleHaloRunV1alpha1ThemeApiFp(this.configuration)
      .listThemes(
        requestParameters.uninstalled,
        requestParameters.fieldSelector,
        requestParameters.labelSelector,
        requestParameters.page,
        requestParameters.size,
        options
      )
      .then((request) => request(this.axios, this.basePath));
  }

  /**
   * Reload theme setting.
   * @param {ApiConsoleHaloRunV1alpha1ThemeApiReloadRequest} requestParameters Request parameters.
   * @param {*} [options] Override http request option.
   * @throws {RequiredError}
   * @memberof ApiConsoleHaloRunV1alpha1ThemeApi
   */
  public reload(
    requestParameters: ApiConsoleHaloRunV1alpha1ThemeApiReloadRequest,
    options?: AxiosRequestConfig
  ) {
    return ApiConsoleHaloRunV1alpha1ThemeApiFp(this.configuration)
      .reload(requestParameters.name, options)
      .then((request) => request(this.axios, this.basePath));
  }

  /**
   * Reset the configMap of theme setting.
   * @param {ApiConsoleHaloRunV1alpha1ThemeApiResetThemeConfigRequest} requestParameters Request parameters.
   * @param {*} [options] Override http request option.
   * @throws {RequiredError}
   * @memberof ApiConsoleHaloRunV1alpha1ThemeApi
   */
  public resetThemeConfig(
    requestParameters: ApiConsoleHaloRunV1alpha1ThemeApiResetThemeConfigRequest,
    options?: AxiosRequestConfig
  ) {
    return ApiConsoleHaloRunV1alpha1ThemeApiFp(this.configuration)
      .resetThemeConfig(requestParameters.name, options)
      .then((request) => request(this.axios, this.basePath));
  }

  /**
   * Update the configMap of theme setting.
   * @param {ApiConsoleHaloRunV1alpha1ThemeApiUpdateThemeConfigRequest} requestParameters Request parameters.
   * @param {*} [options] Override http request option.
   * @throws {RequiredError}
   * @memberof ApiConsoleHaloRunV1alpha1ThemeApi
   */
  public updateThemeConfig(
    requestParameters: ApiConsoleHaloRunV1alpha1ThemeApiUpdateThemeConfigRequest,
    options?: AxiosRequestConfig
  ) {
    return ApiConsoleHaloRunV1alpha1ThemeApiFp(this.configuration)
      .updateThemeConfig(
        requestParameters.name,
        requestParameters.configMap,
        options
      )
      .then((request) => request(this.axios, this.basePath));
  }

  /**
   * Upgrade theme
   * @param {ApiConsoleHaloRunV1alpha1ThemeApiUpgradeThemeRequest} requestParameters Request parameters.
   * @param {*} [options] Override http request option.
   * @throws {RequiredError}
   * @memberof ApiConsoleHaloRunV1alpha1ThemeApi
   */
  public upgradeTheme(
    requestParameters: ApiConsoleHaloRunV1alpha1ThemeApiUpgradeThemeRequest,
    options?: AxiosRequestConfig
  ) {
    return ApiConsoleHaloRunV1alpha1ThemeApiFp(this.configuration)
      .upgradeTheme(requestParameters.name, requestParameters.file, options)
      .then((request) => request(this.axios, this.basePath));
  }

  /**
   * Upgrade a theme from uri.
   * @param {ApiConsoleHaloRunV1alpha1ThemeApiUpgradeThemeFromUriRequest} requestParameters Request parameters.
   * @param {*} [options] Override http request option.
   * @throws {RequiredError}
   * @memberof ApiConsoleHaloRunV1alpha1ThemeApi
   */
  public upgradeThemeFromUri(
    requestParameters: ApiConsoleHaloRunV1alpha1ThemeApiUpgradeThemeFromUriRequest,
    options?: AxiosRequestConfig
  ) {
    return ApiConsoleHaloRunV1alpha1ThemeApiFp(this.configuration)
      .upgradeThemeFromUri(
        requestParameters.name,
        requestParameters.upgradeFromUriRequest,
        options
      )
      .then((request) => request(this.axios, this.basePath));
  }
}
