|
33 | 33 | import org.openapitools.client.model.FileSchemaTestClass;
|
34 | 34 | import org.openapitools.client.model.HealthCheckResult;
|
35 | 35 | import java.time.LocalDate;
|
| 36 | +import org.openapitools.client.model.ModelApiResponse; |
36 | 37 | import java.time.OffsetDateTime;
|
37 | 38 | import org.openapitools.client.model.OuterComposite;
|
38 | 39 | import org.openapitools.client.model.OuterEnum;
|
@@ -554,6 +555,146 @@ public okhttp3.Call fakeOuterStringSerializeAsync(String body, final ApiCallback
|
554 | 555 | localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
|
555 | 556 | return localVarCall;
|
556 | 557 | }
|
| 558 | + /** |
| 559 | + * Build call for fakeUploadRefRequestBodies |
| 560 | + * @param petId ID of pet to update (required) |
| 561 | + * @param additionalMetadata Additional data to pass to server (optional) |
| 562 | + * @param _file file to upload (optional) |
| 563 | + * @param _callback Callback for upload/download progress |
| 564 | + * @return Call to execute |
| 565 | + * @throws ApiException If fail to serialize the request body object |
| 566 | + * @http.response.details |
| 567 | + <table summary="Response Details" border="1"> |
| 568 | + <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> |
| 569 | + <tr><td> 200 </td><td> successful operation </td><td> - </td></tr> |
| 570 | + </table> |
| 571 | + */ |
| 572 | + public okhttp3.Call fakeUploadRefRequestBodiesCall(Long petId, String additionalMetadata, File _file, final ApiCallback _callback) throws ApiException { |
| 573 | + String basePath = null; |
| 574 | + // Operation Servers |
| 575 | + String[] localBasePaths = new String[] { }; |
| 576 | + |
| 577 | + // Determine Base Path to Use |
| 578 | + if (localCustomBaseUrl != null){ |
| 579 | + basePath = localCustomBaseUrl; |
| 580 | + } else if ( localBasePaths.length > 0 ) { |
| 581 | + basePath = localBasePaths[localHostIndex]; |
| 582 | + } else { |
| 583 | + basePath = null; |
| 584 | + } |
| 585 | + |
| 586 | + Object localVarPostBody = null; |
| 587 | + |
| 588 | + // create path and map variables |
| 589 | + String localVarPath = "/fake/pet/{petId}/uploadImage" |
| 590 | + .replace("{" + "petId" + "}", localVarApiClient.escapeString(petId.toString())); |
| 591 | + |
| 592 | + List<Pair> localVarQueryParams = new ArrayList<Pair>(); |
| 593 | + List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>(); |
| 594 | + Map<String, String> localVarHeaderParams = new HashMap<String, String>(); |
| 595 | + Map<String, String> localVarCookieParams = new HashMap<String, String>(); |
| 596 | + Map<String, Object> localVarFormParams = new HashMap<String, Object>(); |
| 597 | + |
| 598 | + if (additionalMetadata != null) { |
| 599 | + localVarFormParams.put("additionalMetadata", additionalMetadata); |
| 600 | + } |
| 601 | + |
| 602 | + if (_file != null) { |
| 603 | + localVarFormParams.put("file", _file); |
| 604 | + } |
| 605 | + |
| 606 | + final String[] localVarAccepts = { |
| 607 | + "application/json" |
| 608 | + }; |
| 609 | + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); |
| 610 | + if (localVarAccept != null) { |
| 611 | + localVarHeaderParams.put("Accept", localVarAccept); |
| 612 | + } |
| 613 | + |
| 614 | + final String[] localVarContentTypes = { |
| 615 | + "multipart/form-data" |
| 616 | + }; |
| 617 | + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); |
| 618 | + if (localVarContentType != null) { |
| 619 | + localVarHeaderParams.put("Content-Type", localVarContentType); |
| 620 | + } |
| 621 | + |
| 622 | + String[] localVarAuthNames = new String[] { "petstore_auth" }; |
| 623 | + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); |
| 624 | + } |
| 625 | + |
| 626 | + @SuppressWarnings("rawtypes") |
| 627 | + private okhttp3.Call fakeUploadRefRequestBodiesValidateBeforeCall(Long petId, String additionalMetadata, File _file, final ApiCallback _callback) throws ApiException { |
| 628 | + // verify the required parameter 'petId' is set |
| 629 | + if (petId == null) { |
| 630 | + throw new ApiException("Missing the required parameter 'petId' when calling fakeUploadRefRequestBodies(Async)"); |
| 631 | + } |
| 632 | + |
| 633 | + return fakeUploadRefRequestBodiesCall(petId, additionalMetadata, _file, _callback); |
| 634 | + |
| 635 | + } |
| 636 | + |
| 637 | + /** |
| 638 | + * fake uploads an image with ref request bodies |
| 639 | + * |
| 640 | + * @param petId ID of pet to update (required) |
| 641 | + * @param additionalMetadata Additional data to pass to server (optional) |
| 642 | + * @param _file file to upload (optional) |
| 643 | + * @return ModelApiResponse |
| 644 | + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body |
| 645 | + * @http.response.details |
| 646 | + <table summary="Response Details" border="1"> |
| 647 | + <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> |
| 648 | + <tr><td> 200 </td><td> successful operation </td><td> - </td></tr> |
| 649 | + </table> |
| 650 | + */ |
| 651 | + public ModelApiResponse fakeUploadRefRequestBodies(Long petId, String additionalMetadata, File _file) throws ApiException { |
| 652 | + ApiResponse<ModelApiResponse> localVarResp = fakeUploadRefRequestBodiesWithHttpInfo(petId, additionalMetadata, _file); |
| 653 | + return localVarResp.getData(); |
| 654 | + } |
| 655 | + |
| 656 | + /** |
| 657 | + * fake uploads an image with ref request bodies |
| 658 | + * |
| 659 | + * @param petId ID of pet to update (required) |
| 660 | + * @param additionalMetadata Additional data to pass to server (optional) |
| 661 | + * @param _file file to upload (optional) |
| 662 | + * @return ApiResponse<ModelApiResponse> |
| 663 | + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body |
| 664 | + * @http.response.details |
| 665 | + <table summary="Response Details" border="1"> |
| 666 | + <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> |
| 667 | + <tr><td> 200 </td><td> successful operation </td><td> - </td></tr> |
| 668 | + </table> |
| 669 | + */ |
| 670 | + public ApiResponse<ModelApiResponse> fakeUploadRefRequestBodiesWithHttpInfo(Long petId, String additionalMetadata, File _file) throws ApiException { |
| 671 | + okhttp3.Call localVarCall = fakeUploadRefRequestBodiesValidateBeforeCall(petId, additionalMetadata, _file, null); |
| 672 | + Type localVarReturnType = new TypeToken<ModelApiResponse>(){}.getType(); |
| 673 | + return localVarApiClient.execute(localVarCall, localVarReturnType); |
| 674 | + } |
| 675 | + |
| 676 | + /** |
| 677 | + * fake uploads an image with ref request bodies (asynchronously) |
| 678 | + * |
| 679 | + * @param petId ID of pet to update (required) |
| 680 | + * @param additionalMetadata Additional data to pass to server (optional) |
| 681 | + * @param _file file to upload (optional) |
| 682 | + * @param _callback The callback to be executed when the API call finishes |
| 683 | + * @return The request call |
| 684 | + * @throws ApiException If fail to process the API call, e.g. serializing the request body object |
| 685 | + * @http.response.details |
| 686 | + <table summary="Response Details" border="1"> |
| 687 | + <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> |
| 688 | + <tr><td> 200 </td><td> successful operation </td><td> - </td></tr> |
| 689 | + </table> |
| 690 | + */ |
| 691 | + public okhttp3.Call fakeUploadRefRequestBodiesAsync(Long petId, String additionalMetadata, File _file, final ApiCallback<ModelApiResponse> _callback) throws ApiException { |
| 692 | + |
| 693 | + okhttp3.Call localVarCall = fakeUploadRefRequestBodiesValidateBeforeCall(petId, additionalMetadata, _file, _callback); |
| 694 | + Type localVarReturnType = new TypeToken<ModelApiResponse>(){}.getType(); |
| 695 | + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); |
| 696 | + return localVarCall; |
| 697 | + } |
557 | 698 | /**
|
558 | 699 | * Build call for getFakeArrayofenums
|
559 | 700 | * @param _callback Callback for upload/download progress
|
|
0 commit comments