/* 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 { PasswordRequest } from "../models";
// @ts-ignore
import { TotpAuthLinkResponse } from "../models";
// @ts-ignore
import { TotpRequest } from "../models";
// @ts-ignore
import { TwoFactorAuthSettings } from "../models";
/**
 * ApiSecurityHaloRunV1alpha1AuthenticationTwoFactorApi - axios parameter creator
 * @export
 */
export const ApiSecurityHaloRunV1alpha1AuthenticationTwoFactorApiAxiosParamCreator =
  function (configuration?: Configuration) {
    return {
      /**
       * Configure a TOTP
       * @param {TotpRequest} [totpRequest]
       * @param {*} [options] Override http request option.
       * @throws {RequiredError}
       */
      configurerTotp: async (
        totpRequest?: TotpRequest,
        options: AxiosRequestConfig = {}
      ): Promise<RequestArgs> => {
        const localVarPath = `/apis/api.security.halo.run/v1alpha1/authentications/two-factor/totp`;
        // 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(
          totpRequest,
          localVarRequestOptions,
          configuration
        );

        return {
          url: toPathString(localVarUrlObj),
          options: localVarRequestOptions,
        };
      },
      /**
       *
       * @param {PasswordRequest} [passwordRequest]
       * @param {*} [options] Override http request option.
       * @throws {RequiredError}
       */
      deleteTotp: async (
        passwordRequest?: PasswordRequest,
        options: AxiosRequestConfig = {}
      ): Promise<RequestArgs> => {
        const localVarPath = `/apis/api.security.halo.run/v1alpha1/authentications/two-factor/totp/-`;
        // 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);

        localVarHeaderParameter["Content-Type"] = "application/json";

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

        return {
          url: toPathString(localVarUrlObj),
          options: localVarRequestOptions,
        };
      },
      /**
       * Disable Two-factor authentication
       * @param {PasswordRequest} [passwordRequest]
       * @param {*} [options] Override http request option.
       * @throws {RequiredError}
       */
      disableTwoFactor: async (
        passwordRequest?: PasswordRequest,
        options: AxiosRequestConfig = {}
      ): Promise<RequestArgs> => {
        const localVarPath = `/apis/api.security.halo.run/v1alpha1/authentications/two-factor/settings/disabled`;
        // 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(
          passwordRequest,
          localVarRequestOptions,
          configuration
        );

        return {
          url: toPathString(localVarUrlObj),
          options: localVarRequestOptions,
        };
      },
      /**
       * Enable Two-factor authentication
       * @param {PasswordRequest} [passwordRequest]
       * @param {*} [options] Override http request option.
       * @throws {RequiredError}
       */
      enableTwoFactor: async (
        passwordRequest?: PasswordRequest,
        options: AxiosRequestConfig = {}
      ): Promise<RequestArgs> => {
        const localVarPath = `/apis/api.security.halo.run/v1alpha1/authentications/two-factor/settings/enabled`;
        // 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(
          passwordRequest,
          localVarRequestOptions,
          configuration
        );

        return {
          url: toPathString(localVarUrlObj),
          options: localVarRequestOptions,
        };
      },
      /**
       * Get TOTP auth link, including secret
       * @param {*} [options] Override http request option.
       * @throws {RequiredError}
       */
      getTotpAuthLink: async (
        options: AxiosRequestConfig = {}
      ): Promise<RequestArgs> => {
        const localVarPath = `/apis/api.security.halo.run/v1alpha1/authentications/two-factor/totp/auth-link`;
        // 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,
        };
      },
      /**
       * Get Two-factor authentication settings.
       * @param {*} [options] Override http request option.
       * @throws {RequiredError}
       */
      getTwoFactorAuthenticationSettings: async (
        options: AxiosRequestConfig = {}
      ): Promise<RequestArgs> => {
        const localVarPath = `/apis/api.security.halo.run/v1alpha1/authentications/two-factor/settings`;
        // 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,
        };
      },
    };
  };

/**
 * ApiSecurityHaloRunV1alpha1AuthenticationTwoFactorApi - functional programming interface
 * @export
 */
