/* tslint:disable */
/* eslint-disable */
/**
 * AutoGlue API
 * API for managing K3s clusters across cloud providers
 *
 * The version of the OpenAPI document: dev
 *
 *
 * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
 * https://openapi-generator.tech
 * Do not edit the class manually.
 */

import * as runtime from "../runtime";
import type { HandlersHealthStatus } from "../models/index";
import {
  HandlersHealthStatusFromJSON,
  HandlersHealthStatusToJSON,
} from "../models/index";

/**
 *
 */
export class HealthApi extends runtime.BaseAPI {
  /**
   * Returns 200 OK when the service is up
   * Basic health check
   */
  async healthCheckOperationIdRaw(
    initOverrides?: RequestInit | runtime.InitOverrideFunction,
  ): Promise<runtime.ApiResponse<HandlersHealthStatus>> {
    const queryParameters: any = {};

    const headerParameters: runtime.HTTPHeaders = {};

    let urlPath = `/healthz`;

    const response = await this.request(
      {
        path: urlPath,
        method: "GET",
        headers: headerParameters,
        query: queryParameters,
      },
      initOverrides,
    );

    return new runtime.JSONApiResponse(response, (jsonValue) =>
      HandlersHealthStatusFromJSON(jsonValue),
    );
  }

  /**
   * Returns 200 OK when the service is up
   * Basic health check
   */
  async healthCheckOperationId(
    initOverrides?: RequestInit | runtime.InitOverrideFunction,
  ): Promise<HandlersHealthStatus> {
    const response = await this.healthCheckOperationIdRaw(initOverrides);
    return await response.value();
  }
}
