/* 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 { Stipulatore } from '../models/stipulatore';
import { stipulatoriControllerFindManyStipulatori } from '../fn/stipulatori/stipulatori-controller-find-many-stipulatori';
import { StipulatoriControllerFindManyStipulatori$Params } from '../fn/stipulatori/stipulatori-controller-find-many-stipulatori';
import { stipulatoriControllerFindManyStipulatoriByAccount } from '../fn/stipulatori/stipulatori-controller-find-many-stipulatori-by-account';
import { StipulatoriControllerFindManyStipulatoriByAccount$Params } from '../fn/stipulatori/stipulatori-controller-find-many-stipulatori-by-account';

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

  /** Path part for operation `stipulatoriControllerFindManyStipulatori()` */
  static readonly StipulatoriControllerFindManyStipulatoriPath = '/stipulatori';

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

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

  /** Path part for operation `stipulatoriControllerFindManyStipulatoriByAccount()` */
  static readonly StipulatoriControllerFindManyStipulatoriByAccountPath =
    '/stipulatori/by-accounts';

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

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