@@ -7,10 +7,10 @@ class PetApi {
7
7
8
8
PetApi ([ApiClient apiClient]) : apiClient = apiClient ?? defaultApiClient;
9
9
10
- /// Add a new pet to the store
10
+ /// Add a new pet to the store with HTTP info returned
11
11
///
12
12
///
13
- Future addPet (Pet body) async {
13
+ Future addPetWithHttpInfo (Pet body) async {
14
14
Object postBody = body;
15
15
16
16
// verify required params are set
@@ -48,18 +48,26 @@ class PetApi {
48
48
formParams,
49
49
contentType,
50
50
authNames);
51
+ return response;
52
+ }
51
53
54
+ /// Add a new pet to the store
55
+ ///
56
+ ///
57
+ Future addPet (Pet body) async {
58
+ Response response = await addPetWithHttpInfo (body);
52
59
if (response.statusCode >= 400 ) {
53
60
throw ApiException (response.statusCode, _decodeBodyBytes (response));
54
61
} else if (response.body != null ) {
55
62
} else {
56
63
return ;
57
64
}
58
65
}
59
- /// Deletes a pet
66
+
67
+ /// Deletes a pet with HTTP info returned
60
68
///
61
69
///
62
- Future deletePet (int petId, { String apiKey }) async {
70
+ Future deletePetWithHttpInfo (int petId, { String apiKey }) async {
63
71
Object postBody;
64
72
65
73
// verify required params are set
@@ -98,18 +106,26 @@ class PetApi {
98
106
formParams,
99
107
contentType,
100
108
authNames);
109
+ return response;
110
+ }
101
111
112
+ /// Deletes a pet
113
+ ///
114
+ ///
115
+ Future deletePet (int petId, { String apiKey }) async {
116
+ Response response = await deletePetWithHttpInfo (petId, apiKey: apiKey );
102
117
if (response.statusCode >= 400 ) {
103
118
throw ApiException (response.statusCode, _decodeBodyBytes (response));
104
119
} else if (response.body != null ) {
105
120
} else {
106
121
return ;
107
122
}
108
123
}
109
- /// Finds Pets by status
124
+
125
+ /// Finds Pets by status with HTTP info returned
110
126
///
111
127
/// Multiple status values can be provided with comma separated strings
112
- Future <List < Pet >> findPetsByStatus (List <String > status) async {
128
+ Future <Response > findPetsByStatusWithHttpInfo (List <String > status) async {
113
129
Object postBody;
114
130
115
131
// verify required params are set
@@ -148,7 +164,14 @@ class PetApi {
148
164
formParams,
149
165
contentType,
150
166
authNames);
167
+ return response;
168
+ }
151
169
170
+ /// Finds Pets by status
171
+ ///
172
+ /// Multiple status values can be provided with comma separated strings
173
+ Future <List <Pet >> findPetsByStatus (List <String > status) async {
174
+ Response response = await findPetsByStatusWithHttpInfo (status);
152
175
if (response.statusCode >= 400 ) {
153
176
throw ApiException (response.statusCode, _decodeBodyBytes (response));
154
177
} else if (response.body != null ) {
@@ -157,10 +180,11 @@ class PetApi {
157
180
return null ;
158
181
}
159
182
}
160
- /// Finds Pets by tags
183
+
184
+ /// Finds Pets by tags with HTTP info returned
161
185
///
162
186
/// Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
163
- Future <List < Pet >> findPetsByTags (List <String > tags) async {
187
+ Future <Response > findPetsByTagsWithHttpInfo (List <String > tags) async {
164
188
Object postBody;
165
189
166
190
// verify required params are set
@@ -199,7 +223,14 @@ class PetApi {
199
223
formParams,
200
224
contentType,
201
225
authNames);
226
+ return response;
227
+ }
202
228
229
+ /// Finds Pets by tags
230
+ ///
231
+ /// Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
232
+ Future <List <Pet >> findPetsByTags (List <String > tags) async {
233
+ Response response = await findPetsByTagsWithHttpInfo (tags);
203
234
if (response.statusCode >= 400 ) {
204
235
throw ApiException (response.statusCode, _decodeBodyBytes (response));
205
236
} else if (response.body != null ) {
@@ -208,10 +239,11 @@ class PetApi {
208
239
return null ;
209
240
}
210
241
}
211
- /// Find pet by ID
242
+
243
+ /// Find pet by ID with HTTP info returned
212
244
///
213
245
/// Returns a single pet
214
- Future <Pet > getPetById (int petId) async {
246
+ Future <Response > getPetByIdWithHttpInfo (int petId) async {
215
247
Object postBody;
216
248
217
249
// verify required params are set
@@ -249,7 +281,14 @@ class PetApi {
249
281
formParams,
250
282
contentType,
251
283
authNames);
284
+ return response;
285
+ }
252
286
287
+ /// Find pet by ID
288
+ ///
289
+ /// Returns a single pet
290
+ Future <Pet > getPetById (int petId) async {
291
+ Response response = await getPetByIdWithHttpInfo (petId);
253
292
if (response.statusCode >= 400 ) {
254
293
throw ApiException (response.statusCode, _decodeBodyBytes (response));
255
294
} else if (response.body != null ) {
@@ -258,10 +297,11 @@ class PetApi {
258
297
return null ;
259
298
}
260
299
}
261
- /// Update an existing pet
300
+
301
+ /// Update an existing pet with HTTP info returned
262
302
///
263
303
///
264
- Future updatePet (Pet body) async {
304
+ Future updatePetWithHttpInfo (Pet body) async {
265
305
Object postBody = body;
266
306
267
307
// verify required params are set
@@ -299,18 +339,26 @@ class PetApi {
299
339
formParams,
300
340
contentType,
301
341
authNames);
342
+ return response;
343
+ }
302
344
345
+ /// Update an existing pet
346
+ ///
347
+ ///
348
+ Future updatePet (Pet body) async {
349
+ Response response = await updatePetWithHttpInfo (body);
303
350
if (response.statusCode >= 400 ) {
304
351
throw ApiException (response.statusCode, _decodeBodyBytes (response));
305
352
} else if (response.body != null ) {
306
353
} else {
307
354
return ;
308
355
}
309
356
}
310
- /// Updates a pet in the store with form data
357
+
358
+ /// Updates a pet in the store with form data with HTTP info returned
311
359
///
312
360
///
313
- Future updatePetWithForm (int petId, { String name, String status }) async {
361
+ Future updatePetWithFormWithHttpInfo (int petId, { String name, String status }) async {
314
362
Object postBody;
315
363
316
364
// verify required params are set
@@ -360,18 +408,26 @@ class PetApi {
360
408
formParams,
361
409
contentType,
362
410
authNames);
411
+ return response;
412
+ }
363
413
414
+ /// Updates a pet in the store with form data
415
+ ///
416
+ ///
417
+ Future updatePetWithForm (int petId, { String name, String status }) async {
418
+ Response response = await updatePetWithFormWithHttpInfo (petId, name: name, status: status );
364
419
if (response.statusCode >= 400 ) {
365
420
throw ApiException (response.statusCode, _decodeBodyBytes (response));
366
421
} else if (response.body != null ) {
367
422
} else {
368
423
return ;
369
424
}
370
425
}
371
- /// uploads an image
426
+
427
+ /// uploads an image with HTTP info returned
372
428
///
373
429
///
374
- Future <ApiResponse > uploadFile (int petId, { String additionalMetadata, MultipartFile file }) async {
430
+ Future <Response > uploadFileWithHttpInfo (int petId, { String additionalMetadata, MultipartFile file }) async {
375
431
Object postBody;
376
432
377
433
// verify required params are set
@@ -420,7 +476,14 @@ class PetApi {
420
476
formParams,
421
477
contentType,
422
478
authNames);
479
+ return response;
480
+ }
423
481
482
+ /// uploads an image
483
+ ///
484
+ ///
485
+ Future <ApiResponse > uploadFile (int petId, { String additionalMetadata, MultipartFile file }) async {
486
+ Response response = await uploadFileWithHttpInfo (petId, additionalMetadata: additionalMetadata, file: file );
424
487
if (response.statusCode >= 400 ) {
425
488
throw ApiException (response.statusCode, _decodeBodyBytes (response));
426
489
} else if (response.body != null ) {
@@ -429,4 +492,5 @@ class PetApi {
429
492
return null ;
430
493
}
431
494
}
495
+
432
496
}
0 commit comments