Advertisement
Guest User

Untitled

a guest
May 21st, 2019
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.37 KB | None | 0 0
  1. /**
  2. * deleteGatewayFromClient
  3. *
  4. * @param clientId clientId
  5. * @param gatewayId gatewayId
  6. * @param body
  7. * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
  8. * @param reportProgress flag to report request and response progress.
  9. */
  10. public deleteGatewayFromClient(clientId: number, gatewayId: number, accepted?: boolean, alias?: string, observe?: 'body', reportProgress?: boolean): Observable<any>;
  11. public deleteGatewayFromClient(clientId: number, gatewayId: number, accepted?: boolean, alias?: string, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<any>>;
  12. public deleteGatewayFromClient(clientId: number, gatewayId: number, accepted?: boolean, alias?: string, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<any>>;
  13. public deleteGatewayFromClient(clientId: number, gatewayId: number, accepted?: boolean, alias?: string, observe: any = 'body', reportProgress: boolean = false): Observable<any> {
  14.  
  15. if (clientId === null || gatewayId === undefined) {
  16. throw new Error('Required parameters null or undefined when calling deleteGatewayFromClient.');
  17. }
  18.  
  19. let headers = this.defaultHeaders;
  20.  
  21. // to determine the Accept header
  22. const httpHeaderAccepts: string[] = [
  23. ];
  24. const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
  25. if (httpHeaderAcceptSelected != undefined) {
  26. headers = headers.set('Accept', httpHeaderAcceptSelected);
  27. }
  28.  
  29. // to determine the Content-Type header
  30. const consumes: string[] = [
  31. 'application/json'
  32. ];
  33. const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
  34. if (httpContentTypeSelected != undefined) {
  35. headers = headers.set('Content-Type', httpContentTypeSelected);
  36. }
  37.  
  38. return this.httpClient.delete<any>(`${this.basePath}/clients/${encodeURIComponent(String(clientId))}/gateways/${encodeURIComponent(String(gatewayId))}/`,
  39. {
  40. withCredentials: this.configuration.withCredentials,
  41. headers,
  42. observe,
  43. reportProgress
  44. }
  45. );
  46. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement