"use strict";
/* tslint:disable */
/* eslint-disable */
/**
 * Hyperledger Cactus API
 * Interact with a Cactus deployment through HTTP.
 *
 * The version of the OpenAPI document: 2.0.0-rc.2
 *
 *
 * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
 * https://openapi-generator.tech
 * Do not edit the class manually.
 */
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.DefaultApi = exports.DefaultApiFactory = exports.DefaultApiFp = exports.DefaultApiAxiosParamCreator = exports.WatchHealthcheckV1 = void 0;
const axios_1 = __importDefault(require("axios"));
// Some imports not used depending on template conditions
// @ts-ignore
const common_1 = require("./common");
// @ts-ignore
const base_1 = require("./base");
/**
 *
 * @export
 * @enum {string}
 */
exports.WatchHealthcheckV1 = {
    Subscribe: 'org.hyperledger.cactus.api.async.besu.WatchHealthcheckV1.Subscribe',
    Next: 'org.hyperledger.cactus.api.async.besu.WatchHealthcheckV1.Next',
    Unsubscribe: 'org.hyperledger.cactus.api.async.besu.WatchHealthcheckV1.Unsubscribe',
    Error: 'org.hyperledger.cactus.api.async.besu.WatchHealthcheckV1.Error',
    Complete: 'org.hyperledger.cactus.api.async.besu.WatchHealthcheckV1.Complete'
};
/**
 * DefaultApi - axios parameter creator
 * @export
 */
const DefaultApiAxiosParamCreator = function (configuration) {
    return {
        /**
         * Returns the current timestamp of the API server as proof of health/liveness
         * @summary Can be used to verify liveness of an API server instance
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        getHealthCheckV1: async (options = {}) => {
            const localVarPath = `/api/v1/api-server/healthcheck`;
            // use dummy base URL string because the URL constructor only accepts absolute URLs.
            const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }
            const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
            const localVarHeaderParameter = {};
            const localVarQueryParameter = {};
            (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
            return {
                url: (0, common_1.toPathString)(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         * Returns the openapi.json document of specific plugin.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        getOpenApiSpecV1: async (options = {}) => {
            const localVarPath = `/api/v1/api-server/get-open-api-spec`;
            // use dummy base URL string because the URL constructor only accepts absolute URLs.
            const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }
            const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
            const localVarHeaderParameter = {};
            const localVarQueryParameter = {};
            (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
            return {
                url: (0, common_1.toPathString)(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         *
         * @summary Get the Prometheus Metrics
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        getPrometheusMetricsV1: async (options = {}) => {
            const localVarPath = `/api/v1/api-server/get-prometheus-exporter-metrics`;
            // use dummy base URL string because the URL constructor only accepts absolute URLs.
            const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }
            const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
            const localVarHeaderParameter = {};
            const localVarQueryParameter = {};
            (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
            return {
                url: (0, common_1.toPathString)(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
    };
};
exports.DefaultApiAxiosParamCreator = DefaultApiAxiosParamCreator;
/**
 * DefaultApi - functional programming interface
 * @export
 */
const DefaultApiFp = function (configuration) {
    const localVarAxiosParamCreator = (0, exports.DefaultApiAxiosParamCreator)(configuration);
    return {
        /**
         * Returns the current timestamp of the API server as proof of health/liveness
         * @summary Can be used to verify liveness of an API server instance
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async getHealthCheckV1(options) {
            const localVarAxiosArgs = await localVarAxiosParamCreator.getHealthCheckV1(options);
            return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
        },
        /**
         * Returns the openapi.json document of specific plugin.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async getOpenApiSpecV1(options) {
            const localVarAxiosArgs = await localVarAxiosParamCreator.getOpenApiSpecV1(options);
            return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
        },
        /**
         *
         * @summary Get the Prometheus Metrics
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async getPrometheusMetricsV1(options) {
            const localVarAxiosArgs = await localVarAxiosParamCreator.getPrometheusMetricsV1(options);
            return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
        },
    };
};
exports.DefaultApiFp = DefaultApiFp;
/**
 * DefaultApi - factory interface
 * @export
 */
const DefaultApiFactory = function (configuration, basePath, axios) {
    const localVarFp = (0, exports.DefaultApiFp)(configuration);
    return {
        /**
         * Returns the current timestamp of the API server as proof of health/liveness
         * @summary Can be used to verify liveness of an API server instance
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        getHealthCheckV1(options) {
            return localVarFp.getHealthCheckV1(options).then((request) => request(axios, basePath));
        },
        /**
         * Returns the openapi.json document of specific plugin.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        getOpenApiSpecV1(options) {
            return localVarFp.getOpenApiSpecV1(options).then((request) => request(axios, basePath));
        },
        /**
         *
         * @summary Get the Prometheus Metrics
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        getPrometheusMetricsV1(options) {
            return localVarFp.getPrometheusMetricsV1(options).then((request) => request(axios, basePath));
        },
    };
};
exports.DefaultApiFactory = DefaultApiFactory;
/**
 * DefaultApi - object-oriented interface
 * @export
 * @class DefaultApi
 * @extends {BaseAPI}
 */
class DefaultApi extends base_1.BaseAPI {
    /**
     * Returns the current timestamp of the API server as proof of health/liveness
     * @summary Can be used to verify liveness of an API server instance
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof DefaultApi
     */
    getHealthCheckV1(options) {
        return (0, exports.DefaultApiFp)(this.configuration).getHealthCheckV1(options).then((request) => request(this.axios, this.basePath));
    }
    /**
     * Returns the openapi.json document of specific plugin.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof DefaultApi
     */
    getOpenApiSpecV1(options) {
        return (0, exports.DefaultApiFp)(this.configuration).getOpenApiSpecV1(options).then((request) => request(this.axios, this.basePath));
    }
    /**
     *
     * @summary Get the Prometheus Metrics
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof DefaultApi
     */
    getPrometheusMetricsV1(options) {
        return (0, exports.DefaultApiFp)(this.configuration).getPrometheusMetricsV1(options).then((request) => request(this.axios, this.basePath));
    }
}
exports.DefaultApi = DefaultApi;
//# sourceMappingURL=data:application/json;base64, 