/**
 * rest api interface
 * 项目标准接口
 *
 * The version of the OpenAPI document: 0.0.1
 *
 *
 * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
 * https://openapi-generator.tech
 * Do not edit the class manually.
 */ import { Inject , Injectable , Optional } from '@angular/core' ; import { HttpClient , HttpHeaders , HttpParams , HttpResponse , HttpEvent , HttpParameterCodec } from '@angular/common/http' ; import { CustomHttpParameterCodec } from '../encoder' ; import { Observable } from 'rxjs' ; import { SettingsGroup } from '../model/settingsGroup' ; import { BASE_PATH , COLLECTION_FORMATS } from '../variables' ; import { Configuration } from '../configuration' ; @ Injectable ( { providedIn : 'root' } ) export class AppService { protected basePath = 'http://localhost' ; public defaultHeaders = new HttpHeaders ( ) ; public configuration = new Configuration ( ) ; public encoder : HttpParameterCodec ; constructor ( protected httpClient , @ Optional ( ) @ Inject ( BASE_PATH ) basePath , @ Optional ( ) configuration ) { if ( configuration ) { this . configuration = configuration ; } if ( typeof this . configuration . basePath !== 'string' ) { if ( typeof basePath !== 'string' ) { basePath = this . basePath ; } this . configuration . basePath = basePath ; } this . encoder = this . configuration . encoder || new CustomHttpParameterCodec ( ) ; } param par1 param observe param reportProgress public appDemo ( par1 , observe ? , reportProgress ? ) ; public appDemo ( par1 , observe ? , reportProgress ? ) ; public appDemo ( par1 , observe ? , reportProgress ? ) ; public appDemo ( par1 , observe = 'body' , reportProgress = false ) { if ( par1 === null || par1 === undefined ) { throw new Error ( 'Required parameter par1 was null or undefined when calling appDemo.' ) ; } let headers = this . defaultHeaders ; const httpHeaderAccepts = [ 'application/json' ] ; const httpHeaderAcceptSelected = this . configuration . selectHeaderAccept ( httpHeaderAccepts ) ; if ( httpHeaderAcceptSelected !== undefined ) { headers = headers . set ( 'Accept' , httpHeaderAcceptSelected ) ; } const consumes = [ 'application/json' ] ; const httpContentTypeSelected = this . configuration . selectHeaderContentType ( consumes ) ; if ( httpContentTypeSelected !== undefined ) { headers = headers . set ( 'Content-Type' , httpContentTypeSelected ) ; } return this . httpClient . post < object > ( `${ this . configuration . basePath }/` , par1 , { withCredentials : this . configuration . withCredentials , headers : headers , observe : observe , reportProgress : reportProgress } ) ; } param name param observe param reportProgress public appGetAppSettings ( name ? , observe ? , reportProgress ? ) ; public appGetAppSettings ( name ? , observe ? , reportProgress ? ) ; public appGetAppSettings ( name ? , observe ? , reportProgress ? ) ; public appGetAppSettings ( name ? , observe = 'body' , reportProgress = false ) { let queryParameters = new HttpParams ( { encoder : this . encoder } ) ; if ( name !== undefined && name !== null ) { queryParameters = queryParameters . set ( 'name' , < any > name ) ; } let headers = this . defaultHeaders ; const httpHeaderAccepts = [ 'application/json' ] ; const httpHeaderAcceptSelected = this . configuration . selectHeaderAccept ( httpHeaderAccepts ) ; if ( httpHeaderAcceptSelected !== undefined ) { headers = headers . set ( 'Accept' , httpHeaderAcceptSelected ) ; } return this . httpClient . get < SettingsGroup > ( `${ this . configuration . basePath }/name/${ encodeURIComponent ( String ( name ) ) }` , { params : queryParameters , withCredentials : this . configuration . withCredentials , headers : headers , observe : observe , reportProgress : reportProgress } ) ; } param observe param reportProgress public appRoot ( observe ? , reportProgress ? ) ; public appRoot ( observe ? , reportProgress ? ) ; public appRoot ( observe ? , reportProgress ? ) ; public appRoot ( observe = 'body' , reportProgress = false ) { let headers = this . defaultHeaders ; const httpHeaderAccepts = [ 'application/json' ] ; const httpHeaderAcceptSelected = this . configuration . selectHeaderAccept ( httpHeaderAccepts ) ; if ( httpHeaderAcceptSelected !== undefined ) { headers = headers . set ( 'Accept' , httpHeaderAcceptSelected ) ; } return this . httpClient . get < object > ( `${ this . configuration . basePath }/` , { withCredentials : this . configuration . withCredentials , headers : headers , observe : observe , reportProgress : reportProgress } ) ; } }