Advertisement
Guest User

default.service.ts

a guest
May 31st, 2021
173
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /**
  2.  * traccar
  3.  * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
  4.  *
  5.  * OpenAPI spec version: 4.8
  6.  *
  7.  *
  8.  * NOTE: This class is auto generated by the swagger code generator program.
  9.  * https://github.com/swagger-api/swagger-codegen.git
  10.  * Do not edit the class manually.
  11.  */
  12. /* tslint:disable:no-unused-variable member-ordering */
  13.  
  14. import { Inject, Injectable, Optional }                      from '@angular/core';
  15. import { HttpClient, HttpHeaders, HttpParams,
  16.          HttpResponse, HttpEvent }                           from '@angular/common/http';
  17. import { CustomHttpUrlEncodingCodec }                        from '../encoder';
  18.  
  19. import { Observable }                                        from 'rxjs/Observable';
  20.  
  21. import { Attribute } from '../model/attribute';
  22. import { Calendar } from '../model/calendar';
  23. import { Command } from '../model/command';
  24. import { CommandType } from '../model/commandType';
  25. import { Device } from '../model/device';
  26. import { DeviceAccumulators } from '../model/deviceAccumulators';
  27. import { Driver } from '../model/driver';
  28. import { Event } from '../model/event';
  29. import { Geofence } from '../model/geofence';
  30. import { Group } from '../model/group';
  31. import { Maintenance } from '../model/maintenance';
  32. import { Notification } from '../model/notification';
  33. import { NotificationType } from '../model/notificationType';
  34. import { Permission } from '../model/permission';
  35. import { Position } from '../model/position';
  36. import { ReportStops } from '../model/reportStops';
  37. import { ReportSummary } from '../model/reportSummary';
  38. import { ReportTrips } from '../model/reportTrips';
  39. import { Server } from '../model/server';
  40. import { Statistics } from '../model/statistics';
  41. import { User } from '../model/user';
  42.  
  43. import { BASE_PATH, COLLECTION_FORMATS }                     from '../variables';
  44. import { Configuration }                                     from '../configuration';
  45.  
  46.  
  47. @Injectable()
  48. export class DefaultService {
  49.  
  50.     public basePath = 'https://central.rdmrastreamento.com.br/api';
  51.     public defaultHeaders = new HttpHeaders();
  52.     public configuration = new Configuration();
  53.  
  54.     constructor(protected httpClient: HttpClient, @Optional()@Inject(BASE_PATH) basePath: string, @Optional() configuration: Configuration) {
  55.         if (basePath) {
  56.             this.basePath = basePath;
  57.         }
  58.         if (configuration) {
  59.             this.configuration = configuration;
  60.             this.basePath = basePath || configuration.basePath || this.basePath;
  61.         }
  62.     }
  63.  
  64.     /**
  65.      * @param consumes string[] mime-types
  66.      * @return true: consumes contains 'multipart/form-data', false: otherwise
  67.      */
  68.     private canConsumeForm(consumes: string[]): boolean {
  69.         const form = 'multipart/form-data';
  70.         for (const consume of consumes) {
  71.             if (form === consume) {
  72.                 return true;
  73.             }
  74.         }
  75.         return false;
  76.     }
  77.  
  78.  
  79.     /**
  80.      * Fetch a list of Attributes
  81.      * Without params, it returns a list of Attributes the user has access to
  82.      * @param all Can only be used by admins or managers to fetch all entities
  83.      * @param userId Standard users can use this only with their own _userId_
  84.      * @param deviceId Standard users can use this only with _deviceId_s, they have access to
  85.      * @param groupId Standard users can use this only with _groupId_s, they have access to
  86.      * @param refresh
  87.      * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
  88.      * @param reportProgress flag to report request and response progress.
  89.      */
  90.     public attributesComputedGet(all?: boolean, userId?: number, deviceId?: number, groupId?: number, refresh?: boolean, observe?: 'body', reportProgress?: boolean): Observable<Array<Attribute>>;
  91.     public attributesComputedGet(all?: boolean, userId?: number, deviceId?: number, groupId?: number, refresh?: boolean, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<Array<Attribute>>>;
  92.     public attributesComputedGet(all?: boolean, userId?: number, deviceId?: number, groupId?: number, refresh?: boolean, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<Array<Attribute>>>;
  93.     public attributesComputedGet(all?: boolean, userId?: number, deviceId?: number, groupId?: number, refresh?: boolean, observe: any = 'body', reportProgress: boolean = false ): Observable<any> {
  94.  
  95.  
  96.  
  97.  
  98.  
  99.  
  100.         let queryParameters = new HttpParams({encoder: new CustomHttpUrlEncodingCodec()});
  101.         if (all !== undefined && all !== null) {
  102.             queryParameters = queryParameters.set('all', <any>all);
  103.         }
  104.         if (userId !== undefined && userId !== null) {
  105.             queryParameters = queryParameters.set('userId', <any>userId);
  106.         }
  107.         if (deviceId !== undefined && deviceId !== null) {
  108.             queryParameters = queryParameters.set('deviceId', <any>deviceId);
  109.         }
  110.         if (groupId !== undefined && groupId !== null) {
  111.             queryParameters = queryParameters.set('groupId', <any>groupId);
  112.         }
  113.         if (refresh !== undefined && refresh !== null) {
  114.             queryParameters = queryParameters.set('refresh', <any>refresh);
  115.         }
  116.  
  117.         let headers = this.defaultHeaders;
  118.  
  119.         // authentication (basicAuth) required
  120.         if (this.configuration.username || this.configuration.password) {
  121.             headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password));
  122.         }
  123.  
  124.         // to determine the Accept header
  125.         let httpHeaderAccepts: string[] = [
  126.             'application/json'
  127.         ];
  128.         const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
  129.         if (httpHeaderAcceptSelected != undefined) {
  130.             headers = headers.set('Accept', httpHeaderAcceptSelected);
  131.         }
  132.  
  133.         // to determine the Content-Type header
  134.         const consumes: string[] = [
  135.             'application/json'
  136.         ];
  137.  
  138.         return this.httpClient.get<Array<Attribute>>(`${this.basePath}/attributes/computed`,
  139.             {
  140.                 params: queryParameters,
  141.                 withCredentials: this.configuration.withCredentials,
  142.                 headers: headers,
  143.                 observe: observe,
  144.                 reportProgress: reportProgress
  145.             }
  146.         );
  147.     }
  148.  
  149.     /**
  150.      * Delete an Attribute
  151.      *
  152.      * @param id
  153.      * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
  154.      * @param reportProgress flag to report request and response progress.
  155.      */
  156.     public attributesComputedIdDelete(id: number, observe?: 'body', reportProgress?: boolean): Observable<any>;
  157.     public attributesComputedIdDelete(id: number, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<any>>;
  158.     public attributesComputedIdDelete(id: number, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<any>>;
  159.     public attributesComputedIdDelete(id: number, observe: any = 'body', reportProgress: boolean = false ): Observable<any> {
  160.  
  161.         if (id === null || id === undefined) {
  162.             throw new Error('Required parameter id was null or undefined when calling attributesComputedIdDelete.');
  163.         }
  164.  
  165.         let headers = this.defaultHeaders;
  166.  
  167.         // authentication (basicAuth) required
  168.         if (this.configuration.username || this.configuration.password) {
  169.             headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password));
  170.         }
  171.  
  172.         // to determine the Accept header
  173.         let httpHeaderAccepts: string[] = [
  174.             'application/json'
  175.         ];
  176.         const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
  177.         if (httpHeaderAcceptSelected != undefined) {
  178.             headers = headers.set('Accept', httpHeaderAcceptSelected);
  179.         }
  180.  
  181.         // to determine the Content-Type header
  182.         const consumes: string[] = [
  183.             'application/json'
  184.         ];
  185.  
  186.         return this.httpClient.delete<any>(`${this.basePath}/attributes/computed/${encodeURIComponent(String(id))}`,
  187.             {
  188.                 withCredentials: this.configuration.withCredentials,
  189.                 headers: headers,
  190.                 observe: observe,
  191.                 reportProgress: reportProgress
  192.             }
  193.         );
  194.     }
  195.  
  196.     /**
  197.      * Update an Attribute
  198.      *
  199.      * @param id
  200.      * @param body
  201.      * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
  202.      * @param reportProgress flag to report request and response progress.
  203.      */
  204.     public attributesComputedIdPut(id: number, body: Attribute, observe?: 'body', reportProgress?: boolean): Observable<Attribute>;
  205.     public attributesComputedIdPut(id: number, body: Attribute, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<Attribute>>;
  206.     public attributesComputedIdPut(id: number, body: Attribute, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<Attribute>>;
  207.     public attributesComputedIdPut(id: number, body: Attribute, observe: any = 'body', reportProgress: boolean = false ): Observable<any> {
  208.  
  209.         if (id === null || id === undefined) {
  210.             throw new Error('Required parameter id was null or undefined when calling attributesComputedIdPut.');
  211.         }
  212.  
  213.         if (body === null || body === undefined) {
  214.             throw new Error('Required parameter body was null or undefined when calling attributesComputedIdPut.');
  215.         }
  216.  
  217.         let headers = this.defaultHeaders;
  218.  
  219.         // authentication (basicAuth) required
  220.         if (this.configuration.username || this.configuration.password) {
  221.             headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password));
  222.         }
  223.  
  224.         // to determine the Accept header
  225.         let httpHeaderAccepts: string[] = [
  226.             'application/json'
  227.         ];
  228.         const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
  229.         if (httpHeaderAcceptSelected != undefined) {
  230.             headers = headers.set('Accept', httpHeaderAcceptSelected);
  231.         }
  232.  
  233.         // to determine the Content-Type header
  234.         const consumes: string[] = [
  235.             'application/json'
  236.         ];
  237.         const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
  238.         if (httpContentTypeSelected != undefined) {
  239.             headers = headers.set('Content-Type', httpContentTypeSelected);
  240.         }
  241.  
  242.         return this.httpClient.put<Attribute>(`${this.basePath}/attributes/computed/${encodeURIComponent(String(id))}`,
  243.             body,
  244.             {
  245.                 withCredentials: this.configuration.withCredentials,
  246.                 headers: headers,
  247.                 observe: observe,
  248.                 reportProgress: reportProgress
  249.             }
  250.         );
  251.     }
  252.  
  253.     /**
  254.      * Create an Attribute
  255.      *
  256.      * @param body
  257.      * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
  258.      * @param reportProgress flag to report request and response progress.
  259.      */
  260.     public attributesComputedPost(body: Attribute, observe?: 'body', reportProgress?: boolean): Observable<Attribute>;
  261.     public attributesComputedPost(body: Attribute, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<Attribute>>;
  262.     public attributesComputedPost(body: Attribute, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<Attribute>>;
  263.     public attributesComputedPost(body: Attribute, observe: any = 'body', reportProgress: boolean = false ): Observable<any> {
  264.  
  265.         if (body === null || body === undefined) {
  266.             throw new Error('Required parameter body was null or undefined when calling attributesComputedPost.');
  267.         }
  268.  
  269.         let headers = this.defaultHeaders;
  270.  
  271.         // authentication (basicAuth) required
  272.         if (this.configuration.username || this.configuration.password) {
  273.             headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password));
  274.         }
  275.  
  276.         // to determine the Accept header
  277.         let httpHeaderAccepts: string[] = [
  278.             'application/json'
  279.         ];
  280.         const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
  281.         if (httpHeaderAcceptSelected != undefined) {
  282.             headers = headers.set('Accept', httpHeaderAcceptSelected);
  283.         }
  284.  
  285.         // to determine the Content-Type header
  286.         const consumes: string[] = [
  287.             'application/json'
  288.         ];
  289.         const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
  290.         if (httpContentTypeSelected != undefined) {
  291.             headers = headers.set('Content-Type', httpContentTypeSelected);
  292.         }
  293.  
  294.         return this.httpClient.post<Attribute>(`${this.basePath}/attributes/computed`,
  295.             body,
  296.             {
  297.                 withCredentials: this.configuration.withCredentials,
  298.                 headers: headers,
  299.                 observe: observe,
  300.                 reportProgress: reportProgress
  301.             }
  302.         );
  303.     }
  304.  
  305.     /**
  306.      * Fetch a list of Calendars
  307.      * Without params, it returns a list of Calendars the user has access to
  308.      * @param all Can only be used by admins or managers to fetch all entities
  309.      * @param userId Standard users can use this only with their own _userId_
  310.      * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
  311.      * @param reportProgress flag to report request and response progress.
  312.      */
  313.     public calendarsGet(all?: boolean, userId?: number, observe?: 'body', reportProgress?: boolean): Observable<Array<Calendar>>;
  314.     public calendarsGet(all?: boolean, userId?: number, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<Array<Calendar>>>;
  315.     public calendarsGet(all?: boolean, userId?: number, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<Array<Calendar>>>;
  316.     public calendarsGet(all?: boolean, userId?: number, observe: any = 'body', reportProgress: boolean = false ): Observable<any> {
  317.  
  318.  
  319.  
  320.         let queryParameters = new HttpParams({encoder: new CustomHttpUrlEncodingCodec()});
  321.         if (all !== undefined && all !== null) {
  322.             queryParameters = queryParameters.set('all', <any>all);
  323.         }
  324.         if (userId !== undefined && userId !== null) {
  325.             queryParameters = queryParameters.set('userId', <any>userId);
  326.         }
  327.  
  328.         let headers = this.defaultHeaders;
  329.  
  330.         // authentication (basicAuth) required
  331.         if (this.configuration.username || this.configuration.password) {
  332.             headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password));
  333.         }
  334.  
  335.         // to determine the Accept header
  336.         let httpHeaderAccepts: string[] = [
  337.             'application/json'
  338.         ];
  339.         const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
  340.         if (httpHeaderAcceptSelected != undefined) {
  341.             headers = headers.set('Accept', httpHeaderAcceptSelected);
  342.         }
  343.  
  344.         // to determine the Content-Type header
  345.         const consumes: string[] = [
  346.             'application/json'
  347.         ];
  348.  
  349.         return this.httpClient.get<Array<Calendar>>(`${this.basePath}/calendars`,
  350.             {
  351.                 params: queryParameters,
  352.                 withCredentials: this.configuration.withCredentials,
  353.                 headers: headers,
  354.                 observe: observe,
  355.                 reportProgress: reportProgress
  356.             }
  357.         );
  358.     }
  359.  
  360.     /**
  361.      * Delete a Calendar
  362.      *
  363.      * @param id
  364.      * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
  365.      * @param reportProgress flag to report request and response progress.
  366.      */
  367.     public calendarsIdDelete(id: number, observe?: 'body', reportProgress?: boolean): Observable<any>;
  368.     public calendarsIdDelete(id: number, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<any>>;
  369.     public calendarsIdDelete(id: number, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<any>>;
  370.     public calendarsIdDelete(id: number, observe: any = 'body', reportProgress: boolean = false ): Observable<any> {
  371.  
  372.         if (id === null || id === undefined) {
  373.             throw new Error('Required parameter id was null or undefined when calling calendarsIdDelete.');
  374.         }
  375.  
  376.         let headers = this.defaultHeaders;
  377.  
  378.         // authentication (basicAuth) required
  379.         if (this.configuration.username || this.configuration.password) {
  380.             headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password));
  381.         }
  382.  
  383.         // to determine the Accept header
  384.         let httpHeaderAccepts: string[] = [
  385.             'application/json'
  386.         ];
  387.         const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
  388.         if (httpHeaderAcceptSelected != undefined) {
  389.             headers = headers.set('Accept', httpHeaderAcceptSelected);
  390.         }
  391.  
  392.         // to determine the Content-Type header
  393.         const consumes: string[] = [
  394.             'application/json'
  395.         ];
  396.  
  397.         return this.httpClient.delete<any>(`${this.basePath}/calendars/${encodeURIComponent(String(id))}`,
  398.             {
  399.                 withCredentials: this.configuration.withCredentials,
  400.                 headers: headers,
  401.                 observe: observe,
  402.                 reportProgress: reportProgress
  403.             }
  404.         );
  405.     }
  406.  
  407.     /**
  408.      * Update a Calendar
  409.      *
  410.      * @param id
  411.      * @param body
  412.      * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
  413.      * @param reportProgress flag to report request and response progress.
  414.      */
  415.     public calendarsIdPut(id: number, body: Calendar, observe?: 'body', reportProgress?: boolean): Observable<Calendar>;
  416.     public calendarsIdPut(id: number, body: Calendar, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<Calendar>>;
  417.     public calendarsIdPut(id: number, body: Calendar, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<Calendar>>;
  418.     public calendarsIdPut(id: number, body: Calendar, observe: any = 'body', reportProgress: boolean = false ): Observable<any> {
  419.  
  420.         if (id === null || id === undefined) {
  421.             throw new Error('Required parameter id was null or undefined when calling calendarsIdPut.');
  422.         }
  423.  
  424.         if (body === null || body === undefined) {
  425.             throw new Error('Required parameter body was null or undefined when calling calendarsIdPut.');
  426.         }
  427.  
  428.         let headers = this.defaultHeaders;
  429.  
  430.         // authentication (basicAuth) required
  431.         if (this.configuration.username || this.configuration.password) {
  432.             headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password));
  433.         }
  434.  
  435.         // to determine the Accept header
  436.         let httpHeaderAccepts: string[] = [
  437.             'application/json'
  438.         ];
  439.         const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
  440.         if (httpHeaderAcceptSelected != undefined) {
  441.             headers = headers.set('Accept', httpHeaderAcceptSelected);
  442.         }
  443.  
  444.         // to determine the Content-Type header
  445.         const consumes: string[] = [
  446.             'application/json'
  447.         ];
  448.         const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
  449.         if (httpContentTypeSelected != undefined) {
  450.             headers = headers.set('Content-Type', httpContentTypeSelected);
  451.         }
  452.  
  453.         return this.httpClient.put<Calendar>(`${this.basePath}/calendars/${encodeURIComponent(String(id))}`,
  454.             body,
  455.             {
  456.                 withCredentials: this.configuration.withCredentials,
  457.                 headers: headers,
  458.                 observe: observe,
  459.                 reportProgress: reportProgress
  460.             }
  461.         );
  462.     }
  463.  
  464.     /**
  465.      * Create a Calendar
  466.      *
  467.      * @param body
  468.      * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
  469.      * @param reportProgress flag to report request and response progress.
  470.      */
  471.     public calendarsPost(body: Calendar, observe?: 'body', reportProgress?: boolean): Observable<Calendar>;
  472.     public calendarsPost(body: Calendar, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<Calendar>>;
  473.     public calendarsPost(body: Calendar, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<Calendar>>;
  474.     public calendarsPost(body: Calendar, observe: any = 'body', reportProgress: boolean = false ): Observable<any> {
  475.  
  476.         if (body === null || body === undefined) {
  477.             throw new Error('Required parameter body was null or undefined when calling calendarsPost.');
  478.         }
  479.  
  480.         let headers = this.defaultHeaders;
  481.  
  482.         // authentication (basicAuth) required
  483.         if (this.configuration.username || this.configuration.password) {
  484.             headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password));
  485.         }
  486.  
  487.         // to determine the Accept header
  488.         let httpHeaderAccepts: string[] = [
  489.             'application/json'
  490.         ];
  491.         const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
  492.         if (httpHeaderAcceptSelected != undefined) {
  493.             headers = headers.set('Accept', httpHeaderAcceptSelected);
  494.         }
  495.  
  496.         // to determine the Content-Type header
  497.         const consumes: string[] = [
  498.             'application/json'
  499.         ];
  500.         const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
  501.         if (httpContentTypeSelected != undefined) {
  502.             headers = headers.set('Content-Type', httpContentTypeSelected);
  503.         }
  504.  
  505.         return this.httpClient.post<Calendar>(`${this.basePath}/calendars`,
  506.             body,
  507.             {
  508.                 withCredentials: this.configuration.withCredentials,
  509.                 headers: headers,
  510.                 observe: observe,
  511.                 reportProgress: reportProgress
  512.             }
  513.         );
  514.     }
  515.  
  516.     /**
  517.      * Fetch a list of Saved Commands
  518.      * Without params, it returns a list of Drivers the user has access to
  519.      * @param all Can only be used by admins or managers to fetch all entities
  520.      * @param userId Standard users can use this only with their own _userId_
  521.      * @param deviceId Standard users can use this only with _deviceId_s, they have access to
  522.      * @param groupId Standard users can use this only with _groupId_s, they have access to
  523.      * @param refresh
  524.      * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
  525.      * @param reportProgress flag to report request and response progress.
  526.      */
  527.     public commandsGet(all?: boolean, userId?: number, deviceId?: number, groupId?: number, refresh?: boolean, observe?: 'body', reportProgress?: boolean): Observable<Array<Command>>;
  528.     public commandsGet(all?: boolean, userId?: number, deviceId?: number, groupId?: number, refresh?: boolean, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<Array<Command>>>;
  529.     public commandsGet(all?: boolean, userId?: number, deviceId?: number, groupId?: number, refresh?: boolean, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<Array<Command>>>;
  530.     public commandsGet(all?: boolean, userId?: number, deviceId?: number, groupId?: number, refresh?: boolean, observe: any = 'body', reportProgress: boolean = false ): Observable<any> {
  531.  
  532.  
  533.  
  534.  
  535.  
  536.  
  537.         let queryParameters = new HttpParams({encoder: new CustomHttpUrlEncodingCodec()});
  538.         if (all !== undefined && all !== null) {
  539.             queryParameters = queryParameters.set('all', <any>all);
  540.         }
  541.         if (userId !== undefined && userId !== null) {
  542.             queryParameters = queryParameters.set('userId', <any>userId);
  543.         }
  544.         if (deviceId !== undefined && deviceId !== null) {
  545.             queryParameters = queryParameters.set('deviceId', <any>deviceId);
  546.         }
  547.         if (groupId !== undefined && groupId !== null) {
  548.             queryParameters = queryParameters.set('groupId', <any>groupId);
  549.         }
  550.         if (refresh !== undefined && refresh !== null) {
  551.             queryParameters = queryParameters.set('refresh', <any>refresh);
  552.         }
  553.  
  554.         let headers = this.defaultHeaders;
  555.  
  556.         // authentication (basicAuth) required
  557.         if (this.configuration.username || this.configuration.password) {
  558.             headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password));
  559.         }
  560.  
  561.         // to determine the Accept header
  562.         let httpHeaderAccepts: string[] = [
  563.             'application/json'
  564.         ];
  565.         const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
  566.         if (httpHeaderAcceptSelected != undefined) {
  567.             headers = headers.set('Accept', httpHeaderAcceptSelected);
  568.         }
  569.  
  570.         // to determine the Content-Type header
  571.         const consumes: string[] = [
  572.             'application/json'
  573.         ];
  574.  
  575.         return this.httpClient.get<Array<Command>>(`${this.basePath}/commands`,
  576.             {
  577.                 params: queryParameters,
  578.                 withCredentials: this.configuration.withCredentials,
  579.                 headers: headers,
  580.                 observe: observe,
  581.                 reportProgress: reportProgress
  582.             }
  583.         );
  584.     }
  585.  
  586.     /**
  587.      * Delete a Saved Command
  588.      *
  589.      * @param id
  590.      * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
  591.      * @param reportProgress flag to report request and response progress.
  592.      */
  593.     public commandsIdDelete(id: number, observe?: 'body', reportProgress?: boolean): Observable<any>;
  594.     public commandsIdDelete(id: number, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<any>>;
  595.     public commandsIdDelete(id: number, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<any>>;
  596.     public commandsIdDelete(id: number, observe: any = 'body', reportProgress: boolean = false ): Observable<any> {
  597.  
  598.         if (id === null || id === undefined) {
  599.             throw new Error('Required parameter id was null or undefined when calling commandsIdDelete.');
  600.         }
  601.  
  602.         let headers = this.defaultHeaders;
  603.  
  604.         // authentication (basicAuth) required
  605.         if (this.configuration.username || this.configuration.password) {
  606.             headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password));
  607.         }
  608.  
  609.         // to determine the Accept header
  610.         let httpHeaderAccepts: string[] = [
  611.             'application/json'
  612.         ];
  613.         const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
  614.         if (httpHeaderAcceptSelected != undefined) {
  615.             headers = headers.set('Accept', httpHeaderAcceptSelected);
  616.         }
  617.  
  618.         // to determine the Content-Type header
  619.         const consumes: string[] = [
  620.             'application/json'
  621.         ];
  622.  
  623.         return this.httpClient.delete<any>(`${this.basePath}/commands/${encodeURIComponent(String(id))}`,
  624.             {
  625.                 withCredentials: this.configuration.withCredentials,
  626.                 headers: headers,
  627.                 observe: observe,
  628.                 reportProgress: reportProgress
  629.             }
  630.         );
  631.     }
  632.  
  633.     /**
  634.      * Update a Saved Command
  635.      *
  636.      * @param id
  637.      * @param body
  638.      * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
  639.      * @param reportProgress flag to report request and response progress.
  640.      */
  641.     public commandsIdPut(id: number, body: Command, observe?: 'body', reportProgress?: boolean): Observable<Command>;
  642.     public commandsIdPut(id: number, body: Command, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<Command>>;
  643.     public commandsIdPut(id: number, body: Command, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<Command>>;
  644.     public commandsIdPut(id: number, body: Command, observe: any = 'body', reportProgress: boolean = false ): Observable<any> {
  645.  
  646.         if (id === null || id === undefined) {
  647.             throw new Error('Required parameter id was null or undefined when calling commandsIdPut.');
  648.         }
  649.  
  650.         if (body === null || body === undefined) {
  651.             throw new Error('Required parameter body was null or undefined when calling commandsIdPut.');
  652.         }
  653.  
  654.         let headers = this.defaultHeaders;
  655.  
  656.         // authentication (basicAuth) required
  657.         if (this.configuration.username || this.configuration.password) {
  658.             headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password));
  659.         }
  660.  
  661.         // to determine the Accept header
  662.         let httpHeaderAccepts: string[] = [
  663.             'application/json'
  664.         ];
  665.         const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
  666.         if (httpHeaderAcceptSelected != undefined) {
  667.             headers = headers.set('Accept', httpHeaderAcceptSelected);
  668.         }
  669.  
  670.         // to determine the Content-Type header
  671.         const consumes: string[] = [
  672.             'application/json'
  673.         ];
  674.         const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
  675.         if (httpContentTypeSelected != undefined) {
  676.             headers = headers.set('Content-Type', httpContentTypeSelected);
  677.         }
  678.  
  679.         return this.httpClient.put<Command>(`${this.basePath}/commands/${encodeURIComponent(String(id))}`,
  680.             body,
  681.             {
  682.                 withCredentials: this.configuration.withCredentials,
  683.                 headers: headers,
  684.                 observe: observe,
  685.                 reportProgress: reportProgress
  686.             }
  687.         );
  688.     }
  689.  
  690.     /**
  691.      * Create a Saved Command
  692.      *
  693.      * @param body
  694.      * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
  695.      * @param reportProgress flag to report request and response progress.
  696.      */
  697.     public commandsPost(body: Command, observe?: 'body', reportProgress?: boolean): Observable<Command>;
  698.     public commandsPost(body: Command, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<Command>>;
  699.     public commandsPost(body: Command, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<Command>>;
  700.     public commandsPost(body: Command, observe: any = 'body', reportProgress: boolean = false ): Observable<any> {
  701.  
  702.         if (body === null || body === undefined) {
  703.             throw new Error('Required parameter body was null or undefined when calling commandsPost.');
  704.         }
  705.  
  706.         let headers = this.defaultHeaders;
  707.  
  708.         // authentication (basicAuth) required
  709.         if (this.configuration.username || this.configuration.password) {
  710.             headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password));
  711.         }
  712.  
  713.         // to determine the Accept header
  714.         let httpHeaderAccepts: string[] = [
  715.             'application/json'
  716.         ];
  717.         const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
  718.         if (httpHeaderAcceptSelected != undefined) {
  719.             headers = headers.set('Accept', httpHeaderAcceptSelected);
  720.         }
  721.  
  722.         // to determine the Content-Type header
  723.         const consumes: string[] = [
  724.             'application/json'
  725.         ];
  726.         const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
  727.         if (httpContentTypeSelected != undefined) {
  728.             headers = headers.set('Content-Type', httpContentTypeSelected);
  729.         }
  730.  
  731.         return this.httpClient.post<Command>(`${this.basePath}/commands`,
  732.             body,
  733.             {
  734.                 withCredentials: this.configuration.withCredentials,
  735.                 headers: headers,
  736.                 observe: observe,
  737.                 reportProgress: reportProgress
  738.             }
  739.         );
  740.     }
  741.  
  742.     /**
  743.      * Fetch a list of Saved Commands supported by Device at the moment
  744.      * Return a list of saved commands linked to Device and its groups, filtered by current Device protocol support
  745.      * @param deviceId Standard users can use this only with _deviceId_s, they have access to
  746.      * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
  747.      * @param reportProgress flag to report request and response progress.
  748.      */
  749.     public commandsSendGet(deviceId?: number, observe?: 'body', reportProgress?: boolean): Observable<Array<Command>>;
  750.     public commandsSendGet(deviceId?: number, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<Array<Command>>>;
  751.     public commandsSendGet(deviceId?: number, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<Array<Command>>>;
  752.     public commandsSendGet(deviceId?: number, observe: any = 'body', reportProgress: boolean = false ): Observable<any> {
  753.  
  754.  
  755.         let queryParameters = new HttpParams({encoder: new CustomHttpUrlEncodingCodec()});
  756.         if (deviceId !== undefined && deviceId !== null) {
  757.             queryParameters = queryParameters.set('deviceId', <any>deviceId);
  758.         }
  759.  
  760.         let headers = this.defaultHeaders;
  761.  
  762.         // authentication (basicAuth) required
  763.         if (this.configuration.username || this.configuration.password) {
  764.             headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password));
  765.         }
  766.  
  767.         // to determine the Accept header
  768.         let httpHeaderAccepts: string[] = [
  769.             'application/json'
  770.         ];
  771.         const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
  772.         if (httpHeaderAcceptSelected != undefined) {
  773.             headers = headers.set('Accept', httpHeaderAcceptSelected);
  774.         }
  775.  
  776.         // to determine the Content-Type header
  777.         const consumes: string[] = [
  778.             'application/json'
  779.         ];
  780.  
  781.         return this.httpClient.get<Array<Command>>(`${this.basePath}/commands/send`,
  782.             {
  783.                 params: queryParameters,
  784.                 withCredentials: this.configuration.withCredentials,
  785.                 headers: headers,
  786.                 observe: observe,
  787.                 reportProgress: reportProgress
  788.             }
  789.         );
  790.     }
  791.  
  792.     /**
  793.      * Despachar comandos para o dispositivo
  794.      * Despachar um novo comando ou Comando salvo se _body.id_ for definido
  795.      * @param body
  796.      * @param observe defina se deve ou não retornar os dados observáveis como o corpo, resposta ou eventos. o padrão é retornar o corpo.
  797.      * @param reportProgress sinalize para relatar o progresso da solicitação e da resposta.
  798.      */
  799.     public commandsSendPost(body: Command, observe?: 'body', reportProgress?: boolean): Observable<Command>;
  800.     public commandsSendPost(body: Command, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<Command>>;
  801.     public commandsSendPost(body: Command, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<Command>>;
  802.     public commandsSendPost(body: Command, observe: any = 'body', reportProgress: boolean = false ): Observable<any> {
  803.  
  804.         if (body === null || body === undefined) {
  805.             throw new Error('Required parameter body was null or undefined when calling commandsSendPost.');
  806.         }
  807.  
  808.         let headers = this.defaultHeaders;
  809.  
  810.         // authentication (basicAuth) required
  811.         if (this.configuration.username || this.configuration.password) {
  812.             headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password));
  813.         }
  814.  
  815.         // to determine the Accept header
  816.         let httpHeaderAccepts: string[] = [
  817.             'application/json'
  818.         ];
  819.         const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
  820.         if (httpHeaderAcceptSelected != undefined) {
  821.             headers = headers.set('Accept', httpHeaderAcceptSelected);
  822.         }
  823.  
  824.         // to determine the Content-Type header
  825.         const consumes: string[] = [
  826.             'application/json'
  827.         ];
  828.         const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
  829.         if (httpContentTypeSelected != undefined) {
  830.             headers = headers.set('Content-Type', httpContentTypeSelected);
  831.         }
  832.  
  833.         return this.httpClient.post<Command>(`${this.basePath}/commands/send`,
  834.             body,
  835.             {
  836.                 withCredentials: this.configuration.withCredentials,
  837.                 headers: headers,
  838.                 observe: observe,
  839.                 reportProgress: reportProgress
  840.             }
  841.         );
  842.     }
  843.  
  844.     /**
  845.      * Obtenha uma lista de comandos disponíveis para o dispositivo ou todos os comandos possíveis se o dispositivo for omitido
  846.      *
  847.      * @param deviceId Internal device identifier. Only works if device has already reported some locations
  848.      * @param protocol Protocol name. Can be used instead of device id
  849.      * @param textChannel When &#x60;true&#x60; return SMS commands. If not specified or &#x60;false&#x60; return data commands
  850.      * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
  851.      * @param reportProgress flag to report request and response progress.
  852.      */
  853.     public commandsTypesGet(deviceId?: number, protocol?: string, textChannel?: boolean, observe?: 'body', reportProgress?: boolean): Observable<Array<CommandType>>;
  854.     public commandsTypesGet(deviceId?: number, protocol?: string, textChannel?: boolean, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<Array<CommandType>>>;
  855.     public commandsTypesGet(deviceId?: number, protocol?: string, textChannel?: boolean, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<Array<CommandType>>>;
  856.     public commandsTypesGet(deviceId?: number, protocol?: string, textChannel?: boolean, observe: any = 'body', reportProgress: boolean = false ): Observable<any> {
  857.  
  858.  
  859.  
  860.  
  861.         let queryParameters = new HttpParams({encoder: new CustomHttpUrlEncodingCodec()});
  862.         if (deviceId !== undefined && deviceId !== null) {
  863.             queryParameters = queryParameters.set('deviceId', <any>deviceId);
  864.         }
  865.         if (protocol !== undefined && protocol !== null) {
  866.             queryParameters = queryParameters.set('protocol', <any>protocol);
  867.         }
  868.         if (textChannel !== undefined && textChannel !== null) {
  869.             queryParameters = queryParameters.set('textChannel', <any>textChannel);
  870.         }
  871.  
  872.         let headers = this.defaultHeaders;
  873.  
  874.         // authentication (basicAuth) required
  875.         if (this.configuration.username || this.configuration.password) {
  876.             headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password));
  877.         }
  878.  
  879.         // to determine the Accept header
  880.         let httpHeaderAccepts: string[] = [
  881.             'application/json'
  882.         ];
  883.         const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
  884.         if (httpHeaderAcceptSelected != undefined) {
  885.             headers = headers.set('Accept', httpHeaderAcceptSelected);
  886.         }
  887.  
  888.         // to determine the Content-Type header
  889.         const consumes: string[] = [
  890.             'application/json'
  891.         ];
  892.  
  893.         return this.httpClient.get<Array<CommandType>>(`${this.basePath}/commands/types`,
  894.             {
  895.                 params: queryParameters,
  896.                 withCredentials: this.configuration.withCredentials,
  897.                 headers: headers,
  898.                 observe: observe,
  899.                 reportProgress: reportProgress
  900.             }
  901.         );
  902.     }
  903.  
  904.     /**
  905.      * Fetch a list of Devices
  906.      * Without any params, returns a list of the user&#39;s devices
  907.      * @param all Can only be used by admins or managers to fetch all entities
  908.      * @param userId Standard users can use this only with their own _userId_
  909.      * @param id To fetch one or more devices. Multiple params can be passed like &#x60;id&#x3D;31&amp;id&#x3D;42&#x60;
  910.      * @param uniqueId To fetch one or more devices. Multiple params can be passed like &#x60;uniqueId&#x3D;333331&amp;uniqieId&#x3D;44442&#x60;
  911.      * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
  912.      * @param reportProgress flag to report request and response progress.
  913.      */
  914.     public devicesGet(all?: boolean, userId?: number, id?: number, uniqueId?: string, observe?: 'body', reportProgress?: boolean): Observable<Array<Device>>;
  915.     public devicesGet(all?: boolean, userId?: number, id?: number, uniqueId?: string, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<Array<Device>>>;
  916.     public devicesGet(all?: boolean, userId?: number, id?: number, uniqueId?: string, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<Array<Device>>>;
  917.     public devicesGet(all?: boolean, userId?: number, id?: number, uniqueId?: string, observe: any = 'body', reportProgress: boolean = false ): Observable<any> {
  918.  
  919.  
  920.  
  921.  
  922.  
  923.         let queryParameters = new HttpParams({encoder: new CustomHttpUrlEncodingCodec()});
  924.         if (all !== undefined && all !== null) {
  925.             queryParameters = queryParameters.set('all', <any>all);
  926.         }
  927.         if (userId !== undefined && userId !== null) {
  928.             queryParameters = queryParameters.set('userId', <any>userId);
  929.         }
  930.         if (id !== undefined && id !== null) {
  931.             queryParameters = queryParameters.set('id', <any>id);
  932.         }
  933.         if (uniqueId !== undefined && uniqueId !== null) {
  934.             queryParameters = queryParameters.set('uniqueId', <any>uniqueId);
  935.         }
  936.  
  937.         let headers = this.defaultHeaders;
  938.  
  939.         // authentication (basicAuth) required
  940.         if (this.configuration.username || this.configuration.password) {
  941.             headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password));
  942.         }
  943.  
  944.         // to determine the Accept header
  945.         let httpHeaderAccepts: string[] = [
  946.             'application/json'
  947.         ];
  948.         const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
  949.         if (httpHeaderAcceptSelected != undefined) {
  950.             headers = headers.set('Accept', httpHeaderAcceptSelected);
  951.         }
  952.  
  953.         // to determine the Content-Type header
  954.         const consumes: string[] = [
  955.             'application/json'
  956.         ];
  957.  
  958.         return this.httpClient.get<Array<Device>>(`${this.basePath}/devices`,
  959.             {
  960.                 params: queryParameters,
  961.                 withCredentials: this.configuration.withCredentials,
  962.                 headers: headers,
  963.                 observe: observe,
  964.                 reportProgress: reportProgress
  965.             }
  966.         );
  967.     }
  968.  
  969.     /**
  970.      * Update total distance and hours of the Device
  971.      *
  972.      * @param id
  973.      * @param body
  974.      * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
  975.      * @param reportProgress flag to report request and response progress.
  976.      */
  977.     public devicesIdAccumulatorsPut(id: number, body: DeviceAccumulators, observe?: 'body', reportProgress?: boolean): Observable<any>;
  978.     public devicesIdAccumulatorsPut(id: number, body: DeviceAccumulators, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<any>>;
  979.     public devicesIdAccumulatorsPut(id: number, body: DeviceAccumulators, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<any>>;
  980.     public devicesIdAccumulatorsPut(id: number, body: DeviceAccumulators, observe: any = 'body', reportProgress: boolean = false ): Observable<any> {
  981.  
  982.         if (id === null || id === undefined) {
  983.             throw new Error('Required parameter id was null or undefined when calling devicesIdAccumulatorsPut.');
  984.         }
  985.  
  986.         if (body === null || body === undefined) {
  987.             throw new Error('Required parameter body was null or undefined when calling devicesIdAccumulatorsPut.');
  988.         }
  989.  
  990.         let headers = this.defaultHeaders;
  991.  
  992.         // authentication (basicAuth) required
  993.         if (this.configuration.username || this.configuration.password) {
  994.             headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password));
  995.         }
  996.  
  997.         // to determine the Accept header
  998.         let httpHeaderAccepts: string[] = [
  999.             'application/json'
  1000.         ];
  1001.         const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
  1002.         if (httpHeaderAcceptSelected != undefined) {
  1003.             headers = headers.set('Accept', httpHeaderAcceptSelected);
  1004.         }
  1005.  
  1006.         // to determine the Content-Type header
  1007.         const consumes: string[] = [
  1008.             'application/json'
  1009.         ];
  1010.         const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
  1011.         if (httpContentTypeSelected != undefined) {
  1012.             headers = headers.set('Content-Type', httpContentTypeSelected);
  1013.         }
  1014.  
  1015.         return this.httpClient.put<any>(`${this.basePath}/devices/${encodeURIComponent(String(id))}/accumulators`,
  1016.             body,
  1017.             {
  1018.                 withCredentials: this.configuration.withCredentials,
  1019.                 headers: headers,
  1020.                 observe: observe,
  1021.                 reportProgress: reportProgress
  1022.             }
  1023.         );
  1024.     }
  1025.  
  1026.     /**
  1027.      * Delete a Device
  1028.      *
  1029.      * @param id
  1030.      * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
  1031.      * @param reportProgress flag to report request and response progress.
  1032.      */
  1033.     public devicesIdDelete(id: number, observe?: 'body', reportProgress?: boolean): Observable<any>;
  1034.     public devicesIdDelete(id: number, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<any>>;
  1035.     public devicesIdDelete(id: number, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<any>>;
  1036.     public devicesIdDelete(id: number, observe: any = 'body', reportProgress: boolean = false ): Observable<any> {
  1037.  
  1038.         if (id === null || id === undefined) {
  1039.             throw new Error('Required parameter id was null or undefined when calling devicesIdDelete.');
  1040.         }
  1041.  
  1042.         let headers = this.defaultHeaders;
  1043.  
  1044.         // authentication (basicAuth) required
  1045.         if (this.configuration.username || this.configuration.password) {
  1046.             headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password));
  1047.         }
  1048.  
  1049.         // to determine the Accept header
  1050.         let httpHeaderAccepts: string[] = [
  1051.             'application/json'
  1052.         ];
  1053.         const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
  1054.         if (httpHeaderAcceptSelected != undefined) {
  1055.             headers = headers.set('Accept', httpHeaderAcceptSelected);
  1056.         }
  1057.  
  1058.         // to determine the Content-Type header
  1059.         const consumes: string[] = [
  1060.             'application/json'
  1061.         ];
  1062.  
  1063.         return this.httpClient.delete<any>(`${this.basePath}/devices/${encodeURIComponent(String(id))}`,
  1064.             {
  1065.                 withCredentials: this.configuration.withCredentials,
  1066.                 headers: headers,
  1067.                 observe: observe,
  1068.                 reportProgress: reportProgress
  1069.             }
  1070.         );
  1071.     }
  1072.  
  1073.     /**
  1074.      * Update a Device
  1075.      *
  1076.      * @param id
  1077.      * @param body
  1078.      * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
  1079.      * @param reportProgress flag to report request and response progress.
  1080.      */
  1081.     public devicesIdPut(id: number, body: Device, observe?: 'body', reportProgress?: boolean): Observable<Device>;
  1082.     public devicesIdPut(id: number, body: Device, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<Device>>;
  1083.     public devicesIdPut(id: number, body: Device, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<Device>>;
  1084.     public devicesIdPut(id: number, body: Device, observe: any = 'body', reportProgress: boolean = false ): Observable<any> {
  1085.  
  1086.         if (id === null || id === undefined) {
  1087.             throw new Error('Required parameter id was null or undefined when calling devicesIdPut.');
  1088.         }
  1089.  
  1090.         if (body === null || body === undefined) {
  1091.             throw new Error('Required parameter body was null or undefined when calling devicesIdPut.');
  1092.         }
  1093.  
  1094.         let headers = this.defaultHeaders;
  1095.  
  1096.         // authentication (basicAuth) required
  1097.         if (this.configuration.username || this.configuration.password) {
  1098.             headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password));
  1099.         }
  1100.  
  1101.         // to determine the Accept header
  1102.         let httpHeaderAccepts: string[] = [
  1103.             'application/json'
  1104.         ];
  1105.         const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
  1106.         if (httpHeaderAcceptSelected != undefined) {
  1107.             headers = headers.set('Accept', httpHeaderAcceptSelected);
  1108.         }
  1109.  
  1110.         // to determine the Content-Type header
  1111.         const consumes: string[] = [
  1112.             'application/json'
  1113.         ];
  1114.         const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
  1115.         if (httpContentTypeSelected != undefined) {
  1116.             headers = headers.set('Content-Type', httpContentTypeSelected);
  1117.         }
  1118.  
  1119.         return this.httpClient.put<Device>(`${this.basePath}/devices/${encodeURIComponent(String(id))}`,
  1120.             body,
  1121.             {
  1122.                 withCredentials: this.configuration.withCredentials,
  1123.                 headers: headers,
  1124.                 observe: observe,
  1125.                 reportProgress: reportProgress
  1126.             }
  1127.         );
  1128.     }
  1129.  
  1130.     /**
  1131.      * Create a Device
  1132.      *
  1133.      * @param body
  1134.      * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
  1135.      * @param reportProgress flag to report request and response progress.
  1136.      */
  1137.     public devicesPost(body: Device, observe?: 'body', reportProgress?: boolean): Observable<Device>;
  1138.     public devicesPost(body: Device, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<Device>>;
  1139.     public devicesPost(body: Device, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<Device>>;
  1140.     public devicesPost(body: Device, observe: any = 'body', reportProgress: boolean = false ): Observable<any> {
  1141.  
  1142.         if (body === null || body === undefined) {
  1143.             throw new Error('Required parameter body was null or undefined when calling devicesPost.');
  1144.         }
  1145.  
  1146.         let headers = this.defaultHeaders;
  1147.  
  1148.         // authentication (basicAuth) required
  1149.         if (this.configuration.username || this.configuration.password) {
  1150.             headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password));
  1151.         }
  1152.  
  1153.         // to determine the Accept header
  1154.         let httpHeaderAccepts: string[] = [
  1155.             'application/json'
  1156.         ];
  1157.         const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
  1158.         if (httpHeaderAcceptSelected != undefined) {
  1159.             headers = headers.set('Accept', httpHeaderAcceptSelected);
  1160.         }
  1161.  
  1162.         // to determine the Content-Type header
  1163.         const consumes: string[] = [
  1164.             'application/json'
  1165.         ];
  1166.         const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
  1167.         if (httpContentTypeSelected != undefined) {
  1168.             headers = headers.set('Content-Type', httpContentTypeSelected);
  1169.         }
  1170.  
  1171.         return this.httpClient.post<Device>(`${this.basePath}/devices`,
  1172.             body,
  1173.             {
  1174.                 withCredentials: this.configuration.withCredentials,
  1175.                 headers: headers,
  1176.                 observe: observe,
  1177.                 reportProgress: reportProgress
  1178.             }
  1179.         );
  1180.     }
  1181.  
  1182.     /**
  1183.      * Fetch a list of Drivers
  1184.      * Without params, it returns a list of Drivers the user has access to
  1185.      * @param all Can only be used by admins or managers to fetch all entities
  1186.      * @param userId Standard users can use this only with their own _userId_
  1187.      * @param deviceId Standard users can use this only with _deviceId_s, they have access to
  1188.      * @param groupId Standard users can use this only with _groupId_s, they have access to
  1189.      * @param refresh
  1190.      * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
  1191.      * @param reportProgress flag to report request and response progress.
  1192.      */
  1193.     public driversGet(all?: boolean, userId?: number, deviceId?: number, groupId?: number, refresh?: boolean, observe?: 'body', reportProgress?: boolean): Observable<Array<Driver>>;
  1194.     public driversGet(all?: boolean, userId?: number, deviceId?: number, groupId?: number, refresh?: boolean, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<Array<Driver>>>;
  1195.     public driversGet(all?: boolean, userId?: number, deviceId?: number, groupId?: number, refresh?: boolean, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<Array<Driver>>>;
  1196.     public driversGet(all?: boolean, userId?: number, deviceId?: number, groupId?: number, refresh?: boolean, observe: any = 'body', reportProgress: boolean = false ): Observable<any> {
  1197.  
  1198.  
  1199.  
  1200.  
  1201.  
  1202.  
  1203.         let queryParameters = new HttpParams({encoder: new CustomHttpUrlEncodingCodec()});
  1204.         if (all !== undefined && all !== null) {
  1205.             queryParameters = queryParameters.set('all', <any>all);
  1206.         }
  1207.         if (userId !== undefined && userId !== null) {
  1208.             queryParameters = queryParameters.set('userId', <any>userId);
  1209.         }
  1210.         if (deviceId !== undefined && deviceId !== null) {
  1211.             queryParameters = queryParameters.set('deviceId', <any>deviceId);
  1212.         }
  1213.         if (groupId !== undefined && groupId !== null) {
  1214.             queryParameters = queryParameters.set('groupId', <any>groupId);
  1215.         }
  1216.         if (refresh !== undefined && refresh !== null) {
  1217.             queryParameters = queryParameters.set('refresh', <any>refresh);
  1218.         }
  1219.  
  1220.         let headers = this.defaultHeaders;
  1221.  
  1222.         // authentication (basicAuth) required
  1223.         if (this.configuration.username || this.configuration.password) {
  1224.             headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password));
  1225.         }
  1226.  
  1227.         // to determine the Accept header
  1228.         let httpHeaderAccepts: string[] = [
  1229.             'application/json'
  1230.         ];
  1231.         const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
  1232.         if (httpHeaderAcceptSelected != undefined) {
  1233.             headers = headers.set('Accept', httpHeaderAcceptSelected);
  1234.         }
  1235.  
  1236.         // to determine the Content-Type header
  1237.         const consumes: string[] = [
  1238.             'application/json'
  1239.         ];
  1240.  
  1241.         return this.httpClient.get<Array<Driver>>(`${this.basePath}/drivers`,
  1242.             {
  1243.                 params: queryParameters,
  1244.                 withCredentials: this.configuration.withCredentials,
  1245.                 headers: headers,
  1246.                 observe: observe,
  1247.                 reportProgress: reportProgress
  1248.             }
  1249.         );
  1250.     }
  1251.  
  1252.     /**
  1253.      * Delete a Driver
  1254.      *
  1255.      * @param id
  1256.      * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
  1257.      * @param reportProgress flag to report request and response progress.
  1258.      */
  1259.     public driversIdDelete(id: number, observe?: 'body', reportProgress?: boolean): Observable<any>;
  1260.     public driversIdDelete(id: number, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<any>>;
  1261.     public driversIdDelete(id: number, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<any>>;
  1262.     public driversIdDelete(id: number, observe: any = 'body', reportProgress: boolean = false ): Observable<any> {
  1263.  
  1264.         if (id === null || id === undefined) {
  1265.             throw new Error('Required parameter id was null or undefined when calling driversIdDelete.');
  1266.         }
  1267.  
  1268.         let headers = this.defaultHeaders;
  1269.  
  1270.         // authentication (basicAuth) required
  1271.         if (this.configuration.username || this.configuration.password) {
  1272.             headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password));
  1273.         }
  1274.  
  1275.         // to determine the Accept header
  1276.         let httpHeaderAccepts: string[] = [
  1277.             'application/json'
  1278.         ];
  1279.         const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
  1280.         if (httpHeaderAcceptSelected != undefined) {
  1281.             headers = headers.set('Accept', httpHeaderAcceptSelected);
  1282.         }
  1283.  
  1284.         // to determine the Content-Type header
  1285.         const consumes: string[] = [
  1286.             'application/json'
  1287.         ];
  1288.  
  1289.         return this.httpClient.delete<any>(`${this.basePath}/drivers/${encodeURIComponent(String(id))}`,
  1290.             {
  1291.                 withCredentials: this.configuration.withCredentials,
  1292.                 headers: headers,
  1293.                 observe: observe,
  1294.                 reportProgress: reportProgress
  1295.             }
  1296.         );
  1297.     }
  1298.  
  1299.     /**
  1300.      * Update a Driver
  1301.      *
  1302.      * @param id
  1303.      * @param body
  1304.      * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
  1305.      * @param reportProgress flag to report request and response progress.
  1306.      */
  1307.     public driversIdPut(id: number, body: Driver, observe?: 'body', reportProgress?: boolean): Observable<Driver>;
  1308.     public driversIdPut(id: number, body: Driver, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<Driver>>;
  1309.     public driversIdPut(id: number, body: Driver, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<Driver>>;
  1310.     public driversIdPut(id: number, body: Driver, observe: any = 'body', reportProgress: boolean = false ): Observable<any> {
  1311.  
  1312.         if (id === null || id === undefined) {
  1313.             throw new Error('Required parameter id was null or undefined when calling driversIdPut.');
  1314.         }
  1315.  
  1316.         if (body === null || body === undefined) {
  1317.             throw new Error('Required parameter body was null or undefined when calling driversIdPut.');
  1318.         }
  1319.  
  1320.         let headers = this.defaultHeaders;
  1321.  
  1322.         // authentication (basicAuth) required
  1323.         if (this.configuration.username || this.configuration.password) {
  1324.             headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password));
  1325.         }
  1326.  
  1327.         // to determine the Accept header
  1328.         let httpHeaderAccepts: string[] = [
  1329.             'application/json'
  1330.         ];
  1331.         const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
  1332.         if (httpHeaderAcceptSelected != undefined) {
  1333.             headers = headers.set('Accept', httpHeaderAcceptSelected);
  1334.         }
  1335.  
  1336.         // to determine the Content-Type header
  1337.         const consumes: string[] = [
  1338.             'application/json'
  1339.         ];
  1340.         const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
  1341.         if (httpContentTypeSelected != undefined) {
  1342.             headers = headers.set('Content-Type', httpContentTypeSelected);
  1343.         }
  1344.  
  1345.         return this.httpClient.put<Driver>(`${this.basePath}/drivers/${encodeURIComponent(String(id))}`,
  1346.             body,
  1347.             {
  1348.                 withCredentials: this.configuration.withCredentials,
  1349.                 headers: headers,
  1350.                 observe: observe,
  1351.                 reportProgress: reportProgress
  1352.             }
  1353.         );
  1354.     }
  1355.  
  1356.     /**
  1357.      * Create a Driver
  1358.      *
  1359.      * @param body
  1360.      * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
  1361.      * @param reportProgress flag to report request and response progress.
  1362.      */
  1363.     public driversPost(body: Driver, observe?: 'body', reportProgress?: boolean): Observable<Driver>;
  1364.     public driversPost(body: Driver, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<Driver>>;
  1365.     public driversPost(body: Driver, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<Driver>>;
  1366.     public driversPost(body: Driver, observe: any = 'body', reportProgress: boolean = false ): Observable<any> {
  1367.  
  1368.         if (body === null || body === undefined) {
  1369.             throw new Error('Required parameter body was null or undefined when calling driversPost.');
  1370.         }
  1371.  
  1372.         let headers = this.defaultHeaders;
  1373.  
  1374.         // authentication (basicAuth) required
  1375.         if (this.configuration.username || this.configuration.password) {
  1376.             headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password));
  1377.         }
  1378.  
  1379.         // to determine the Accept header
  1380.         let httpHeaderAccepts: string[] = [
  1381.             'application/json'
  1382.         ];
  1383.         const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
  1384.         if (httpHeaderAcceptSelected != undefined) {
  1385.             headers = headers.set('Accept', httpHeaderAcceptSelected);
  1386.         }
  1387.  
  1388.         // to determine the Content-Type header
  1389.         const consumes: string[] = [
  1390.             'application/json'
  1391.         ];
  1392.         const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
  1393.         if (httpContentTypeSelected != undefined) {
  1394.             headers = headers.set('Content-Type', httpContentTypeSelected);
  1395.         }
  1396.  
  1397.         return this.httpClient.post<Driver>(`${this.basePath}/drivers`,
  1398.             body,
  1399.             {
  1400.                 withCredentials: this.configuration.withCredentials,
  1401.                 headers: headers,
  1402.                 observe: observe,
  1403.                 reportProgress: reportProgress
  1404.             }
  1405.         );
  1406.     }
  1407.  
  1408.     /**
  1409.      *
  1410.      *
  1411.      * @param id
  1412.      * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
  1413.      * @param reportProgress flag to report request and response progress.
  1414.      */
  1415.     public eventsIdGet(id: number, observe?: 'body', reportProgress?: boolean): Observable<Event>;
  1416.     public eventsIdGet(id: number, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<Event>>;
  1417.     public eventsIdGet(id: number, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<Event>>;
  1418.     public eventsIdGet(id: number, observe: any = 'body', reportProgress: boolean = false ): Observable<any> {
  1419.  
  1420.         if (id === null || id === undefined) {
  1421.             throw new Error('Required parameter id was null or undefined when calling eventsIdGet.');
  1422.         }
  1423.  
  1424.         let headers = this.defaultHeaders;
  1425.  
  1426.         // authentication (basicAuth) required
  1427.         if (this.configuration.username || this.configuration.password) {
  1428.             headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password));
  1429.         }
  1430.  
  1431.         // to determine the Accept header
  1432.         let httpHeaderAccepts: string[] = [
  1433.             'application/json'
  1434.         ];
  1435.         const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
  1436.         if (httpHeaderAcceptSelected != undefined) {
  1437.             headers = headers.set('Accept', httpHeaderAcceptSelected);
  1438.         }
  1439.  
  1440.         // to determine the Content-Type header
  1441.         const consumes: string[] = [
  1442.             'application/json'
  1443.         ];
  1444.  
  1445.         return this.httpClient.get<Event>(`${this.basePath}/events/${encodeURIComponent(String(id))}`,
  1446.             {
  1447.                 withCredentials: this.configuration.withCredentials,
  1448.                 headers: headers,
  1449.                 observe: observe,
  1450.                 reportProgress: reportProgress
  1451.             }
  1452.         );
  1453.     }
  1454.  
  1455.     /**
  1456.      * Fetch a list of Geofences
  1457.      * Without params, it returns a list of Geofences the user has access to
  1458.      * @param all Can only be used by admins or managers to fetch all entities
  1459.      * @param userId Standard users can use this only with their own _userId_
  1460.      * @param deviceId Standard users can use this only with _deviceId_s, they have access to
  1461.      * @param groupId Standard users can use this only with _groupId_s, they have access to
  1462.      * @param refresh
  1463.      * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
  1464.      * @param reportProgress flag to report request and response progress.
  1465.      */
  1466.     public geofencesGet(all?: boolean, userId?: number, deviceId?: number, groupId?: number, refresh?: boolean, observe?: 'body', reportProgress?: boolean): Observable<Array<Geofence>>;
  1467.     public geofencesGet(all?: boolean, userId?: number, deviceId?: number, groupId?: number, refresh?: boolean, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<Array<Geofence>>>;
  1468.     public geofencesGet(all?: boolean, userId?: number, deviceId?: number, groupId?: number, refresh?: boolean, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<Array<Geofence>>>;
  1469.     public geofencesGet(all?: boolean, userId?: number, deviceId?: number, groupId?: number, refresh?: boolean, observe: any = 'body', reportProgress: boolean = false ): Observable<any> {
  1470.  
  1471.  
  1472.  
  1473.  
  1474.  
  1475.  
  1476.         let queryParameters = new HttpParams({encoder: new CustomHttpUrlEncodingCodec()});
  1477.         if (all !== undefined && all !== null) {
  1478.             queryParameters = queryParameters.set('all', <any>all);
  1479.         }
  1480.         if (userId !== undefined && userId !== null) {
  1481.             queryParameters = queryParameters.set('userId', <any>userId);
  1482.         }
  1483.         if (deviceId !== undefined && deviceId !== null) {
  1484.             queryParameters = queryParameters.set('deviceId', <any>deviceId);
  1485.         }
  1486.         if (groupId !== undefined && groupId !== null) {
  1487.             queryParameters = queryParameters.set('groupId', <any>groupId);
  1488.         }
  1489.         if (refresh !== undefined && refresh !== null) {
  1490.             queryParameters = queryParameters.set('refresh', <any>refresh);
  1491.         }
  1492.  
  1493.         let headers = this.defaultHeaders;
  1494.  
  1495.         // authentication (basicAuth) required
  1496.         if (this.configuration.username || this.configuration.password) {
  1497.             headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password));
  1498.         }
  1499.  
  1500.         // to determine the Accept header
  1501.         let httpHeaderAccepts: string[] = [
  1502.             'application/json'
  1503.         ];
  1504.         const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
  1505.         if (httpHeaderAcceptSelected != undefined) {
  1506.             headers = headers.set('Accept', httpHeaderAcceptSelected);
  1507.         }
  1508.  
  1509.         // to determine the Content-Type header
  1510.         const consumes: string[] = [
  1511.             'application/json'
  1512.         ];
  1513.  
  1514.         return this.httpClient.get<Array<Geofence>>(`${this.basePath}/geofences`,
  1515.             {
  1516.                 params: queryParameters,
  1517.                 withCredentials: this.configuration.withCredentials,
  1518.                 headers: headers,
  1519.                 observe: observe,
  1520.                 reportProgress: reportProgress
  1521.             }
  1522.         );
  1523.     }
  1524.  
  1525.     /**
  1526.      * Delete a Geofence
  1527.      *
  1528.      * @param id
  1529.      * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
  1530.      * @param reportProgress flag to report request and response progress.
  1531.      */
  1532.     public geofencesIdDelete(id: number, observe?: 'body', reportProgress?: boolean): Observable<any>;
  1533.     public geofencesIdDelete(id: number, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<any>>;
  1534.     public geofencesIdDelete(id: number, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<any>>;
  1535.     public geofencesIdDelete(id: number, observe: any = 'body', reportProgress: boolean = false ): Observable<any> {
  1536.  
  1537.         if (id === null || id === undefined) {
  1538.             throw new Error('Required parameter id was null or undefined when calling geofencesIdDelete.');
  1539.         }
  1540.  
  1541.         let headers = this.defaultHeaders;
  1542.  
  1543.         // authentication (basicAuth) required
  1544.         if (this.configuration.username || this.configuration.password) {
  1545.             headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password));
  1546.         }
  1547.  
  1548.         // to determine the Accept header
  1549.         let httpHeaderAccepts: string[] = [
  1550.             'application/json'
  1551.         ];
  1552.         const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
  1553.         if (httpHeaderAcceptSelected != undefined) {
  1554.             headers = headers.set('Accept', httpHeaderAcceptSelected);
  1555.         }
  1556.  
  1557.         // to determine the Content-Type header
  1558.         const consumes: string[] = [
  1559.             'application/json'
  1560.         ];
  1561.  
  1562.         return this.httpClient.delete<any>(`${this.basePath}/geofences/${encodeURIComponent(String(id))}`,
  1563.             {
  1564.                 withCredentials: this.configuration.withCredentials,
  1565.                 headers: headers,
  1566.                 observe: observe,
  1567.                 reportProgress: reportProgress
  1568.             }
  1569.         );
  1570.     }
  1571.  
  1572.     /**
  1573.      * Update a Geofence
  1574.      *
  1575.      * @param id
  1576.      * @param body
  1577.      * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
  1578.      * @param reportProgress flag to report request and response progress.
  1579.      */
  1580.     public geofencesIdPut(id: number, body: Geofence, observe?: 'body', reportProgress?: boolean): Observable<Geofence>;
  1581.     public geofencesIdPut(id: number, body: Geofence, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<Geofence>>;
  1582.     public geofencesIdPut(id: number, body: Geofence, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<Geofence>>;
  1583.     public geofencesIdPut(id: number, body: Geofence, observe: any = 'body', reportProgress: boolean = false ): Observable<any> {
  1584.  
  1585.         if (id === null || id === undefined) {
  1586.             throw new Error('Required parameter id was null or undefined when calling geofencesIdPut.');
  1587.         }
  1588.  
  1589.         if (body === null || body === undefined) {
  1590.             throw new Error('Required parameter body was null or undefined when calling geofencesIdPut.');
  1591.         }
  1592.  
  1593.         let headers = this.defaultHeaders;
  1594.  
  1595.         // authentication (basicAuth) required
  1596.         if (this.configuration.username || this.configuration.password) {
  1597.             headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password));
  1598.         }
  1599.  
  1600.         // to determine the Accept header
  1601.         let httpHeaderAccepts: string[] = [
  1602.             'application/json'
  1603.         ];
  1604.         const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
  1605.         if (httpHeaderAcceptSelected != undefined) {
  1606.             headers = headers.set('Accept', httpHeaderAcceptSelected);
  1607.         }
  1608.  
  1609.         // to determine the Content-Type header
  1610.         const consumes: string[] = [
  1611.             'application/json'
  1612.         ];
  1613.         const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
  1614.         if (httpContentTypeSelected != undefined) {
  1615.             headers = headers.set('Content-Type', httpContentTypeSelected);
  1616.         }
  1617.  
  1618.         return this.httpClient.put<Geofence>(`${this.basePath}/geofences/${encodeURIComponent(String(id))}`,
  1619.             body,
  1620.             {
  1621.                 withCredentials: this.configuration.withCredentials,
  1622.                 headers: headers,
  1623.                 observe: observe,
  1624.                 reportProgress: reportProgress
  1625.             }
  1626.         );
  1627.     }
  1628.  
  1629.     /**
  1630.      * Create a Geofence
  1631.      *
  1632.      * @param body
  1633.      * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
  1634.      * @param reportProgress flag to report request and response progress.
  1635.      */
  1636.     public geofencesPost(body: Geofence, observe?: 'body', reportProgress?: boolean): Observable<Geofence>;
  1637.     public geofencesPost(body: Geofence, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<Geofence>>;
  1638.     public geofencesPost(body: Geofence, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<Geofence>>;
  1639.     public geofencesPost(body: Geofence, observe: any = 'body', reportProgress: boolean = false ): Observable<any> {
  1640.  
  1641.         if (body === null || body === undefined) {
  1642.             throw new Error('Required parameter body was null or undefined when calling geofencesPost.');
  1643.         }
  1644.  
  1645.         let headers = this.defaultHeaders;
  1646.  
  1647.         // authentication (basicAuth) required
  1648.         if (this.configuration.username || this.configuration.password) {
  1649.             headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password));
  1650.         }
  1651.  
  1652.         // to determine the Accept header
  1653.         let httpHeaderAccepts: string[] = [
  1654.             'application/json'
  1655.         ];
  1656.         const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
  1657.         if (httpHeaderAcceptSelected != undefined) {
  1658.             headers = headers.set('Accept', httpHeaderAcceptSelected);
  1659.         }
  1660.  
  1661.         // to determine the Content-Type header
  1662.         const consumes: string[] = [
  1663.             'application/json'
  1664.         ];
  1665.         const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
  1666.         if (httpContentTypeSelected != undefined) {
  1667.             headers = headers.set('Content-Type', httpContentTypeSelected);
  1668.         }
  1669.  
  1670.         return this.httpClient.post<Geofence>(`${this.basePath}/geofences`,
  1671.             body,
  1672.             {
  1673.                 withCredentials: this.configuration.withCredentials,
  1674.                 headers: headers,
  1675.                 observe: observe,
  1676.                 reportProgress: reportProgress
  1677.             }
  1678.         );
  1679.     }
  1680.  
  1681.     /**
  1682.      * Fetch a list of Groups
  1683.      * Without any params, returns a list of the Groups the user belongs to
  1684.      * @param all Can only be used by admins or managers to fetch all entities
  1685.      * @param userId Standard users can use this only with their own _userId_
  1686.      * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
  1687.      * @param reportProgress flag to report request and response progress.
  1688.      */
  1689.     public groupsGet(all?: boolean, userId?: number, observe?: 'body', reportProgress?: boolean): Observable<Array<Group>>;
  1690.     public groupsGet(all?: boolean, userId?: number, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<Array<Group>>>;
  1691.     public groupsGet(all?: boolean, userId?: number, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<Array<Group>>>;
  1692.     public groupsGet(all?: boolean, userId?: number, observe: any = 'body', reportProgress: boolean = false ): Observable<any> {
  1693.  
  1694.  
  1695.  
  1696.         let queryParameters = new HttpParams({encoder: new CustomHttpUrlEncodingCodec()});
  1697.         if (all !== undefined && all !== null) {
  1698.             queryParameters = queryParameters.set('all', <any>all);
  1699.         }
  1700.         if (userId !== undefined && userId !== null) {
  1701.             queryParameters = queryParameters.set('userId', <any>userId);
  1702.         }
  1703.  
  1704.         let headers = this.defaultHeaders;
  1705.  
  1706.         // authentication (basicAuth) required
  1707.         if (this.configuration.username || this.configuration.password) {
  1708.             headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password));
  1709.         }
  1710.  
  1711.         // to determine the Accept header
  1712.         let httpHeaderAccepts: string[] = [
  1713.             'application/json'
  1714.         ];
  1715.         const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
  1716.         if (httpHeaderAcceptSelected != undefined) {
  1717.             headers = headers.set('Accept', httpHeaderAcceptSelected);
  1718.         }
  1719.  
  1720.         // to determine the Content-Type header
  1721.         const consumes: string[] = [
  1722.             'application/json'
  1723.         ];
  1724.  
  1725.         return this.httpClient.get<Array<Group>>(`${this.basePath}/groups`,
  1726.             {
  1727.                 params: queryParameters,
  1728.                 withCredentials: this.configuration.withCredentials,
  1729.                 headers: headers,
  1730.                 observe: observe,
  1731.                 reportProgress: reportProgress
  1732.             }
  1733.         );
  1734.     }
  1735.  
  1736.     /**
  1737.      * Delete a Group
  1738.      *
  1739.      * @param id
  1740.      * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
  1741.      * @param reportProgress flag to report request and response progress.
  1742.      */
  1743.     public groupsIdDelete(id: number, observe?: 'body', reportProgress?: boolean): Observable<any>;
  1744.     public groupsIdDelete(id: number, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<any>>;
  1745.     public groupsIdDelete(id: number, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<any>>;
  1746.     public groupsIdDelete(id: number, observe: any = 'body', reportProgress: boolean = false ): Observable<any> {
  1747.  
  1748.         if (id === null || id === undefined) {
  1749.             throw new Error('Required parameter id was null or undefined when calling groupsIdDelete.');
  1750.         }
  1751.  
  1752.         let headers = this.defaultHeaders;
  1753.  
  1754.         // authentication (basicAuth) required
  1755.         if (this.configuration.username || this.configuration.password) {
  1756.             headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password));
  1757.         }
  1758.  
  1759.         // to determine the Accept header
  1760.         let httpHeaderAccepts: string[] = [
  1761.             'application/json'
  1762.         ];
  1763.         const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
  1764.         if (httpHeaderAcceptSelected != undefined) {
  1765.             headers = headers.set('Accept', httpHeaderAcceptSelected);
  1766.         }
  1767.  
  1768.         // to determine the Content-Type header
  1769.         const consumes: string[] = [
  1770.             'application/json'
  1771.         ];
  1772.  
  1773.         return this.httpClient.delete<any>(`${this.basePath}/groups/${encodeURIComponent(String(id))}`,
  1774.             {
  1775.                 withCredentials: this.configuration.withCredentials,
  1776.                 headers: headers,
  1777.                 observe: observe,
  1778.                 reportProgress: reportProgress
  1779.             }
  1780.         );
  1781.     }
  1782.  
  1783.     /**
  1784.      * Update a Group
  1785.      *
  1786.      * @param id
  1787.      * @param body
  1788.      * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
  1789.      * @param reportProgress flag to report request and response progress.
  1790.      */
  1791.     public groupsIdPut(id: number, body: Group, observe?: 'body', reportProgress?: boolean): Observable<Group>;
  1792.     public groupsIdPut(id: number, body: Group, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<Group>>;
  1793.     public groupsIdPut(id: number, body: Group, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<Group>>;
  1794.     public groupsIdPut(id: number, body: Group, observe: any = 'body', reportProgress: boolean = false ): Observable<any> {
  1795.  
  1796.         if (id === null || id === undefined) {
  1797.             throw new Error('Required parameter id was null or undefined when calling groupsIdPut.');
  1798.         }
  1799.  
  1800.         if (body === null || body === undefined) {
  1801.             throw new Error('Required parameter body was null or undefined when calling groupsIdPut.');
  1802.         }
  1803.  
  1804.         let headers = this.defaultHeaders;
  1805.  
  1806.         // authentication (basicAuth) required
  1807.         if (this.configuration.username || this.configuration.password) {
  1808.             headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password));
  1809.         }
  1810.  
  1811.         // to determine the Accept header
  1812.         let httpHeaderAccepts: string[] = [
  1813.             'application/json'
  1814.         ];
  1815.         const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
  1816.         if (httpHeaderAcceptSelected != undefined) {
  1817.             headers = headers.set('Accept', httpHeaderAcceptSelected);
  1818.         }
  1819.  
  1820.         // to determine the Content-Type header
  1821.         const consumes: string[] = [
  1822.             'application/json'
  1823.         ];
  1824.         const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
  1825.         if (httpContentTypeSelected != undefined) {
  1826.             headers = headers.set('Content-Type', httpContentTypeSelected);
  1827.         }
  1828.  
  1829.         return this.httpClient.put<Group>(`${this.basePath}/groups/${encodeURIComponent(String(id))}`,
  1830.             body,
  1831.             {
  1832.                 withCredentials: this.configuration.withCredentials,
  1833.                 headers: headers,
  1834.                 observe: observe,
  1835.                 reportProgress: reportProgress
  1836.             }
  1837.         );
  1838.     }
  1839.  
  1840.     /**
  1841.      * Create a Group
  1842.      *
  1843.      * @param body
  1844.      * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
  1845.      * @param reportProgress flag to report request and response progress.
  1846.      */
  1847.     public groupsPost(body: Group, observe?: 'body', reportProgress?: boolean): Observable<Group>;
  1848.     public groupsPost(body: Group, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<Group>>;
  1849.     public groupsPost(body: Group, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<Group>>;
  1850.     public groupsPost(body: Group, observe: any = 'body', reportProgress: boolean = false ): Observable<any> {
  1851.  
  1852.         if (body === null || body === undefined) {
  1853.             throw new Error('Required parameter body was null or undefined when calling groupsPost.');
  1854.         }
  1855.  
  1856.         let headers = this.defaultHeaders;
  1857.  
  1858.         // authentication (basicAuth) required
  1859.         if (this.configuration.username || this.configuration.password) {
  1860.             headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password));
  1861.         }
  1862.  
  1863.         // to determine the Accept header
  1864.         let httpHeaderAccepts: string[] = [
  1865.             'application/json'
  1866.         ];
  1867.         const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
  1868.         if (httpHeaderAcceptSelected != undefined) {
  1869.             headers = headers.set('Accept', httpHeaderAcceptSelected);
  1870.         }
  1871.  
  1872.         // to determine the Content-Type header
  1873.         const consumes: string[] = [
  1874.             'application/json'
  1875.         ];
  1876.         const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
  1877.         if (httpContentTypeSelected != undefined) {
  1878.             headers = headers.set('Content-Type', httpContentTypeSelected);
  1879.         }
  1880.  
  1881.         return this.httpClient.post<Group>(`${this.basePath}/groups`,
  1882.             body,
  1883.             {
  1884.                 withCredentials: this.configuration.withCredentials,
  1885.                 headers: headers,
  1886.                 observe: observe,
  1887.                 reportProgress: reportProgress
  1888.             }
  1889.         );
  1890.     }
  1891.  
  1892.     /**
  1893.      * Fetch a list of Maintenance
  1894.      * Without params, it returns a list of Maintenance the user has access to
  1895.      * @param all Can only be used by admins or managers to fetch all entities
  1896.      * @param userId Standard users can use this only with their own _userId_
  1897.      * @param deviceId Standard users can use this only with _deviceId_s, they have access to
  1898.      * @param groupId Standard users can use this only with _groupId_s, they have access to
  1899.      * @param refresh
  1900.      * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
  1901.      * @param reportProgress flag to report request and response progress.
  1902.      */
  1903.     public maintenanceGet(all?: boolean, userId?: number, deviceId?: number, groupId?: number, refresh?: boolean, observe?: 'body', reportProgress?: boolean): Observable<Array<Maintenance>>;
  1904.     public maintenanceGet(all?: boolean, userId?: number, deviceId?: number, groupId?: number, refresh?: boolean, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<Array<Maintenance>>>;
  1905.     public maintenanceGet(all?: boolean, userId?: number, deviceId?: number, groupId?: number, refresh?: boolean, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<Array<Maintenance>>>;
  1906.     public maintenanceGet(all?: boolean, userId?: number, deviceId?: number, groupId?: number, refresh?: boolean, observe: any = 'body', reportProgress: boolean = false ): Observable<any> {
  1907.  
  1908.  
  1909.  
  1910.  
  1911.  
  1912.  
  1913.         let queryParameters = new HttpParams({encoder: new CustomHttpUrlEncodingCodec()});
  1914.         if (all !== undefined && all !== null) {
  1915.             queryParameters = queryParameters.set('all', <any>all);
  1916.         }
  1917.         if (userId !== undefined && userId !== null) {
  1918.             queryParameters = queryParameters.set('userId', <any>userId);
  1919.         }
  1920.         if (deviceId !== undefined && deviceId !== null) {
  1921.             queryParameters = queryParameters.set('deviceId', <any>deviceId);
  1922.         }
  1923.         if (groupId !== undefined && groupId !== null) {
  1924.             queryParameters = queryParameters.set('groupId', <any>groupId);
  1925.         }
  1926.         if (refresh !== undefined && refresh !== null) {
  1927.             queryParameters = queryParameters.set('refresh', <any>refresh);
  1928.         }
  1929.  
  1930.         let headers = this.defaultHeaders;
  1931.  
  1932.         // authentication (basicAuth) required
  1933.         if (this.configuration.username || this.configuration.password) {
  1934.             headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password));
  1935.         }
  1936.  
  1937.         // to determine the Accept header
  1938.         let httpHeaderAccepts: string[] = [
  1939.             'application/json'
  1940.         ];
  1941.         const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
  1942.         if (httpHeaderAcceptSelected != undefined) {
  1943.             headers = headers.set('Accept', httpHeaderAcceptSelected);
  1944.         }
  1945.  
  1946.         // to determine the Content-Type header
  1947.         const consumes: string[] = [
  1948.             'application/json'
  1949.         ];
  1950.  
  1951.         return this.httpClient.get<Array<Maintenance>>(`${this.basePath}/maintenance`,
  1952.             {
  1953.                 params: queryParameters,
  1954.                 withCredentials: this.configuration.withCredentials,
  1955.                 headers: headers,
  1956.                 observe: observe,
  1957.                 reportProgress: reportProgress
  1958.             }
  1959.         );
  1960.     }
  1961.  
  1962.     /**
  1963.      * Delete a Maintenance
  1964.      *
  1965.      * @param id
  1966.      * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
  1967.      * @param reportProgress flag to report request and response progress.
  1968.      */
  1969.     public maintenanceIdDelete(id: number, observe?: 'body', reportProgress?: boolean): Observable<any>;
  1970.     public maintenanceIdDelete(id: number, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<any>>;
  1971.     public maintenanceIdDelete(id: number, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<any>>;
  1972.     public maintenanceIdDelete(id: number, observe: any = 'body', reportProgress: boolean = false ): Observable<any> {
  1973.  
  1974.         if (id === null || id === undefined) {
  1975.             throw new Error('Required parameter id was null or undefined when calling maintenanceIdDelete.');
  1976.         }
  1977.  
  1978.         let headers = this.defaultHeaders;
  1979.  
  1980.         // authentication (basicAuth) required
  1981.         if (this.configuration.username || this.configuration.password) {
  1982.             headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password));
  1983.         }
  1984.  
  1985.         // to determine the Accept header
  1986.         let httpHeaderAccepts: string[] = [
  1987.             'application/json'
  1988.         ];
  1989.         const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
  1990.         if (httpHeaderAcceptSelected != undefined) {
  1991.             headers = headers.set('Accept', httpHeaderAcceptSelected);
  1992.         }
  1993.  
  1994.         // to determine the Content-Type header
  1995.         const consumes: string[] = [
  1996.             'application/json'
  1997.         ];
  1998.  
  1999.         return this.httpClient.delete<any>(`${this.basePath}/maintenance/${encodeURIComponent(String(id))}`,
  2000.             {
  2001.                 withCredentials: this.configuration.withCredentials,
  2002.                 headers: headers,
  2003.                 observe: observe,
  2004.                 reportProgress: reportProgress
  2005.             }
  2006.         );
  2007.     }
  2008.  
  2009.     /**
  2010.      * Update a Maintenance
  2011.      *
  2012.      * @param id
  2013.      * @param body
  2014.      * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
  2015.      * @param reportProgress flag to report request and response progress.
  2016.      */
  2017.     public maintenanceIdPut(id: number, body: Maintenance, observe?: 'body', reportProgress?: boolean): Observable<Maintenance>;
  2018.     public maintenanceIdPut(id: number, body: Maintenance, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<Maintenance>>;
  2019.     public maintenanceIdPut(id: number, body: Maintenance, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<Maintenance>>;
  2020.     public maintenanceIdPut(id: number, body: Maintenance, observe: any = 'body', reportProgress: boolean = false ): Observable<any> {
  2021.  
  2022.         if (id === null || id === undefined) {
  2023.             throw new Error('Required parameter id was null or undefined when calling maintenanceIdPut.');
  2024.         }
  2025.  
  2026.         if (body === null || body === undefined) {
  2027.             throw new Error('Required parameter body was null or undefined when calling maintenanceIdPut.');
  2028.         }
  2029.  
  2030.         let headers = this.defaultHeaders;
  2031.  
  2032.         // authentication (basicAuth) required
  2033.         if (this.configuration.username || this.configuration.password) {
  2034.             headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password));
  2035.         }
  2036.  
  2037.         // to determine the Accept header
  2038.         let httpHeaderAccepts: string[] = [
  2039.             'application/json'
  2040.         ];
  2041.         const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
  2042.         if (httpHeaderAcceptSelected != undefined) {
  2043.             headers = headers.set('Accept', httpHeaderAcceptSelected);
  2044.         }
  2045.  
  2046.         // to determine the Content-Type header
  2047.         const consumes: string[] = [
  2048.             'application/json'
  2049.         ];
  2050.         const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
  2051.         if (httpContentTypeSelected != undefined) {
  2052.             headers = headers.set('Content-Type', httpContentTypeSelected);
  2053.         }
  2054.  
  2055.         return this.httpClient.put<Maintenance>(`${this.basePath}/maintenance/${encodeURIComponent(String(id))}`,
  2056.             body,
  2057.             {
  2058.                 withCredentials: this.configuration.withCredentials,
  2059.                 headers: headers,
  2060.                 observe: observe,
  2061.                 reportProgress: reportProgress
  2062.             }
  2063.         );
  2064.     }
  2065.  
  2066.     /**
  2067.      * Create a Maintenance
  2068.      *
  2069.      * @param body
  2070.      * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
  2071.      * @param reportProgress flag to report request and response progress.
  2072.      */
  2073.     public maintenancePost(body: Maintenance, observe?: 'body', reportProgress?: boolean): Observable<Maintenance>;
  2074.     public maintenancePost(body: Maintenance, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<Maintenance>>;
  2075.     public maintenancePost(body: Maintenance, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<Maintenance>>;
  2076.     public maintenancePost(body: Maintenance, observe: any = 'body', reportProgress: boolean = false ): Observable<any> {
  2077.  
  2078.         if (body === null || body === undefined) {
  2079.             throw new Error('Required parameter body was null or undefined when calling maintenancePost.');
  2080.         }
  2081.  
  2082.         let headers = this.defaultHeaders;
  2083.  
  2084.         // authentication (basicAuth) required
  2085.         if (this.configuration.username || this.configuration.password) {
  2086.             headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password));
  2087.         }
  2088.  
  2089.         // to determine the Accept header
  2090.         let httpHeaderAccepts: string[] = [
  2091.             'application/json'
  2092.         ];
  2093.         const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
  2094.         if (httpHeaderAcceptSelected != undefined) {
  2095.             headers = headers.set('Accept', httpHeaderAcceptSelected);
  2096.         }
  2097.  
  2098.         // to determine the Content-Type header
  2099.         const consumes: string[] = [
  2100.             'application/json'
  2101.         ];
  2102.         const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
  2103.         if (httpContentTypeSelected != undefined) {
  2104.             headers = headers.set('Content-Type', httpContentTypeSelected);
  2105.         }
  2106.  
  2107.         return this.httpClient.post<Maintenance>(`${this.basePath}/maintenance`,
  2108.             body,
  2109.             {
  2110.                 withCredentials: this.configuration.withCredentials,
  2111.                 headers: headers,
  2112.                 observe: observe,
  2113.                 reportProgress: reportProgress
  2114.             }
  2115.         );
  2116.     }
  2117.  
  2118.     /**
  2119.      * Fetch a list of Notifications
  2120.      * Without params, it returns a list of Notifications the user has access to
  2121.      * @param all Can only be used by admins or managers to fetch all entities
  2122.      * @param userId Standard users can use this only with their own _userId_
  2123.      * @param deviceId Standard users can use this only with _deviceId_s, they have access to
  2124.      * @param groupId Standard users can use this only with _groupId_s, they have access to
  2125.      * @param refresh
  2126.      * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
  2127.      * @param reportProgress flag to report request and response progress.
  2128.      */
  2129.     public notificationsGet(all?: boolean, userId?: number, deviceId?: number, groupId?: number, refresh?: boolean, observe?: 'body', reportProgress?: boolean): Observable<Array<Notification>>;
  2130.     public notificationsGet(all?: boolean, userId?: number, deviceId?: number, groupId?: number, refresh?: boolean, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<Array<Notification>>>;
  2131.     public notificationsGet(all?: boolean, userId?: number, deviceId?: number, groupId?: number, refresh?: boolean, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<Array<Notification>>>;
  2132.     public notificationsGet(all?: boolean, userId?: number, deviceId?: number, groupId?: number, refresh?: boolean, observe: any = 'body', reportProgress: boolean = false ): Observable<any> {
  2133.  
  2134.  
  2135.  
  2136.  
  2137.  
  2138.  
  2139.         let queryParameters = new HttpParams({encoder: new CustomHttpUrlEncodingCodec()});
  2140.         if (all !== undefined && all !== null) {
  2141.             queryParameters = queryParameters.set('all', <any>all);
  2142.         }
  2143.         if (userId !== undefined && userId !== null) {
  2144.             queryParameters = queryParameters.set('userId', <any>userId);
  2145.         }
  2146.         if (deviceId !== undefined && deviceId !== null) {
  2147.             queryParameters = queryParameters.set('deviceId', <any>deviceId);
  2148.         }
  2149.         if (groupId !== undefined && groupId !== null) {
  2150.             queryParameters = queryParameters.set('groupId', <any>groupId);
  2151.         }
  2152.         if (refresh !== undefined && refresh !== null) {
  2153.             queryParameters = queryParameters.set('refresh', <any>refresh);
  2154.         }
  2155.  
  2156.         let headers = this.defaultHeaders;
  2157.  
  2158.         // authentication (basicAuth) required
  2159.         if (this.configuration.username || this.configuration.password) {
  2160.             headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password));
  2161.         }
  2162.  
  2163.         // to determine the Accept header
  2164.         let httpHeaderAccepts: string[] = [
  2165.             'application/json'
  2166.         ];
  2167.         const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
  2168.         if (httpHeaderAcceptSelected != undefined) {
  2169.             headers = headers.set('Accept', httpHeaderAcceptSelected);
  2170.         }
  2171.  
  2172.         // to determine the Content-Type header
  2173.         const consumes: string[] = [
  2174.             'application/json'
  2175.         ];
  2176.  
  2177.         return this.httpClient.get<Array<Notification>>(`${this.basePath}/notifications`,
  2178.             {
  2179.                 params: queryParameters,
  2180.                 withCredentials: this.configuration.withCredentials,
  2181.                 headers: headers,
  2182.                 observe: observe,
  2183.                 reportProgress: reportProgress
  2184.             }
  2185.         );
  2186.     }
  2187.  
  2188.     /**
  2189.      * Delete a Notification
  2190.      *
  2191.      * @param id
  2192.      * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
  2193.      * @param reportProgress flag to report request and response progress.
  2194.      */
  2195.     public notificationsIdDelete(id: number, observe?: 'body', reportProgress?: boolean): Observable<any>;
  2196.     public notificationsIdDelete(id: number, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<any>>;
  2197.     public notificationsIdDelete(id: number, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<any>>;
  2198.     public notificationsIdDelete(id: number, observe: any = 'body', reportProgress: boolean = false ): Observable<any> {
  2199.  
  2200.         if (id === null || id === undefined) {
  2201.             throw new Error('Required parameter id was null or undefined when calling notificationsIdDelete.');
  2202.         }
  2203.  
  2204.         let headers = this.defaultHeaders;
  2205.  
  2206.         // authentication (basicAuth) required
  2207.         if (this.configuration.username || this.configuration.password) {
  2208.             headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password));
  2209.         }
  2210.  
  2211.         // to determine the Accept header
  2212.         let httpHeaderAccepts: string[] = [
  2213.             'application/json'
  2214.         ];
  2215.         const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
  2216.         if (httpHeaderAcceptSelected != undefined) {
  2217.             headers = headers.set('Accept', httpHeaderAcceptSelected);
  2218.         }
  2219.  
  2220.         // to determine the Content-Type header
  2221.         const consumes: string[] = [
  2222.             'application/json'
  2223.         ];
  2224.  
  2225.         return this.httpClient.delete<any>(`${this.basePath}/notifications/${encodeURIComponent(String(id))}`,
  2226.             {
  2227.                 withCredentials: this.configuration.withCredentials,
  2228.                 headers: headers,
  2229.                 observe: observe,
  2230.                 reportProgress: reportProgress
  2231.             }
  2232.         );
  2233.     }
  2234.  
  2235.     /**
  2236.      * Update a Notification
  2237.      *
  2238.      * @param id
  2239.      * @param body
  2240.      * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
  2241.      * @param reportProgress flag to report request and response progress.
  2242.      */
  2243.     public notificationsIdPut(id: number, body: Notification, observe?: 'body', reportProgress?: boolean): Observable<Notification>;
  2244.     public notificationsIdPut(id: number, body: Notification, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<Notification>>;
  2245.     public notificationsIdPut(id: number, body: Notification, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<Notification>>;
  2246.     public notificationsIdPut(id: number, body: Notification, observe: any = 'body', reportProgress: boolean = false ): Observable<any> {
  2247.  
  2248.         if (id === null || id === undefined) {
  2249.             throw new Error('Required parameter id was null or undefined when calling notificationsIdPut.');
  2250.         }
  2251.  
  2252.         if (body === null || body === undefined) {
  2253.             throw new Error('Required parameter body was null or undefined when calling notificationsIdPut.');
  2254.         }
  2255.  
  2256.         let headers = this.defaultHeaders;
  2257.  
  2258.         // authentication (basicAuth) required
  2259.         if (this.configuration.username || this.configuration.password) {
  2260.             headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password));
  2261.         }
  2262.  
  2263.         // to determine the Accept header
  2264.         let httpHeaderAccepts: string[] = [
  2265.             'application/json'
  2266.         ];
  2267.         const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
  2268.         if (httpHeaderAcceptSelected != undefined) {
  2269.             headers = headers.set('Accept', httpHeaderAcceptSelected);
  2270.         }
  2271.  
  2272.         // to determine the Content-Type header
  2273.         const consumes: string[] = [
  2274.             'application/json'
  2275.         ];
  2276.         const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
  2277.         if (httpContentTypeSelected != undefined) {
  2278.             headers = headers.set('Content-Type', httpContentTypeSelected);
  2279.         }
  2280.  
  2281.         return this.httpClient.put<Notification>(`${this.basePath}/notifications/${encodeURIComponent(String(id))}`,
  2282.             body,
  2283.             {
  2284.                 withCredentials: this.configuration.withCredentials,
  2285.                 headers: headers,
  2286.                 observe: observe,
  2287.                 reportProgress: reportProgress
  2288.             }
  2289.         );
  2290.     }
  2291.  
  2292.     /**
  2293.      * Create a Notification
  2294.      *
  2295.      * @param body
  2296.      * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
  2297.      * @param reportProgress flag to report request and response progress.
  2298.      */
  2299.     public notificationsPost(body: Notification, observe?: 'body', reportProgress?: boolean): Observable<Notification>;
  2300.     public notificationsPost(body: Notification, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<Notification>>;
  2301.     public notificationsPost(body: Notification, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<Notification>>;
  2302.     public notificationsPost(body: Notification, observe: any = 'body', reportProgress: boolean = false ): Observable<any> {
  2303.  
  2304.         if (body === null || body === undefined) {
  2305.             throw new Error('Required parameter body was null or undefined when calling notificationsPost.');
  2306.         }
  2307.  
  2308.         let headers = this.defaultHeaders;
  2309.  
  2310.         // authentication (basicAuth) required
  2311.         if (this.configuration.username || this.configuration.password) {
  2312.             headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password));
  2313.         }
  2314.  
  2315.         // to determine the Accept header
  2316.         let httpHeaderAccepts: string[] = [
  2317.             'application/json'
  2318.         ];
  2319.         const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
  2320.         if (httpHeaderAcceptSelected != undefined) {
  2321.             headers = headers.set('Accept', httpHeaderAcceptSelected);
  2322.         }
  2323.  
  2324.         // to determine the Content-Type header
  2325.         const consumes: string[] = [
  2326.             'application/json'
  2327.         ];
  2328.         const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
  2329.         if (httpContentTypeSelected != undefined) {
  2330.             headers = headers.set('Content-Type', httpContentTypeSelected);
  2331.         }
  2332.  
  2333.         return this.httpClient.post<Notification>(`${this.basePath}/notifications`,
  2334.             body,
  2335.             {
  2336.                 withCredentials: this.configuration.withCredentials,
  2337.                 headers: headers,
  2338.                 observe: observe,
  2339.                 reportProgress: reportProgress
  2340.             }
  2341.         );
  2342.     }
  2343.  
  2344.     /**
  2345.      * Send test notification to current user via Email and SMS
  2346.      *
  2347.      * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
  2348.      * @param reportProgress flag to report request and response progress.
  2349.      */
  2350.     public notificationsTestPost(observe?: 'body', reportProgress?: boolean): Observable<any>;
  2351.     public notificationsTestPost(observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<any>>;
  2352.     public notificationsTestPost(observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<any>>;
  2353.     public notificationsTestPost(observe: any = 'body', reportProgress: boolean = false ): Observable<any> {
  2354.  
  2355.         let headers = this.defaultHeaders;
  2356.  
  2357.         // authentication (basicAuth) required
  2358.         if (this.configuration.username || this.configuration.password) {
  2359.             headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password));
  2360.         }
  2361.  
  2362.         // to determine the Accept header
  2363.         let httpHeaderAccepts: string[] = [
  2364.             'application/json'
  2365.         ];
  2366.         const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
  2367.         if (httpHeaderAcceptSelected != undefined) {
  2368.             headers = headers.set('Accept', httpHeaderAcceptSelected);
  2369.         }
  2370.  
  2371.         // to determine the Content-Type header
  2372.         const consumes: string[] = [
  2373.             'application/json'
  2374.         ];
  2375.  
  2376.         return this.httpClient.post<any>(`${this.basePath}/notifications/test`,
  2377.             null,
  2378.             {
  2379.                 withCredentials: this.configuration.withCredentials,
  2380.                 headers: headers,
  2381.                 observe: observe,
  2382.                 reportProgress: reportProgress
  2383.             }
  2384.         );
  2385.     }
  2386.  
  2387.     /**
  2388.      * Fetch a list of available Notification types
  2389.      *
  2390.      * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
  2391.      * @param reportProgress flag to report request and response progress.
  2392.      */
  2393.     public notificationsTypesGet(observe?: 'body', reportProgress?: boolean): Observable<Array<NotificationType>>;
  2394.     public notificationsTypesGet(observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<Array<NotificationType>>>;
  2395.     public notificationsTypesGet(observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<Array<NotificationType>>>;
  2396.     public notificationsTypesGet(observe: any = 'body', reportProgress: boolean = false ): Observable<any> {
  2397.  
  2398.         let headers = this.defaultHeaders;
  2399.  
  2400.         // authentication (basicAuth) required
  2401.         if (this.configuration.username || this.configuration.password) {
  2402.             headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password));
  2403.         }
  2404.  
  2405.         // to determine the Accept header
  2406.         let httpHeaderAccepts: string[] = [
  2407.             'application/json'
  2408.         ];
  2409.         const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
  2410.         if (httpHeaderAcceptSelected != undefined) {
  2411.             headers = headers.set('Accept', httpHeaderAcceptSelected);
  2412.         }
  2413.  
  2414.         // to determine the Content-Type header
  2415.         const consumes: string[] = [
  2416.             'application/json'
  2417.         ];
  2418.  
  2419.         return this.httpClient.get<Array<NotificationType>>(`${this.basePath}/notifications/types`,
  2420.             {
  2421.                 withCredentials: this.configuration.withCredentials,
  2422.                 headers: headers,
  2423.                 observe: observe,
  2424.                 reportProgress: reportProgress
  2425.             }
  2426.         );
  2427.     }
  2428.  
  2429.     /**
  2430.      * Unlink an Object from another Object
  2431.      *
  2432.      * @param body
  2433.      * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
  2434.      * @param reportProgress flag to report request and response progress.
  2435.      */
  2436.     public permissionsDelete(body: Permission, observe?: 'body', reportProgress?: boolean): Observable<any>;
  2437.     public permissionsDelete(body: Permission, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<any>>;
  2438.     public permissionsDelete(body: Permission, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<any>>;
  2439.     public permissionsDelete(body: Permission, observe: any = 'body', reportProgress: boolean = false ): Observable<any> {
  2440.  
  2441.         if (body === null || body === undefined) {
  2442.             throw new Error('Required parameter body was null or undefined when calling permissionsDelete.');
  2443.         }
  2444.  
  2445.         let headers = this.defaultHeaders;
  2446.  
  2447.         // authentication (basicAuth) required
  2448.         if (this.configuration.username || this.configuration.password) {
  2449.             headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password));
  2450.         }
  2451.  
  2452.         // to determine the Accept header
  2453.         let httpHeaderAccepts: string[] = [
  2454.             'application/json'
  2455.         ];
  2456.         const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
  2457.         if (httpHeaderAcceptSelected != undefined) {
  2458.             headers = headers.set('Accept', httpHeaderAcceptSelected);
  2459.         }
  2460.  
  2461.         // to determine the Content-Type header
  2462.         const consumes: string[] = [
  2463.             'application/json'
  2464.         ];
  2465.         const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
  2466.         if (httpContentTypeSelected != undefined) {
  2467.             headers = headers.set('Content-Type', httpContentTypeSelected);
  2468.         }
  2469.  
  2470.         return this.httpClient.delete<any>(`${this.basePath}/permissions`,
  2471.             {
  2472.                 withCredentials: this.configuration.withCredentials,
  2473.                 headers: headers,
  2474.                 observe: observe,
  2475.                 reportProgress: reportProgress
  2476.             }
  2477.         );
  2478.     }
  2479.  
  2480.     /**
  2481.      * Link an Object to another Object
  2482.      *
  2483.      * @param body
  2484.      * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
  2485.      * @param reportProgress flag to report request and response progress.
  2486.      */
  2487.     public permissionsPost(body: Permission, observe?: 'body', reportProgress?: boolean): Observable<Permission>;
  2488.     public permissionsPost(body: Permission, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<Permission>>;
  2489.     public permissionsPost(body: Permission, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<Permission>>;
  2490.     public permissionsPost(body: Permission, observe: any = 'body', reportProgress: boolean = false ): Observable<any> {
  2491.  
  2492.         if (body === null || body === undefined) {
  2493.             throw new Error('Required parameter body was null or undefined when calling permissionsPost.');
  2494.         }
  2495.  
  2496.         let headers = this.defaultHeaders;
  2497.  
  2498.         // authentication (basicAuth) required
  2499.         if (this.configuration.username || this.configuration.password) {
  2500.             headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password));
  2501.         }
  2502.  
  2503.         // to determine the Accept header
  2504.         let httpHeaderAccepts: string[] = [
  2505.             'application/json'
  2506.         ];
  2507.         const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
  2508.         if (httpHeaderAcceptSelected != undefined) {
  2509.             headers = headers.set('Accept', httpHeaderAcceptSelected);
  2510.         }
  2511.  
  2512.         // to determine the Content-Type header
  2513.         const consumes: string[] = [
  2514.             'application/json'
  2515.         ];
  2516.         const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
  2517.         if (httpContentTypeSelected != undefined) {
  2518.             headers = headers.set('Content-Type', httpContentTypeSelected);
  2519.         }
  2520.  
  2521.         return this.httpClient.post<Permission>(`${this.basePath}/permissions`,
  2522.             body,
  2523.             {
  2524.                 withCredentials: this.configuration.withCredentials,
  2525.                 headers: headers,
  2526.                 observe: observe,
  2527.                 reportProgress: reportProgress
  2528.             }
  2529.         );
  2530.     }
  2531.  
  2532.     /**
  2533.      * Fetches a list of Positions
  2534.      * Without any params, it returns a list of last known positions for all the user&#39;s Devices. _from_ and _to_ fields are not required with _id_
  2535.      * @param deviceId _deviceId_ is optional, but requires the _from_ and _to_ parameters when used
  2536.      * @param from in IS0 8601 format. eg. &#x60;1963-11-22T18:30:00Z&#x60;
  2537.      * @param to in IS0 8601 format. eg. &#x60;1963-11-22T18:30:00Z&#x60;
  2538.      * @param id To fetch one or more positions. Multiple params can be passed like &#x60;id&#x3D;31&amp;id&#x3D;42&#x60;
  2539.      * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
  2540.      * @param reportProgress flag to report request and response progress.
  2541.      */
  2542.     public positionsGet(deviceId?: number, from?: Date, to?: Date, id?: number, observe?: 'body', reportProgress?: boolean): Observable<Array<Position>>;
  2543.     public positionsGet(deviceId?: number, from?: Date, to?: Date, id?: number, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<Array<Position>>>;
  2544.     public positionsGet(deviceId?: number, from?: Date, to?: Date, id?: number, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<Array<Position>>>;
  2545.     public positionsGet(deviceId?: number, from?: Date, to?: Date, id?: number, observe: any = 'body', reportProgress: boolean = false ): Observable<any> {
  2546.  
  2547.  
  2548.  
  2549.  
  2550.  
  2551.         let queryParameters = new HttpParams({encoder: new CustomHttpUrlEncodingCodec()});
  2552.         if (deviceId !== undefined && deviceId !== null) {
  2553.             queryParameters = queryParameters.set('deviceId', <any>deviceId);
  2554.         }
  2555.         if (from !== undefined && from !== null) {
  2556.             queryParameters = queryParameters.set('from', <any>from.toISOString());
  2557.         }
  2558.         if (to !== undefined && to !== null) {
  2559.             queryParameters = queryParameters.set('to', <any>to.toISOString());
  2560.         }
  2561.         if (id !== undefined && id !== null) {
  2562.             queryParameters = queryParameters.set('id', <any>id);
  2563.         }
  2564.  
  2565.         let headers = this.defaultHeaders;
  2566.  
  2567.         // authentication (basicAuth) required
  2568.         if (this.configuration.username || this.configuration.password) {
  2569.             headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password));
  2570.         }
  2571.  
  2572.         // to determine the Accept header
  2573.         let httpHeaderAccepts: string[] = [
  2574.             'application/json',
  2575.             'text/csv',
  2576.             'application/gpx+xml'
  2577.         ];
  2578.         const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
  2579.         if (httpHeaderAcceptSelected != undefined) {
  2580.             headers = headers.set('Accept', httpHeaderAcceptSelected);
  2581.         }
  2582.  
  2583.         // to determine the Content-Type header
  2584.         const consumes: string[] = [
  2585.             'application/json',
  2586.             'text/csv',
  2587.             'application/gpx+xml'
  2588.         ];
  2589.  
  2590.         return this.httpClient.get<Array<Position>>(`${this.basePath}/positions`,
  2591.             {
  2592.                 params: queryParameters,
  2593.                 withCredentials: this.configuration.withCredentials,
  2594.                 headers: headers,
  2595.                 observe: observe,
  2596.                 reportProgress: reportProgress
  2597.             }
  2598.         );
  2599.     }
  2600.  
  2601.     /**
  2602.      * Fetch a list of Events within the time period for the Devices or Groups
  2603.      * At least one _deviceId_ or one _groupId_ must be passed
  2604.      * @param from in IS0 8601 format. eg. &#x60;1963-11-22T18:30:00Z&#x60;
  2605.      * @param to in IS0 8601 format. eg. &#x60;1963-11-22T18:30:00Z&#x60;
  2606.      * @param deviceId
  2607.      * @param groupId
  2608.      * @param type % can be used to return events of all types
  2609.      * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
  2610.      * @param reportProgress flag to report request and response progress.
  2611.      */
  2612.     public reportsEventsGet(from: Date, to: Date, deviceId?: Array<number>, groupId?: Array<number>, type?: Array<string>, observe?: 'body', reportProgress?: boolean): Observable<Array<Event>>;
  2613.     public reportsEventsGet(from: Date, to: Date, deviceId?: Array<number>, groupId?: Array<number>, type?: Array<string>, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<Array<Event>>>;
  2614.     public reportsEventsGet(from: Date, to: Date, deviceId?: Array<number>, groupId?: Array<number>, type?: Array<string>, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<Array<Event>>>;
  2615.     public reportsEventsGet(from: Date, to: Date, deviceId?: Array<number>, groupId?: Array<number>, type?: Array<string>, observe: any = 'body', reportProgress: boolean = false ): Observable<any> {
  2616.  
  2617.         if (from === null || from === undefined) {
  2618.             throw new Error('Required parameter from was null or undefined when calling reportsEventsGet.');
  2619.         }
  2620.  
  2621.         if (to === null || to === undefined) {
  2622.             throw new Error('Required parameter to was null or undefined when calling reportsEventsGet.');
  2623.         }
  2624.  
  2625.  
  2626.  
  2627.  
  2628.         let queryParameters = new HttpParams({encoder: new CustomHttpUrlEncodingCodec()});
  2629.         if (deviceId) {
  2630.             deviceId.forEach((element) => {
  2631.                 queryParameters = queryParameters.append('deviceId', <any>element);
  2632.             })
  2633.         }
  2634.         if (groupId) {
  2635.             groupId.forEach((element) => {
  2636.                 queryParameters = queryParameters.append('groupId', <any>element);
  2637.             })
  2638.         }
  2639.         if (type) {
  2640.             type.forEach((element) => {
  2641.                 queryParameters = queryParameters.append('type', <any>element);
  2642.             })
  2643.         }
  2644.         if (from !== undefined && from !== null) {
  2645.             queryParameters = queryParameters.set('from', <any>from.toISOString());
  2646.         }
  2647.         if (to !== undefined && to !== null) {
  2648.             queryParameters = queryParameters.set('to', <any>to.toISOString());
  2649.         }
  2650.  
  2651.         let headers = this.defaultHeaders;
  2652.  
  2653.         // authentication (basicAuth) required
  2654.         if (this.configuration.username || this.configuration.password) {
  2655.             headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password));
  2656.         }
  2657.  
  2658.         // to determine the Accept header
  2659.         let httpHeaderAccepts: string[] = [
  2660.             'application/json',
  2661.             'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'
  2662.         ];
  2663.         const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
  2664.         if (httpHeaderAcceptSelected != undefined) {
  2665.             headers = headers.set('Accept', httpHeaderAcceptSelected);
  2666.         }
  2667.  
  2668.         // to determine the Content-Type header
  2669.         const consumes: string[] = [
  2670.             'application/json',
  2671.             'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'
  2672.         ];
  2673.  
  2674.         return this.httpClient.get<Array<Event>>(`${this.basePath}/reports/events`,
  2675.             {
  2676.                 params: queryParameters,
  2677.                 withCredentials: this.configuration.withCredentials,
  2678.                 headers: headers,
  2679.                 observe: observe,
  2680.                 reportProgress: reportProgress
  2681.             }
  2682.         );
  2683.     }
  2684.  
  2685.     /**
  2686.      * Fetch a list of Positions within the time period for the Devices or Groups
  2687.      * At least one _deviceId_ or one _groupId_ must be passed
  2688.      * @param from in IS0 8601 format. eg. &#x60;1963-11-22T18:30:00Z&#x60;
  2689.      * @param to in IS0 8601 format. eg. &#x60;1963-11-22T18:30:00Z&#x60;
  2690.      * @param deviceId
  2691.      * @param groupId
  2692.      * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
  2693.      * @param reportProgress flag to report request and response progress.
  2694.      */
  2695.     public reportsRouteGet(from: Date, to: Date, deviceId?: Array<number>, groupId?: Array<number>, observe?: 'body', reportProgress?: boolean): Observable<Array<Position>>;
  2696.     public reportsRouteGet(from: Date, to: Date, deviceId?: Array<number>, groupId?: Array<number>, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<Array<Position>>>;
  2697.     public reportsRouteGet(from: Date, to: Date, deviceId?: Array<number>, groupId?: Array<number>, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<Array<Position>>>;
  2698.     public reportsRouteGet(from: Date, to: Date, deviceId?: Array<number>, groupId?: Array<number>, observe: any = 'body', reportProgress: boolean = false ): Observable<any> {
  2699.  
  2700.         if (from === null || from === undefined) {
  2701.             throw new Error('Required parameter from was null or undefined when calling reportsRouteGet.');
  2702.         }
  2703.  
  2704.         if (to === null || to === undefined) {
  2705.             throw new Error('Required parameter to was null or undefined when calling reportsRouteGet.');
  2706.         }
  2707.  
  2708.  
  2709.  
  2710.         let queryParameters = new HttpParams({encoder: new CustomHttpUrlEncodingCodec()});
  2711.         if (deviceId) {
  2712.             deviceId.forEach((element) => {
  2713.                 queryParameters = queryParameters.append('deviceId', <any>element);
  2714.             })
  2715.         }
  2716.         if (groupId) {
  2717.             groupId.forEach((element) => {
  2718.                 queryParameters = queryParameters.append('groupId', <any>element);
  2719.             })
  2720.         }
  2721.         if (from !== undefined && from !== null) {
  2722.             queryParameters = queryParameters.set('from', <any>from.toISOString());
  2723.         }
  2724.         if (to !== undefined && to !== null) {
  2725.             queryParameters = queryParameters.set('to', <any>to.toISOString());
  2726.         }
  2727.  
  2728.         let headers = this.defaultHeaders;
  2729.  
  2730.         // authentication (basicAuth) required
  2731.         if (this.configuration.username || this.configuration.password) {
  2732.             headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password));
  2733.         }
  2734.  
  2735.         // to determine the Accept header
  2736.         let httpHeaderAccepts: string[] = [
  2737.             'application/json',
  2738.             'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'
  2739.         ];
  2740.         const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
  2741.         if (httpHeaderAcceptSelected != undefined) {
  2742.             headers = headers.set('Accept', httpHeaderAcceptSelected);
  2743.         }
  2744.  
  2745.         // to determine the Content-Type header
  2746.         const consumes: string[] = [
  2747.             'application/json',
  2748.             'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'
  2749.         ];
  2750.  
  2751.         return this.httpClient.get<Array<Position>>(`${this.basePath}/reports/route`,
  2752.             {
  2753.                 params: queryParameters,
  2754.                 withCredentials: this.configuration.withCredentials,
  2755.                 headers: headers,
  2756.                 observe: observe,
  2757.                 reportProgress: reportProgress
  2758.             }
  2759.         );
  2760.     }
  2761.  
  2762.     /**
  2763.      * Fetch a list of ReportStops within the time period for the Devices or Groups
  2764.      * At least one _deviceId_ or one _groupId_ must be passed
  2765.      * @param from in IS0 8601 format. eg. &#x60;1963-11-22T18:30:00Z&#x60;
  2766.      * @param to in IS0 8601 format. eg. &#x60;1963-11-22T18:30:00Z&#x60;
  2767.      * @param deviceId
  2768.      * @param groupId
  2769.      * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
  2770.      * @param reportProgress flag to report request and response progress.
  2771.      */
  2772.     public reportsStopsGet(from: Date, to: Date, deviceId?: Array<number>, groupId?: Array<number>, observe?: 'body', reportProgress?: boolean): Observable<Array<ReportStops>>;
  2773.     public reportsStopsGet(from: Date, to: Date, deviceId?: Array<number>, groupId?: Array<number>, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<Array<ReportStops>>>;
  2774.     public reportsStopsGet(from: Date, to: Date, deviceId?: Array<number>, groupId?: Array<number>, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<Array<ReportStops>>>;
  2775.     public reportsStopsGet(from: Date, to: Date, deviceId?: Array<number>, groupId?: Array<number>, observe: any = 'body', reportProgress: boolean = false ): Observable<any> {
  2776.  
  2777.         if (from === null || from === undefined) {
  2778.             throw new Error('Required parameter from was null or undefined when calling reportsStopsGet.');
  2779.         }
  2780.  
  2781.         if (to === null || to === undefined) {
  2782.             throw new Error('Required parameter to was null or undefined when calling reportsStopsGet.');
  2783.         }
  2784.  
  2785.  
  2786.  
  2787.         let queryParameters = new HttpParams({encoder: new CustomHttpUrlEncodingCodec()});
  2788.         if (deviceId) {
  2789.             deviceId.forEach((element) => {
  2790.                 queryParameters = queryParameters.append('deviceId', <any>element);
  2791.             })
  2792.         }
  2793.         if (groupId) {
  2794.             groupId.forEach((element) => {
  2795.                 queryParameters = queryParameters.append('groupId', <any>element);
  2796.             })
  2797.         }
  2798.         if (from !== undefined && from !== null) {
  2799.             queryParameters = queryParameters.set('from', <any>from.toISOString());
  2800.         }
  2801.         if (to !== undefined && to !== null) {
  2802.             queryParameters = queryParameters.set('to', <any>to.toISOString());
  2803.         }
  2804.  
  2805.         let headers = this.defaultHeaders;
  2806.  
  2807.         // authentication (basicAuth) required
  2808.         if (this.configuration.username || this.configuration.password) {
  2809.             headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password));
  2810.         }
  2811.  
  2812.         // to determine the Accept header
  2813.         let httpHeaderAccepts: string[] = [
  2814.             'application/json',
  2815.             'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'
  2816.         ];
  2817.         const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
  2818.         if (httpHeaderAcceptSelected != undefined) {
  2819.             headers = headers.set('Accept', httpHeaderAcceptSelected);
  2820.         }
  2821.  
  2822.         // to determine the Content-Type header
  2823.         const consumes: string[] = [
  2824.             'application/json',
  2825.             'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'
  2826.         ];
  2827.  
  2828.         return this.httpClient.get<Array<ReportStops>>(`${this.basePath}/reports/stops`,
  2829.             {
  2830.                 params: queryParameters,
  2831.                 withCredentials: this.configuration.withCredentials,
  2832.                 headers: headers,
  2833.                 observe: observe,
  2834.                 reportProgress: reportProgress
  2835.             }
  2836.         );
  2837.     }
  2838.  
  2839.     /**
  2840.      * Fetch a list of ReportSummary within the time period for the Devices or Groups
  2841.      * At least one _deviceId_ or one _groupId_ must be passed
  2842.      * @param from in IS0 8601 format. eg. &#x60;1963-11-22T18:30:00Z&#x60;
  2843.      * @param to in IS0 8601 format. eg. &#x60;1963-11-22T18:30:00Z&#x60;
  2844.      * @param deviceId
  2845.      * @param groupId
  2846.      * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
  2847.      * @param reportProgress flag to report request and response progress.
  2848.      */
  2849.     public reportsSummaryGet(from: Date, to: Date, deviceId?: Array<number>, groupId?: Array<number>, observe?: 'body', reportProgress?: boolean): Observable<Array<ReportSummary>>;
  2850.     public reportsSummaryGet(from: Date, to: Date, deviceId?: Array<number>, groupId?: Array<number>, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<Array<ReportSummary>>>;
  2851.     public reportsSummaryGet(from: Date, to: Date, deviceId?: Array<number>, groupId?: Array<number>, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<Array<ReportSummary>>>;
  2852.     public reportsSummaryGet(from: Date, to: Date, deviceId?: Array<number>, groupId?: Array<number>, observe: any = 'body', reportProgress: boolean = false ): Observable<any> {
  2853.  
  2854.         if (from === null || from === undefined) {
  2855.             throw new Error('Required parameter from was null or undefined when calling reportsSummaryGet.');
  2856.         }
  2857.  
  2858.         if (to === null || to === undefined) {
  2859.             throw new Error('Required parameter to was null or undefined when calling reportsSummaryGet.');
  2860.         }
  2861.  
  2862.  
  2863.  
  2864.         let queryParameters = new HttpParams({encoder: new CustomHttpUrlEncodingCodec()});
  2865.         if (deviceId) {
  2866.             deviceId.forEach((element) => {
  2867.                 queryParameters = queryParameters.append('deviceId', <any>element);
  2868.             })
  2869.         }
  2870.         if (groupId) {
  2871.             groupId.forEach((element) => {
  2872.                 queryParameters = queryParameters.append('groupId', <any>element);
  2873.             })
  2874.         }
  2875.         if (from !== undefined && from !== null) {
  2876.             queryParameters = queryParameters.set('from', <any>from.toISOString());
  2877.         }
  2878.         if (to !== undefined && to !== null) {
  2879.             queryParameters = queryParameters.set('to', <any>to.toISOString());
  2880.         }
  2881.  
  2882.         let headers = this.defaultHeaders;
  2883.  
  2884.         // authentication (basicAuth) required
  2885.         if (this.configuration.username || this.configuration.password) {
  2886.             headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password));
  2887.         }
  2888.  
  2889.         // to determine the Accept header
  2890.         let httpHeaderAccepts: string[] = [
  2891.             'application/json',
  2892.             'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'
  2893.         ];
  2894.         const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
  2895.         if (httpHeaderAcceptSelected != undefined) {
  2896.             headers = headers.set('Accept', httpHeaderAcceptSelected);
  2897.         }
  2898.  
  2899.         // to determine the Content-Type header
  2900.         const consumes: string[] = [
  2901.             'application/json',
  2902.             'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'
  2903.         ];
  2904.  
  2905.         return this.httpClient.get<Array<ReportSummary>>(`${this.basePath}/reports/summary`,
  2906.             {
  2907.                 params: queryParameters,
  2908.                 withCredentials: this.configuration.withCredentials,
  2909.                 headers: headers,
  2910.                 observe: observe,
  2911.                 reportProgress: reportProgress
  2912.             }
  2913.         );
  2914.     }
  2915.  
  2916.     /**
  2917.      * Fetch a list of ReportTrips within the time period for the Devices or Groups
  2918.      * At least one _deviceId_ or one _groupId_ must be passed
  2919.      * @param from in IS0 8601 format. eg. &#x60;1963-11-22T18:30:00Z&#x60;
  2920.      * @param to in IS0 8601 format. eg. &#x60;1963-11-22T18:30:00Z&#x60;
  2921.      * @param deviceId
  2922.      * @param groupId
  2923.      * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
  2924.      * @param reportProgress flag to report request and response progress.
  2925.      */
  2926.     public reportsTripsGet(from: Date, to: Date, deviceId?: Array<number>, groupId?: Array<number>, observe?: 'body', reportProgress?: boolean): Observable<Array<ReportTrips>>;
  2927.     public reportsTripsGet(from: Date, to: Date, deviceId?: Array<number>, groupId?: Array<number>, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<Array<ReportTrips>>>;
  2928.     public reportsTripsGet(from: Date, to: Date, deviceId?: Array<number>, groupId?: Array<number>, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<Array<ReportTrips>>>;
  2929.     public reportsTripsGet(from: Date, to: Date, deviceId?: Array<number>, groupId?: Array<number>, observe: any = 'body', reportProgress: boolean = false ): Observable<any> {
  2930.  
  2931.         if (from === null || from === undefined) {
  2932.             throw new Error('Required parameter from was null or undefined when calling reportsTripsGet.');
  2933.         }
  2934.  
  2935.         if (to === null || to === undefined) {
  2936.             throw new Error('Required parameter to was null or undefined when calling reportsTripsGet.');
  2937.         }
  2938.  
  2939.  
  2940.  
  2941.         let queryParameters = new HttpParams({encoder: new CustomHttpUrlEncodingCodec()});
  2942.         if (deviceId) {
  2943.             deviceId.forEach((element) => {
  2944.                 queryParameters = queryParameters.append('deviceId', <any>element);
  2945.             })
  2946.         }
  2947.         if (groupId) {
  2948.             groupId.forEach((element) => {
  2949.                 queryParameters = queryParameters.append('groupId', <any>element);
  2950.             })
  2951.         }
  2952.         if (from !== undefined && from !== null) {
  2953.             queryParameters = queryParameters.set('from', <any>from.toISOString());
  2954.         }
  2955.         if (to !== undefined && to !== null) {
  2956.             queryParameters = queryParameters.set('to', <any>to.toISOString());
  2957.         }
  2958.  
  2959.         let headers = this.defaultHeaders;
  2960.  
  2961.         // authentication (basicAuth) required
  2962.         if (this.configuration.username || this.configuration.password) {
  2963.             headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password));
  2964.         }
  2965.  
  2966.         // to determine the Accept header
  2967.         let httpHeaderAccepts: string[] = [
  2968.             'application/json',
  2969.             'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'
  2970.         ];
  2971.         const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
  2972.         if (httpHeaderAcceptSelected != undefined) {
  2973.             headers = headers.set('Accept', httpHeaderAcceptSelected);
  2974.         }
  2975.  
  2976.         // to determine the Content-Type header
  2977.         const consumes: string[] = [
  2978.             'application/json',
  2979.             'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'
  2980.         ];
  2981.  
  2982.         return this.httpClient.get<Array<ReportTrips>>(`${this.basePath}/reports/trips`,
  2983.             {
  2984.                 params: queryParameters,
  2985.                 withCredentials: this.configuration.withCredentials,
  2986.                 headers: headers,
  2987.                 observe: observe,
  2988.                 reportProgress: reportProgress
  2989.             }
  2990.         );
  2991.     }
  2992.  
  2993.     /**
  2994.      * Fetch Server information
  2995.      *
  2996.      * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
  2997.      * @param reportProgress flag to report request and response progress.
  2998.      */
  2999.     public serverGet(observe?: 'body', reportProgress?: boolean): Observable<Server>;
  3000.     public serverGet(observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<Server>>;
  3001.     public serverGet(observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<Server>>;
  3002.     public serverGet(observe: any = 'body', reportProgress: boolean = false ): Observable<any> {
  3003.  
  3004.         let headers = this.defaultHeaders;
  3005.  
  3006.         // authentication (basicAuth) required
  3007.         if (this.configuration.username || this.configuration.password) {
  3008.             headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password));
  3009.         }
  3010.  
  3011.         // to determine the Accept header
  3012.         let httpHeaderAccepts: string[] = [
  3013.             'application/json'
  3014.         ];
  3015.         const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
  3016.         if (httpHeaderAcceptSelected != undefined) {
  3017.             headers = headers.set('Accept', httpHeaderAcceptSelected);
  3018.         }
  3019.  
  3020.         // to determine the Content-Type header
  3021.         const consumes: string[] = [
  3022.             'application/json'
  3023.         ];
  3024.  
  3025.         return this.httpClient.get<Server>(`${this.basePath}/server`,
  3026.             {
  3027.                 withCredentials: this.configuration.withCredentials,
  3028.                 headers: headers,
  3029.                 observe: observe,
  3030.                 reportProgress: reportProgress
  3031.             }
  3032.         );
  3033.     }
  3034.  
  3035.     /**
  3036.      * Update Server information
  3037.      *
  3038.      * @param body
  3039.      * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
  3040.      * @param reportProgress flag to report request and response progress.
  3041.      */
  3042.     public serverPut(body: Server, observe?: 'body', reportProgress?: boolean): Observable<Server>;
  3043.     public serverPut(body: Server, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<Server>>;
  3044.     public serverPut(body: Server, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<Server>>;
  3045.     public serverPut(body: Server, observe: any = 'body', reportProgress: boolean = false ): Observable<any> {
  3046.  
  3047.         if (body === null || body === undefined) {
  3048.             throw new Error('Required parameter body was null or undefined when calling serverPut.');
  3049.         }
  3050.  
  3051.         let headers = this.defaultHeaders;
  3052.  
  3053.         // authentication (basicAuth) required
  3054.         if (this.configuration.username || this.configuration.password) {
  3055.             headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password));
  3056.         }
  3057.  
  3058.         // to determine the Accept header
  3059.         let httpHeaderAccepts: string[] = [
  3060.             'application/json'
  3061.         ];
  3062.         const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
  3063.         if (httpHeaderAcceptSelected != undefined) {
  3064.             headers = headers.set('Accept', httpHeaderAcceptSelected);
  3065.         }
  3066.  
  3067.         // to determine the Content-Type header
  3068.         const consumes: string[] = [
  3069.             'application/json'
  3070.         ];
  3071.         const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
  3072.         if (httpContentTypeSelected != undefined) {
  3073.             headers = headers.set('Content-Type', httpContentTypeSelected);
  3074.         }
  3075.  
  3076.         return this.httpClient.put<Server>(`${this.basePath}/server`,
  3077.             body,
  3078.             {
  3079.                 withCredentials: this.configuration.withCredentials,
  3080.                 headers: headers,
  3081.                 observe: observe,
  3082.                 reportProgress: reportProgress
  3083.             }
  3084.         );
  3085.     }
  3086.  
  3087.     /**
  3088.      * Close the Session
  3089.      *
  3090.      * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
  3091.      * @param reportProgress flag to report request and response progress.
  3092.      */
  3093.     public sessionDelete(observe?: 'body', reportProgress?: boolean): Observable<any>;
  3094.     public sessionDelete(observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<any>>;
  3095.     public sessionDelete(observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<any>>;
  3096.     public sessionDelete(observe: any = 'body', reportProgress: boolean = false ): Observable<any> {
  3097.  
  3098.         let headers = this.defaultHeaders;
  3099.  
  3100.         // authentication (basicAuth) required
  3101.         if (this.configuration.username || this.configuration.password) {
  3102.             headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password));
  3103.         }
  3104.  
  3105.         // to determine the Accept header
  3106.         let httpHeaderAccepts: string[] = [
  3107.             'application/json'
  3108.         ];
  3109.         const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
  3110.         if (httpHeaderAcceptSelected != undefined) {
  3111.             headers = headers.set('Accept', httpHeaderAcceptSelected);
  3112.         }
  3113.  
  3114.         // to determine the Content-Type header
  3115.         const consumes: string[] = [
  3116.             'application/x-www-form-urlencoded'
  3117.         ];
  3118.  
  3119.         return this.httpClient.delete<any>(`${this.basePath}/session`,
  3120.             {
  3121.                 withCredentials: this.configuration.withCredentials,
  3122.                 headers: headers,
  3123.                 observe: observe,
  3124.                 reportProgress: reportProgress
  3125.             }
  3126.         );
  3127.     }
  3128.  
  3129.     /**
  3130.      * Fetch Session information
  3131.      *
  3132.      * @param token
  3133.      * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
  3134.      * @param reportProgress flag to report request and response progress.
  3135.      */
  3136.     public sessionGet(token?: string, observe?: 'body', reportProgress?: boolean): Observable<User>;
  3137.     public sessionGet(token?: string, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<User>>;
  3138.     public sessionGet(token?: string, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<User>>;
  3139.     public sessionGet(token?: string, observe: any = 'body', reportProgress: boolean = false ): Observable<any> {
  3140.  
  3141.  
  3142.         let queryParameters = new HttpParams({encoder: new CustomHttpUrlEncodingCodec()});
  3143.         if (token !== undefined && token !== null) {
  3144.             queryParameters = queryParameters.set('token', <any>token);
  3145.         }
  3146.  
  3147.         let headers = this.defaultHeaders;
  3148.  
  3149.         // authentication (basicAuth) required
  3150.         if (this.configuration.username || this.configuration.password) {
  3151.             headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password));
  3152.         }
  3153.  
  3154.         // to determine the Accept header
  3155.         let httpHeaderAccepts: string[] = [
  3156.             'application/json'
  3157.         ];
  3158.         const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
  3159.         if (httpHeaderAcceptSelected != undefined) {
  3160.             headers = headers.set('Accept', httpHeaderAcceptSelected);
  3161.         }
  3162.  
  3163.         // to determine the Content-Type header
  3164.         const consumes: string[] = [
  3165.             'application/x-www-form-urlencoded'
  3166.         ];
  3167.  
  3168.         return this.httpClient.get<User>(`${this.basePath}/session`,
  3169.             {
  3170.                 params: queryParameters,
  3171.                 withCredentials: this.configuration.withCredentials,
  3172.                 headers: headers,
  3173.                 observe: observe,
  3174.                 reportProgress: reportProgress
  3175.             }
  3176.         );
  3177.     }
  3178.  
  3179.     /**
  3180.      * Create a new Session
  3181.      *
  3182.      * @param email
  3183.      * @param password
  3184.      * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
  3185.      * @param reportProgress flag to report request and response progress.
  3186.      */
  3187.     public sessionPost(email: string, password: string, observe?: 'body', reportProgress?: boolean): Observable<User>;
  3188.     public sessionPost(email: string, password: string, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<User>>;
  3189.     public sessionPost(email: string, password: string, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<User>>;
  3190.     public sessionPost(email: string, password: string, observe: any = 'body', reportProgress: boolean = false ): Observable<any> {
  3191.  
  3192.         if (email === null || email === undefined) {
  3193.             throw new Error('Required parameter email was null or undefined when calling sessionPost.');
  3194.         }
  3195.  
  3196.         if (password === null || password === undefined) {
  3197.             throw new Error('Required parameter password was null or undefined when calling sessionPost.');
  3198.         }
  3199.  
  3200.         let headers = this.defaultHeaders;
  3201.  
  3202.         // authentication (basicAuth) required
  3203.         if (this.configuration.username || this.configuration.password) {
  3204.             headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password));
  3205.         }
  3206.  
  3207.         // to determine the Accept header
  3208.         let httpHeaderAccepts: string[] = [
  3209.             'application/json'
  3210.         ];
  3211.         const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
  3212.         if (httpHeaderAcceptSelected != undefined) {
  3213.             headers = headers.set('Accept', httpHeaderAcceptSelected);
  3214.         }
  3215.  
  3216.         // to determine the Content-Type header
  3217.         const consumes: string[] = [
  3218.             'application/x-www-form-urlencoded'
  3219.         ];
  3220.  
  3221.         const canConsumeForm = this.canConsumeForm(consumes);
  3222.  
  3223.         let formParams: { append(param: string, value: any): void | HttpParams; };
  3224.         let useForm = false;
  3225.         let convertFormParamsToString = false;
  3226.         if (useForm) {
  3227.             formParams = new FormData();
  3228.         } else {
  3229.             formParams = new HttpParams({encoder: new CustomHttpUrlEncodingCodec()});
  3230.         }
  3231.  
  3232.         if (email !== undefined) {
  3233.             formParams = formParams.append('email', <any>email) || formParams;
  3234.         }
  3235.         if (password !== undefined) {
  3236.             formParams = formParams.append('password', <any>password) || formParams;
  3237.         }
  3238.  
  3239.         return this.httpClient.post<User>(`${this.basePath}/session`,
  3240.             convertFormParamsToString ? formParams.toString() : formParams,
  3241.             {
  3242.                 withCredentials: this.configuration.withCredentials,
  3243.                 headers: headers,
  3244.                 observe: observe,
  3245.                 reportProgress: reportProgress
  3246.             }
  3247.         );
  3248.     }
  3249.  
  3250.     /**
  3251.      * Fetch server Statistics
  3252.      *
  3253.      * @param from in IS0 8601 format. eg. &#x60;1963-11-22T18:30:00Z&#x60;
  3254.      * @param to in IS0 8601 format. eg. &#x60;1963-11-22T18:30:00Z&#x60;
  3255.      * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
  3256.      * @param reportProgress flag to report request and response progress.
  3257.      */
  3258.     public statisticsGet(from: Date, to: Date, observe?: 'body', reportProgress?: boolean): Observable<Array<Statistics>>;
  3259.     public statisticsGet(from: Date, to: Date, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<Array<Statistics>>>;
  3260.     public statisticsGet(from: Date, to: Date, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<Array<Statistics>>>;
  3261.     public statisticsGet(from: Date, to: Date, observe: any = 'body', reportProgress: boolean = false ): Observable<any> {
  3262.  
  3263.         if (from === null || from === undefined) {
  3264.             throw new Error('Required parameter from was null or undefined when calling statisticsGet.');
  3265.         }
  3266.  
  3267.         if (to === null || to === undefined) {
  3268.             throw new Error('Required parameter to was null or undefined when calling statisticsGet.');
  3269.         }
  3270.  
  3271.         let queryParameters = new HttpParams({encoder: new CustomHttpUrlEncodingCodec()});
  3272.         if (from !== undefined && from !== null) {
  3273.             queryParameters = queryParameters.set('from', <any>from.toISOString());
  3274.         }
  3275.         if (to !== undefined && to !== null) {
  3276.             queryParameters = queryParameters.set('to', <any>to.toISOString());
  3277.         }
  3278.  
  3279.         let headers = this.defaultHeaders;
  3280.  
  3281.         // authentication (basicAuth) required
  3282.         if (this.configuration.username || this.configuration.password) {
  3283.             headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password));
  3284.         }
  3285.  
  3286.         // to determine the Accept header
  3287.         let httpHeaderAccepts: string[] = [
  3288.             'application/json'
  3289.         ];
  3290.         const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
  3291.         if (httpHeaderAcceptSelected != undefined) {
  3292.             headers = headers.set('Accept', httpHeaderAcceptSelected);
  3293.         }
  3294.  
  3295.         // to determine the Content-Type header
  3296.         const consumes: string[] = [
  3297.             'application/json'
  3298.         ];
  3299.  
  3300.         return this.httpClient.get<Array<Statistics>>(`${this.basePath}/statistics`,
  3301.             {
  3302.                 params: queryParameters,
  3303.                 withCredentials: this.configuration.withCredentials,
  3304.                 headers: headers,
  3305.                 observe: observe,
  3306.                 reportProgress: reportProgress
  3307.             }
  3308.         );
  3309.     }
  3310.  
  3311.     /**
  3312.      * Fetch a list of Users
  3313.      *
  3314.      * @param userId Can only be used by admin or manager users
  3315.      * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
  3316.      * @param reportProgress flag to report request and response progress.
  3317.      */
  3318.     public usersGet(userId?: string, observe?: 'body', reportProgress?: boolean): Observable<Array<User>>;
  3319.     public usersGet(userId?: string, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<Array<User>>>;
  3320.     public usersGet(userId?: string, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<Array<User>>>;
  3321.     public usersGet(userId?: string, observe: any = 'body', reportProgress: boolean = false ): Observable<any> {
  3322.  
  3323.  
  3324.         let queryParameters = new HttpParams({encoder: new CustomHttpUrlEncodingCodec()});
  3325.         if (userId !== undefined && userId !== null) {
  3326.             queryParameters = queryParameters.set('userId', <any>userId);
  3327.         }
  3328.  
  3329.         let headers = this.defaultHeaders;
  3330.  
  3331.         // authentication (basicAuth) required
  3332.         if (this.configuration.username || this.configuration.password) {
  3333.             headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password));
  3334.         }
  3335.  
  3336.         // to determine the Accept header
  3337.         let httpHeaderAccepts: string[] = [
  3338.             'application/json'
  3339.         ];
  3340.         const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
  3341.         if (httpHeaderAcceptSelected != undefined) {
  3342.             headers = headers.set('Accept', httpHeaderAcceptSelected);
  3343.         }
  3344.  
  3345.         // to determine the Content-Type header
  3346.         const consumes: string[] = [
  3347.             'application/json'
  3348.         ];
  3349.  
  3350.         return this.httpClient.get<Array<User>>(`${this.basePath}/users`,
  3351.             {
  3352.                 params: queryParameters,
  3353.                 withCredentials: this.configuration.withCredentials,
  3354.                 headers: headers,
  3355.                 observe: observe,
  3356.                 reportProgress: reportProgress
  3357.             }
  3358.         );
  3359.     }
  3360.  
  3361.     /**
  3362.      * Delete a User
  3363.      *
  3364.      * @param id
  3365.      * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
  3366.      * @param reportProgress flag to report request and response progress.
  3367.      */
  3368.     public usersIdDelete(id: number, observe?: 'body', reportProgress?: boolean): Observable<any>;
  3369.     public usersIdDelete(id: number, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<any>>;
  3370.     public usersIdDelete(id: number, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<any>>;
  3371.     public usersIdDelete(id: number, observe: any = 'body', reportProgress: boolean = false ): Observable<any> {
  3372.  
  3373.         if (id === null || id === undefined) {
  3374.             throw new Error('Required parameter id was null or undefined when calling usersIdDelete.');
  3375.         }
  3376.  
  3377.         let headers = this.defaultHeaders;
  3378.  
  3379.         // authentication (basicAuth) required
  3380.         if (this.configuration.username || this.configuration.password) {
  3381.             headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password));
  3382.         }
  3383.  
  3384.         // to determine the Accept header
  3385.         let httpHeaderAccepts: string[] = [
  3386.             'application/json'
  3387.         ];
  3388.         const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
  3389.         if (httpHeaderAcceptSelected != undefined) {
  3390.             headers = headers.set('Accept', httpHeaderAcceptSelected);
  3391.         }
  3392.  
  3393.         // to determine the Content-Type header
  3394.         const consumes: string[] = [
  3395.             'application/json'
  3396.         ];
  3397.  
  3398.         return this.httpClient.delete<any>(`${this.basePath}/users/${encodeURIComponent(String(id))}`,
  3399.             {
  3400.                 withCredentials: this.configuration.withCredentials,
  3401.                 headers: headers,
  3402.                 observe: observe,
  3403.                 reportProgress: reportProgress
  3404.             }
  3405.         );
  3406.     }
  3407.  
  3408.     /**
  3409.      * Update a User
  3410.      *
  3411.      * @param id
  3412.      * @param body
  3413.      * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
  3414.      * @param reportProgress flag to report request and response progress.
  3415.      */
  3416.     public usersIdPut(id: number, body: User, observe?: 'body', reportProgress?: boolean): Observable<User>;
  3417.     public usersIdPut(id: number, body: User, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<User>>;
  3418.     public usersIdPut(id: number, body: User, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<User>>;
  3419.     public usersIdPut(id: number, body: User, observe: any = 'body', reportProgress: boolean = false ): Observable<any> {
  3420.  
  3421.         if (id === null || id === undefined) {
  3422.             throw new Error('Required parameter id was null or undefined when calling usersIdPut.');
  3423.         }
  3424.  
  3425.         if (body === null || body === undefined) {
  3426.             throw new Error('Required parameter body was null or undefined when calling usersIdPut.');
  3427.         }
  3428.  
  3429.         let headers = this.defaultHeaders;
  3430.  
  3431.         // authentication (basicAuth) required
  3432.         if (this.configuration.username || this.configuration.password) {
  3433.             headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password));
  3434.         }
  3435.  
  3436.         // to determine the Accept header
  3437.         let httpHeaderAccepts: string[] = [
  3438.             'application/json'
  3439.         ];
  3440.         const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
  3441.         if (httpHeaderAcceptSelected != undefined) {
  3442.             headers = headers.set('Accept', httpHeaderAcceptSelected);
  3443.         }
  3444.  
  3445.         // to determine the Content-Type header
  3446.         const consumes: string[] = [
  3447.             'application/json'
  3448.         ];
  3449.         const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
  3450.         if (httpContentTypeSelected != undefined) {
  3451.             headers = headers.set('Content-Type', httpContentTypeSelected);
  3452.         }
  3453.  
  3454.         return this.httpClient.put<User>(`${this.basePath}/users/${encodeURIComponent(String(id))}`,
  3455.             body,
  3456.             {
  3457.                 withCredentials: this.configuration.withCredentials,
  3458.                 headers: headers,
  3459.                 observe: observe,
  3460.                 reportProgress: reportProgress
  3461.             }
  3462.         );
  3463.     }
  3464.  
  3465.     /**
  3466.      * Create a User
  3467.      *
  3468.      * @param body
  3469.      * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
  3470.      * @param reportProgress flag to report request and response progress.
  3471.      */
  3472.     public usersPost(body: User, observe?: 'body', reportProgress?: boolean): Observable<User>;
  3473.     public usersPost(body: User, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<User>>;
  3474.     public usersPost(body: User, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<User>>;
  3475.     public usersPost(body: User, observe: any = 'body', reportProgress: boolean = false ): Observable<any> {
  3476.  
  3477.         if (body === null || body === undefined) {
  3478.             throw new Error('Required parameter body was null or undefined when calling usersPost.');
  3479.         }
  3480.  
  3481.         let headers = this.defaultHeaders;
  3482.  
  3483.         // authentication (basicAuth) required
  3484.         if (this.configuration.username || this.configuration.password) {
  3485.             headers = headers.set('Authorization', 'Basic ' + btoa(this.configuration.username + ':' + this.configuration.password));
  3486.         }
  3487.  
  3488.         // to determine the Accept header
  3489.         let httpHeaderAccepts: string[] = [
  3490.             'application/json'
  3491.         ];
  3492.         const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
  3493.         if (httpHeaderAcceptSelected != undefined) {
  3494.             headers = headers.set('Accept', httpHeaderAcceptSelected);
  3495.         }
  3496.  
  3497.         // to determine the Content-Type header
  3498.         const consumes: string[] = [
  3499.             'application/json'
  3500.         ];
  3501.         const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
  3502.         if (httpContentTypeSelected != undefined) {
  3503.             headers = headers.set('Content-Type', httpContentTypeSelected);
  3504.         }
  3505.  
  3506.         return this.httpClient.post<User>(`${this.basePath}/users`,
  3507.             body,
  3508.             {
  3509.                 withCredentials: this.configuration.withCredentials,
  3510.                 headers: headers,
  3511.                 observe: observe,
  3512.                 reportProgress: reportProgress
  3513.             }
  3514.         );
  3515.     }
  3516.  
  3517. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement