/* 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 { CittaRes } from '../models/citta-res';
import { luoghiControllerFindLuogoByAutocomplete } from '../fn/luoghi/luoghi-controller-find-luogo-by-autocomplete';
import { LuoghiControllerFindLuogoByAutocomplete$Params } from '../fn/luoghi/luoghi-controller-find-luogo-by-autocomplete';
import { luoghiControllerFindLuogoEsteso } from '../fn/luoghi/luoghi-controller-find-luogo-esteso';
import { LuoghiControllerFindLuogoEsteso$Params } from '../fn/luoghi/luoghi-controller-find-luogo-esteso';
import { luoghiControllerFindManyCitta } from '../fn/luoghi/luoghi-controller-find-many-citta';
import { LuoghiControllerFindManyCitta$Params } from '../fn/luoghi/luoghi-controller-find-many-citta';
import { luoghiControllerFindManyProvince } from '../fn/luoghi/luoghi-controller-find-many-province';
import { LuoghiControllerFindManyProvince$Params } from '../fn/luoghi/luoghi-controller-find-many-province';
import { luoghiControllerFindManyRegioni } from '../fn/luoghi/luoghi-controller-find-many-regioni';
import { LuoghiControllerFindManyRegioni$Params } from '../fn/luoghi/luoghi-controller-find-many-regioni';
import { luoghiControllerFindManyStati } from '../fn/luoghi/luoghi-controller-find-many-stati';
import { LuoghiControllerFindManyStati$Params } from '../fn/luoghi/luoghi-controller-find-many-stati';
import { LuogoRes } from '../models/luogo-res';
import { ProvinciaRes } from '../models/provincia-res';
import { RegioneRes } from '../models/regione-res';
import { StatoRes } from '../models/stato-res';

@Injectable({ providedIn: 'root' })
export class LuoghiApiClient extends BaseService {
  constructor(config: ApiConfiguration, http: HttpClient) {
    super(config, http);
  }

  /** Path part for operation `luoghiControllerFindLuogoByAutocomplete()` */
  static readonly LuoghiControllerFindLuogoByAutocompletePath =
    '/public/luoghi/cerca';

  /**
   * Cerca luoghi con autocomplete.
   *
   *
   *
   * This method provides access to the full `HttpResponse`, allowing access to response headers.
   * To access only the response body, use `luoghiControllerFindLuogoByAutocomplete()` instead.
   *
   * This method doesn't expect any request body.
   */
  luoghiControllerFindLuogoByAutocomplete$Response(
    params: LuoghiControllerFindLuogoByAutocomplete$Params,
    context?: HttpContext,
  ): Observable<StrictHttpResponse<Array<LuogoRes>>> {
    return luoghiControllerFindLuogoByAutocomplete(
      this.http,
      this.rootUrl,
      params,
      context,
    );
  }

  /**
   * Cerca luoghi con autocomplete.
   *
   *
   *
   * This method provides access only to the response body.
   * To access the full response (for headers, for example), `luoghiControllerFindLuogoByAutocomplete$Response()` instead.
   *
   * This method doesn't expect any request body.
   */
  luoghiControllerFindLuogoByAutocomplete(
    params: LuoghiControllerFindLuogoByAutocomplete$Params,
    context?: HttpContext,
  ): Observable<Array<LuogoRes>> {
    return this.luoghiControllerFindLuogoByAutocomplete$Response(
      params,
      context,
    ).pipe(
      map((r: StrictHttpResponse<Array<LuogoRes>>): Array<LuogoRes> => r.body),
    );
  }

  /** Path part for operation `luoghiControllerFindLuogoEsteso()` */
  static readonly LuoghiControllerFindLuogoEstesoPath =
    '/public/luoghi/cerca-esteso';

  /**
   * Cerca luoghi, province e regioni con autocomplete.
   *
   *
   *
   * This method provides access to the full `HttpResponse`, allowing access to response headers.
   * To access only the response body, use `luoghiControllerFindLuogoEsteso()` instead.
   *
   * This method doesn't expect any request body.
   */
  luoghiControllerFindLuogoEsteso$Response(
    params: LuoghiControllerFindLuogoEsteso$Params,
    context?: HttpContext,
  ): Observable<StrictHttpResponse<Array<LuogoRes>>> {
    return luoghiControllerFindLuogoEsteso(
      this.http,
      this.rootUrl,
      params,
      context,
    );
  }

  /**
   * Cerca luoghi, province e regioni con autocomplete.
   *
   *
   *
   * This method provides access only to the response body.
   * To access the full response (for headers, for example), `luoghiControllerFindLuogoEsteso$Response()` instead.
   *
   * This method doesn't expect any request body.
   */
  luoghiControllerFindLuogoEsteso(
    params: LuoghiControllerFindLuogoEsteso$Params,
    context?: HttpContext,
  ): Observable<Array<LuogoRes>> {
    return this.luoghiControllerFindLuogoEsteso$Response(params, context).pipe(
      map((r: StrictHttpResponse<Array<LuogoRes>>): Array<LuogoRes> => r.body),
    );
  }

  /** Path part for operation `luoghiControllerFindManyStati()` */
  static readonly LuoghiControllerFindManyStatiPath = '/public/luoghi/stati';

  /**
   * Get stati.
   *
   *
   *
   * This method provides access to the full `HttpResponse`, allowing access to response headers.
   * To access only the response body, use `luoghiControllerFindManyStati()` instead.
   *
   * This method doesn't expect any request body.
   */
  luoghiControllerFindManyStati$Response(
    params?: LuoghiControllerFindManyStati$Params,
    context?: HttpContext,
  ): Observable<StrictHttpResponse<Array<StatoRes>>> {
    return luoghiControllerFindManyStati(
      this.http,
      this.rootUrl,
      params,
      context,
    );
  }

  /**
   * Get stati.
   *
   *
   *
   * This method provides access only to the response body.
   * To access the full response (for headers, for example), `luoghiControllerFindManyStati$Response()` instead.
   *
   * This method doesn't expect any request body.
   */
  luoghiControllerFindManyStati(
    params?: LuoghiControllerFindManyStati$Params,
    context?: HttpContext,
  ): Observable<Array<StatoRes>> {
    return this.luoghiControllerFindManyStati$Response(params, context).pipe(
      map((r: StrictHttpResponse<Array<StatoRes>>): Array<StatoRes> => r.body),
    );
  }

  /** Path part for operation `luoghiControllerFindManyRegioni()` */
  static readonly LuoghiControllerFindManyRegioniPath =
    '/public/luoghi/regioni';

  /**
   * Get regioni.
   *
   *
   *
   * This method provides access to the full `HttpResponse`, allowing access to response headers.
   * To access only the response body, use `luoghiControllerFindManyRegioni()` instead.
   *
   * This method doesn't expect any request body.
   */
  luoghiControllerFindManyRegioni$Response(
    params: LuoghiControllerFindManyRegioni$Params,
    context?: HttpContext,
  ): Observable<StrictHttpResponse<Array<RegioneRes>>> {
    return luoghiControllerFindManyRegioni(
      this.http,
      this.rootUrl,
      params,
      context,
    );
  }

  /**
   * Get regioni.
   *
   *
   *
   * This method provides access only to the response body.
   * To access the full response (for headers, for example), `luoghiControllerFindManyRegioni$Response()` instead.
   *
   * This method doesn't expect any request body.
   */
  luoghiControllerFindManyRegioni(
    params: LuoghiControllerFindManyRegioni$Params,
    context?: HttpContext,
  ): Observable<Array<RegioneRes>> {
    return this.luoghiControllerFindManyRegioni$Response(params, context).pipe(
      map(
        (r: StrictHttpResponse<Array<RegioneRes>>): Array<RegioneRes> => r.body,
      ),
    );
  }

  /** Path part for operation `luoghiControllerFindManyProvince()` */
  static readonly LuoghiControllerFindManyProvincePath =
    '/public/luoghi/province';

  /**
   * Get province.
   *
   *
   *
   * This method provides access to the full `HttpResponse`, allowing access to response headers.
   * To access only the response body, use `luoghiControllerFindManyProvince()` instead.
   *
   * This method doesn't expect any request body.
   */
  luoghiControllerFindManyProvince$Response(
    params: LuoghiControllerFindManyProvince$Params,
    context?: HttpContext,
  ): Observable<StrictHttpResponse<Array<ProvinciaRes>>> {
    return luoghiControllerFindManyProvince(
      this.http,
      this.rootUrl,
      params,
      context,
    );
  }

  /**
   * Get province.
   *
   *
   *
   * This method provides access only to the response body.
   * To access the full response (for headers, for example), `luoghiControllerFindManyProvince$Response()` instead.
   *
   * This method doesn't expect any request body.
   */
  luoghiControllerFindManyProvince(
    params: LuoghiControllerFindManyProvince$Params,
    context?: HttpContext,
  ): Observable<Array<ProvinciaRes>> {
    return this.luoghiControllerFindManyProvince$Response(params, context).pipe(
      map(
        (r: StrictHttpResponse<Array<ProvinciaRes>>): Array<ProvinciaRes> =>
          r.body,
      ),
    );
  }

  /** Path part for operation `luoghiControllerFindManyCitta()` */
  static readonly LuoghiControllerFindManyCittaPath = '/public/luoghi/citta';

  /**
   * Get città.
   *
   *
   *
   * This method provides access to the full `HttpResponse`, allowing access to response headers.
   * To access only the response body, use `luoghiControllerFindManyCitta()` instead.
   *
   * This method doesn't expect any request body.
   */
  luoghiControllerFindManyCitta$Response(
    params: LuoghiControllerFindManyCitta$Params,
    context?: HttpContext,
  ): Observable<StrictHttpResponse<Array<CittaRes>>> {
    return luoghiControllerFindManyCitta(
      this.http,
      this.rootUrl,
      params,
      context,
    );
  }

  /**
   * Get città.
   *
   *
   *
   * This method provides access only to the response body.
   * To access the full response (for headers, for example), `luoghiControllerFindManyCitta$Response()` instead.
   *
   * This method doesn't expect any request body.
   */
  luoghiControllerFindManyCitta(
    params: LuoghiControllerFindManyCitta$Params,
    context?: HttpContext,
  ): Observable<Array<CittaRes>> {
    return this.luoghiControllerFindManyCitta$Response(params, context).pipe(
      map((r: StrictHttpResponse<Array<CittaRes>>): Array<CittaRes> => r.body),
    );
  }
}
