-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathProcessesApi.ts
More file actions
591 lines (485 loc) · 26.8 KB
/
ProcessesApi.ts
File metadata and controls
591 lines (485 loc) · 26.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
// TODO: better import syntax?
import {BaseAPIRequestFactory, RequiredError, COLLECTION_FORMATS} from './baseapi';
import {Configuration} from '../configuration';
import {RequestContext, HttpMethod, ResponseContext, HttpFile, HttpInfo} from '../http/http';
import {ObjectSerializer} from '../models/ObjectSerializer';
import {ApiException} from './exception';
import {canConsumeForm, isCodeInRange} from '../util';
import {SecurityAuthentication} from '../auth/auth';
import { Exception } from '../models/Exception';
import { Execute } from '../models/Execute';
import { JobList } from '../models/JobList';
import { NDVIProcessOutputs } from '../models/NDVIProcessOutputs';
import { NDVIProcessParams } from '../models/NDVIProcessParams';
import { Process } from '../models/Process';
import { ProcessList } from '../models/ProcessList';
import { Results } from '../models/Results';
import { StatusInfo } from '../models/StatusInfo';
/**
* no description
*/
export class ProcessesApiRequestFactory extends BaseAPIRequestFactory {
/**
* Cancel a job execution and remove it from the jobs list. For more information, see [Section 13](https://docs.ogc.org/is/18-062/18-062.html#Dismiss).
* Cancel a job execution, remove finished job
* @param jobId
*/
public async _delete(jobId: string, _options?: Configuration): Promise<RequestContext> {
let _config = _options || this.configuration;
// verify required parameter 'jobId' is not null or undefined
if (jobId === null || jobId === undefined) {
throw new RequiredError("ProcessesApi", "_delete", "jobId");
}
// Path Params
const localVarPath = '/jobs/{jobId}'
.replace('{' + 'jobId' + '}', encodeURIComponent(String(jobId)));
// Make Request Context
const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.DELETE);
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
const defaultAuth: SecurityAuthentication | undefined = _config?.authMethods?.default
if (defaultAuth?.applySecurityAuthentication) {
await defaultAuth?.applySecurityAuthentication(requestContext);
}
return requestContext;
}
/**
* @param nDVIProcessParams
*/
public async executeNdvi(nDVIProcessParams: NDVIProcessParams, _options?: Configuration): Promise<RequestContext> {
let _config = _options || this.configuration;
// verify required parameter 'nDVIProcessParams' is not null or undefined
if (nDVIProcessParams === null || nDVIProcessParams === undefined) {
throw new RequiredError("ProcessesApi", "executeNdvi", "nDVIProcessParams");
}
// Path Params
const localVarPath = '/processes/ndvi/execution';
// Make Request Context
const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST);
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
// Body Params
const contentType = ObjectSerializer.getPreferredMediaType([
"application/json"
]);
requestContext.setHeaderParam("Content-Type", contentType);
const serializedBody = ObjectSerializer.stringify(
ObjectSerializer.serialize(nDVIProcessParams, "NDVIProcessParams", ""),
contentType
);
requestContext.setBody(serializedBody);
const defaultAuth: SecurityAuthentication | undefined = _config?.authMethods?.default
if (defaultAuth?.applySecurityAuthentication) {
await defaultAuth?.applySecurityAuthentication(requestContext);
}
return requestContext;
}
/**
* Create a new job. For more information, see [Section 7.11](https://docs.ogc.org/is/18-062/18-062.html#sc_create_job).
* Execute a process
* @param processID
* @param execute
*/
public async execution(processID: string, execute: Execute, _options?: Configuration): Promise<RequestContext> {
let _config = _options || this.configuration;
// verify required parameter 'processID' is not null or undefined
if (processID === null || processID === undefined) {
throw new RequiredError("ProcessesApi", "execution", "processID");
}
// verify required parameter 'execute' is not null or undefined
if (execute === null || execute === undefined) {
throw new RequiredError("ProcessesApi", "execution", "execute");
}
// Path Params
const localVarPath = '/processes/{processID}/execution'
.replace('{' + 'processID' + '}', encodeURIComponent(String(processID)));
// Make Request Context
const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.POST);
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
// Body Params
const contentType = ObjectSerializer.getPreferredMediaType([
"application/json"
]);
requestContext.setHeaderParam("Content-Type", contentType);
const serializedBody = ObjectSerializer.stringify(
ObjectSerializer.serialize(execute, "Execute", ""),
contentType
);
requestContext.setBody(serializedBody);
const defaultAuth: SecurityAuthentication | undefined = _config?.authMethods?.default
if (defaultAuth?.applySecurityAuthentication) {
await defaultAuth?.applySecurityAuthentication(requestContext);
}
return requestContext;
}
/**
* For more information, see [Section 11](https://docs.ogc.org/is/18-062/18-062.html#sc_job_list).
* Retrieve the list of jobs
* @param limit Amount of items to return
* @param offset Offset into the items list
*/
public async jobs(limit?: number, offset?: number, _options?: Configuration): Promise<RequestContext> {
let _config = _options || this.configuration;
// Path Params
const localVarPath = '/jobs';
// Make Request Context
const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.GET);
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
// Query Params
if (limit !== undefined) {
requestContext.setQueryParam("limit", ObjectSerializer.serialize(limit, "number", ""));
}
// Query Params
if (offset !== undefined) {
requestContext.setQueryParam("offset", ObjectSerializer.serialize(offset, "number", ""));
}
const defaultAuth: SecurityAuthentication | undefined = _config?.authMethods?.default
if (defaultAuth?.applySecurityAuthentication) {
await defaultAuth?.applySecurityAuthentication(requestContext);
}
return requestContext;
}
/**
* The process description contains information about inputs and outputs and a link to the execution-endpoint for the process. The Core does not mandate the use of a specific process description to specify the interface of a process. That said, the Core requirements class makes the following recommendation: Implementations SHOULD consider supporting the OGC process description. For more information, see Section 7.10.
* Retrieve a processes description
* @param processID
*/
public async process(processID: string, _options?: Configuration): Promise<RequestContext> {
let _config = _options || this.configuration;
// verify required parameter 'processID' is not null or undefined
if (processID === null || processID === undefined) {
throw new RequiredError("ProcessesApi", "process", "processID");
}
// Path Params
const localVarPath = '/processes/{processID}'
.replace('{' + 'processID' + '}', encodeURIComponent(String(processID)));
// Make Request Context
const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.GET);
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
const defaultAuth: SecurityAuthentication | undefined = _config?.authMethods?.default
if (defaultAuth?.applySecurityAuthentication) {
await defaultAuth?.applySecurityAuthentication(requestContext);
}
return requestContext;
}
/**
* The list of processes contains a summary of each process the OGC API - Processes offers, including the link to a more detailed description of the process. For more information, see [Section 7.9](https://docs.ogc.org/is/18-062/18-062.html#sc_process_list).
* Retrieve the list of available processes
*/
public async processes(_options?: Configuration): Promise<RequestContext> {
let _config = _options || this.configuration;
// Path Params
const localVarPath = '/processes';
// Make Request Context
const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.GET);
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
const defaultAuth: SecurityAuthentication | undefined = _config?.authMethods?.default
if (defaultAuth?.applySecurityAuthentication) {
await defaultAuth?.applySecurityAuthentication(requestContext);
}
return requestContext;
}
/**
* Lists available results of a job. In case of a failure, lists exceptions instead. For more information, see [Section 7.13](https://docs.ogc.org/is/18-062r2/18-062r2.html#sc_retrieve_job_results).
* Retrieve the result(s) of a job
* @param jobId
*/
public async results(jobId: string, _options?: Configuration): Promise<RequestContext> {
let _config = _options || this.configuration;
// verify required parameter 'jobId' is not null or undefined
if (jobId === null || jobId === undefined) {
throw new RequiredError("ProcessesApi", "results", "jobId");
}
// Path Params
const localVarPath = '/jobs/{jobId}/results'
.replace('{' + 'jobId' + '}', encodeURIComponent(String(jobId)));
// Make Request Context
const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.GET);
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
const defaultAuth: SecurityAuthentication | undefined = _config?.authMethods?.default
if (defaultAuth?.applySecurityAuthentication) {
await defaultAuth?.applySecurityAuthentication(requestContext);
}
return requestContext;
}
/**
* Shows the status of a job. For more information, see [Section 7.12](https://docs.ogc.org/is/18-062/18-062.html#sc_retrieve_status_info).
* Retrieve the status of a job
* @param jobId
*/
public async status(jobId: string, _options?: Configuration): Promise<RequestContext> {
let _config = _options || this.configuration;
// verify required parameter 'jobId' is not null or undefined
if (jobId === null || jobId === undefined) {
throw new RequiredError("ProcessesApi", "status", "jobId");
}
// Path Params
const localVarPath = '/jobs/{jobId}'
.replace('{' + 'jobId' + '}', encodeURIComponent(String(jobId)));
// Make Request Context
const requestContext = _config.baseServer.makeRequestContext(localVarPath, HttpMethod.GET);
requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8")
const defaultAuth: SecurityAuthentication | undefined = _config?.authMethods?.default
if (defaultAuth?.applySecurityAuthentication) {
await defaultAuth?.applySecurityAuthentication(requestContext);
}
return requestContext;
}
}
export class ProcessesApiResponseProcessor {
/**
* Unwraps the actual response sent by the server from the response context and deserializes the response content
* to the expected objects
*
* @params response Response returned by the server for a request to _delete
* @throws ApiException if the response code was not in [200, 299]
*/
public async _deleteWithHttpInfo(response: ResponseContext): Promise<HttpInfo<StatusInfo >> {
const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
if (isCodeInRange("200", response.httpStatusCode)) {
const body: StatusInfo = ObjectSerializer.deserialize(
ObjectSerializer.parse(await response.body.text(), contentType),
"StatusInfo", ""
) as StatusInfo;
return new HttpInfo(response.httpStatusCode, response.headers, response.body, body);
}
if (isCodeInRange("404", response.httpStatusCode)) {
const body: Exception = ObjectSerializer.deserialize(
ObjectSerializer.parse(await response.body.text(), contentType),
"Exception", ""
) as Exception;
throw new ApiException<Exception>(response.httpStatusCode, "The requested URI was not found.", body, response.headers);
}
// Work around for missing responses in specification, e.g. for petstore.yaml
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
const body: StatusInfo = ObjectSerializer.deserialize(
ObjectSerializer.parse(await response.body.text(), contentType),
"StatusInfo", ""
) as StatusInfo;
return new HttpInfo(response.httpStatusCode, response.headers, response.body, body);
}
throw new ApiException<string | Blob | undefined>(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
}
/**
* Unwraps the actual response sent by the server from the response context and deserializes the response content
* to the expected objects
*
* @params response Response returned by the server for a request to executeNdvi
* @throws ApiException if the response code was not in [200, 299]
*/
public async executeNdviWithHttpInfo(response: ResponseContext): Promise<HttpInfo<NDVIProcessOutputs >> {
const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
if (isCodeInRange("200", response.httpStatusCode)) {
const body: NDVIProcessOutputs = ObjectSerializer.deserialize(
ObjectSerializer.parse(await response.body.text(), contentType),
"NDVIProcessOutputs", ""
) as NDVIProcessOutputs;
return new HttpInfo(response.httpStatusCode, response.headers, response.body, body);
}
// Work around for missing responses in specification, e.g. for petstore.yaml
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
const body: NDVIProcessOutputs = ObjectSerializer.deserialize(
ObjectSerializer.parse(await response.body.text(), contentType),
"NDVIProcessOutputs", ""
) as NDVIProcessOutputs;
return new HttpInfo(response.httpStatusCode, response.headers, response.body, body);
}
throw new ApiException<string | Blob | undefined>(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
}
/**
* Unwraps the actual response sent by the server from the response context and deserializes the response content
* to the expected objects
*
* @params response Response returned by the server for a request to execution
* @throws ApiException if the response code was not in [200, 299]
*/
public async executionWithHttpInfo(response: ResponseContext): Promise<HttpInfo<Results >> {
const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
if (isCodeInRange("200", response.httpStatusCode)) {
const body: Results = ObjectSerializer.deserialize(
ObjectSerializer.parse(await response.body.text(), contentType),
"Results", ""
) as Results;
return new HttpInfo(response.httpStatusCode, response.headers, response.body, body);
}
if (isCodeInRange("404", response.httpStatusCode)) {
const body: Exception = ObjectSerializer.deserialize(
ObjectSerializer.parse(await response.body.text(), contentType),
"Exception", ""
) as Exception;
throw new ApiException<Exception>(response.httpStatusCode, "The requested URI was not found.", body, response.headers);
}
// Work around for missing responses in specification, e.g. for petstore.yaml
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
const body: Results = ObjectSerializer.deserialize(
ObjectSerializer.parse(await response.body.text(), contentType),
"Results", ""
) as Results;
return new HttpInfo(response.httpStatusCode, response.headers, response.body, body);
}
throw new ApiException<string | Blob | undefined>(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
}
/**
* Unwraps the actual response sent by the server from the response context and deserializes the response content
* to the expected objects
*
* @params response Response returned by the server for a request to jobs
* @throws ApiException if the response code was not in [200, 299]
*/
public async jobsWithHttpInfo(response: ResponseContext): Promise<HttpInfo<JobList >> {
const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
if (isCodeInRange("200", response.httpStatusCode)) {
const body: JobList = ObjectSerializer.deserialize(
ObjectSerializer.parse(await response.body.text(), contentType),
"JobList", ""
) as JobList;
return new HttpInfo(response.httpStatusCode, response.headers, response.body, body);
}
if (isCodeInRange("404", response.httpStatusCode)) {
const body: Exception = ObjectSerializer.deserialize(
ObjectSerializer.parse(await response.body.text(), contentType),
"Exception", ""
) as Exception;
throw new ApiException<Exception>(response.httpStatusCode, "The requested URI was not found.", body, response.headers);
}
// Work around for missing responses in specification, e.g. for petstore.yaml
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
const body: JobList = ObjectSerializer.deserialize(
ObjectSerializer.parse(await response.body.text(), contentType),
"JobList", ""
) as JobList;
return new HttpInfo(response.httpStatusCode, response.headers, response.body, body);
}
throw new ApiException<string | Blob | undefined>(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
}
/**
* Unwraps the actual response sent by the server from the response context and deserializes the response content
* to the expected objects
*
* @params response Response returned by the server for a request to process
* @throws ApiException if the response code was not in [200, 299]
*/
public async processWithHttpInfo(response: ResponseContext): Promise<HttpInfo<Process >> {
const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
if (isCodeInRange("200", response.httpStatusCode)) {
const body: Process = ObjectSerializer.deserialize(
ObjectSerializer.parse(await response.body.text(), contentType),
"Process", ""
) as Process;
return new HttpInfo(response.httpStatusCode, response.headers, response.body, body);
}
if (isCodeInRange("404", response.httpStatusCode)) {
const body: Exception = ObjectSerializer.deserialize(
ObjectSerializer.parse(await response.body.text(), contentType),
"Exception", ""
) as Exception;
throw new ApiException<Exception>(response.httpStatusCode, "The requested URI was not found.", body, response.headers);
}
// Work around for missing responses in specification, e.g. for petstore.yaml
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
const body: Process = ObjectSerializer.deserialize(
ObjectSerializer.parse(await response.body.text(), contentType),
"Process", ""
) as Process;
return new HttpInfo(response.httpStatusCode, response.headers, response.body, body);
}
throw new ApiException<string | Blob | undefined>(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
}
/**
* Unwraps the actual response sent by the server from the response context and deserializes the response content
* to the expected objects
*
* @params response Response returned by the server for a request to processes
* @throws ApiException if the response code was not in [200, 299]
*/
public async processesWithHttpInfo(response: ResponseContext): Promise<HttpInfo<ProcessList >> {
const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
if (isCodeInRange("200", response.httpStatusCode)) {
const body: ProcessList = ObjectSerializer.deserialize(
ObjectSerializer.parse(await response.body.text(), contentType),
"ProcessList", ""
) as ProcessList;
return new HttpInfo(response.httpStatusCode, response.headers, response.body, body);
}
if (isCodeInRange("500", response.httpStatusCode)) {
const body: Exception = ObjectSerializer.deserialize(
ObjectSerializer.parse(await response.body.text(), contentType),
"Exception", ""
) as Exception;
throw new ApiException<Exception>(response.httpStatusCode, "A server error occurred.", body, response.headers);
}
// Work around for missing responses in specification, e.g. for petstore.yaml
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
const body: ProcessList = ObjectSerializer.deserialize(
ObjectSerializer.parse(await response.body.text(), contentType),
"ProcessList", ""
) as ProcessList;
return new HttpInfo(response.httpStatusCode, response.headers, response.body, body);
}
throw new ApiException<string | Blob | undefined>(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
}
/**
* Unwraps the actual response sent by the server from the response context and deserializes the response content
* to the expected objects
*
* @params response Response returned by the server for a request to results
* @throws ApiException if the response code was not in [200, 299]
*/
public async resultsWithHttpInfo(response: ResponseContext): Promise<HttpInfo<Results >> {
const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
if (isCodeInRange("200", response.httpStatusCode)) {
const body: Results = ObjectSerializer.deserialize(
ObjectSerializer.parse(await response.body.text(), contentType),
"Results", ""
) as Results;
return new HttpInfo(response.httpStatusCode, response.headers, response.body, body);
}
if (isCodeInRange("404", response.httpStatusCode)) {
const body: Exception = ObjectSerializer.deserialize(
ObjectSerializer.parse(await response.body.text(), contentType),
"Exception", ""
) as Exception;
throw new ApiException<Exception>(response.httpStatusCode, "The requested URI was not found.", body, response.headers);
}
// Work around for missing responses in specification, e.g. for petstore.yaml
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
const body: Results = ObjectSerializer.deserialize(
ObjectSerializer.parse(await response.body.text(), contentType),
"Results", ""
) as Results;
return new HttpInfo(response.httpStatusCode, response.headers, response.body, body);
}
throw new ApiException<string | Blob | undefined>(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
}
/**
* Unwraps the actual response sent by the server from the response context and deserializes the response content
* to the expected objects
*
* @params response Response returned by the server for a request to status
* @throws ApiException if the response code was not in [200, 299]
*/
public async statusWithHttpInfo(response: ResponseContext): Promise<HttpInfo<StatusInfo >> {
const contentType = ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
if (isCodeInRange("200", response.httpStatusCode)) {
const body: StatusInfo = ObjectSerializer.deserialize(
ObjectSerializer.parse(await response.body.text(), contentType),
"StatusInfo", ""
) as StatusInfo;
return new HttpInfo(response.httpStatusCode, response.headers, response.body, body);
}
if (isCodeInRange("404", response.httpStatusCode)) {
const body: Exception = ObjectSerializer.deserialize(
ObjectSerializer.parse(await response.body.text(), contentType),
"Exception", ""
) as Exception;
throw new ApiException<Exception>(response.httpStatusCode, "The requested URI was not found.", body, response.headers);
}
// Work around for missing responses in specification, e.g. for petstore.yaml
if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) {
const body: StatusInfo = ObjectSerializer.deserialize(
ObjectSerializer.parse(await response.body.text(), contentType),
"StatusInfo", ""
) as StatusInfo;
return new HttpInfo(response.httpStatusCode, response.headers, response.body, body);
}
throw new ApiException<string | Blob | undefined>(response.httpStatusCode, "Unknown API Status Code!", await response.getBodyAsAny(), response.headers);
}
}