/* tslint:disable */
/* eslint-disable */
/* Code generated by ng-openapi-gen DO NOT EDIT. */

import { HttpClient, HttpContext } from '@angular/common/http';
import { Injectable } from '@angular/core';
import { Observable } from 'rxjs';
import { map } from 'rxjs/operators';

import { BaseService } from '../base-service';
import { ApiConfiguration } from '../api-configuration';
import { StrictHttpResponse } from '../strict-http-response';

import { getPublishedServiceSpecifications } from '../fn/general-metrics-api/get-published-service-specifications';
import { GetPublishedServiceSpecifications$Params } from '../fn/general-metrics-api/get-published-service-specifications';
import { getRegisteredIndividuals } from '../fn/general-metrics-api/get-registered-individuals';
import { GetRegisteredIndividuals$Params } from '../fn/general-metrics-api/get-registered-individuals';
import { getRegisteredResourceSpecifications } from '../fn/general-metrics-api/get-registered-resource-specifications';
import { GetRegisteredResourceSpecifications$Params } from '../fn/general-metrics-api/get-registered-resource-specifications';
import { PublishedServiceSpecifications } from '../models/published-service-specifications';
import { RegisteredIndividuals } from '../models/registered-individuals';
import { RegisteredResourceSpecifications } from '../models/registered-resource-specifications';


/**
 * The General Metrics API
 */
@Injectable({ providedIn: 'root' })
export class GeneralMetricsApiService extends BaseService {
  constructor(config: ApiConfiguration, http: HttpClient) {
    super(config, http);
  }

  /** Path part for operation `getRegisteredResourceSpecifications()` */
  static readonly GetRegisteredResourceSpecificationsPath = '/metrics/registeredResourceSpecifications';

  /**
   * Get total number of registered resource specifications.
   *
   *
   *
   * This method provides access to the full `HttpResponse`, allowing access to response headers.
   * To access only the response body, use `getRegisteredResourceSpecifications()` instead.
   *
   * This method doesn't expect any request body.
   */
  getRegisteredResourceSpecifications$Response(params?: GetRegisteredResourceSpecifications$Params, context?: HttpContext): Observable<StrictHttpResponse<RegisteredResourceSpecifications>> {
    return getRegisteredResourceSpecifications(this.http, this.rootUrl, params, context);
  }

  /**
   * Get total number of registered resource specifications.
   *
   *
   *
   * This method provides access only to the response body.
   * To access the full response (for headers, for example), `getRegisteredResourceSpecifications$Response()` instead.
   *
   * This method doesn't expect any request body.
   */
  getRegisteredResourceSpecifications(params?: GetRegisteredResourceSpecifications$Params, context?: HttpContext): Observable<RegisteredResourceSpecifications> {
    return this.getRegisteredResourceSpecifications$Response(params, context).pipe(
      map((r: StrictHttpResponse<RegisteredResourceSpecifications>): RegisteredResourceSpecifications => r.body)
    );
  }

  /** Path part for operation `getRegisteredIndividuals()` */
  static readonly GetRegisteredIndividualsPath = '/metrics/registeredIndividuals';

  /**
   * Get total number of registered individuals.
   *
   *
   *
   * This method provides access to the full `HttpResponse`, allowing access to response headers.
   * To access only the response body, use `getRegisteredIndividuals()` instead.
   *
   * This method doesn't expect any request body.
   */
  getRegisteredIndividuals$Response(params?: GetRegisteredIndividuals$Params, context?: HttpContext): Observable<StrictHttpResponse<RegisteredIndividuals>> {
    return getRegisteredIndividuals(this.http, this.rootUrl, params, context);
  }

  /**
   * Get total number of registered individuals.
   *
   *
   *
   * This method provides access only to the response body.
   * To access the full response (for headers, for example), `getRegisteredIndividuals$Response()` instead.
   *
   * This method doesn't expect any request body.
   */
  getRegisteredIndividuals(params?: GetRegisteredIndividuals$Params, context?: HttpContext): Observable<RegisteredIndividuals> {
    return this.getRegisteredIndividuals$Response(params, context).pipe(
      map((r: StrictHttpResponse<RegisteredIndividuals>): RegisteredIndividuals => r.body)
    );
  }

  /** Path part for operation `getPublishedServiceSpecifications()` */
  static readonly GetPublishedServiceSpecificationsPath = '/metrics/publishedServiceSpecifications';

  /**
   * Get total number of published service specifications.
   *
   *
   *
   * This method provides access to the full `HttpResponse`, allowing access to response headers.
   * To access only the response body, use `getPublishedServiceSpecifications()` instead.
   *
   * This method doesn't expect any request body.
   */
  getPublishedServiceSpecifications$Response(params?: GetPublishedServiceSpecifications$Params, context?: HttpContext): Observable<StrictHttpResponse<PublishedServiceSpecifications>> {
    return getPublishedServiceSpecifications(this.http, this.rootUrl, params, context);
  }

  /**
   * Get total number of published service specifications.
   *
   *
   *
   * This method provides access only to the response body.
   * To access the full response (for headers, for example), `getPublishedServiceSpecifications$Response()` instead.
   *
   * This method doesn't expect any request body.
   */
  getPublishedServiceSpecifications(params?: GetPublishedServiceSpecifications$Params, context?: HttpContext): Observable<PublishedServiceSpecifications> {
    return this.getPublishedServiceSpecifications$Response(params, context).pipe(
      map((r: StrictHttpResponse<PublishedServiceSpecifications>): PublishedServiceSpecifications => r.body)
    );
  }

}