export const ApiSecurityHaloRunV1alpha1AuthenticationTwoFactorApiFp = function (
  configuration?: Configuration
) {
  const localVarAxiosParamCreator =
    ApiSecurityHaloRunV1alpha1AuthenticationTwoFactorApiAxiosParamCreator(
      configuration
    );
  return {
    /**
     * Configure a TOTP
     * @param {TotpRequest} [totpRequest]
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    async configurerTotp(
      totpRequest?: TotpRequest,
      options?: AxiosRequestConfig
    ): Promise<
      (
        axios?: AxiosInstance,
        basePath?: string
      ) => AxiosPromise<TwoFactorAuthSettings>
    > {
      const localVarAxiosArgs = await localVarAxiosParamCreator.configurerTotp(
        totpRequest,
        options
      );
      return createRequestFunction(
        localVarAxiosArgs,
        globalAxios,
        BASE_PATH,
        configuration
      );
    },
    /**
     *
     * @param {PasswordRequest} [passwordRequest]
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    async deleteTotp(
      passwordRequest?: PasswordRequest,
      options?: AxiosRequestConfig
    ): Promise<
      (
        axios?: AxiosInstance,
        basePath?: string
      ) => AxiosPromise<TwoFactorAuthSettings>
    > {
      const localVarAxiosArgs = await localVarAxiosParamCreator.deleteTotp(
        passwordRequest,
        options
      );
      return createRequestFunction(
        localVarAxiosArgs,
        globalAxios,
        BASE_PATH,
        configuration
      );
    },
    /**
     * Disable Two-factor authentication
     * @param {PasswordRequest} [passwordRequest]
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    async disableTwoFactor(
      passwordRequest?: PasswordRequest,
      options?: AxiosRequestConfig
    ): Promise<
      (
        axios?: AxiosInstance,
        basePath?: string
      ) => AxiosPromise<TwoFactorAuthSettings>
    > {
      const localVarAxiosArgs =
        await localVarAxiosParamCreator.disableTwoFactor(
          passwordRequest,
          options
        );
      return createRequestFunction(
        localVarAxiosArgs,
        globalAxios,
        BASE_PATH,
        configuration
      );
    },
    /**
     * Enable Two-factor authentication
     * @param {PasswordRequest} [passwordRequest]
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    async enableTwoFactor(
      passwordRequest?: PasswordRequest,
      options?: AxiosRequestConfig
    ): Promise<
      (
        axios?: AxiosInstance,
        basePath?: string
      ) => AxiosPromise<TwoFactorAuthSettings>
    > {
      const localVarAxiosArgs = await localVarAxiosParamCreator.enableTwoFactor(
        passwordRequest,
        options
      );
      return createRequestFunction(
        localVarAxiosArgs,
        globalAxios,
        BASE_PATH,
        configuration
      );
    },
    /**
     * Get TOTP auth link, including secret
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    async getTotpAuthLink(
      options?: AxiosRequestConfig
    ): Promise<
      (
        axios?: AxiosInstance,
        basePath?: string
      ) => AxiosPromise<TotpAuthLinkResponse>
    > {
      const localVarAxiosArgs = await localVarAxiosParamCreator.getTotpAuthLink(
        options
      );
      return createRequestFunction(
        localVarAxiosArgs,
        globalAxios,
        BASE_PATH,
        configuration
      );
    },
    /**
     * Get Two-factor authentication settings.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    async getTwoFactorAuthenticationSettings(
      options?: AxiosRequestConfig
    ): Promise<
      (
        axios?: AxiosInstance,
        basePath?: string
      ) => AxiosPromise<TwoFactorAuthSettings>
    > {
      const localVarAxiosArgs =
        await localVarAxiosParamCreator.getTwoFactorAuthenticationSettings(
          options
        );
      return createRequestFunction(
        localVarAxiosArgs,
        globalAxios,
        BASE_PATH,
        configuration
      );
    },
  };
};

/**
 * ApiSecurityHaloRunV1alpha1AuthenticationTwoFactorApi - factory interface
 * @export
 */
export const ApiSecurityHaloRunV1alpha1AuthenticationTwoFactorApiFactory =
  function (
    configuration?: Configuration,
    basePath?: string,
    axios?: AxiosInstance
  ) {
    const localVarFp =
      ApiSecurityHaloRunV1alpha1AuthenticationTwoFactorApiFp(configuration);
    return {
      /**
       * Configure a TOTP
       * @param {ApiSecurityHaloRunV1alpha1AuthenticationTwoFactorApiConfigurerTotpRequest} requestParameters Request parameters.
       * @param {*} [options] Override http request option.
       * @throws {RequiredError}
       */
      configurerTotp(
        requestParameters: ApiSecurityHaloRunV1alpha1AuthenticationTwoFactorApiConfigurerTotpRequest = {},
        options?: AxiosRequestConfig
      ): AxiosPromise<TwoFactorAuthSettings> {
        return localVarFp
          .configurerTotp(requestParameters.totpRequest, options)
          .then((request) => request(axios, basePath));
      },
      /**
       *
       * @param {ApiSecurityHaloRunV1alpha1AuthenticationTwoFactorApiDeleteTotpRequest} requestParameters Request parameters.
       * @param {*} [options] Override http request option.
       * @throws {RequiredError}
       */
      deleteTotp(
        requestParameters: ApiSecurityHaloRunV1alpha1AuthenticationTwoFactorApiDeleteTotpRequest = {},
        options?: AxiosRequestConfig
      ): AxiosPromise<TwoFactorAuthSettings> {
        return localVarFp
          .deleteTotp(requestParameters.passwordRequest, options)
          .then((request) => request(axios, basePath));
      },
      /**
       * Disable Two-factor authentication
       * @param {ApiSecurityHaloRunV1alpha1AuthenticationTwoFactorApiDisableTwoFactorRequest} requestParameters Request parameters.
       * @param {*} [options] Override http request option.
       * @throws {RequiredError}
       */
      disableTwoFactor(
        requestParameters: ApiSecurityHaloRunV1alpha1AuthenticationTwoFactorApiDisableTwoFactorRequest = {},
        options?: AxiosRequestConfig
      ): AxiosPromise<TwoFactorAuthSettings> {
        return localVarFp
          .disableTwoFactor(requestParameters.passwordRequest, options)
          .then((request) => request(axios, basePath));
      },
      /**
       * Enable Two-factor authentication
       * @param {ApiSecurityHaloRunV1alpha1AuthenticationTwoFactorApiEnableTwoFactorRequest} requestParameters Request parameters.
       * @param {*} [options] Override http request option.
       * @throws {RequiredError}
       */
      enableTwoFactor(
        requestParameters: ApiSecurityHaloRunV1alpha1AuthenticationTwoFactorApiEnableTwoFactorRequest = {},
        options?: AxiosRequestConfig
      ): AxiosPromise<TwoFactorAuthSettings> {
        return localVarFp
          .enableTwoFactor(requestParameters.passwordRequest, options)
          .then((request) => request(axios, basePath));
      },
      /**
       * Get TOTP auth link, including secret
       * @param {*} [options] Override http request option.
       * @throws {RequiredError}
       */
      getTotpAuthLink(
        options?: AxiosRequestConfig
      ): AxiosPromise<TotpAuthLinkResponse> {
        return localVarFp
          .getTotpAuthLink(options)
          .then((request) => request(axios, basePath));
      },
      /**
       * Get Two-factor authentication settings.
       * @param {*} [options] Override http request option.
       * @throws {RequiredError}
       */
      getTwoFactorAuthenticationSettings(
        options?: AxiosRequestConfig
      ): AxiosPromise<TwoFactorAuthSettings> {
        return localVarFp
          .getTwoFactorAuthenticationSettings(options)
          .then((request) => request(axios, basePath));
      },
    };
  };

/**
 * Request parameters for configurerTotp operation in ApiSecurityHaloRunV1alpha1AuthenticationTwoFactorApi.
 * @export
 * @interface ApiSecurityHaloRunV1alpha1AuthenticationTwoFactorApiConfigurerTotpRequest
 */
export interface ApiSecurityHaloRunV1alpha1AuthenticationTwoFactorApiConfigurerTotpRequest {
  /**
   *
   * @type {TotpRequest}
   * @memberof ApiSecurityHaloRunV1alpha1AuthenticationTwoFactorApiConfigurerTotp
   */
  readonly totpRequest?: TotpRequest;
}

/**
 * Request parameters for deleteTotp operation in ApiSecurityHaloRunV1alpha1AuthenticationTwoFactorApi.
 * @export
 * @interface ApiSecurityHaloRunV1alpha1AuthenticationTwoFactorApiDeleteTotpRequest
 */
export interface ApiSecurityHaloRunV1alpha1AuthenticationTwoFactorApiDeleteTotpRequest {
  /**
   *
   * @type {PasswordRequest}
   * @memberof ApiSecurityHaloRunV1alpha1AuthenticationTwoFactorApiDeleteTotp
   */
  readonly passwordRequest?: PasswordRequest;
}

/**
 * Request parameters for disableTwoFactor operation in ApiSecurityHaloRunV1alpha1AuthenticationTwoFactorApi.
 * @export
 * @interface ApiSecurityHaloRunV1alpha1AuthenticationTwoFactorApiDisableTwoFactorRequest
 */
export interface ApiSecurityHaloRunV1alpha1AuthenticationTwoFactorApiDisableTwoFactorRequest {
  /**
   *
   * @type {PasswordRequest}
   * @memberof ApiSecurityHaloRunV1alpha1AuthenticationTwoFactorApiDisableTwoFactor
   */
  readonly passwordRequest?: PasswordRequest;
}

/**
 * Request parameters for enableTwoFactor operation in ApiSecurityHaloRunV1alpha1AuthenticationTwoFactorApi.
 * @export
 * @interface ApiSecurityHaloRunV1alpha1AuthenticationTwoFactorApiEnableTwoFactorRequest
 */
export interface ApiSecurityHaloRunV1alpha1AuthenticationTwoFactorApiEnableTwoFactorRequest {
  /**
   *
   * @type {PasswordRequest}
   * @memberof ApiSecurityHaloRunV1alpha1AuthenticationTwoFactorApiEnableTwoFactor
   */
  readonly passwordRequest?: PasswordRequest;
}

/**
 * ApiSecurityHaloRunV1alpha1AuthenticationTwoFactorApi - object-oriented interface
 * @export
 * @class ApiSecurityHaloRunV1alpha1AuthenticationTwoFactorApi
 * @extends {BaseAPI}
 */
export class ApiSecurityHaloRunV1alpha1AuthenticationTwoFactorApi extends BaseAPI {
  /**
   * Configure a TOTP
   * @param {ApiSecurityHaloRunV1alpha1AuthenticationTwoFactorApiConfigurerTotpRequest} requestParameters Request parameters.
   * @param {*} [options] Override http request option.
   * @throws {RequiredError}
   * @memberof ApiSecurityHaloRunV1alpha1AuthenticationTwoFactorApi
   */
  public configurerTotp(
    requestParameters: ApiSecurityHaloRunV1alpha1AuthenticationTwoFactorApiConfigurerTotpRequest = {},
    options?: AxiosRequestConfig
  ) {
    return ApiSecurityHaloRunV1alpha1AuthenticationTwoFactorApiFp(
      this.configuration
    )
      .configurerTotp(requestParameters.totpRequest, options)
      .then((request) => request(this.axios, this.basePath));
  }

  /**
   *
   * @param {ApiSecurityHaloRunV1alpha1AuthenticationTwoFactorApiDeleteTotpRequest} requestParameters Request parameters.
   * @param {*} [options] Override http request option.
   * @throws {RequiredError}
   * @memberof ApiSecurityHaloRunV1alpha1AuthenticationTwoFactorApi
   */
  public deleteTotp(
    requestParameters: ApiSecurityHaloRunV1alpha1AuthenticationTwoFactorApiDeleteTotpRequest = {},
    options?: AxiosRequestConfig
  ) {
    return ApiSecurityHaloRunV1alpha1AuthenticationTwoFactorApiFp(
      this.configuration
    )
      .deleteTotp(requestParameters.passwordRequest, options)
      .then((request) => request(this.axios, this.basePath));
  }

  /**
   * Disable Two-factor authentication
   * @param {ApiSecurityHaloRunV1alpha1AuthenticationTwoFactorApiDisableTwoFactorRequest} requestParameters Request parameters.
   * @param {*} [options] Override http request option.
   * @throws {RequiredError}
   * @memberof ApiSecurityHaloRunV1alpha1AuthenticationTwoFactorApi
   */
  public disableTwoFactor(
    requestParameters: ApiSecurityHaloRunV1alpha1AuthenticationTwoFactorApiDisableTwoFactorRequest = {},
    options?: AxiosRequestConfig
  ) {
    return ApiSecurityHaloRunV1alpha1AuthenticationTwoFactorApiFp(
      this.configuration
    )
      .disableTwoFactor(requestParameters.passwordRequest, options)
      .then((request) => request(this.axios, this.basePath));
  }

  /**
   * Enable Two-factor authentication
   * @param {ApiSecurityHaloRunV1alpha1AuthenticationTwoFactorApiEnableTwoFactorRequest} requestParameters Request parameters.
   * @param {*} [options] Override http request option.
   * @throws {RequiredError}
   * @memberof ApiSecurityHaloRunV1alpha1AuthenticationTwoFactorApi
   */
  public enableTwoFactor(
    requestParameters: ApiSecurityHaloRunV1alpha1AuthenticationTwoFactorApiEnableTwoFactorRequest = {},
    options?: AxiosRequestConfig
  ) {
    return ApiSecurityHaloRunV1alpha1AuthenticationTwoFactorApiFp(
      this.configuration
    )
      .enableTwoFactor(requestParameters.passwordRequest, options)
      .then((request) => request(this.axios, this.basePath));
  }

  /**
   * Get TOTP auth link, including secret
   * @param {*} [options] Override http request option.
   * @throws {RequiredError}
   * @memberof ApiSecurityHaloRunV1alpha1AuthenticationTwoFactorApi
   */
  public getTotpAuthLink(options?: AxiosRequestConfig) {
    return ApiSecurityHaloRunV1alpha1AuthenticationTwoFactorApiFp(
      this.configuration
    )
      .getTotpAuthLink(options)
      .then((request) => request(this.axios, this.basePath));
  }

  /**
   * Get Two-factor authentication settings.
   * @param {*} [options] Override http request option.
   * @throws {RequiredError}
   * @memberof ApiSecurityHaloRunV1alpha1AuthenticationTwoFactorApi
   */
  public getTwoFactorAuthenticationSettings(options?: AxiosRequestConfig) {
    return ApiSecurityHaloRunV1alpha1AuthenticationTwoFactorApiFp(
      this.configuration
    )
      .getTwoFactorAuthenticationSettings(options)
      .then((request) => request(this.axios, this.basePath));
  }
}
