|
| 1 | +/** |
| 2 | + * MSR Interface definitions |
| 3 | + * Compliant with IEC 63173-2:2025 SECOM version 2 |
| 4 | + * |
| 5 | + * OpenAPI spec version: v2 |
| 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 | + *//* tslint:disable:no-unused-variable member-ordering */ |
| 12 | + |
| 13 | +import { Inject, Injectable, Optional } from '@angular/core'; |
| 14 | +import { HttpClient, HttpHeaders, HttpParams, |
| 15 | + HttpResponse, HttpEvent } from '@angular/common/http'; |
| 16 | +import { CustomHttpUrlEncodingCodec } from '../encoder'; |
| 17 | + |
| 18 | +import { Observable } from 'rxjs'; |
| 19 | + |
| 20 | +import { InlineResponse200 } from '../model/inlineResponse200'; |
| 21 | + |
| 22 | +import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; |
| 23 | +import { Configuration } from '../configuration'; |
| 24 | + |
| 25 | + |
| 26 | +@Injectable() |
| 27 | +export class ServiceService { |
| 28 | + |
| 29 | + protected basePath = '/'; |
| 30 | + public defaultHeaders = new HttpHeaders(); |
| 31 | + public configuration = new Configuration(); |
| 32 | + |
| 33 | + constructor(protected httpClient: HttpClient, @Optional()@Inject(BASE_PATH) basePath: string, @Optional() configuration: Configuration) { |
| 34 | + if (basePath) { |
| 35 | + this.basePath = basePath; |
| 36 | + } |
| 37 | + if (configuration) { |
| 38 | + this.configuration = configuration; |
| 39 | + this.basePath = basePath || configuration.basePath || this.basePath; |
| 40 | + } |
| 41 | + } |
| 42 | + |
| 43 | + /** |
| 44 | + * @param consumes string[] mime-types |
| 45 | + * @return true: consumes contains 'multipart/form-data', false: otherwise |
| 46 | + */ |
| 47 | + private canConsumeForm(consumes: string[]): boolean { |
| 48 | + const form = 'multipart/form-data'; |
| 49 | + for (const consume of consumes) { |
| 50 | + if (form === consume) { |
| 51 | + return true; |
| 52 | + } |
| 53 | + } |
| 54 | + return false; |
| 55 | + } |
| 56 | + |
| 57 | + |
| 58 | + /** |
| 59 | + * |
| 60 | + * |
| 61 | + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. |
| 62 | + * @param reportProgress flag to report request and response progress. |
| 63 | + */ |
| 64 | + public v2PingGet(observe?: 'body', reportProgress?: boolean): Observable<InlineResponse200>; |
| 65 | + public v2PingGet(observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<InlineResponse200>>; |
| 66 | + public v2PingGet(observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<InlineResponse200>>; |
| 67 | + public v2PingGet(observe: any = 'body', reportProgress: boolean = false ): Observable<any> { |
| 68 | + |
| 69 | + let headers = this.defaultHeaders; |
| 70 | + |
| 71 | + // to determine the Accept header |
| 72 | + let httpHeaderAccepts: string[] = [ |
| 73 | + 'application/json' |
| 74 | + ]; |
| 75 | + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); |
| 76 | + if (httpHeaderAcceptSelected != undefined) { |
| 77 | + headers = headers.set('Accept', httpHeaderAcceptSelected); |
| 78 | + } |
| 79 | + |
| 80 | + // to determine the Content-Type header |
| 81 | + const consumes: string[] = [ |
| 82 | + ]; |
| 83 | + |
| 84 | + return this.httpClient.request<InlineResponse200>('get',`${this.basePath}/v2/ping`, |
| 85 | + { |
| 86 | + withCredentials: this.configuration.withCredentials, |
| 87 | + headers: headers, |
| 88 | + observe: observe, |
| 89 | + reportProgress: reportProgress |
| 90 | + } |
| 91 | + ); |
| 92 | + } |
| 93 | + |
| 94 | +} |
0 commit comments