/** * Density Maps Microservice * This is the API and the model definition for the FIWOO'S microservice of Density Maps. * * OpenAPI spec version: 1.0 * * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ /* tslint:disable:no-unused-variable member-ordering */ import { Inject, Injectable, Optional } from '@angular/core'; import { HttpClient, HttpHeaders, HttpParams, HttpResponse, HttpEvent } from '@angular/common/http'; import { CustomHttpUrlEncodingCodec } from '../encoder'; import { Observable } from 'rxjs/Observable'; import { ResponseEntity } from '../model/responseEntity'; import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; import { Configuration } from '../configuration'; @Injectable() export class DensityMapsControllerService { protected basePath = 'https://us2.fiwoo.eu:5000/bi/density'; public defaultHeaders = new HttpHeaders(); public configuration = new Configuration(); constructor(protected httpClient: HttpClient, @Optional()@Inject(BASE_PATH) basePath: string, @Optional() configuration: Configuration) { if (basePath) { this.basePath = basePath; } if (configuration) { this.configuration = configuration; this.basePath = basePath || configuration.basePath || this.basePath; } } /** * @param consumes string[] mime-types * @return true: consumes contains 'multipart/form-data', false: otherwise */ private canConsumeForm(consumes: string[]): boolean { const form = 'multipart/form-data'; for (let consume of consumes) { if (form === consume) { return true; } } return false; } /** * getDensityMapReverse * * @param body body * @param xAuthorizationS4c X-Authorization-s4c * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ public getDensityMapReverseUsingPOST(body: string, xAuthorizationS4c: string, observe?: 'body', reportProgress?: boolean): Observable; public getDensityMapReverseUsingPOST(body: string, xAuthorizationS4c: string, observe?: 'response', reportProgress?: boolean): Observable>; public getDensityMapReverseUsingPOST(body: string, xAuthorizationS4c: string, observe?: 'events', reportProgress?: boolean): Observable>; public getDensityMapReverseUsingPOST(body: string, xAuthorizationS4c: string, observe: any = 'body', reportProgress: boolean = false ): Observable { if (body === null || body === undefined) { throw new Error('Required parameter body was null or undefined when calling getDensityMapReverseUsingPOST.'); } if (xAuthorizationS4c === null || xAuthorizationS4c === undefined) { throw new Error('Required parameter xAuthorizationS4c was null or undefined when calling getDensityMapReverseUsingPOST.'); } let headers = this.defaultHeaders; if (xAuthorizationS4c !== undefined && xAuthorizationS4c !== null) { headers = headers.set('X-Authorization-s4c', String(xAuthorizationS4c)); } // to determine the Accept header let httpHeaderAccepts: string[] = [ 'application/ld+json', 'application/json', 'application/ngsi+json' ]; let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected != undefined) { headers = headers.set("Accept", httpHeaderAcceptSelected); } // to determine the Content-Type header let consumes: string[] = [ 'application/json' ]; let httpContentTypeSelected:string | undefined = this.configuration.selectHeaderContentType(consumes); if (httpContentTypeSelected != undefined) { headers = headers.set("Content-Type", httpContentTypeSelected); } return this.httpClient.post(`${this.basePath}/densityMap/reversed`, body, { withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, reportProgress: reportProgress } ); } /** * getDensityMap * * @param body body * @param xAuthorizationS4c X-Authorization-s4c * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ public getDensityMapUsingPOST(body: string, xAuthorizationS4c: string, observe?: 'body', reportProgress?: boolean): Observable; public getDensityMapUsingPOST(body: string, xAuthorizationS4c: string, observe?: 'response', reportProgress?: boolean): Observable>; public getDensityMapUsingPOST(body: string, xAuthorizationS4c: string, observe?: 'events', reportProgress?: boolean): Observable>; public getDensityMapUsingPOST(body: string, xAuthorizationS4c: string, observe: any = 'body', reportProgress: boolean = false ): Observable { if (body === null || body === undefined) { throw new Error('Required parameter body was null or undefined when calling getDensityMapUsingPOST.'); } if (xAuthorizationS4c === null || xAuthorizationS4c === undefined) { throw new Error('Required parameter xAuthorizationS4c was null or undefined when calling getDensityMapUsingPOST.'); } let headers = this.defaultHeaders; if (xAuthorizationS4c !== undefined && xAuthorizationS4c !== null) { headers = headers.set('X-Authorization-s4c', String(xAuthorizationS4c)); } // to determine the Accept header let httpHeaderAccepts: string[] = [ 'application/ld+json', 'application/json', 'application/ngsi+json' ]; let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected != undefined) { headers = headers.set("Accept", httpHeaderAcceptSelected); } // to determine the Content-Type header let consumes: string[] = [ 'application/json' ]; let httpContentTypeSelected:string | undefined = this.configuration.selectHeaderContentType(consumes); if (httpContentTypeSelected != undefined) { headers = headers.set("Content-Type", httpContentTypeSelected); } return this.httpClient.post(`${this.basePath}/densityMap`, body, { withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, reportProgress: reportProgress } ); } /** * getSwagger * * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ public getSwaggerUsingGET(observe?: 'body', reportProgress?: boolean): Observable; public getSwaggerUsingGET(observe?: 'response', reportProgress?: boolean): Observable>; public getSwaggerUsingGET(observe?: 'events', reportProgress?: boolean): Observable>; public getSwaggerUsingGET(observe: any = 'body', reportProgress: boolean = false ): Observable { let headers = this.defaultHeaders; // to determine the Accept header let httpHeaderAccepts: string[] = [ 'application/json' ]; let httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected != undefined) { headers = headers.set("Accept", httpHeaderAcceptSelected); } // to determine the Content-Type header let consumes: string[] = [ 'application/json' ]; return this.httpClient.get(`${this.basePath}/swagger`, { withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, reportProgress: reportProgress } ); } }