/* 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 { ReasonType } from "../models";
// @ts-ignore
import { ReasonTypeList } from "../models";
/**
 * NotificationHaloRunV1alpha1ReasonTypeApi - axios parameter creator
 * @export
 */
export const NotificationHaloRunV1alpha1ReasonTypeApiAxiosParamCreator =
  function (configuration?: Configuration) {
    return {
      /**
       * Create notification.halo.run/v1alpha1/ReasonType
       * @param {ReasonType} [reasonType] Fresh reasontype
       * @param {*} [options] Override http request option.
       * @throws {RequiredError}
       */
      createnotificationHaloRunV1alpha1ReasonType: async (
        reasonType?: ReasonType,
        options: AxiosRequestConfig = {}
      ): Promise<RequestArgs> => {
        const localVarPath = `/apis/notification.halo.run/v1alpha1/reasontypes`;
        // 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(
          reasonType,
          localVarRequestOptions,
          configuration
        );

        return {
          url: toPathString(localVarUrlObj),
          options: localVarRequestOptions,
        };
      },
      /**
       * Delete notification.halo.run/v1alpha1/ReasonType
       * @param {string} name Name of reasontype
       * @param {*} [options] Override http request option.
       * @throws {RequiredError}
       */
      deletenotificationHaloRunV1alpha1ReasonType: async (
        name: string,
        options: AxiosRequestConfig = {}
      ): Promise<RequestArgs> => {
        // verify required parameter 'name' is not null or undefined
        assertParamExists(
          "deletenotificationHaloRunV1alpha1ReasonType",
          "name",
          name
        );
        const localVarPath =
          `/apis/notification.halo.run/v1alpha1/reasontypes/{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 notification.halo.run/v1alpha1/ReasonType
       * @param {string} name Name of reasontype
       * @param {*} [options] Override http request option.
       * @throws {RequiredError}
       */
      getnotificationHaloRunV1alpha1ReasonType: async (
        name: string,
        options: AxiosRequestConfig = {}
      ): Promise<RequestArgs> => {
        // verify required parameter 'name' is not null or undefined
        assertParamExists(
          "getnotificationHaloRunV1alpha1ReasonType",
          "name",
          name
        );
        const localVarPath =
          `/apis/notification.halo.run/v1alpha1/reasontypes/{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 notification.halo.run/v1alpha1/ReasonType
       * @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}
       */
      listnotificationHaloRunV1alpha1ReasonType: async (
        fieldSelector?: Array<string>,
        labelSelector?: Array<string>,
        page?: number,
        size?: number,
        sort?: Array<string>,
        options: AxiosRequestConfig = {}
      ): Promise<RequestArgs> => {
        const localVarPath = `/apis/notification.halo.run/v1alpha1/reasontypes`;
        // 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 notification.halo.run/v1alpha1/ReasonType
       * @param {string} name Name of reasontype
       * @param {ReasonType} [reasonType] Updated reasontype
       * @param {*} [options] Override http request option.
       * @throws {RequiredError}
       */
      updatenotificationHaloRunV1alpha1ReasonType: async (
        name: string,
        reasonType?: ReasonType,
        options: AxiosRequestConfig = {}
      ): Promise<RequestArgs> => {
        // verify required parameter 'name' is not null or undefined
        assertParamExists(
          "updatenotificationHaloRunV1alpha1ReasonType",
          "name",
          name
        );
        const localVarPath =
          `/apis/notification.halo.run/v1alpha1/reasontypes/{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(
          reasonType,
          localVarRequestOptions,
          configuration
        );

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

/**
 * NotificationHaloRunV1alpha1ReasonTypeApi - functional programming interface
 * @export
 */
export const NotificationHaloRunV1alpha1ReasonTypeApiFp = function (
  configuration?: Configuration
) {
  const localVarAxiosParamCreator =
    NotificationHaloRunV1alpha1ReasonTypeApiAxiosParamCreator(configuration);
  return {
    /**
     * Create notification.halo.run/v1alpha1/ReasonType
     * @param {ReasonType} [reasonType] Fresh reasontype
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    async createnotificationHaloRunV1alpha1ReasonType(
      reasonType?: ReasonType,
      options?: AxiosRequestConfig
    ): Promise<
      (axios?: AxiosInstance, basePath?: string) => AxiosPromise<ReasonType>
    > {
      const localVarAxiosArgs =
        await localVarAxiosParamCreator.createnotificationHaloRunV1alpha1ReasonType(
          reasonType,
          options
        );
      return createRequestFunction(
        localVarAxiosArgs,
        globalAxios,
        BASE_PATH,
        configuration
      );
    },
    /**
     * Delete notification.halo.run/v1alpha1/ReasonType
     * @param {string} name Name of reasontype
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    async deletenotificationHaloRunV1alpha1ReasonType(
      name: string,
      options?: AxiosRequestConfig
    ): Promise<
      (axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>
    > {
      const localVarAxiosArgs =
        await localVarAxiosParamCreator.deletenotificationHaloRunV1alpha1ReasonType(
          name,
          options
        );
      return createRequestFunction(
        localVarAxiosArgs,
        globalAxios,
        BASE_PATH,
        configuration
      );
    },
    /**
     * Get notification.halo.run/v1alpha1/ReasonType
     * @param {string} name Name of reasontype
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    async getnotificationHaloRunV1alpha1ReasonType(
      name: string,
      options?: AxiosRequestConfig
    ): Promise<
      (axios?: AxiosInstance, basePath?: string) => AxiosPromise<ReasonType>
    > {
      const localVarAxiosArgs =
        await localVarAxiosParamCreator.getnotificationHaloRunV1alpha1ReasonType(
          name,
          options
        );
      return createRequestFunction(
        localVarAxiosArgs,
        globalAxios,
        BASE_PATH,
        configuration
      );
    },
    /**
     * List notification.halo.run/v1alpha1/ReasonType
     * @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 listnotificationHaloRunV1alpha1ReasonType(
      fieldSelector?: Array<string>,
      labelSelector?: Array<string>,
      page?: number,
      size?: number,
      sort?: Array<string>,
      options?: AxiosRequestConfig
    ): Promise<
      (axios?: AxiosInstance, basePath?: string) => AxiosPromise<ReasonTypeList>
    > {
      const localVarAxiosArgs =
        await localVarAxiosParamCreator.listnotificationHaloRunV1alpha1ReasonType(
          fieldSelector,
          labelSelector,
          page,
          size,
          sort,
          options
        );
      return createRequestFunction(
        localVarAxiosArgs,
        globalAxios,
        BASE_PATH,
        configuration
      );
    },
    /**
     * Update notification.halo.run/v1alpha1/ReasonType
     * @param {string} name Name of reasontype
     * @param {ReasonType} [reasonType] Updated reasontype
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    async updatenotificationHaloRunV1alpha1ReasonType(
      name: string,
      reasonType?: ReasonType,
      options?: AxiosRequestConfig
    ): Promise<
      (axios?: AxiosInstance, basePath?: string) => AxiosPromise<ReasonType>
    > {
      const localVarAxiosArgs =
        await localVarAxiosParamCreator.updatenotificationHaloRunV1alpha1ReasonType(
          name,
          reasonType,
          options
        );
      return createRequestFunction(
        localVarAxiosArgs,
        globalAxios,
        BASE_PATH,
        configuration
      );
    },
  };
};

/**
 * NotificationHaloRunV1alpha1ReasonTypeApi - factory interface
 * @export
 */
export const NotificationHaloRunV1alpha1ReasonTypeApiFactory = function (
  configuration?: Configuration,
  basePath?: string,
  axios?: AxiosInstance
) {
  const localVarFp = NotificationHaloRunV1alpha1ReasonTypeApiFp(configuration);
  return {
    /**
     * Create notification.halo.run/v1alpha1/ReasonType
     * @param {NotificationHaloRunV1alpha1ReasonTypeApiCreatenotificationHaloRunV1alpha1ReasonTypeRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    createnotificationHaloRunV1alpha1ReasonType(
      requestParameters: NotificationHaloRunV1alpha1ReasonTypeApiCreatenotificationHaloRunV1alpha1ReasonTypeRequest = {},
      options?: AxiosRequestConfig
    ): AxiosPromise<ReasonType> {
      return localVarFp
        .createnotificationHaloRunV1alpha1ReasonType(
          requestParameters.reasonType,
          options
        )
        .then((request) => request(axios, basePath));
    },
    /**
     * Delete notification.halo.run/v1alpha1/ReasonType
     * @param {NotificationHaloRunV1alpha1ReasonTypeApiDeletenotificationHaloRunV1alpha1ReasonTypeRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    deletenotificationHaloRunV1alpha1ReasonType(
      requestParameters: NotificationHaloRunV1alpha1ReasonTypeApiDeletenotificationHaloRunV1alpha1ReasonTypeRequest,
      options?: AxiosRequestConfig
    ): AxiosPromise<void> {
      return localVarFp
        .deletenotificationHaloRunV1alpha1ReasonType(
          requestParameters.name,
          options
        )
        .then((request) => request(axios, basePath));
    },
    /**
     * Get notification.halo.run/v1alpha1/ReasonType
     * @param {NotificationHaloRunV1alpha1ReasonTypeApiGetnotificationHaloRunV1alpha1ReasonTypeRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    getnotificationHaloRunV1alpha1ReasonType(
      requestParameters: NotificationHaloRunV1alpha1ReasonTypeApiGetnotificationHaloRunV1alpha1ReasonTypeRequest,
      options?: AxiosRequestConfig
    ): AxiosPromise<ReasonType> {
      return localVarFp
        .getnotificationHaloRunV1alpha1ReasonType(
          requestParameters.name,
          options
        )
        .then((request) => request(axios, basePath));
    },
    /**
     * List notification.halo.run/v1alpha1/ReasonType
     * @param {NotificationHaloRunV1alpha1ReasonTypeApiListnotificationHaloRunV1alpha1ReasonTypeRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    listnotificationHaloRunV1alpha1ReasonType(
      requestParameters: NotificationHaloRunV1alpha1ReasonTypeApiListnotificationHaloRunV1alpha1ReasonTypeRequest = {},
      options?: AxiosRequestConfig
    ): AxiosPromise<ReasonTypeList> {
      return localVarFp
        .listnotificationHaloRunV1alpha1ReasonType(
          requestParameters.fieldSelector,
          requestParameters.labelSelector,
          requestParameters.page,
          requestParameters.size,
          requestParameters.sort,
          options
        )
        .then((request) => request(axios, basePath));
    },
    /**
     * Update notification.halo.run/v1alpha1/ReasonType
     * @param {NotificationHaloRunV1alpha1ReasonTypeApiUpdatenotificationHaloRunV1alpha1ReasonTypeRequest} requestParameters Request parameters.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     */
    updatenotificationHaloRunV1alpha1ReasonType(
      requestParameters: NotificationHaloRunV1alpha1ReasonTypeApiUpdatenotificationHaloRunV1alpha1ReasonTypeRequest,
      options?: AxiosRequestConfig
    ): AxiosPromise<ReasonType> {
      return localVarFp
        .updatenotificationHaloRunV1alpha1ReasonType(
          requestParameters.name,
          requestParameters.reasonType,
          options
        )
        .then((request) => request(axios, basePath));
    },
  };
};

/**
 * Request parameters for createnotificationHaloRunV1alpha1ReasonType operation in NotificationHaloRunV1alpha1ReasonTypeApi.
 * @export
 * @interface NotificationHaloRunV1alpha1ReasonTypeApiCreatenotificationHaloRunV1alpha1ReasonTypeRequest
 */
export interface NotificationHaloRunV1alpha1ReasonTypeApiCreatenotificationHaloRunV1alpha1ReasonTypeRequest {
  /**
   * Fresh reasontype
   * @type {ReasonType}
   * @memberof NotificationHaloRunV1alpha1ReasonTypeApiCreatenotificationHaloRunV1alpha1ReasonType
   */
  readonly reasonType?: ReasonType;
}

/**
 * Request parameters for deletenotificationHaloRunV1alpha1ReasonType operation in NotificationHaloRunV1alpha1ReasonTypeApi.
 * @export
 * @interface NotificationHaloRunV1alpha1ReasonTypeApiDeletenotificationHaloRunV1alpha1ReasonTypeRequest
 */
export interface NotificationHaloRunV1alpha1ReasonTypeApiDeletenotificationHaloRunV1alpha1ReasonTypeRequest {
  /**
   * Name of reasontype
   * @type {string}
   * @memberof NotificationHaloRunV1alpha1ReasonTypeApiDeletenotificationHaloRunV1alpha1ReasonType
   */
  readonly name: string;
}

/**
 * Request parameters for getnotificationHaloRunV1alpha1ReasonType operation in NotificationHaloRunV1alpha1ReasonTypeApi.
 * @export
 * @interface NotificationHaloRunV1alpha1ReasonTypeApiGetnotificationHaloRunV1alpha1ReasonTypeRequest
 */
export interface NotificationHaloRunV1alpha1ReasonTypeApiGetnotificationHaloRunV1alpha1ReasonTypeRequest {
  /**
   * Name of reasontype
   * @type {string}
   * @memberof NotificationHaloRunV1alpha1ReasonTypeApiGetnotificationHaloRunV1alpha1ReasonType
   */
  readonly name: string;
}

/**
 * Request parameters for listnotificationHaloRunV1alpha1ReasonType operation in NotificationHaloRunV1alpha1ReasonTypeApi.
 * @export
 * @interface NotificationHaloRunV1alpha1ReasonTypeApiListnotificationHaloRunV1alpha1ReasonTypeRequest
 */
export interface NotificationHaloRunV1alpha1ReasonTypeApiListnotificationHaloRunV1alpha1ReasonTypeRequest {
  /**
   * Field selector for filtering.
   * @type {Array<string>}
   * @memberof NotificationHaloRunV1alpha1ReasonTypeApiListnotificationHaloRunV1alpha1ReasonType
   */
  readonly fieldSelector?: Array<string>;

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

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

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

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

/**
 * Request parameters for updatenotificationHaloRunV1alpha1ReasonType operation in NotificationHaloRunV1alpha1ReasonTypeApi.
 * @export
 * @interface NotificationHaloRunV1alpha1ReasonTypeApiUpdatenotificationHaloRunV1alpha1ReasonTypeRequest
 */
export interface NotificationHaloRunV1alpha1ReasonTypeApiUpdatenotificationHaloRunV1alpha1ReasonTypeRequest {
  /**
   * Name of reasontype
   * @type {string}
   * @memberof NotificationHaloRunV1alpha1ReasonTypeApiUpdatenotificationHaloRunV1alpha1ReasonType
   */
  readonly name: string;

  /**
   * Updated reasontype
   * @type {ReasonType}
   * @memberof NotificationHaloRunV1alpha1ReasonTypeApiUpdatenotificationHaloRunV1alpha1ReasonType
   */
  readonly reasonType?: ReasonType;
}

/**
 * NotificationHaloRunV1alpha1ReasonTypeApi - object-oriented interface
 * @export
 * @class NotificationHaloRunV1alpha1ReasonTypeApi
 * @extends {BaseAPI}
 */
export class NotificationHaloRunV1alpha1ReasonTypeApi extends BaseAPI {
  /**
   * Create notification.halo.run/v1alpha1/ReasonType
   * @param {NotificationHaloRunV1alpha1ReasonTypeApiCreatenotificationHaloRunV1alpha1ReasonTypeRequest} requestParameters Request parameters.
   * @param {*} [options] Override http request option.
   * @throws {RequiredError}
   * @memberof NotificationHaloRunV1alpha1ReasonTypeApi
   */
  public createnotificationHaloRunV1alpha1ReasonType(
    requestParameters: NotificationHaloRunV1alpha1ReasonTypeApiCreatenotificationHaloRunV1alpha1ReasonTypeRequest = {},
    options?: AxiosRequestConfig
  ) {
    return NotificationHaloRunV1alpha1ReasonTypeApiFp(this.configuration)
      .createnotificationHaloRunV1alpha1ReasonType(
        requestParameters.reasonType,
        options
      )
      .then((request) => request(this.axios, this.basePath));
  }

  /**
   * Delete notification.halo.run/v1alpha1/ReasonType
   * @param {NotificationHaloRunV1alpha1ReasonTypeApiDeletenotificationHaloRunV1alpha1ReasonTypeRequest} requestParameters Request parameters.
   * @param {*} [options] Override http request option.
   * @throws {RequiredError}
   * @memberof NotificationHaloRunV1alpha1ReasonTypeApi
   */
  public deletenotificationHaloRunV1alpha1ReasonType(
    requestParameters: NotificationHaloRunV1alpha1ReasonTypeApiDeletenotificationHaloRunV1alpha1ReasonTypeRequest,
    options?: AxiosRequestConfig
  ) {
    return NotificationHaloRunV1alpha1ReasonTypeApiFp(this.configuration)
      .deletenotificationHaloRunV1alpha1ReasonType(
        requestParameters.name,
        options
      )
      .then((request) => request(this.axios, this.basePath));
  }

  /**
   * Get notification.halo.run/v1alpha1/ReasonType
   * @param {NotificationHaloRunV1alpha1ReasonTypeApiGetnotificationHaloRunV1alpha1ReasonTypeRequest} requestParameters Request parameters.
   * @param {*} [options] Override http request option.
   * @throws {RequiredError}
   * @memberof NotificationHaloRunV1alpha1ReasonTypeApi
   */
  public getnotificationHaloRunV1alpha1ReasonType(
    requestParameters: NotificationHaloRunV1alpha1ReasonTypeApiGetnotificationHaloRunV1alpha1ReasonTypeRequest,
    options?: AxiosRequestConfig
  ) {
    return NotificationHaloRunV1alpha1ReasonTypeApiFp(this.configuration)
      .getnotificationHaloRunV1alpha1ReasonType(requestParameters.name, options)
      .then((request) => request(this.axios, this.basePath));
  }

  /**
   * List notification.halo.run/v1alpha1/ReasonType
   * @param {NotificationHaloRunV1alpha1ReasonTypeApiListnotificationHaloRunV1alpha1ReasonTypeRequest} requestParameters Request parameters.
   * @param {*} [options] Override http request option.
   * @throws {RequiredError}
   * @memberof NotificationHaloRunV1alpha1ReasonTypeApi
   */
  public listnotificationHaloRunV1alpha1ReasonType(
    requestParameters: NotificationHaloRunV1alpha1ReasonTypeApiListnotificationHaloRunV1alpha1ReasonTypeRequest = {},
    options?: AxiosRequestConfig
  ) {
    return NotificationHaloRunV1alpha1ReasonTypeApiFp(this.configuration)
      .listnotificationHaloRunV1alpha1ReasonType(
        requestParameters.fieldSelector,
        requestParameters.labelSelector,
        requestParameters.page,
        requestParameters.size,
        requestParameters.sort,
        options
      )
      .then((request) => request(this.axios, this.basePath));
  }

  /**
   * Update notification.halo.run/v1alpha1/ReasonType
   * @param {NotificationHaloRunV1alpha1ReasonTypeApiUpdatenotificationHaloRunV1alpha1ReasonTypeRequest} requestParameters Request parameters.
   * @param {*} [options] Override http request option.
   * @throws {RequiredError}
   * @memberof NotificationHaloRunV1alpha1ReasonTypeApi
   */
  public updatenotificationHaloRunV1alpha1ReasonType(
    requestParameters: NotificationHaloRunV1alpha1ReasonTypeApiUpdatenotificationHaloRunV1alpha1ReasonTypeRequest,
    options?: AxiosRequestConfig
  ) {
    return NotificationHaloRunV1alpha1ReasonTypeApiFp(this.configuration)
      .updatenotificationHaloRunV1alpha1ReasonType(
        requestParameters.name,
        requestParameters.reasonType,
        options
      )
      .then((request) => request(this.axios, this.basePath));
  }
}
