diff --git a/modules/swagger-codegen/src/main/resources/Java/libraries/okhttp-gson/api.mustache b/modules/swagger-codegen/src/main/resources/Java/libraries/okhttp-gson/api.mustache index ed447a8f5dd..7abe897d42e 100644 --- a/modules/swagger-codegen/src/main/resources/Java/libraries/okhttp-gson/api.mustache +++ b/modules/swagger-codegen/src/main/resources/Java/libraries/okhttp-gson/api.mustache @@ -13,9 +13,6 @@ import {{invokerPackage}}.ProgressResponseBody; import com.google.gson.reflect.TypeToken; -import com.squareup.okhttp.Call; -import com.squareup.okhttp.Interceptor; - import java.io.IOException; {{#imports}}import {{import}}; @@ -51,7 +48,7 @@ public class {{classname}} { {{#operation}} /* Build call for {{operationId}} */ - private Call {{operationId}}Call({{#allParams}}{{{dataType}}} {{paramName}}, {{/allParams}}final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + private com.squareup.okhttp.Call {{operationId}}Call({{#allParams}}{{{dataType}}} {{paramName}}, {{/allParams}}final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { Object {{localVariablePrefix}}localVarPostBody = {{#bodyParam}}{{paramName}}{{/bodyParam}}{{^bodyParam}}null{{/bodyParam}}; {{#allParams}}{{#required}} // verify the required parameter '{{paramName}}' is set @@ -89,9 +86,9 @@ public class {{classname}} { {{localVariablePrefix}}localVarHeaderParams.put("Content-Type", {{localVariablePrefix}}localVarContentType); if(progressListener != null) { - apiClient.getHttpClient().networkInterceptors().add(new Interceptor() { + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { @Override - public com.squareup.okhttp.Response intercept(Interceptor.Chain chain) throws IOException { + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); return originalResponse.newBuilder() .body(new ProgressResponseBody(originalResponse.body(), progressListener)) @@ -124,7 +121,7 @@ public class {{classname}} { * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Void{{/returnType}}> {{operationId}}WithHttpInfo({{#allParams}}{{{dataType}}} {{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}}) throws ApiException { - Call {{localVariablePrefix}}call = {{operationId}}Call({{#allParams}}{{paramName}}, {{/allParams}}null, null); + com.squareup.okhttp.Call {{localVariablePrefix}}call = {{operationId}}Call({{#allParams}}{{paramName}}, {{/allParams}}null, null); {{#returnType}}Type {{localVariablePrefix}}localVarReturnType = new TypeToken<{{{returnType}}}>(){}.getType(); return {{localVariablePrefix}}apiClient.execute({{localVariablePrefix}}call, {{localVariablePrefix}}localVarReturnType);{{/returnType}}{{^returnType}}return {{localVariablePrefix}}apiClient.execute({{localVariablePrefix}}call);{{/returnType}} } @@ -137,7 +134,7 @@ public class {{classname}} { * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object */ - public Call {{operationId}}Async({{#allParams}}{{{dataType}}} {{paramName}}, {{/allParams}}final ApiCallback<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Void{{/returnType}}> {{localVariablePrefix}}callback) throws ApiException { + public com.squareup.okhttp.Call {{operationId}}Async({{#allParams}}{{{dataType}}} {{paramName}}, {{/allParams}}final ApiCallback<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Void{{/returnType}}> {{localVariablePrefix}}callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestListener = null; @@ -158,7 +155,7 @@ public class {{classname}} { }; } - Call {{localVariablePrefix}}call = {{operationId}}Call({{#allParams}}{{paramName}}, {{/allParams}}progressListener, progressRequestListener); + com.squareup.okhttp.Call {{localVariablePrefix}}call = {{operationId}}Call({{#allParams}}{{paramName}}, {{/allParams}}progressListener, progressRequestListener); {{#returnType}}Type {{localVariablePrefix}}localVarReturnType = new TypeToken<{{{returnType}}}>(){}.getType(); {{localVariablePrefix}}apiClient.executeAsync({{localVariablePrefix}}call, {{localVariablePrefix}}localVarReturnType, {{localVariablePrefix}}callback);{{/returnType}}{{^returnType}}{{localVariablePrefix}}apiClient.executeAsync({{localVariablePrefix}}call, {{localVariablePrefix}}callback);{{/returnType}} return {{localVariablePrefix}}call; diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/api/FakeApi.java b/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/api/FakeApi.java index 3e28653cab4..2784add9c9c 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/api/FakeApi.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/api/FakeApi.java @@ -36,9 +36,6 @@ import io.swagger.client.ProgressResponseBody; import com.google.gson.reflect.TypeToken; -import com.squareup.okhttp.Call; -import com.squareup.okhttp.Interceptor; - import java.io.IOException; import java.util.Date; @@ -70,7 +67,7 @@ public class FakeApi { } /* Build call for testEndpointParameters */ - private Call testEndpointParametersCall(BigDecimal number, Double _double, String string, byte[] _byte, Integer integer, Integer int32, Long int64, Float _float, byte[] binary, Date date, Date dateTime, String password, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + private com.squareup.okhttp.Call testEndpointParametersCall(BigDecimal number, Double _double, String string, byte[] _byte, Integer integer, Integer int32, Long int64, Float _float, byte[] binary, Date date, Date dateTime, String password, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'number' is set @@ -140,9 +137,9 @@ public class FakeApi { localVarHeaderParams.put("Content-Type", localVarContentType); if(progressListener != null) { - apiClient.getHttpClient().networkInterceptors().add(new Interceptor() { + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { @Override - public com.squareup.okhttp.Response intercept(Interceptor.Chain chain) throws IOException { + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); return originalResponse.newBuilder() .body(new ProgressResponseBody(originalResponse.body(), progressListener)) @@ -195,7 +192,7 @@ public class FakeApi { * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse testEndpointParametersWithHttpInfo(BigDecimal number, Double _double, String string, byte[] _byte, Integer integer, Integer int32, Long int64, Float _float, byte[] binary, Date date, Date dateTime, String password) throws ApiException { - Call call = testEndpointParametersCall(number, _double, string, _byte, integer, int32, int64, _float, binary, date, dateTime, password, null, null); + com.squareup.okhttp.Call call = testEndpointParametersCall(number, _double, string, _byte, integer, int32, int64, _float, binary, date, dateTime, password, null, null); return apiClient.execute(call); } @@ -218,7 +215,7 @@ public class FakeApi { * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object */ - public Call testEndpointParametersAsync(BigDecimal number, Double _double, String string, byte[] _byte, Integer integer, Integer int32, Long int64, Float _float, byte[] binary, Date date, Date dateTime, String password, final ApiCallback callback) throws ApiException { + public com.squareup.okhttp.Call testEndpointParametersAsync(BigDecimal number, Double _double, String string, byte[] _byte, Integer integer, Integer int32, Long int64, Float _float, byte[] binary, Date date, Date dateTime, String password, final ApiCallback callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestListener = null; @@ -239,7 +236,7 @@ public class FakeApi { }; } - Call call = testEndpointParametersCall(number, _double, string, _byte, integer, int32, int64, _float, binary, date, dateTime, password, progressListener, progressRequestListener); + com.squareup.okhttp.Call call = testEndpointParametersCall(number, _double, string, _byte, integer, int32, int64, _float, binary, date, dateTime, password, progressListener, progressRequestListener); apiClient.executeAsync(call, callback); return call; } diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/api/PetApi.java b/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/api/PetApi.java index d47afbe2d51..765754a3b09 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/api/PetApi.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/api/PetApi.java @@ -36,9 +36,6 @@ import io.swagger.client.ProgressResponseBody; import com.google.gson.reflect.TypeToken; -import com.squareup.okhttp.Call; -import com.squareup.okhttp.Interceptor; - import java.io.IOException; import io.swagger.client.model.Pet; @@ -71,7 +68,7 @@ public class PetApi { } /* Build call for addPet */ - private Call addPetCall(Pet body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + private com.squareup.okhttp.Call addPetCall(Pet body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { Object localVarPostBody = body; // verify the required parameter 'body' is set @@ -102,9 +99,9 @@ public class PetApi { localVarHeaderParams.put("Content-Type", localVarContentType); if(progressListener != null) { - apiClient.getHttpClient().networkInterceptors().add(new Interceptor() { + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { @Override - public com.squareup.okhttp.Response intercept(Interceptor.Chain chain) throws IOException { + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); return originalResponse.newBuilder() .body(new ProgressResponseBody(originalResponse.body(), progressListener)) @@ -135,7 +132,7 @@ public class PetApi { * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse addPetWithHttpInfo(Pet body) throws ApiException { - Call call = addPetCall(body, null, null); + com.squareup.okhttp.Call call = addPetCall(body, null, null); return apiClient.execute(call); } @@ -147,7 +144,7 @@ public class PetApi { * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object */ - public Call addPetAsync(Pet body, final ApiCallback callback) throws ApiException { + public com.squareup.okhttp.Call addPetAsync(Pet body, final ApiCallback callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestListener = null; @@ -168,12 +165,12 @@ public class PetApi { }; } - Call call = addPetCall(body, progressListener, progressRequestListener); + com.squareup.okhttp.Call call = addPetCall(body, progressListener, progressRequestListener); apiClient.executeAsync(call, callback); return call; } /* Build call for deletePet */ - private Call deletePetCall(Long petId, String apiKey, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + private com.squareup.okhttp.Call deletePetCall(Long petId, String apiKey, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'petId' is set @@ -207,9 +204,9 @@ public class PetApi { localVarHeaderParams.put("Content-Type", localVarContentType); if(progressListener != null) { - apiClient.getHttpClient().networkInterceptors().add(new Interceptor() { + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { @Override - public com.squareup.okhttp.Response intercept(Interceptor.Chain chain) throws IOException { + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); return originalResponse.newBuilder() .body(new ProgressResponseBody(originalResponse.body(), progressListener)) @@ -242,7 +239,7 @@ public class PetApi { * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse deletePetWithHttpInfo(Long petId, String apiKey) throws ApiException { - Call call = deletePetCall(petId, apiKey, null, null); + com.squareup.okhttp.Call call = deletePetCall(petId, apiKey, null, null); return apiClient.execute(call); } @@ -255,7 +252,7 @@ public class PetApi { * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object */ - public Call deletePetAsync(Long petId, String apiKey, final ApiCallback callback) throws ApiException { + public com.squareup.okhttp.Call deletePetAsync(Long petId, String apiKey, final ApiCallback callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestListener = null; @@ -276,12 +273,12 @@ public class PetApi { }; } - Call call = deletePetCall(petId, apiKey, progressListener, progressRequestListener); + com.squareup.okhttp.Call call = deletePetCall(petId, apiKey, progressListener, progressRequestListener); apiClient.executeAsync(call, callback); return call; } /* Build call for findPetsByStatus */ - private Call findPetsByStatusCall(List status, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + private com.squareup.okhttp.Call findPetsByStatusCall(List status, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'status' is set @@ -314,9 +311,9 @@ public class PetApi { localVarHeaderParams.put("Content-Type", localVarContentType); if(progressListener != null) { - apiClient.getHttpClient().networkInterceptors().add(new Interceptor() { + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { @Override - public com.squareup.okhttp.Response intercept(Interceptor.Chain chain) throws IOException { + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); return originalResponse.newBuilder() .body(new ProgressResponseBody(originalResponse.body(), progressListener)) @@ -349,7 +346,7 @@ public class PetApi { * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse> findPetsByStatusWithHttpInfo(List status) throws ApiException { - Call call = findPetsByStatusCall(status, null, null); + com.squareup.okhttp.Call call = findPetsByStatusCall(status, null, null); Type localVarReturnType = new TypeToken>(){}.getType(); return apiClient.execute(call, localVarReturnType); } @@ -362,7 +359,7 @@ public class PetApi { * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object */ - public Call findPetsByStatusAsync(List status, final ApiCallback> callback) throws ApiException { + public com.squareup.okhttp.Call findPetsByStatusAsync(List status, final ApiCallback> callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestListener = null; @@ -383,13 +380,13 @@ public class PetApi { }; } - Call call = findPetsByStatusCall(status, progressListener, progressRequestListener); + com.squareup.okhttp.Call call = findPetsByStatusCall(status, progressListener, progressRequestListener); Type localVarReturnType = new TypeToken>(){}.getType(); apiClient.executeAsync(call, localVarReturnType, callback); return call; } /* Build call for findPetsByTags */ - private Call findPetsByTagsCall(List tags, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + private com.squareup.okhttp.Call findPetsByTagsCall(List tags, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'tags' is set @@ -422,9 +419,9 @@ public class PetApi { localVarHeaderParams.put("Content-Type", localVarContentType); if(progressListener != null) { - apiClient.getHttpClient().networkInterceptors().add(new Interceptor() { + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { @Override - public com.squareup.okhttp.Response intercept(Interceptor.Chain chain) throws IOException { + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); return originalResponse.newBuilder() .body(new ProgressResponseBody(originalResponse.body(), progressListener)) @@ -457,7 +454,7 @@ public class PetApi { * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse> findPetsByTagsWithHttpInfo(List tags) throws ApiException { - Call call = findPetsByTagsCall(tags, null, null); + com.squareup.okhttp.Call call = findPetsByTagsCall(tags, null, null); Type localVarReturnType = new TypeToken>(){}.getType(); return apiClient.execute(call, localVarReturnType); } @@ -470,7 +467,7 @@ public class PetApi { * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object */ - public Call findPetsByTagsAsync(List tags, final ApiCallback> callback) throws ApiException { + public com.squareup.okhttp.Call findPetsByTagsAsync(List tags, final ApiCallback> callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestListener = null; @@ -491,13 +488,13 @@ public class PetApi { }; } - Call call = findPetsByTagsCall(tags, progressListener, progressRequestListener); + com.squareup.okhttp.Call call = findPetsByTagsCall(tags, progressListener, progressRequestListener); Type localVarReturnType = new TypeToken>(){}.getType(); apiClient.executeAsync(call, localVarReturnType, callback); return call; } /* Build call for getPetById */ - private Call getPetByIdCall(Long petId, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + private com.squareup.okhttp.Call getPetByIdCall(Long petId, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'petId' is set @@ -529,9 +526,9 @@ public class PetApi { localVarHeaderParams.put("Content-Type", localVarContentType); if(progressListener != null) { - apiClient.getHttpClient().networkInterceptors().add(new Interceptor() { + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { @Override - public com.squareup.okhttp.Response intercept(Interceptor.Chain chain) throws IOException { + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); return originalResponse.newBuilder() .body(new ProgressResponseBody(originalResponse.body(), progressListener)) @@ -564,7 +561,7 @@ public class PetApi { * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse getPetByIdWithHttpInfo(Long petId) throws ApiException { - Call call = getPetByIdCall(petId, null, null); + com.squareup.okhttp.Call call = getPetByIdCall(petId, null, null); Type localVarReturnType = new TypeToken(){}.getType(); return apiClient.execute(call, localVarReturnType); } @@ -577,7 +574,7 @@ public class PetApi { * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object */ - public Call getPetByIdAsync(Long petId, final ApiCallback callback) throws ApiException { + public com.squareup.okhttp.Call getPetByIdAsync(Long petId, final ApiCallback callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestListener = null; @@ -598,13 +595,13 @@ public class PetApi { }; } - Call call = getPetByIdCall(petId, progressListener, progressRequestListener); + com.squareup.okhttp.Call call = getPetByIdCall(petId, progressListener, progressRequestListener); Type localVarReturnType = new TypeToken(){}.getType(); apiClient.executeAsync(call, localVarReturnType, callback); return call; } /* Build call for updatePet */ - private Call updatePetCall(Pet body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + private com.squareup.okhttp.Call updatePetCall(Pet body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { Object localVarPostBody = body; // verify the required parameter 'body' is set @@ -635,9 +632,9 @@ public class PetApi { localVarHeaderParams.put("Content-Type", localVarContentType); if(progressListener != null) { - apiClient.getHttpClient().networkInterceptors().add(new Interceptor() { + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { @Override - public com.squareup.okhttp.Response intercept(Interceptor.Chain chain) throws IOException { + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); return originalResponse.newBuilder() .body(new ProgressResponseBody(originalResponse.body(), progressListener)) @@ -668,7 +665,7 @@ public class PetApi { * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse updatePetWithHttpInfo(Pet body) throws ApiException { - Call call = updatePetCall(body, null, null); + com.squareup.okhttp.Call call = updatePetCall(body, null, null); return apiClient.execute(call); } @@ -680,7 +677,7 @@ public class PetApi { * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object */ - public Call updatePetAsync(Pet body, final ApiCallback callback) throws ApiException { + public com.squareup.okhttp.Call updatePetAsync(Pet body, final ApiCallback callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestListener = null; @@ -701,12 +698,12 @@ public class PetApi { }; } - Call call = updatePetCall(body, progressListener, progressRequestListener); + com.squareup.okhttp.Call call = updatePetCall(body, progressListener, progressRequestListener); apiClient.executeAsync(call, callback); return call; } /* Build call for updatePetWithForm */ - private Call updatePetWithFormCall(Long petId, String name, String status, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + private com.squareup.okhttp.Call updatePetWithFormCall(Long petId, String name, String status, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'petId' is set @@ -742,9 +739,9 @@ public class PetApi { localVarHeaderParams.put("Content-Type", localVarContentType); if(progressListener != null) { - apiClient.getHttpClient().networkInterceptors().add(new Interceptor() { + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { @Override - public com.squareup.okhttp.Response intercept(Interceptor.Chain chain) throws IOException { + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); return originalResponse.newBuilder() .body(new ProgressResponseBody(originalResponse.body(), progressListener)) @@ -779,7 +776,7 @@ public class PetApi { * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse updatePetWithFormWithHttpInfo(Long petId, String name, String status) throws ApiException { - Call call = updatePetWithFormCall(petId, name, status, null, null); + com.squareup.okhttp.Call call = updatePetWithFormCall(petId, name, status, null, null); return apiClient.execute(call); } @@ -793,7 +790,7 @@ public class PetApi { * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object */ - public Call updatePetWithFormAsync(Long petId, String name, String status, final ApiCallback callback) throws ApiException { + public com.squareup.okhttp.Call updatePetWithFormAsync(Long petId, String name, String status, final ApiCallback callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestListener = null; @@ -814,12 +811,12 @@ public class PetApi { }; } - Call call = updatePetWithFormCall(petId, name, status, progressListener, progressRequestListener); + com.squareup.okhttp.Call call = updatePetWithFormCall(petId, name, status, progressListener, progressRequestListener); apiClient.executeAsync(call, callback); return call; } /* Build call for uploadFile */ - private Call uploadFileCall(Long petId, String additionalMetadata, File file, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + private com.squareup.okhttp.Call uploadFileCall(Long petId, String additionalMetadata, File file, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'petId' is set @@ -855,9 +852,9 @@ public class PetApi { localVarHeaderParams.put("Content-Type", localVarContentType); if(progressListener != null) { - apiClient.getHttpClient().networkInterceptors().add(new Interceptor() { + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { @Override - public com.squareup.okhttp.Response intercept(Interceptor.Chain chain) throws IOException { + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); return originalResponse.newBuilder() .body(new ProgressResponseBody(originalResponse.body(), progressListener)) @@ -894,7 +891,7 @@ public class PetApi { * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse uploadFileWithHttpInfo(Long petId, String additionalMetadata, File file) throws ApiException { - Call call = uploadFileCall(petId, additionalMetadata, file, null, null); + com.squareup.okhttp.Call call = uploadFileCall(petId, additionalMetadata, file, null, null); Type localVarReturnType = new TypeToken(){}.getType(); return apiClient.execute(call, localVarReturnType); } @@ -909,7 +906,7 @@ public class PetApi { * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object */ - public Call uploadFileAsync(Long petId, String additionalMetadata, File file, final ApiCallback callback) throws ApiException { + public com.squareup.okhttp.Call uploadFileAsync(Long petId, String additionalMetadata, File file, final ApiCallback callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestListener = null; @@ -930,7 +927,7 @@ public class PetApi { }; } - Call call = uploadFileCall(petId, additionalMetadata, file, progressListener, progressRequestListener); + com.squareup.okhttp.Call call = uploadFileCall(petId, additionalMetadata, file, progressListener, progressRequestListener); Type localVarReturnType = new TypeToken(){}.getType(); apiClient.executeAsync(call, localVarReturnType, callback); return call; diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/api/StoreApi.java b/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/api/StoreApi.java index 2299101c41b..43c530ee964 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/api/StoreApi.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/api/StoreApi.java @@ -36,9 +36,6 @@ import io.swagger.client.ProgressResponseBody; import com.google.gson.reflect.TypeToken; -import com.squareup.okhttp.Call; -import com.squareup.okhttp.Interceptor; - import java.io.IOException; import io.swagger.client.model.Order; @@ -69,7 +66,7 @@ public class StoreApi { } /* Build call for deleteOrder */ - private Call deleteOrderCall(String orderId, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + private com.squareup.okhttp.Call deleteOrderCall(String orderId, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'orderId' is set @@ -101,9 +98,9 @@ public class StoreApi { localVarHeaderParams.put("Content-Type", localVarContentType); if(progressListener != null) { - apiClient.getHttpClient().networkInterceptors().add(new Interceptor() { + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { @Override - public com.squareup.okhttp.Response intercept(Interceptor.Chain chain) throws IOException { + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); return originalResponse.newBuilder() .body(new ProgressResponseBody(originalResponse.body(), progressListener)) @@ -134,7 +131,7 @@ public class StoreApi { * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse deleteOrderWithHttpInfo(String orderId) throws ApiException { - Call call = deleteOrderCall(orderId, null, null); + com.squareup.okhttp.Call call = deleteOrderCall(orderId, null, null); return apiClient.execute(call); } @@ -146,7 +143,7 @@ public class StoreApi { * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object */ - public Call deleteOrderAsync(String orderId, final ApiCallback callback) throws ApiException { + public com.squareup.okhttp.Call deleteOrderAsync(String orderId, final ApiCallback callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestListener = null; @@ -167,12 +164,12 @@ public class StoreApi { }; } - Call call = deleteOrderCall(orderId, progressListener, progressRequestListener); + com.squareup.okhttp.Call call = deleteOrderCall(orderId, progressListener, progressRequestListener); apiClient.executeAsync(call, callback); return call; } /* Build call for getInventory */ - private Call getInventoryCall(final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + private com.squareup.okhttp.Call getInventoryCall(final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { Object localVarPostBody = null; @@ -198,9 +195,9 @@ public class StoreApi { localVarHeaderParams.put("Content-Type", localVarContentType); if(progressListener != null) { - apiClient.getHttpClient().networkInterceptors().add(new Interceptor() { + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { @Override - public com.squareup.okhttp.Response intercept(Interceptor.Chain chain) throws IOException { + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); return originalResponse.newBuilder() .body(new ProgressResponseBody(originalResponse.body(), progressListener)) @@ -231,7 +228,7 @@ public class StoreApi { * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse> getInventoryWithHttpInfo() throws ApiException { - Call call = getInventoryCall(null, null); + com.squareup.okhttp.Call call = getInventoryCall(null, null); Type localVarReturnType = new TypeToken>(){}.getType(); return apiClient.execute(call, localVarReturnType); } @@ -243,7 +240,7 @@ public class StoreApi { * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object */ - public Call getInventoryAsync(final ApiCallback> callback) throws ApiException { + public com.squareup.okhttp.Call getInventoryAsync(final ApiCallback> callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestListener = null; @@ -264,13 +261,13 @@ public class StoreApi { }; } - Call call = getInventoryCall(progressListener, progressRequestListener); + com.squareup.okhttp.Call call = getInventoryCall(progressListener, progressRequestListener); Type localVarReturnType = new TypeToken>(){}.getType(); apiClient.executeAsync(call, localVarReturnType, callback); return call; } /* Build call for getOrderById */ - private Call getOrderByIdCall(Long orderId, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + private com.squareup.okhttp.Call getOrderByIdCall(Long orderId, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'orderId' is set @@ -302,9 +299,9 @@ public class StoreApi { localVarHeaderParams.put("Content-Type", localVarContentType); if(progressListener != null) { - apiClient.getHttpClient().networkInterceptors().add(new Interceptor() { + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { @Override - public com.squareup.okhttp.Response intercept(Interceptor.Chain chain) throws IOException { + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); return originalResponse.newBuilder() .body(new ProgressResponseBody(originalResponse.body(), progressListener)) @@ -337,7 +334,7 @@ public class StoreApi { * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse getOrderByIdWithHttpInfo(Long orderId) throws ApiException { - Call call = getOrderByIdCall(orderId, null, null); + com.squareup.okhttp.Call call = getOrderByIdCall(orderId, null, null); Type localVarReturnType = new TypeToken(){}.getType(); return apiClient.execute(call, localVarReturnType); } @@ -350,7 +347,7 @@ public class StoreApi { * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object */ - public Call getOrderByIdAsync(Long orderId, final ApiCallback callback) throws ApiException { + public com.squareup.okhttp.Call getOrderByIdAsync(Long orderId, final ApiCallback callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestListener = null; @@ -371,13 +368,13 @@ public class StoreApi { }; } - Call call = getOrderByIdCall(orderId, progressListener, progressRequestListener); + com.squareup.okhttp.Call call = getOrderByIdCall(orderId, progressListener, progressRequestListener); Type localVarReturnType = new TypeToken(){}.getType(); apiClient.executeAsync(call, localVarReturnType, callback); return call; } /* Build call for placeOrder */ - private Call placeOrderCall(Order body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + private com.squareup.okhttp.Call placeOrderCall(Order body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { Object localVarPostBody = body; // verify the required parameter 'body' is set @@ -408,9 +405,9 @@ public class StoreApi { localVarHeaderParams.put("Content-Type", localVarContentType); if(progressListener != null) { - apiClient.getHttpClient().networkInterceptors().add(new Interceptor() { + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { @Override - public com.squareup.okhttp.Response intercept(Interceptor.Chain chain) throws IOException { + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); return originalResponse.newBuilder() .body(new ProgressResponseBody(originalResponse.body(), progressListener)) @@ -443,7 +440,7 @@ public class StoreApi { * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse placeOrderWithHttpInfo(Order body) throws ApiException { - Call call = placeOrderCall(body, null, null); + com.squareup.okhttp.Call call = placeOrderCall(body, null, null); Type localVarReturnType = new TypeToken(){}.getType(); return apiClient.execute(call, localVarReturnType); } @@ -456,7 +453,7 @@ public class StoreApi { * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object */ - public Call placeOrderAsync(Order body, final ApiCallback callback) throws ApiException { + public com.squareup.okhttp.Call placeOrderAsync(Order body, final ApiCallback callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestListener = null; @@ -477,7 +474,7 @@ public class StoreApi { }; } - Call call = placeOrderCall(body, progressListener, progressRequestListener); + com.squareup.okhttp.Call call = placeOrderCall(body, progressListener, progressRequestListener); Type localVarReturnType = new TypeToken(){}.getType(); apiClient.executeAsync(call, localVarReturnType, callback); return call; diff --git a/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/api/UserApi.java b/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/api/UserApi.java index 37026b8fb17..9a7054091a3 100644 --- a/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/api/UserApi.java +++ b/samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/api/UserApi.java @@ -36,9 +36,6 @@ import io.swagger.client.ProgressResponseBody; import com.google.gson.reflect.TypeToken; -import com.squareup.okhttp.Call; -import com.squareup.okhttp.Interceptor; - import java.io.IOException; import io.swagger.client.model.User; @@ -69,7 +66,7 @@ public class UserApi { } /* Build call for createUser */ - private Call createUserCall(User body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + private com.squareup.okhttp.Call createUserCall(User body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { Object localVarPostBody = body; // verify the required parameter 'body' is set @@ -100,9 +97,9 @@ public class UserApi { localVarHeaderParams.put("Content-Type", localVarContentType); if(progressListener != null) { - apiClient.getHttpClient().networkInterceptors().add(new Interceptor() { + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { @Override - public com.squareup.okhttp.Response intercept(Interceptor.Chain chain) throws IOException { + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); return originalResponse.newBuilder() .body(new ProgressResponseBody(originalResponse.body(), progressListener)) @@ -133,7 +130,7 @@ public class UserApi { * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse createUserWithHttpInfo(User body) throws ApiException { - Call call = createUserCall(body, null, null); + com.squareup.okhttp.Call call = createUserCall(body, null, null); return apiClient.execute(call); } @@ -145,7 +142,7 @@ public class UserApi { * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object */ - public Call createUserAsync(User body, final ApiCallback callback) throws ApiException { + public com.squareup.okhttp.Call createUserAsync(User body, final ApiCallback callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestListener = null; @@ -166,12 +163,12 @@ public class UserApi { }; } - Call call = createUserCall(body, progressListener, progressRequestListener); + com.squareup.okhttp.Call call = createUserCall(body, progressListener, progressRequestListener); apiClient.executeAsync(call, callback); return call; } /* Build call for createUsersWithArrayInput */ - private Call createUsersWithArrayInputCall(List body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + private com.squareup.okhttp.Call createUsersWithArrayInputCall(List body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { Object localVarPostBody = body; // verify the required parameter 'body' is set @@ -202,9 +199,9 @@ public class UserApi { localVarHeaderParams.put("Content-Type", localVarContentType); if(progressListener != null) { - apiClient.getHttpClient().networkInterceptors().add(new Interceptor() { + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { @Override - public com.squareup.okhttp.Response intercept(Interceptor.Chain chain) throws IOException { + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); return originalResponse.newBuilder() .body(new ProgressResponseBody(originalResponse.body(), progressListener)) @@ -235,7 +232,7 @@ public class UserApi { * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse createUsersWithArrayInputWithHttpInfo(List body) throws ApiException { - Call call = createUsersWithArrayInputCall(body, null, null); + com.squareup.okhttp.Call call = createUsersWithArrayInputCall(body, null, null); return apiClient.execute(call); } @@ -247,7 +244,7 @@ public class UserApi { * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object */ - public Call createUsersWithArrayInputAsync(List body, final ApiCallback callback) throws ApiException { + public com.squareup.okhttp.Call createUsersWithArrayInputAsync(List body, final ApiCallback callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestListener = null; @@ -268,12 +265,12 @@ public class UserApi { }; } - Call call = createUsersWithArrayInputCall(body, progressListener, progressRequestListener); + com.squareup.okhttp.Call call = createUsersWithArrayInputCall(body, progressListener, progressRequestListener); apiClient.executeAsync(call, callback); return call; } /* Build call for createUsersWithListInput */ - private Call createUsersWithListInputCall(List body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + private com.squareup.okhttp.Call createUsersWithListInputCall(List body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { Object localVarPostBody = body; // verify the required parameter 'body' is set @@ -304,9 +301,9 @@ public class UserApi { localVarHeaderParams.put("Content-Type", localVarContentType); if(progressListener != null) { - apiClient.getHttpClient().networkInterceptors().add(new Interceptor() { + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { @Override - public com.squareup.okhttp.Response intercept(Interceptor.Chain chain) throws IOException { + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); return originalResponse.newBuilder() .body(new ProgressResponseBody(originalResponse.body(), progressListener)) @@ -337,7 +334,7 @@ public class UserApi { * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse createUsersWithListInputWithHttpInfo(List body) throws ApiException { - Call call = createUsersWithListInputCall(body, null, null); + com.squareup.okhttp.Call call = createUsersWithListInputCall(body, null, null); return apiClient.execute(call); } @@ -349,7 +346,7 @@ public class UserApi { * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object */ - public Call createUsersWithListInputAsync(List body, final ApiCallback callback) throws ApiException { + public com.squareup.okhttp.Call createUsersWithListInputAsync(List body, final ApiCallback callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestListener = null; @@ -370,12 +367,12 @@ public class UserApi { }; } - Call call = createUsersWithListInputCall(body, progressListener, progressRequestListener); + com.squareup.okhttp.Call call = createUsersWithListInputCall(body, progressListener, progressRequestListener); apiClient.executeAsync(call, callback); return call; } /* Build call for deleteUser */ - private Call deleteUserCall(String username, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + private com.squareup.okhttp.Call deleteUserCall(String username, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'username' is set @@ -407,9 +404,9 @@ public class UserApi { localVarHeaderParams.put("Content-Type", localVarContentType); if(progressListener != null) { - apiClient.getHttpClient().networkInterceptors().add(new Interceptor() { + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { @Override - public com.squareup.okhttp.Response intercept(Interceptor.Chain chain) throws IOException { + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); return originalResponse.newBuilder() .body(new ProgressResponseBody(originalResponse.body(), progressListener)) @@ -440,7 +437,7 @@ public class UserApi { * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse deleteUserWithHttpInfo(String username) throws ApiException { - Call call = deleteUserCall(username, null, null); + com.squareup.okhttp.Call call = deleteUserCall(username, null, null); return apiClient.execute(call); } @@ -452,7 +449,7 @@ public class UserApi { * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object */ - public Call deleteUserAsync(String username, final ApiCallback callback) throws ApiException { + public com.squareup.okhttp.Call deleteUserAsync(String username, final ApiCallback callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestListener = null; @@ -473,12 +470,12 @@ public class UserApi { }; } - Call call = deleteUserCall(username, progressListener, progressRequestListener); + com.squareup.okhttp.Call call = deleteUserCall(username, progressListener, progressRequestListener); apiClient.executeAsync(call, callback); return call; } /* Build call for getUserByName */ - private Call getUserByNameCall(String username, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + private com.squareup.okhttp.Call getUserByNameCall(String username, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'username' is set @@ -510,9 +507,9 @@ public class UserApi { localVarHeaderParams.put("Content-Type", localVarContentType); if(progressListener != null) { - apiClient.getHttpClient().networkInterceptors().add(new Interceptor() { + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { @Override - public com.squareup.okhttp.Response intercept(Interceptor.Chain chain) throws IOException { + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); return originalResponse.newBuilder() .body(new ProgressResponseBody(originalResponse.body(), progressListener)) @@ -545,7 +542,7 @@ public class UserApi { * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse getUserByNameWithHttpInfo(String username) throws ApiException { - Call call = getUserByNameCall(username, null, null); + com.squareup.okhttp.Call call = getUserByNameCall(username, null, null); Type localVarReturnType = new TypeToken(){}.getType(); return apiClient.execute(call, localVarReturnType); } @@ -558,7 +555,7 @@ public class UserApi { * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object */ - public Call getUserByNameAsync(String username, final ApiCallback callback) throws ApiException { + public com.squareup.okhttp.Call getUserByNameAsync(String username, final ApiCallback callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestListener = null; @@ -579,13 +576,13 @@ public class UserApi { }; } - Call call = getUserByNameCall(username, progressListener, progressRequestListener); + com.squareup.okhttp.Call call = getUserByNameCall(username, progressListener, progressRequestListener); Type localVarReturnType = new TypeToken(){}.getType(); apiClient.executeAsync(call, localVarReturnType, callback); return call; } /* Build call for loginUser */ - private Call loginUserCall(String username, String password, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + private com.squareup.okhttp.Call loginUserCall(String username, String password, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { Object localVarPostBody = null; // verify the required parameter 'username' is set @@ -625,9 +622,9 @@ public class UserApi { localVarHeaderParams.put("Content-Type", localVarContentType); if(progressListener != null) { - apiClient.getHttpClient().networkInterceptors().add(new Interceptor() { + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { @Override - public com.squareup.okhttp.Response intercept(Interceptor.Chain chain) throws IOException { + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); return originalResponse.newBuilder() .body(new ProgressResponseBody(originalResponse.body(), progressListener)) @@ -662,7 +659,7 @@ public class UserApi { * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse loginUserWithHttpInfo(String username, String password) throws ApiException { - Call call = loginUserCall(username, password, null, null); + com.squareup.okhttp.Call call = loginUserCall(username, password, null, null); Type localVarReturnType = new TypeToken(){}.getType(); return apiClient.execute(call, localVarReturnType); } @@ -676,7 +673,7 @@ public class UserApi { * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object */ - public Call loginUserAsync(String username, String password, final ApiCallback callback) throws ApiException { + public com.squareup.okhttp.Call loginUserAsync(String username, String password, final ApiCallback callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestListener = null; @@ -697,13 +694,13 @@ public class UserApi { }; } - Call call = loginUserCall(username, password, progressListener, progressRequestListener); + com.squareup.okhttp.Call call = loginUserCall(username, password, progressListener, progressRequestListener); Type localVarReturnType = new TypeToken(){}.getType(); apiClient.executeAsync(call, localVarReturnType, callback); return call; } /* Build call for logoutUser */ - private Call logoutUserCall(final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + private com.squareup.okhttp.Call logoutUserCall(final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { Object localVarPostBody = null; @@ -729,9 +726,9 @@ public class UserApi { localVarHeaderParams.put("Content-Type", localVarContentType); if(progressListener != null) { - apiClient.getHttpClient().networkInterceptors().add(new Interceptor() { + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { @Override - public com.squareup.okhttp.Response intercept(Interceptor.Chain chain) throws IOException { + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); return originalResponse.newBuilder() .body(new ProgressResponseBody(originalResponse.body(), progressListener)) @@ -760,7 +757,7 @@ public class UserApi { * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse logoutUserWithHttpInfo() throws ApiException { - Call call = logoutUserCall(null, null); + com.squareup.okhttp.Call call = logoutUserCall(null, null); return apiClient.execute(call); } @@ -771,7 +768,7 @@ public class UserApi { * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object */ - public Call logoutUserAsync(final ApiCallback callback) throws ApiException { + public com.squareup.okhttp.Call logoutUserAsync(final ApiCallback callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestListener = null; @@ -792,12 +789,12 @@ public class UserApi { }; } - Call call = logoutUserCall(progressListener, progressRequestListener); + com.squareup.okhttp.Call call = logoutUserCall(progressListener, progressRequestListener); apiClient.executeAsync(call, callback); return call; } /* Build call for updateUser */ - private Call updateUserCall(String username, User body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + private com.squareup.okhttp.Call updateUserCall(String username, User body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { Object localVarPostBody = body; // verify the required parameter 'username' is set @@ -834,9 +831,9 @@ public class UserApi { localVarHeaderParams.put("Content-Type", localVarContentType); if(progressListener != null) { - apiClient.getHttpClient().networkInterceptors().add(new Interceptor() { + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { @Override - public com.squareup.okhttp.Response intercept(Interceptor.Chain chain) throws IOException { + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); return originalResponse.newBuilder() .body(new ProgressResponseBody(originalResponse.body(), progressListener)) @@ -869,7 +866,7 @@ public class UserApi { * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ public ApiResponse updateUserWithHttpInfo(String username, User body) throws ApiException { - Call call = updateUserCall(username, body, null, null); + com.squareup.okhttp.Call call = updateUserCall(username, body, null, null); return apiClient.execute(call); } @@ -882,7 +879,7 @@ public class UserApi { * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object */ - public Call updateUserAsync(String username, User body, final ApiCallback callback) throws ApiException { + public com.squareup.okhttp.Call updateUserAsync(String username, User body, final ApiCallback callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestListener = null; @@ -903,7 +900,7 @@ public class UserApi { }; } - Call call = updateUserCall(username, body, progressListener, progressRequestListener); + com.squareup.okhttp.Call call = updateUserCall(username, body, progressListener, progressRequestListener); apiClient.executeAsync(call, callback); return call; }