mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-12-11 09:02:43 +00:00
Port of @ngaya-ll 's pull request from swagger to openapi. (#2356)
See https://github.com/swagger-api/swagger-codegen/pull/8053
This commit is contained in:
committed by
William Cheng
parent
b1dc2eeaac
commit
fde3252924
@@ -124,7 +124,9 @@ public class ApiClient {
|
||||
}
|
||||
|
||||
private void init() {
|
||||
httpClient = new OkHttpClient();
|
||||
OkHttpClient.Builder builder = new OkHttpClient.Builder();
|
||||
builder.addInterceptor(getProgressInterceptor());
|
||||
httpClient = builder.build();
|
||||
|
||||
|
||||
verifyingSsl = true;
|
||||
@@ -173,7 +175,7 @@ public class ApiClient {
|
||||
* @return Api Client
|
||||
*/
|
||||
public ApiClient setHttpClient(OkHttpClient httpClient) {
|
||||
this.httpClient = httpClient;
|
||||
this.httpClient = httpClient.newBuilder().addInterceptor(getProgressInterceptor()).build();
|
||||
return this;
|
||||
}
|
||||
|
||||
@@ -1032,12 +1034,12 @@ public class ApiClient {
|
||||
* @param headerParams The header parameters
|
||||
* @param formParams The form parameters
|
||||
* @param authNames The authentications to apply
|
||||
* @param progressRequestListener Progress request listener
|
||||
* @param callback Callback for upload/download progress
|
||||
* @return The HTTP call
|
||||
* @throws ApiException If fail to serialize the request body object
|
||||
*/
|
||||
public Call buildCall(String path, String method, List<Pair> queryParams, List<Pair> collectionQueryParams, Object body, Map<String, String> headerParams, Map<String, Object> formParams, String[] authNames, ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
|
||||
Request request = buildRequest(path, method, queryParams, collectionQueryParams, body, headerParams, formParams, authNames, progressRequestListener);
|
||||
public Call buildCall(String path, String method, List<Pair> queryParams, List<Pair> collectionQueryParams, Object body, Map<String, String> headerParams, Map<String, Object> formParams, String[] authNames, ApiCallback callback) throws ApiException {
|
||||
Request request = buildRequest(path, method, queryParams, collectionQueryParams, body, headerParams, formParams, authNames, callback);
|
||||
|
||||
return httpClient.newCall(request);
|
||||
}
|
||||
@@ -1053,11 +1055,11 @@ public class ApiClient {
|
||||
* @param headerParams The header parameters
|
||||
* @param formParams The form parameters
|
||||
* @param authNames The authentications to apply
|
||||
* @param progressRequestListener Progress request listener
|
||||
* @param callback Callback for upload/download progress
|
||||
* @return The HTTP request
|
||||
* @throws ApiException If fail to serialize the request body object
|
||||
*/
|
||||
public Request buildRequest(String path, String method, List<Pair> queryParams, List<Pair> collectionQueryParams, Object body, Map<String, String> headerParams, Map<String, Object> formParams, String[] authNames, ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
|
||||
public Request buildRequest(String path, String method, List<Pair> queryParams, List<Pair> collectionQueryParams, Object body, Map<String, String> headerParams, Map<String, Object> formParams, String[] authNames, ApiCallback callback) throws ApiException {
|
||||
updateParamsForAuth(authNames, queryParams, headerParams);
|
||||
|
||||
final String url = buildUrl(path, queryParams, collectionQueryParams);
|
||||
@@ -1089,10 +1091,14 @@ public class ApiClient {
|
||||
reqBody = serialize(body, contentType);
|
||||
}
|
||||
|
||||
// Associate callback with request (if not null) so interceptor can
|
||||
// access it when creating ProgressResponseBody
|
||||
reqBuilder.tag(callback);
|
||||
|
||||
Request request = null;
|
||||
|
||||
if (progressRequestListener != null && reqBody != null) {
|
||||
ProgressRequestBody progressRequestBody = new ProgressRequestBody(reqBody, progressRequestListener);
|
||||
if (callback != null && reqBody != null) {
|
||||
ProgressRequestBody progressRequestBody = new ProgressRequestBody(reqBody, callback);
|
||||
request = reqBuilder.method(method, progressRequestBody).build();
|
||||
} else {
|
||||
request = reqBuilder.method(method, reqBody).build();
|
||||
@@ -1236,6 +1242,27 @@ public class ApiClient {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get network interceptor to add it to the httpClient to track download progress for
|
||||
* async requests.
|
||||
*/
|
||||
private Interceptor getProgressInterceptor() {
|
||||
return new Interceptor() {
|
||||
@Override
|
||||
public Response intercept(Interceptor.Chain chain) throws IOException {
|
||||
final Request request = chain.request();
|
||||
final Response originalResponse = chain.proceed(request);
|
||||
if (request.tag() instanceof ApiCallback) {
|
||||
final ApiCallback callback = (ApiCallback) request.tag();
|
||||
return originalResponse.newBuilder()
|
||||
.body(new ProgressResponseBody(originalResponse.body(), callback))
|
||||
.build();
|
||||
}
|
||||
return originalResponse;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Apply SSL related settings to httpClient according to the current values of
|
||||
* verifyingSsl and sslCaCert.
|
||||
|
||||
@@ -26,17 +26,13 @@ import okio.Sink;
|
||||
|
||||
public class ProgressRequestBody extends RequestBody {
|
||||
|
||||
public interface ProgressRequestListener {
|
||||
void onRequestProgress(long bytesWritten, long contentLength, boolean done);
|
||||
}
|
||||
|
||||
private final RequestBody requestBody;
|
||||
|
||||
private final ProgressRequestListener progressListener;
|
||||
private final ApiCallback callback;
|
||||
|
||||
public ProgressRequestBody(RequestBody requestBody, ProgressRequestListener progressListener) {
|
||||
public ProgressRequestBody(RequestBody requestBody, ApiCallback callback) {
|
||||
this.requestBody = requestBody;
|
||||
this.progressListener = progressListener;
|
||||
this.callback = callback;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -70,7 +66,7 @@ public class ProgressRequestBody extends RequestBody {
|
||||
}
|
||||
|
||||
bytesWritten += byteCount;
|
||||
progressListener.onRequestProgress(bytesWritten, contentLength, bytesWritten == contentLength);
|
||||
callback.onUploadProgress(bytesWritten, contentLength, bytesWritten == contentLength);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
@@ -26,17 +26,13 @@ import okio.Source;
|
||||
|
||||
public class ProgressResponseBody extends ResponseBody {
|
||||
|
||||
public interface ProgressListener {
|
||||
void update(long bytesRead, long contentLength, boolean done);
|
||||
}
|
||||
|
||||
private final ResponseBody responseBody;
|
||||
private final ProgressListener progressListener;
|
||||
private final ApiCallback callback;
|
||||
private BufferedSource bufferedSource;
|
||||
|
||||
public ProgressResponseBody(ResponseBody responseBody, ProgressListener progressListener) {
|
||||
public ProgressResponseBody(ResponseBody responseBody, ApiCallback callback) {
|
||||
this.responseBody = responseBody;
|
||||
this.progressListener = progressListener;
|
||||
this.callback = callback;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -66,7 +62,7 @@ public class ProgressResponseBody extends ResponseBody {
|
||||
long bytesRead = super.read(sink, byteCount);
|
||||
// read() returns the number of bytes read, or -1 if this source is exhausted.
|
||||
totalBytesRead += bytesRead != -1 ? bytesRead : 0;
|
||||
progressListener.update(totalBytesRead, responseBody.contentLength(), bytesRead == -1);
|
||||
callback.onDownloadProgress(totalBytesRead, responseBody.contentLength(), bytesRead == -1);
|
||||
return bytesRead;
|
||||
}
|
||||
};
|
||||
|
||||
@@ -57,12 +57,11 @@ public class AnotherFakeApi {
|
||||
/**
|
||||
* Build call for call123testSpecialTags
|
||||
* @param body client model (required)
|
||||
* @param _progressListener Progress listener
|
||||
* @param _progressRequestListener Progress request listener
|
||||
* @param _callback Callback for upload/download progress
|
||||
* @return Call to execute
|
||||
* @throws ApiException If fail to serialize the request body object
|
||||
*/
|
||||
public okhttp3.Call call123testSpecialTagsCall(Client body, final ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException {
|
||||
public okhttp3.Call call123testSpecialTagsCall(Client body, final ApiCallback _callback) throws ApiException {
|
||||
Object localVarPostBody = body;
|
||||
|
||||
// create path and map variables
|
||||
@@ -86,24 +85,12 @@ public class AnotherFakeApi {
|
||||
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
||||
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||
|
||||
if (_progressListener != null) {
|
||||
localVarApiClient.setHttpClient(localVarApiClient.getHttpClient().newBuilder().addNetworkInterceptor(new okhttp3.Interceptor() {
|
||||
@Override
|
||||
public okhttp3.Response intercept(okhttp3.Interceptor.Chain chain) throws IOException {
|
||||
okhttp3.Response originalResponse = chain.proceed(chain.request());
|
||||
return originalResponse.newBuilder()
|
||||
.body(new ProgressResponseBody(originalResponse.body(), _progressListener))
|
||||
.build();
|
||||
}
|
||||
}).build());
|
||||
}
|
||||
|
||||
String[] localVarAuthNames = new String[] { };
|
||||
return localVarApiClient.buildCall(localVarPath, "PATCH", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _progressRequestListener);
|
||||
return localVarApiClient.buildCall(localVarPath, "PATCH", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _callback);
|
||||
}
|
||||
|
||||
@SuppressWarnings("rawtypes")
|
||||
private okhttp3.Call call123testSpecialTagsValidateBeforeCall(Client body, final ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException {
|
||||
private okhttp3.Call call123testSpecialTagsValidateBeforeCall(Client body, final ApiCallback _callback) throws ApiException {
|
||||
|
||||
// verify the required parameter 'body' is set
|
||||
if (body == null) {
|
||||
@@ -111,7 +98,7 @@ public class AnotherFakeApi {
|
||||
}
|
||||
|
||||
|
||||
okhttp3.Call localVarCall = call123testSpecialTagsCall(body, _progressListener, _progressRequestListener);
|
||||
okhttp3.Call localVarCall = call123testSpecialTagsCall(body, _callback);
|
||||
return localVarCall;
|
||||
|
||||
}
|
||||
@@ -136,7 +123,7 @@ public class AnotherFakeApi {
|
||||
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
|
||||
*/
|
||||
public ApiResponse<Client> call123testSpecialTagsWithHttpInfo(Client body) throws ApiException {
|
||||
okhttp3.Call localVarCall = call123testSpecialTagsValidateBeforeCall(body, null, null);
|
||||
okhttp3.Call localVarCall = call123testSpecialTagsValidateBeforeCall(body, null);
|
||||
Type localVarReturnType = new TypeToken<Client>(){}.getType();
|
||||
return localVarApiClient.execute(localVarCall, localVarReturnType);
|
||||
}
|
||||
@@ -151,26 +138,7 @@ public class AnotherFakeApi {
|
||||
*/
|
||||
public okhttp3.Call call123testSpecialTagsAsync(Client body, final ApiCallback<Client> _callback) throws ApiException {
|
||||
|
||||
ProgressResponseBody.ProgressListener _progressListener = null;
|
||||
ProgressRequestBody.ProgressRequestListener _progressRequestListener = null;
|
||||
|
||||
if (_callback != null) {
|
||||
_progressListener = new ProgressResponseBody.ProgressListener() {
|
||||
@Override
|
||||
public void update(long bytesRead, long contentLength, boolean done) {
|
||||
_callback.onDownloadProgress(bytesRead, contentLength, done);
|
||||
}
|
||||
};
|
||||
|
||||
_progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
|
||||
@Override
|
||||
public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
|
||||
_callback.onUploadProgress(bytesWritten, contentLength, done);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
okhttp3.Call localVarCall = call123testSpecialTagsValidateBeforeCall(body, _progressListener, _progressRequestListener);
|
||||
okhttp3.Call localVarCall = call123testSpecialTagsValidateBeforeCall(body, _callback);
|
||||
Type localVarReturnType = new TypeToken<Client>(){}.getType();
|
||||
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
|
||||
return localVarCall;
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -57,12 +57,11 @@ public class FakeClassnameTags123Api {
|
||||
/**
|
||||
* Build call for testClassname
|
||||
* @param body client model (required)
|
||||
* @param _progressListener Progress listener
|
||||
* @param _progressRequestListener Progress request listener
|
||||
* @param _callback Callback for upload/download progress
|
||||
* @return Call to execute
|
||||
* @throws ApiException If fail to serialize the request body object
|
||||
*/
|
||||
public okhttp3.Call testClassnameCall(Client body, final ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException {
|
||||
public okhttp3.Call testClassnameCall(Client body, final ApiCallback _callback) throws ApiException {
|
||||
Object localVarPostBody = body;
|
||||
|
||||
// create path and map variables
|
||||
@@ -86,24 +85,12 @@ public class FakeClassnameTags123Api {
|
||||
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
||||
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||
|
||||
if (_progressListener != null) {
|
||||
localVarApiClient.setHttpClient(localVarApiClient.getHttpClient().newBuilder().addNetworkInterceptor(new okhttp3.Interceptor() {
|
||||
@Override
|
||||
public okhttp3.Response intercept(okhttp3.Interceptor.Chain chain) throws IOException {
|
||||
okhttp3.Response originalResponse = chain.proceed(chain.request());
|
||||
return originalResponse.newBuilder()
|
||||
.body(new ProgressResponseBody(originalResponse.body(), _progressListener))
|
||||
.build();
|
||||
}
|
||||
}).build());
|
||||
}
|
||||
|
||||
String[] localVarAuthNames = new String[] { "api_key_query" };
|
||||
return localVarApiClient.buildCall(localVarPath, "PATCH", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _progressRequestListener);
|
||||
return localVarApiClient.buildCall(localVarPath, "PATCH", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _callback);
|
||||
}
|
||||
|
||||
@SuppressWarnings("rawtypes")
|
||||
private okhttp3.Call testClassnameValidateBeforeCall(Client body, final ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException {
|
||||
private okhttp3.Call testClassnameValidateBeforeCall(Client body, final ApiCallback _callback) throws ApiException {
|
||||
|
||||
// verify the required parameter 'body' is set
|
||||
if (body == null) {
|
||||
@@ -111,7 +98,7 @@ public class FakeClassnameTags123Api {
|
||||
}
|
||||
|
||||
|
||||
okhttp3.Call localVarCall = testClassnameCall(body, _progressListener, _progressRequestListener);
|
||||
okhttp3.Call localVarCall = testClassnameCall(body, _callback);
|
||||
return localVarCall;
|
||||
|
||||
}
|
||||
@@ -136,7 +123,7 @@ public class FakeClassnameTags123Api {
|
||||
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
|
||||
*/
|
||||
public ApiResponse<Client> testClassnameWithHttpInfo(Client body) throws ApiException {
|
||||
okhttp3.Call localVarCall = testClassnameValidateBeforeCall(body, null, null);
|
||||
okhttp3.Call localVarCall = testClassnameValidateBeforeCall(body, null);
|
||||
Type localVarReturnType = new TypeToken<Client>(){}.getType();
|
||||
return localVarApiClient.execute(localVarCall, localVarReturnType);
|
||||
}
|
||||
@@ -151,26 +138,7 @@ public class FakeClassnameTags123Api {
|
||||
*/
|
||||
public okhttp3.Call testClassnameAsync(Client body, final ApiCallback<Client> _callback) throws ApiException {
|
||||
|
||||
ProgressResponseBody.ProgressListener _progressListener = null;
|
||||
ProgressRequestBody.ProgressRequestListener _progressRequestListener = null;
|
||||
|
||||
if (_callback != null) {
|
||||
_progressListener = new ProgressResponseBody.ProgressListener() {
|
||||
@Override
|
||||
public void update(long bytesRead, long contentLength, boolean done) {
|
||||
_callback.onDownloadProgress(bytesRead, contentLength, done);
|
||||
}
|
||||
};
|
||||
|
||||
_progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
|
||||
@Override
|
||||
public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
|
||||
_callback.onUploadProgress(bytesWritten, contentLength, done);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
okhttp3.Call localVarCall = testClassnameValidateBeforeCall(body, _progressListener, _progressRequestListener);
|
||||
okhttp3.Call localVarCall = testClassnameValidateBeforeCall(body, _callback);
|
||||
Type localVarReturnType = new TypeToken<Client>(){}.getType();
|
||||
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
|
||||
return localVarCall;
|
||||
|
||||
@@ -59,12 +59,11 @@ public class PetApi {
|
||||
/**
|
||||
* Build call for addPet
|
||||
* @param body Pet object that needs to be added to the store (required)
|
||||
* @param _progressListener Progress listener
|
||||
* @param _progressRequestListener Progress request listener
|
||||
* @param _callback Callback for upload/download progress
|
||||
* @return Call to execute
|
||||
* @throws ApiException If fail to serialize the request body object
|
||||
*/
|
||||
public okhttp3.Call addPetCall(Pet body, final ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException {
|
||||
public okhttp3.Call addPetCall(Pet body, final ApiCallback _callback) throws ApiException {
|
||||
Object localVarPostBody = body;
|
||||
|
||||
// create path and map variables
|
||||
@@ -88,24 +87,12 @@ public class PetApi {
|
||||
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
||||
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||
|
||||
if (_progressListener != null) {
|
||||
localVarApiClient.setHttpClient(localVarApiClient.getHttpClient().newBuilder().addNetworkInterceptor(new okhttp3.Interceptor() {
|
||||
@Override
|
||||
public okhttp3.Response intercept(okhttp3.Interceptor.Chain chain) throws IOException {
|
||||
okhttp3.Response originalResponse = chain.proceed(chain.request());
|
||||
return originalResponse.newBuilder()
|
||||
.body(new ProgressResponseBody(originalResponse.body(), _progressListener))
|
||||
.build();
|
||||
}
|
||||
}).build());
|
||||
}
|
||||
|
||||
String[] localVarAuthNames = new String[] { "petstore_auth" };
|
||||
return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _progressRequestListener);
|
||||
return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _callback);
|
||||
}
|
||||
|
||||
@SuppressWarnings("rawtypes")
|
||||
private okhttp3.Call addPetValidateBeforeCall(Pet body, final ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException {
|
||||
private okhttp3.Call addPetValidateBeforeCall(Pet body, final ApiCallback _callback) throws ApiException {
|
||||
|
||||
// verify the required parameter 'body' is set
|
||||
if (body == null) {
|
||||
@@ -113,7 +100,7 @@ public class PetApi {
|
||||
}
|
||||
|
||||
|
||||
okhttp3.Call localVarCall = addPetCall(body, _progressListener, _progressRequestListener);
|
||||
okhttp3.Call localVarCall = addPetCall(body, _callback);
|
||||
return localVarCall;
|
||||
|
||||
}
|
||||
@@ -136,7 +123,7 @@ public class PetApi {
|
||||
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
|
||||
*/
|
||||
public ApiResponse<Void> addPetWithHttpInfo(Pet body) throws ApiException {
|
||||
okhttp3.Call localVarCall = addPetValidateBeforeCall(body, null, null);
|
||||
okhttp3.Call localVarCall = addPetValidateBeforeCall(body, null);
|
||||
return localVarApiClient.execute(localVarCall);
|
||||
}
|
||||
|
||||
@@ -150,26 +137,7 @@ public class PetApi {
|
||||
*/
|
||||
public okhttp3.Call addPetAsync(Pet body, final ApiCallback<Void> _callback) throws ApiException {
|
||||
|
||||
ProgressResponseBody.ProgressListener _progressListener = null;
|
||||
ProgressRequestBody.ProgressRequestListener _progressRequestListener = null;
|
||||
|
||||
if (_callback != null) {
|
||||
_progressListener = new ProgressResponseBody.ProgressListener() {
|
||||
@Override
|
||||
public void update(long bytesRead, long contentLength, boolean done) {
|
||||
_callback.onDownloadProgress(bytesRead, contentLength, done);
|
||||
}
|
||||
};
|
||||
|
||||
_progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
|
||||
@Override
|
||||
public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
|
||||
_callback.onUploadProgress(bytesWritten, contentLength, done);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
okhttp3.Call localVarCall = addPetValidateBeforeCall(body, _progressListener, _progressRequestListener);
|
||||
okhttp3.Call localVarCall = addPetValidateBeforeCall(body, _callback);
|
||||
localVarApiClient.executeAsync(localVarCall, _callback);
|
||||
return localVarCall;
|
||||
}
|
||||
@@ -177,12 +145,11 @@ public class PetApi {
|
||||
* Build call for deletePet
|
||||
* @param petId Pet id to delete (required)
|
||||
* @param apiKey (optional)
|
||||
* @param _progressListener Progress listener
|
||||
* @param _progressRequestListener Progress request listener
|
||||
* @param _callback Callback for upload/download progress
|
||||
* @return Call to execute
|
||||
* @throws ApiException If fail to serialize the request body object
|
||||
*/
|
||||
public okhttp3.Call deletePetCall(Long petId, String apiKey, final ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException {
|
||||
public okhttp3.Call deletePetCall(Long petId, String apiKey, final ApiCallback _callback) throws ApiException {
|
||||
Object localVarPostBody = new Object();
|
||||
|
||||
// create path and map variables
|
||||
@@ -211,24 +178,12 @@ public class PetApi {
|
||||
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
||||
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||
|
||||
if (_progressListener != null) {
|
||||
localVarApiClient.setHttpClient(localVarApiClient.getHttpClient().newBuilder().addNetworkInterceptor(new okhttp3.Interceptor() {
|
||||
@Override
|
||||
public okhttp3.Response intercept(okhttp3.Interceptor.Chain chain) throws IOException {
|
||||
okhttp3.Response originalResponse = chain.proceed(chain.request());
|
||||
return originalResponse.newBuilder()
|
||||
.body(new ProgressResponseBody(originalResponse.body(), _progressListener))
|
||||
.build();
|
||||
}
|
||||
}).build());
|
||||
}
|
||||
|
||||
String[] localVarAuthNames = new String[] { "petstore_auth" };
|
||||
return localVarApiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _progressRequestListener);
|
||||
return localVarApiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _callback);
|
||||
}
|
||||
|
||||
@SuppressWarnings("rawtypes")
|
||||
private okhttp3.Call deletePetValidateBeforeCall(Long petId, String apiKey, final ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException {
|
||||
private okhttp3.Call deletePetValidateBeforeCall(Long petId, String apiKey, final ApiCallback _callback) throws ApiException {
|
||||
|
||||
// verify the required parameter 'petId' is set
|
||||
if (petId == null) {
|
||||
@@ -236,7 +191,7 @@ public class PetApi {
|
||||
}
|
||||
|
||||
|
||||
okhttp3.Call localVarCall = deletePetCall(petId, apiKey, _progressListener, _progressRequestListener);
|
||||
okhttp3.Call localVarCall = deletePetCall(petId, apiKey, _callback);
|
||||
return localVarCall;
|
||||
|
||||
}
|
||||
@@ -261,7 +216,7 @@ public class PetApi {
|
||||
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
|
||||
*/
|
||||
public ApiResponse<Void> deletePetWithHttpInfo(Long petId, String apiKey) throws ApiException {
|
||||
okhttp3.Call localVarCall = deletePetValidateBeforeCall(petId, apiKey, null, null);
|
||||
okhttp3.Call localVarCall = deletePetValidateBeforeCall(petId, apiKey, null);
|
||||
return localVarApiClient.execute(localVarCall);
|
||||
}
|
||||
|
||||
@@ -276,38 +231,18 @@ public class PetApi {
|
||||
*/
|
||||
public okhttp3.Call deletePetAsync(Long petId, String apiKey, final ApiCallback<Void> _callback) throws ApiException {
|
||||
|
||||
ProgressResponseBody.ProgressListener _progressListener = null;
|
||||
ProgressRequestBody.ProgressRequestListener _progressRequestListener = null;
|
||||
|
||||
if (_callback != null) {
|
||||
_progressListener = new ProgressResponseBody.ProgressListener() {
|
||||
@Override
|
||||
public void update(long bytesRead, long contentLength, boolean done) {
|
||||
_callback.onDownloadProgress(bytesRead, contentLength, done);
|
||||
}
|
||||
};
|
||||
|
||||
_progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
|
||||
@Override
|
||||
public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
|
||||
_callback.onUploadProgress(bytesWritten, contentLength, done);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
okhttp3.Call localVarCall = deletePetValidateBeforeCall(petId, apiKey, _progressListener, _progressRequestListener);
|
||||
okhttp3.Call localVarCall = deletePetValidateBeforeCall(petId, apiKey, _callback);
|
||||
localVarApiClient.executeAsync(localVarCall, _callback);
|
||||
return localVarCall;
|
||||
}
|
||||
/**
|
||||
* Build call for findPetsByStatus
|
||||
* @param status Status values that need to be considered for filter (required)
|
||||
* @param _progressListener Progress listener
|
||||
* @param _progressRequestListener Progress request listener
|
||||
* @param _callback Callback for upload/download progress
|
||||
* @return Call to execute
|
||||
* @throws ApiException If fail to serialize the request body object
|
||||
*/
|
||||
public okhttp3.Call findPetsByStatusCall(List<String> status, final ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException {
|
||||
public okhttp3.Call findPetsByStatusCall(List<String> status, final ApiCallback _callback) throws ApiException {
|
||||
Object localVarPostBody = new Object();
|
||||
|
||||
// create path and map variables
|
||||
@@ -335,24 +270,12 @@ public class PetApi {
|
||||
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
||||
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||
|
||||
if (_progressListener != null) {
|
||||
localVarApiClient.setHttpClient(localVarApiClient.getHttpClient().newBuilder().addNetworkInterceptor(new okhttp3.Interceptor() {
|
||||
@Override
|
||||
public okhttp3.Response intercept(okhttp3.Interceptor.Chain chain) throws IOException {
|
||||
okhttp3.Response originalResponse = chain.proceed(chain.request());
|
||||
return originalResponse.newBuilder()
|
||||
.body(new ProgressResponseBody(originalResponse.body(), _progressListener))
|
||||
.build();
|
||||
}
|
||||
}).build());
|
||||
}
|
||||
|
||||
String[] localVarAuthNames = new String[] { "petstore_auth" };
|
||||
return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _progressRequestListener);
|
||||
return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _callback);
|
||||
}
|
||||
|
||||
@SuppressWarnings("rawtypes")
|
||||
private okhttp3.Call findPetsByStatusValidateBeforeCall(List<String> status, final ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException {
|
||||
private okhttp3.Call findPetsByStatusValidateBeforeCall(List<String> status, final ApiCallback _callback) throws ApiException {
|
||||
|
||||
// verify the required parameter 'status' is set
|
||||
if (status == null) {
|
||||
@@ -360,7 +283,7 @@ public class PetApi {
|
||||
}
|
||||
|
||||
|
||||
okhttp3.Call localVarCall = findPetsByStatusCall(status, _progressListener, _progressRequestListener);
|
||||
okhttp3.Call localVarCall = findPetsByStatusCall(status, _callback);
|
||||
return localVarCall;
|
||||
|
||||
}
|
||||
@@ -385,7 +308,7 @@ public class PetApi {
|
||||
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
|
||||
*/
|
||||
public ApiResponse<List<Pet>> findPetsByStatusWithHttpInfo(List<String> status) throws ApiException {
|
||||
okhttp3.Call localVarCall = findPetsByStatusValidateBeforeCall(status, null, null);
|
||||
okhttp3.Call localVarCall = findPetsByStatusValidateBeforeCall(status, null);
|
||||
Type localVarReturnType = new TypeToken<List<Pet>>(){}.getType();
|
||||
return localVarApiClient.execute(localVarCall, localVarReturnType);
|
||||
}
|
||||
@@ -400,26 +323,7 @@ public class PetApi {
|
||||
*/
|
||||
public okhttp3.Call findPetsByStatusAsync(List<String> status, final ApiCallback<List<Pet>> _callback) throws ApiException {
|
||||
|
||||
ProgressResponseBody.ProgressListener _progressListener = null;
|
||||
ProgressRequestBody.ProgressRequestListener _progressRequestListener = null;
|
||||
|
||||
if (_callback != null) {
|
||||
_progressListener = new ProgressResponseBody.ProgressListener() {
|
||||
@Override
|
||||
public void update(long bytesRead, long contentLength, boolean done) {
|
||||
_callback.onDownloadProgress(bytesRead, contentLength, done);
|
||||
}
|
||||
};
|
||||
|
||||
_progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
|
||||
@Override
|
||||
public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
|
||||
_callback.onUploadProgress(bytesWritten, contentLength, done);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
okhttp3.Call localVarCall = findPetsByStatusValidateBeforeCall(status, _progressListener, _progressRequestListener);
|
||||
okhttp3.Call localVarCall = findPetsByStatusValidateBeforeCall(status, _callback);
|
||||
Type localVarReturnType = new TypeToken<List<Pet>>(){}.getType();
|
||||
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
|
||||
return localVarCall;
|
||||
@@ -427,14 +331,13 @@ public class PetApi {
|
||||
/**
|
||||
* Build call for findPetsByTags
|
||||
* @param tags Tags to filter by (required)
|
||||
* @param _progressListener Progress listener
|
||||
* @param _progressRequestListener Progress request listener
|
||||
* @param _callback Callback for upload/download progress
|
||||
* @return Call to execute
|
||||
* @throws ApiException If fail to serialize the request body object
|
||||
* @deprecated
|
||||
*/
|
||||
@Deprecated
|
||||
public okhttp3.Call findPetsByTagsCall(List<String> tags, final ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException {
|
||||
public okhttp3.Call findPetsByTagsCall(List<String> tags, final ApiCallback _callback) throws ApiException {
|
||||
Object localVarPostBody = new Object();
|
||||
|
||||
// create path and map variables
|
||||
@@ -462,25 +365,13 @@ public class PetApi {
|
||||
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
||||
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||
|
||||
if (_progressListener != null) {
|
||||
localVarApiClient.setHttpClient(localVarApiClient.getHttpClient().newBuilder().addNetworkInterceptor(new okhttp3.Interceptor() {
|
||||
@Override
|
||||
public okhttp3.Response intercept(okhttp3.Interceptor.Chain chain) throws IOException {
|
||||
okhttp3.Response originalResponse = chain.proceed(chain.request());
|
||||
return originalResponse.newBuilder()
|
||||
.body(new ProgressResponseBody(originalResponse.body(), _progressListener))
|
||||
.build();
|
||||
}
|
||||
}).build());
|
||||
}
|
||||
|
||||
String[] localVarAuthNames = new String[] { "petstore_auth" };
|
||||
return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _progressRequestListener);
|
||||
return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _callback);
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
@SuppressWarnings("rawtypes")
|
||||
private okhttp3.Call findPetsByTagsValidateBeforeCall(List<String> tags, final ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException {
|
||||
private okhttp3.Call findPetsByTagsValidateBeforeCall(List<String> tags, final ApiCallback _callback) throws ApiException {
|
||||
|
||||
// verify the required parameter 'tags' is set
|
||||
if (tags == null) {
|
||||
@@ -488,7 +379,7 @@ public class PetApi {
|
||||
}
|
||||
|
||||
|
||||
okhttp3.Call localVarCall = findPetsByTagsCall(tags, _progressListener, _progressRequestListener);
|
||||
okhttp3.Call localVarCall = findPetsByTagsCall(tags, _callback);
|
||||
return localVarCall;
|
||||
|
||||
}
|
||||
@@ -517,7 +408,7 @@ public class PetApi {
|
||||
*/
|
||||
@Deprecated
|
||||
public ApiResponse<List<Pet>> findPetsByTagsWithHttpInfo(List<String> tags) throws ApiException {
|
||||
okhttp3.Call localVarCall = findPetsByTagsValidateBeforeCall(tags, null, null);
|
||||
okhttp3.Call localVarCall = findPetsByTagsValidateBeforeCall(tags, null);
|
||||
Type localVarReturnType = new TypeToken<List<Pet>>(){}.getType();
|
||||
return localVarApiClient.execute(localVarCall, localVarReturnType);
|
||||
}
|
||||
@@ -534,26 +425,7 @@ public class PetApi {
|
||||
@Deprecated
|
||||
public okhttp3.Call findPetsByTagsAsync(List<String> tags, final ApiCallback<List<Pet>> _callback) throws ApiException {
|
||||
|
||||
ProgressResponseBody.ProgressListener _progressListener = null;
|
||||
ProgressRequestBody.ProgressRequestListener _progressRequestListener = null;
|
||||
|
||||
if (_callback != null) {
|
||||
_progressListener = new ProgressResponseBody.ProgressListener() {
|
||||
@Override
|
||||
public void update(long bytesRead, long contentLength, boolean done) {
|
||||
_callback.onDownloadProgress(bytesRead, contentLength, done);
|
||||
}
|
||||
};
|
||||
|
||||
_progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
|
||||
@Override
|
||||
public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
|
||||
_callback.onUploadProgress(bytesWritten, contentLength, done);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
okhttp3.Call localVarCall = findPetsByTagsValidateBeforeCall(tags, _progressListener, _progressRequestListener);
|
||||
okhttp3.Call localVarCall = findPetsByTagsValidateBeforeCall(tags, _callback);
|
||||
Type localVarReturnType = new TypeToken<List<Pet>>(){}.getType();
|
||||
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
|
||||
return localVarCall;
|
||||
@@ -561,12 +433,11 @@ public class PetApi {
|
||||
/**
|
||||
* Build call for getPetById
|
||||
* @param petId ID of pet to return (required)
|
||||
* @param _progressListener Progress listener
|
||||
* @param _progressRequestListener Progress request listener
|
||||
* @param _callback Callback for upload/download progress
|
||||
* @return Call to execute
|
||||
* @throws ApiException If fail to serialize the request body object
|
||||
*/
|
||||
public okhttp3.Call getPetByIdCall(Long petId, final ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException {
|
||||
public okhttp3.Call getPetByIdCall(Long petId, final ApiCallback _callback) throws ApiException {
|
||||
Object localVarPostBody = new Object();
|
||||
|
||||
// create path and map variables
|
||||
@@ -591,24 +462,12 @@ public class PetApi {
|
||||
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
||||
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||
|
||||
if (_progressListener != null) {
|
||||
localVarApiClient.setHttpClient(localVarApiClient.getHttpClient().newBuilder().addNetworkInterceptor(new okhttp3.Interceptor() {
|
||||
@Override
|
||||
public okhttp3.Response intercept(okhttp3.Interceptor.Chain chain) throws IOException {
|
||||
okhttp3.Response originalResponse = chain.proceed(chain.request());
|
||||
return originalResponse.newBuilder()
|
||||
.body(new ProgressResponseBody(originalResponse.body(), _progressListener))
|
||||
.build();
|
||||
}
|
||||
}).build());
|
||||
}
|
||||
|
||||
String[] localVarAuthNames = new String[] { "api_key" };
|
||||
return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _progressRequestListener);
|
||||
return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _callback);
|
||||
}
|
||||
|
||||
@SuppressWarnings("rawtypes")
|
||||
private okhttp3.Call getPetByIdValidateBeforeCall(Long petId, final ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException {
|
||||
private okhttp3.Call getPetByIdValidateBeforeCall(Long petId, final ApiCallback _callback) throws ApiException {
|
||||
|
||||
// verify the required parameter 'petId' is set
|
||||
if (petId == null) {
|
||||
@@ -616,7 +475,7 @@ public class PetApi {
|
||||
}
|
||||
|
||||
|
||||
okhttp3.Call localVarCall = getPetByIdCall(petId, _progressListener, _progressRequestListener);
|
||||
okhttp3.Call localVarCall = getPetByIdCall(petId, _callback);
|
||||
return localVarCall;
|
||||
|
||||
}
|
||||
@@ -641,7 +500,7 @@ public class PetApi {
|
||||
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
|
||||
*/
|
||||
public ApiResponse<Pet> getPetByIdWithHttpInfo(Long petId) throws ApiException {
|
||||
okhttp3.Call localVarCall = getPetByIdValidateBeforeCall(petId, null, null);
|
||||
okhttp3.Call localVarCall = getPetByIdValidateBeforeCall(petId, null);
|
||||
Type localVarReturnType = new TypeToken<Pet>(){}.getType();
|
||||
return localVarApiClient.execute(localVarCall, localVarReturnType);
|
||||
}
|
||||
@@ -656,26 +515,7 @@ public class PetApi {
|
||||
*/
|
||||
public okhttp3.Call getPetByIdAsync(Long petId, final ApiCallback<Pet> _callback) throws ApiException {
|
||||
|
||||
ProgressResponseBody.ProgressListener _progressListener = null;
|
||||
ProgressRequestBody.ProgressRequestListener _progressRequestListener = null;
|
||||
|
||||
if (_callback != null) {
|
||||
_progressListener = new ProgressResponseBody.ProgressListener() {
|
||||
@Override
|
||||
public void update(long bytesRead, long contentLength, boolean done) {
|
||||
_callback.onDownloadProgress(bytesRead, contentLength, done);
|
||||
}
|
||||
};
|
||||
|
||||
_progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
|
||||
@Override
|
||||
public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
|
||||
_callback.onUploadProgress(bytesWritten, contentLength, done);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
okhttp3.Call localVarCall = getPetByIdValidateBeforeCall(petId, _progressListener, _progressRequestListener);
|
||||
okhttp3.Call localVarCall = getPetByIdValidateBeforeCall(petId, _callback);
|
||||
Type localVarReturnType = new TypeToken<Pet>(){}.getType();
|
||||
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
|
||||
return localVarCall;
|
||||
@@ -683,12 +523,11 @@ public class PetApi {
|
||||
/**
|
||||
* Build call for updatePet
|
||||
* @param body Pet object that needs to be added to the store (required)
|
||||
* @param _progressListener Progress listener
|
||||
* @param _progressRequestListener Progress request listener
|
||||
* @param _callback Callback for upload/download progress
|
||||
* @return Call to execute
|
||||
* @throws ApiException If fail to serialize the request body object
|
||||
*/
|
||||
public okhttp3.Call updatePetCall(Pet body, final ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException {
|
||||
public okhttp3.Call updatePetCall(Pet body, final ApiCallback _callback) throws ApiException {
|
||||
Object localVarPostBody = body;
|
||||
|
||||
// create path and map variables
|
||||
@@ -712,24 +551,12 @@ public class PetApi {
|
||||
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
||||
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||
|
||||
if (_progressListener != null) {
|
||||
localVarApiClient.setHttpClient(localVarApiClient.getHttpClient().newBuilder().addNetworkInterceptor(new okhttp3.Interceptor() {
|
||||
@Override
|
||||
public okhttp3.Response intercept(okhttp3.Interceptor.Chain chain) throws IOException {
|
||||
okhttp3.Response originalResponse = chain.proceed(chain.request());
|
||||
return originalResponse.newBuilder()
|
||||
.body(new ProgressResponseBody(originalResponse.body(), _progressListener))
|
||||
.build();
|
||||
}
|
||||
}).build());
|
||||
}
|
||||
|
||||
String[] localVarAuthNames = new String[] { "petstore_auth" };
|
||||
return localVarApiClient.buildCall(localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _progressRequestListener);
|
||||
return localVarApiClient.buildCall(localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _callback);
|
||||
}
|
||||
|
||||
@SuppressWarnings("rawtypes")
|
||||
private okhttp3.Call updatePetValidateBeforeCall(Pet body, final ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException {
|
||||
private okhttp3.Call updatePetValidateBeforeCall(Pet body, final ApiCallback _callback) throws ApiException {
|
||||
|
||||
// verify the required parameter 'body' is set
|
||||
if (body == null) {
|
||||
@@ -737,7 +564,7 @@ public class PetApi {
|
||||
}
|
||||
|
||||
|
||||
okhttp3.Call localVarCall = updatePetCall(body, _progressListener, _progressRequestListener);
|
||||
okhttp3.Call localVarCall = updatePetCall(body, _callback);
|
||||
return localVarCall;
|
||||
|
||||
}
|
||||
@@ -760,7 +587,7 @@ public class PetApi {
|
||||
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
|
||||
*/
|
||||
public ApiResponse<Void> updatePetWithHttpInfo(Pet body) throws ApiException {
|
||||
okhttp3.Call localVarCall = updatePetValidateBeforeCall(body, null, null);
|
||||
okhttp3.Call localVarCall = updatePetValidateBeforeCall(body, null);
|
||||
return localVarApiClient.execute(localVarCall);
|
||||
}
|
||||
|
||||
@@ -774,26 +601,7 @@ public class PetApi {
|
||||
*/
|
||||
public okhttp3.Call updatePetAsync(Pet body, final ApiCallback<Void> _callback) throws ApiException {
|
||||
|
||||
ProgressResponseBody.ProgressListener _progressListener = null;
|
||||
ProgressRequestBody.ProgressRequestListener _progressRequestListener = null;
|
||||
|
||||
if (_callback != null) {
|
||||
_progressListener = new ProgressResponseBody.ProgressListener() {
|
||||
@Override
|
||||
public void update(long bytesRead, long contentLength, boolean done) {
|
||||
_callback.onDownloadProgress(bytesRead, contentLength, done);
|
||||
}
|
||||
};
|
||||
|
||||
_progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
|
||||
@Override
|
||||
public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
|
||||
_callback.onUploadProgress(bytesWritten, contentLength, done);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
okhttp3.Call localVarCall = updatePetValidateBeforeCall(body, _progressListener, _progressRequestListener);
|
||||
okhttp3.Call localVarCall = updatePetValidateBeforeCall(body, _callback);
|
||||
localVarApiClient.executeAsync(localVarCall, _callback);
|
||||
return localVarCall;
|
||||
}
|
||||
@@ -802,12 +610,11 @@ public class PetApi {
|
||||
* @param petId ID of pet that needs to be updated (required)
|
||||
* @param name Updated name of the pet (optional)
|
||||
* @param status Updated status of the pet (optional)
|
||||
* @param _progressListener Progress listener
|
||||
* @param _progressRequestListener Progress request listener
|
||||
* @param _callback Callback for upload/download progress
|
||||
* @return Call to execute
|
||||
* @throws ApiException If fail to serialize the request body object
|
||||
*/
|
||||
public okhttp3.Call updatePetWithFormCall(Long petId, String name, String status, final ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException {
|
||||
public okhttp3.Call updatePetWithFormCall(Long petId, String name, String status, final ApiCallback _callback) throws ApiException {
|
||||
Object localVarPostBody = new Object();
|
||||
|
||||
// create path and map variables
|
||||
@@ -840,24 +647,12 @@ public class PetApi {
|
||||
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
||||
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||
|
||||
if (_progressListener != null) {
|
||||
localVarApiClient.setHttpClient(localVarApiClient.getHttpClient().newBuilder().addNetworkInterceptor(new okhttp3.Interceptor() {
|
||||
@Override
|
||||
public okhttp3.Response intercept(okhttp3.Interceptor.Chain chain) throws IOException {
|
||||
okhttp3.Response originalResponse = chain.proceed(chain.request());
|
||||
return originalResponse.newBuilder()
|
||||
.body(new ProgressResponseBody(originalResponse.body(), _progressListener))
|
||||
.build();
|
||||
}
|
||||
}).build());
|
||||
}
|
||||
|
||||
String[] localVarAuthNames = new String[] { "petstore_auth" };
|
||||
return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _progressRequestListener);
|
||||
return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _callback);
|
||||
}
|
||||
|
||||
@SuppressWarnings("rawtypes")
|
||||
private okhttp3.Call updatePetWithFormValidateBeforeCall(Long petId, String name, String status, final ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException {
|
||||
private okhttp3.Call updatePetWithFormValidateBeforeCall(Long petId, String name, String status, final ApiCallback _callback) throws ApiException {
|
||||
|
||||
// verify the required parameter 'petId' is set
|
||||
if (petId == null) {
|
||||
@@ -865,7 +660,7 @@ public class PetApi {
|
||||
}
|
||||
|
||||
|
||||
okhttp3.Call localVarCall = updatePetWithFormCall(petId, name, status, _progressListener, _progressRequestListener);
|
||||
okhttp3.Call localVarCall = updatePetWithFormCall(petId, name, status, _callback);
|
||||
return localVarCall;
|
||||
|
||||
}
|
||||
@@ -892,7 +687,7 @@ public class PetApi {
|
||||
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
|
||||
*/
|
||||
public ApiResponse<Void> updatePetWithFormWithHttpInfo(Long petId, String name, String status) throws ApiException {
|
||||
okhttp3.Call localVarCall = updatePetWithFormValidateBeforeCall(petId, name, status, null, null);
|
||||
okhttp3.Call localVarCall = updatePetWithFormValidateBeforeCall(petId, name, status, null);
|
||||
return localVarApiClient.execute(localVarCall);
|
||||
}
|
||||
|
||||
@@ -908,26 +703,7 @@ public class PetApi {
|
||||
*/
|
||||
public okhttp3.Call updatePetWithFormAsync(Long petId, String name, String status, final ApiCallback<Void> _callback) throws ApiException {
|
||||
|
||||
ProgressResponseBody.ProgressListener _progressListener = null;
|
||||
ProgressRequestBody.ProgressRequestListener _progressRequestListener = null;
|
||||
|
||||
if (_callback != null) {
|
||||
_progressListener = new ProgressResponseBody.ProgressListener() {
|
||||
@Override
|
||||
public void update(long bytesRead, long contentLength, boolean done) {
|
||||
_callback.onDownloadProgress(bytesRead, contentLength, done);
|
||||
}
|
||||
};
|
||||
|
||||
_progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
|
||||
@Override
|
||||
public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
|
||||
_callback.onUploadProgress(bytesWritten, contentLength, done);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
okhttp3.Call localVarCall = updatePetWithFormValidateBeforeCall(petId, name, status, _progressListener, _progressRequestListener);
|
||||
okhttp3.Call localVarCall = updatePetWithFormValidateBeforeCall(petId, name, status, _callback);
|
||||
localVarApiClient.executeAsync(localVarCall, _callback);
|
||||
return localVarCall;
|
||||
}
|
||||
@@ -936,12 +712,11 @@ public class PetApi {
|
||||
* @param petId ID of pet to update (required)
|
||||
* @param additionalMetadata Additional data to pass to server (optional)
|
||||
* @param file file to upload (optional)
|
||||
* @param _progressListener Progress listener
|
||||
* @param _progressRequestListener Progress request listener
|
||||
* @param _callback Callback for upload/download progress
|
||||
* @return Call to execute
|
||||
* @throws ApiException If fail to serialize the request body object
|
||||
*/
|
||||
public okhttp3.Call uploadFileCall(Long petId, String additionalMetadata, File file, final ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException {
|
||||
public okhttp3.Call uploadFileCall(Long petId, String additionalMetadata, File file, final ApiCallback _callback) throws ApiException {
|
||||
Object localVarPostBody = new Object();
|
||||
|
||||
// create path and map variables
|
||||
@@ -974,24 +749,12 @@ public class PetApi {
|
||||
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
||||
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||
|
||||
if (_progressListener != null) {
|
||||
localVarApiClient.setHttpClient(localVarApiClient.getHttpClient().newBuilder().addNetworkInterceptor(new okhttp3.Interceptor() {
|
||||
@Override
|
||||
public okhttp3.Response intercept(okhttp3.Interceptor.Chain chain) throws IOException {
|
||||
okhttp3.Response originalResponse = chain.proceed(chain.request());
|
||||
return originalResponse.newBuilder()
|
||||
.body(new ProgressResponseBody(originalResponse.body(), _progressListener))
|
||||
.build();
|
||||
}
|
||||
}).build());
|
||||
}
|
||||
|
||||
String[] localVarAuthNames = new String[] { "petstore_auth" };
|
||||
return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _progressRequestListener);
|
||||
return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _callback);
|
||||
}
|
||||
|
||||
@SuppressWarnings("rawtypes")
|
||||
private okhttp3.Call uploadFileValidateBeforeCall(Long petId, String additionalMetadata, File file, final ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException {
|
||||
private okhttp3.Call uploadFileValidateBeforeCall(Long petId, String additionalMetadata, File file, final ApiCallback _callback) throws ApiException {
|
||||
|
||||
// verify the required parameter 'petId' is set
|
||||
if (petId == null) {
|
||||
@@ -999,7 +762,7 @@ public class PetApi {
|
||||
}
|
||||
|
||||
|
||||
okhttp3.Call localVarCall = uploadFileCall(petId, additionalMetadata, file, _progressListener, _progressRequestListener);
|
||||
okhttp3.Call localVarCall = uploadFileCall(petId, additionalMetadata, file, _callback);
|
||||
return localVarCall;
|
||||
|
||||
}
|
||||
@@ -1028,7 +791,7 @@ public class PetApi {
|
||||
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
|
||||
*/
|
||||
public ApiResponse<ModelApiResponse> uploadFileWithHttpInfo(Long petId, String additionalMetadata, File file) throws ApiException {
|
||||
okhttp3.Call localVarCall = uploadFileValidateBeforeCall(petId, additionalMetadata, file, null, null);
|
||||
okhttp3.Call localVarCall = uploadFileValidateBeforeCall(petId, additionalMetadata, file, null);
|
||||
Type localVarReturnType = new TypeToken<ModelApiResponse>(){}.getType();
|
||||
return localVarApiClient.execute(localVarCall, localVarReturnType);
|
||||
}
|
||||
@@ -1045,26 +808,7 @@ public class PetApi {
|
||||
*/
|
||||
public okhttp3.Call uploadFileAsync(Long petId, String additionalMetadata, File file, final ApiCallback<ModelApiResponse> _callback) throws ApiException {
|
||||
|
||||
ProgressResponseBody.ProgressListener _progressListener = null;
|
||||
ProgressRequestBody.ProgressRequestListener _progressRequestListener = null;
|
||||
|
||||
if (_callback != null) {
|
||||
_progressListener = new ProgressResponseBody.ProgressListener() {
|
||||
@Override
|
||||
public void update(long bytesRead, long contentLength, boolean done) {
|
||||
_callback.onDownloadProgress(bytesRead, contentLength, done);
|
||||
}
|
||||
};
|
||||
|
||||
_progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
|
||||
@Override
|
||||
public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
|
||||
_callback.onUploadProgress(bytesWritten, contentLength, done);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
okhttp3.Call localVarCall = uploadFileValidateBeforeCall(petId, additionalMetadata, file, _progressListener, _progressRequestListener);
|
||||
okhttp3.Call localVarCall = uploadFileValidateBeforeCall(petId, additionalMetadata, file, _callback);
|
||||
Type localVarReturnType = new TypeToken<ModelApiResponse>(){}.getType();
|
||||
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
|
||||
return localVarCall;
|
||||
@@ -1074,12 +818,11 @@ public class PetApi {
|
||||
* @param petId ID of pet to update (required)
|
||||
* @param requiredFile file to upload (required)
|
||||
* @param additionalMetadata Additional data to pass to server (optional)
|
||||
* @param _progressListener Progress listener
|
||||
* @param _progressRequestListener Progress request listener
|
||||
* @param _callback Callback for upload/download progress
|
||||
* @return Call to execute
|
||||
* @throws ApiException If fail to serialize the request body object
|
||||
*/
|
||||
public okhttp3.Call uploadFileWithRequiredFileCall(Long petId, File requiredFile, String additionalMetadata, final ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException {
|
||||
public okhttp3.Call uploadFileWithRequiredFileCall(Long petId, File requiredFile, String additionalMetadata, final ApiCallback _callback) throws ApiException {
|
||||
Object localVarPostBody = new Object();
|
||||
|
||||
// create path and map variables
|
||||
@@ -1112,24 +855,12 @@ public class PetApi {
|
||||
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
||||
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||
|
||||
if (_progressListener != null) {
|
||||
localVarApiClient.setHttpClient(localVarApiClient.getHttpClient().newBuilder().addNetworkInterceptor(new okhttp3.Interceptor() {
|
||||
@Override
|
||||
public okhttp3.Response intercept(okhttp3.Interceptor.Chain chain) throws IOException {
|
||||
okhttp3.Response originalResponse = chain.proceed(chain.request());
|
||||
return originalResponse.newBuilder()
|
||||
.body(new ProgressResponseBody(originalResponse.body(), _progressListener))
|
||||
.build();
|
||||
}
|
||||
}).build());
|
||||
}
|
||||
|
||||
String[] localVarAuthNames = new String[] { "petstore_auth" };
|
||||
return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _progressRequestListener);
|
||||
return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _callback);
|
||||
}
|
||||
|
||||
@SuppressWarnings("rawtypes")
|
||||
private okhttp3.Call uploadFileWithRequiredFileValidateBeforeCall(Long petId, File requiredFile, String additionalMetadata, final ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException {
|
||||
private okhttp3.Call uploadFileWithRequiredFileValidateBeforeCall(Long petId, File requiredFile, String additionalMetadata, final ApiCallback _callback) throws ApiException {
|
||||
|
||||
// verify the required parameter 'petId' is set
|
||||
if (petId == null) {
|
||||
@@ -1142,7 +873,7 @@ public class PetApi {
|
||||
}
|
||||
|
||||
|
||||
okhttp3.Call localVarCall = uploadFileWithRequiredFileCall(petId, requiredFile, additionalMetadata, _progressListener, _progressRequestListener);
|
||||
okhttp3.Call localVarCall = uploadFileWithRequiredFileCall(petId, requiredFile, additionalMetadata, _callback);
|
||||
return localVarCall;
|
||||
|
||||
}
|
||||
@@ -1171,7 +902,7 @@ public class PetApi {
|
||||
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
|
||||
*/
|
||||
public ApiResponse<ModelApiResponse> uploadFileWithRequiredFileWithHttpInfo(Long petId, File requiredFile, String additionalMetadata) throws ApiException {
|
||||
okhttp3.Call localVarCall = uploadFileWithRequiredFileValidateBeforeCall(petId, requiredFile, additionalMetadata, null, null);
|
||||
okhttp3.Call localVarCall = uploadFileWithRequiredFileValidateBeforeCall(petId, requiredFile, additionalMetadata, null);
|
||||
Type localVarReturnType = new TypeToken<ModelApiResponse>(){}.getType();
|
||||
return localVarApiClient.execute(localVarCall, localVarReturnType);
|
||||
}
|
||||
@@ -1188,26 +919,7 @@ public class PetApi {
|
||||
*/
|
||||
public okhttp3.Call uploadFileWithRequiredFileAsync(Long petId, File requiredFile, String additionalMetadata, final ApiCallback<ModelApiResponse> _callback) throws ApiException {
|
||||
|
||||
ProgressResponseBody.ProgressListener _progressListener = null;
|
||||
ProgressRequestBody.ProgressRequestListener _progressRequestListener = null;
|
||||
|
||||
if (_callback != null) {
|
||||
_progressListener = new ProgressResponseBody.ProgressListener() {
|
||||
@Override
|
||||
public void update(long bytesRead, long contentLength, boolean done) {
|
||||
_callback.onDownloadProgress(bytesRead, contentLength, done);
|
||||
}
|
||||
};
|
||||
|
||||
_progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
|
||||
@Override
|
||||
public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
|
||||
_callback.onUploadProgress(bytesWritten, contentLength, done);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
okhttp3.Call localVarCall = uploadFileWithRequiredFileValidateBeforeCall(petId, requiredFile, additionalMetadata, _progressListener, _progressRequestListener);
|
||||
okhttp3.Call localVarCall = uploadFileWithRequiredFileValidateBeforeCall(petId, requiredFile, additionalMetadata, _callback);
|
||||
Type localVarReturnType = new TypeToken<ModelApiResponse>(){}.getType();
|
||||
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
|
||||
return localVarCall;
|
||||
|
||||
@@ -57,12 +57,11 @@ public class StoreApi {
|
||||
/**
|
||||
* Build call for deleteOrder
|
||||
* @param orderId ID of the order that needs to be deleted (required)
|
||||
* @param _progressListener Progress listener
|
||||
* @param _progressRequestListener Progress request listener
|
||||
* @param _callback Callback for upload/download progress
|
||||
* @return Call to execute
|
||||
* @throws ApiException If fail to serialize the request body object
|
||||
*/
|
||||
public okhttp3.Call deleteOrderCall(String orderId, final ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException {
|
||||
public okhttp3.Call deleteOrderCall(String orderId, final ApiCallback _callback) throws ApiException {
|
||||
Object localVarPostBody = new Object();
|
||||
|
||||
// create path and map variables
|
||||
@@ -87,24 +86,12 @@ public class StoreApi {
|
||||
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
||||
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||
|
||||
if (_progressListener != null) {
|
||||
localVarApiClient.setHttpClient(localVarApiClient.getHttpClient().newBuilder().addNetworkInterceptor(new okhttp3.Interceptor() {
|
||||
@Override
|
||||
public okhttp3.Response intercept(okhttp3.Interceptor.Chain chain) throws IOException {
|
||||
okhttp3.Response originalResponse = chain.proceed(chain.request());
|
||||
return originalResponse.newBuilder()
|
||||
.body(new ProgressResponseBody(originalResponse.body(), _progressListener))
|
||||
.build();
|
||||
}
|
||||
}).build());
|
||||
}
|
||||
|
||||
String[] localVarAuthNames = new String[] { };
|
||||
return localVarApiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _progressRequestListener);
|
||||
return localVarApiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _callback);
|
||||
}
|
||||
|
||||
@SuppressWarnings("rawtypes")
|
||||
private okhttp3.Call deleteOrderValidateBeforeCall(String orderId, final ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException {
|
||||
private okhttp3.Call deleteOrderValidateBeforeCall(String orderId, final ApiCallback _callback) throws ApiException {
|
||||
|
||||
// verify the required parameter 'orderId' is set
|
||||
if (orderId == null) {
|
||||
@@ -112,7 +99,7 @@ public class StoreApi {
|
||||
}
|
||||
|
||||
|
||||
okhttp3.Call localVarCall = deleteOrderCall(orderId, _progressListener, _progressRequestListener);
|
||||
okhttp3.Call localVarCall = deleteOrderCall(orderId, _callback);
|
||||
return localVarCall;
|
||||
|
||||
}
|
||||
@@ -135,7 +122,7 @@ public class StoreApi {
|
||||
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
|
||||
*/
|
||||
public ApiResponse<Void> deleteOrderWithHttpInfo(String orderId) throws ApiException {
|
||||
okhttp3.Call localVarCall = deleteOrderValidateBeforeCall(orderId, null, null);
|
||||
okhttp3.Call localVarCall = deleteOrderValidateBeforeCall(orderId, null);
|
||||
return localVarApiClient.execute(localVarCall);
|
||||
}
|
||||
|
||||
@@ -149,37 +136,17 @@ public class StoreApi {
|
||||
*/
|
||||
public okhttp3.Call deleteOrderAsync(String orderId, final ApiCallback<Void> _callback) throws ApiException {
|
||||
|
||||
ProgressResponseBody.ProgressListener _progressListener = null;
|
||||
ProgressRequestBody.ProgressRequestListener _progressRequestListener = null;
|
||||
|
||||
if (_callback != null) {
|
||||
_progressListener = new ProgressResponseBody.ProgressListener() {
|
||||
@Override
|
||||
public void update(long bytesRead, long contentLength, boolean done) {
|
||||
_callback.onDownloadProgress(bytesRead, contentLength, done);
|
||||
}
|
||||
};
|
||||
|
||||
_progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
|
||||
@Override
|
||||
public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
|
||||
_callback.onUploadProgress(bytesWritten, contentLength, done);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
okhttp3.Call localVarCall = deleteOrderValidateBeforeCall(orderId, _progressListener, _progressRequestListener);
|
||||
okhttp3.Call localVarCall = deleteOrderValidateBeforeCall(orderId, _callback);
|
||||
localVarApiClient.executeAsync(localVarCall, _callback);
|
||||
return localVarCall;
|
||||
}
|
||||
/**
|
||||
* Build call for getInventory
|
||||
* @param _progressListener Progress listener
|
||||
* @param _progressRequestListener Progress request listener
|
||||
* @param _callback Callback for upload/download progress
|
||||
* @return Call to execute
|
||||
* @throws ApiException If fail to serialize the request body object
|
||||
*/
|
||||
public okhttp3.Call getInventoryCall(final ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException {
|
||||
public okhttp3.Call getInventoryCall(final ApiCallback _callback) throws ApiException {
|
||||
Object localVarPostBody = new Object();
|
||||
|
||||
// create path and map variables
|
||||
@@ -203,27 +170,15 @@ public class StoreApi {
|
||||
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
||||
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||
|
||||
if (_progressListener != null) {
|
||||
localVarApiClient.setHttpClient(localVarApiClient.getHttpClient().newBuilder().addNetworkInterceptor(new okhttp3.Interceptor() {
|
||||
@Override
|
||||
public okhttp3.Response intercept(okhttp3.Interceptor.Chain chain) throws IOException {
|
||||
okhttp3.Response originalResponse = chain.proceed(chain.request());
|
||||
return originalResponse.newBuilder()
|
||||
.body(new ProgressResponseBody(originalResponse.body(), _progressListener))
|
||||
.build();
|
||||
}
|
||||
}).build());
|
||||
}
|
||||
|
||||
String[] localVarAuthNames = new String[] { "api_key" };
|
||||
return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _progressRequestListener);
|
||||
return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _callback);
|
||||
}
|
||||
|
||||
@SuppressWarnings("rawtypes")
|
||||
private okhttp3.Call getInventoryValidateBeforeCall(final ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException {
|
||||
private okhttp3.Call getInventoryValidateBeforeCall(final ApiCallback _callback) throws ApiException {
|
||||
|
||||
|
||||
okhttp3.Call localVarCall = getInventoryCall(_progressListener, _progressRequestListener);
|
||||
okhttp3.Call localVarCall = getInventoryCall(_callback);
|
||||
return localVarCall;
|
||||
|
||||
}
|
||||
@@ -246,7 +201,7 @@ public class StoreApi {
|
||||
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
|
||||
*/
|
||||
public ApiResponse<Map<String, Integer>> getInventoryWithHttpInfo() throws ApiException {
|
||||
okhttp3.Call localVarCall = getInventoryValidateBeforeCall(null, null);
|
||||
okhttp3.Call localVarCall = getInventoryValidateBeforeCall(null);
|
||||
Type localVarReturnType = new TypeToken<Map<String, Integer>>(){}.getType();
|
||||
return localVarApiClient.execute(localVarCall, localVarReturnType);
|
||||
}
|
||||
@@ -260,26 +215,7 @@ public class StoreApi {
|
||||
*/
|
||||
public okhttp3.Call getInventoryAsync(final ApiCallback<Map<String, Integer>> _callback) throws ApiException {
|
||||
|
||||
ProgressResponseBody.ProgressListener _progressListener = null;
|
||||
ProgressRequestBody.ProgressRequestListener _progressRequestListener = null;
|
||||
|
||||
if (_callback != null) {
|
||||
_progressListener = new ProgressResponseBody.ProgressListener() {
|
||||
@Override
|
||||
public void update(long bytesRead, long contentLength, boolean done) {
|
||||
_callback.onDownloadProgress(bytesRead, contentLength, done);
|
||||
}
|
||||
};
|
||||
|
||||
_progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
|
||||
@Override
|
||||
public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
|
||||
_callback.onUploadProgress(bytesWritten, contentLength, done);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
okhttp3.Call localVarCall = getInventoryValidateBeforeCall(_progressListener, _progressRequestListener);
|
||||
okhttp3.Call localVarCall = getInventoryValidateBeforeCall(_callback);
|
||||
Type localVarReturnType = new TypeToken<Map<String, Integer>>(){}.getType();
|
||||
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
|
||||
return localVarCall;
|
||||
@@ -287,12 +223,11 @@ public class StoreApi {
|
||||
/**
|
||||
* Build call for getOrderById
|
||||
* @param orderId ID of pet that needs to be fetched (required)
|
||||
* @param _progressListener Progress listener
|
||||
* @param _progressRequestListener Progress request listener
|
||||
* @param _callback Callback for upload/download progress
|
||||
* @return Call to execute
|
||||
* @throws ApiException If fail to serialize the request body object
|
||||
*/
|
||||
public okhttp3.Call getOrderByIdCall(Long orderId, final ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException {
|
||||
public okhttp3.Call getOrderByIdCall(Long orderId, final ApiCallback _callback) throws ApiException {
|
||||
Object localVarPostBody = new Object();
|
||||
|
||||
// create path and map variables
|
||||
@@ -317,24 +252,12 @@ public class StoreApi {
|
||||
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
||||
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||
|
||||
if (_progressListener != null) {
|
||||
localVarApiClient.setHttpClient(localVarApiClient.getHttpClient().newBuilder().addNetworkInterceptor(new okhttp3.Interceptor() {
|
||||
@Override
|
||||
public okhttp3.Response intercept(okhttp3.Interceptor.Chain chain) throws IOException {
|
||||
okhttp3.Response originalResponse = chain.proceed(chain.request());
|
||||
return originalResponse.newBuilder()
|
||||
.body(new ProgressResponseBody(originalResponse.body(), _progressListener))
|
||||
.build();
|
||||
}
|
||||
}).build());
|
||||
}
|
||||
|
||||
String[] localVarAuthNames = new String[] { };
|
||||
return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _progressRequestListener);
|
||||
return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _callback);
|
||||
}
|
||||
|
||||
@SuppressWarnings("rawtypes")
|
||||
private okhttp3.Call getOrderByIdValidateBeforeCall(Long orderId, final ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException {
|
||||
private okhttp3.Call getOrderByIdValidateBeforeCall(Long orderId, final ApiCallback _callback) throws ApiException {
|
||||
|
||||
// verify the required parameter 'orderId' is set
|
||||
if (orderId == null) {
|
||||
@@ -342,7 +265,7 @@ public class StoreApi {
|
||||
}
|
||||
|
||||
|
||||
okhttp3.Call localVarCall = getOrderByIdCall(orderId, _progressListener, _progressRequestListener);
|
||||
okhttp3.Call localVarCall = getOrderByIdCall(orderId, _callback);
|
||||
return localVarCall;
|
||||
|
||||
}
|
||||
@@ -367,7 +290,7 @@ public class StoreApi {
|
||||
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
|
||||
*/
|
||||
public ApiResponse<Order> getOrderByIdWithHttpInfo(Long orderId) throws ApiException {
|
||||
okhttp3.Call localVarCall = getOrderByIdValidateBeforeCall(orderId, null, null);
|
||||
okhttp3.Call localVarCall = getOrderByIdValidateBeforeCall(orderId, null);
|
||||
Type localVarReturnType = new TypeToken<Order>(){}.getType();
|
||||
return localVarApiClient.execute(localVarCall, localVarReturnType);
|
||||
}
|
||||
@@ -382,26 +305,7 @@ public class StoreApi {
|
||||
*/
|
||||
public okhttp3.Call getOrderByIdAsync(Long orderId, final ApiCallback<Order> _callback) throws ApiException {
|
||||
|
||||
ProgressResponseBody.ProgressListener _progressListener = null;
|
||||
ProgressRequestBody.ProgressRequestListener _progressRequestListener = null;
|
||||
|
||||
if (_callback != null) {
|
||||
_progressListener = new ProgressResponseBody.ProgressListener() {
|
||||
@Override
|
||||
public void update(long bytesRead, long contentLength, boolean done) {
|
||||
_callback.onDownloadProgress(bytesRead, contentLength, done);
|
||||
}
|
||||
};
|
||||
|
||||
_progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
|
||||
@Override
|
||||
public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
|
||||
_callback.onUploadProgress(bytesWritten, contentLength, done);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
okhttp3.Call localVarCall = getOrderByIdValidateBeforeCall(orderId, _progressListener, _progressRequestListener);
|
||||
okhttp3.Call localVarCall = getOrderByIdValidateBeforeCall(orderId, _callback);
|
||||
Type localVarReturnType = new TypeToken<Order>(){}.getType();
|
||||
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
|
||||
return localVarCall;
|
||||
@@ -409,12 +313,11 @@ public class StoreApi {
|
||||
/**
|
||||
* Build call for placeOrder
|
||||
* @param body order placed for purchasing the pet (required)
|
||||
* @param _progressListener Progress listener
|
||||
* @param _progressRequestListener Progress request listener
|
||||
* @param _callback Callback for upload/download progress
|
||||
* @return Call to execute
|
||||
* @throws ApiException If fail to serialize the request body object
|
||||
*/
|
||||
public okhttp3.Call placeOrderCall(Order body, final ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException {
|
||||
public okhttp3.Call placeOrderCall(Order body, final ApiCallback _callback) throws ApiException {
|
||||
Object localVarPostBody = body;
|
||||
|
||||
// create path and map variables
|
||||
@@ -438,24 +341,12 @@ public class StoreApi {
|
||||
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
||||
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||
|
||||
if (_progressListener != null) {
|
||||
localVarApiClient.setHttpClient(localVarApiClient.getHttpClient().newBuilder().addNetworkInterceptor(new okhttp3.Interceptor() {
|
||||
@Override
|
||||
public okhttp3.Response intercept(okhttp3.Interceptor.Chain chain) throws IOException {
|
||||
okhttp3.Response originalResponse = chain.proceed(chain.request());
|
||||
return originalResponse.newBuilder()
|
||||
.body(new ProgressResponseBody(originalResponse.body(), _progressListener))
|
||||
.build();
|
||||
}
|
||||
}).build());
|
||||
}
|
||||
|
||||
String[] localVarAuthNames = new String[] { };
|
||||
return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _progressRequestListener);
|
||||
return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _callback);
|
||||
}
|
||||
|
||||
@SuppressWarnings("rawtypes")
|
||||
private okhttp3.Call placeOrderValidateBeforeCall(Order body, final ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException {
|
||||
private okhttp3.Call placeOrderValidateBeforeCall(Order body, final ApiCallback _callback) throws ApiException {
|
||||
|
||||
// verify the required parameter 'body' is set
|
||||
if (body == null) {
|
||||
@@ -463,7 +354,7 @@ public class StoreApi {
|
||||
}
|
||||
|
||||
|
||||
okhttp3.Call localVarCall = placeOrderCall(body, _progressListener, _progressRequestListener);
|
||||
okhttp3.Call localVarCall = placeOrderCall(body, _callback);
|
||||
return localVarCall;
|
||||
|
||||
}
|
||||
@@ -488,7 +379,7 @@ public class StoreApi {
|
||||
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
|
||||
*/
|
||||
public ApiResponse<Order> placeOrderWithHttpInfo(Order body) throws ApiException {
|
||||
okhttp3.Call localVarCall = placeOrderValidateBeforeCall(body, null, null);
|
||||
okhttp3.Call localVarCall = placeOrderValidateBeforeCall(body, null);
|
||||
Type localVarReturnType = new TypeToken<Order>(){}.getType();
|
||||
return localVarApiClient.execute(localVarCall, localVarReturnType);
|
||||
}
|
||||
@@ -503,26 +394,7 @@ public class StoreApi {
|
||||
*/
|
||||
public okhttp3.Call placeOrderAsync(Order body, final ApiCallback<Order> _callback) throws ApiException {
|
||||
|
||||
ProgressResponseBody.ProgressListener _progressListener = null;
|
||||
ProgressRequestBody.ProgressRequestListener _progressRequestListener = null;
|
||||
|
||||
if (_callback != null) {
|
||||
_progressListener = new ProgressResponseBody.ProgressListener() {
|
||||
@Override
|
||||
public void update(long bytesRead, long contentLength, boolean done) {
|
||||
_callback.onDownloadProgress(bytesRead, contentLength, done);
|
||||
}
|
||||
};
|
||||
|
||||
_progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
|
||||
@Override
|
||||
public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
|
||||
_callback.onUploadProgress(bytesWritten, contentLength, done);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
okhttp3.Call localVarCall = placeOrderValidateBeforeCall(body, _progressListener, _progressRequestListener);
|
||||
okhttp3.Call localVarCall = placeOrderValidateBeforeCall(body, _callback);
|
||||
Type localVarReturnType = new TypeToken<Order>(){}.getType();
|
||||
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
|
||||
return localVarCall;
|
||||
|
||||
@@ -57,12 +57,11 @@ public class UserApi {
|
||||
/**
|
||||
* Build call for createUser
|
||||
* @param body Created user object (required)
|
||||
* @param _progressListener Progress listener
|
||||
* @param _progressRequestListener Progress request listener
|
||||
* @param _callback Callback for upload/download progress
|
||||
* @return Call to execute
|
||||
* @throws ApiException If fail to serialize the request body object
|
||||
*/
|
||||
public okhttp3.Call createUserCall(User body, final ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException {
|
||||
public okhttp3.Call createUserCall(User body, final ApiCallback _callback) throws ApiException {
|
||||
Object localVarPostBody = body;
|
||||
|
||||
// create path and map variables
|
||||
@@ -86,24 +85,12 @@ public class UserApi {
|
||||
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
||||
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||
|
||||
if (_progressListener != null) {
|
||||
localVarApiClient.setHttpClient(localVarApiClient.getHttpClient().newBuilder().addNetworkInterceptor(new okhttp3.Interceptor() {
|
||||
@Override
|
||||
public okhttp3.Response intercept(okhttp3.Interceptor.Chain chain) throws IOException {
|
||||
okhttp3.Response originalResponse = chain.proceed(chain.request());
|
||||
return originalResponse.newBuilder()
|
||||
.body(new ProgressResponseBody(originalResponse.body(), _progressListener))
|
||||
.build();
|
||||
}
|
||||
}).build());
|
||||
}
|
||||
|
||||
String[] localVarAuthNames = new String[] { };
|
||||
return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _progressRequestListener);
|
||||
return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _callback);
|
||||
}
|
||||
|
||||
@SuppressWarnings("rawtypes")
|
||||
private okhttp3.Call createUserValidateBeforeCall(User body, final ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException {
|
||||
private okhttp3.Call createUserValidateBeforeCall(User body, final ApiCallback _callback) throws ApiException {
|
||||
|
||||
// verify the required parameter 'body' is set
|
||||
if (body == null) {
|
||||
@@ -111,7 +98,7 @@ public class UserApi {
|
||||
}
|
||||
|
||||
|
||||
okhttp3.Call localVarCall = createUserCall(body, _progressListener, _progressRequestListener);
|
||||
okhttp3.Call localVarCall = createUserCall(body, _callback);
|
||||
return localVarCall;
|
||||
|
||||
}
|
||||
@@ -134,7 +121,7 @@ public class UserApi {
|
||||
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
|
||||
*/
|
||||
public ApiResponse<Void> createUserWithHttpInfo(User body) throws ApiException {
|
||||
okhttp3.Call localVarCall = createUserValidateBeforeCall(body, null, null);
|
||||
okhttp3.Call localVarCall = createUserValidateBeforeCall(body, null);
|
||||
return localVarApiClient.execute(localVarCall);
|
||||
}
|
||||
|
||||
@@ -148,38 +135,18 @@ public class UserApi {
|
||||
*/
|
||||
public okhttp3.Call createUserAsync(User body, final ApiCallback<Void> _callback) throws ApiException {
|
||||
|
||||
ProgressResponseBody.ProgressListener _progressListener = null;
|
||||
ProgressRequestBody.ProgressRequestListener _progressRequestListener = null;
|
||||
|
||||
if (_callback != null) {
|
||||
_progressListener = new ProgressResponseBody.ProgressListener() {
|
||||
@Override
|
||||
public void update(long bytesRead, long contentLength, boolean done) {
|
||||
_callback.onDownloadProgress(bytesRead, contentLength, done);
|
||||
}
|
||||
};
|
||||
|
||||
_progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
|
||||
@Override
|
||||
public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
|
||||
_callback.onUploadProgress(bytesWritten, contentLength, done);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
okhttp3.Call localVarCall = createUserValidateBeforeCall(body, _progressListener, _progressRequestListener);
|
||||
okhttp3.Call localVarCall = createUserValidateBeforeCall(body, _callback);
|
||||
localVarApiClient.executeAsync(localVarCall, _callback);
|
||||
return localVarCall;
|
||||
}
|
||||
/**
|
||||
* Build call for createUsersWithArrayInput
|
||||
* @param body List of user object (required)
|
||||
* @param _progressListener Progress listener
|
||||
* @param _progressRequestListener Progress request listener
|
||||
* @param _callback Callback for upload/download progress
|
||||
* @return Call to execute
|
||||
* @throws ApiException If fail to serialize the request body object
|
||||
*/
|
||||
public okhttp3.Call createUsersWithArrayInputCall(List<User> body, final ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException {
|
||||
public okhttp3.Call createUsersWithArrayInputCall(List<User> body, final ApiCallback _callback) throws ApiException {
|
||||
Object localVarPostBody = body;
|
||||
|
||||
// create path and map variables
|
||||
@@ -203,24 +170,12 @@ public class UserApi {
|
||||
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
||||
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||
|
||||
if (_progressListener != null) {
|
||||
localVarApiClient.setHttpClient(localVarApiClient.getHttpClient().newBuilder().addNetworkInterceptor(new okhttp3.Interceptor() {
|
||||
@Override
|
||||
public okhttp3.Response intercept(okhttp3.Interceptor.Chain chain) throws IOException {
|
||||
okhttp3.Response originalResponse = chain.proceed(chain.request());
|
||||
return originalResponse.newBuilder()
|
||||
.body(new ProgressResponseBody(originalResponse.body(), _progressListener))
|
||||
.build();
|
||||
}
|
||||
}).build());
|
||||
}
|
||||
|
||||
String[] localVarAuthNames = new String[] { };
|
||||
return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _progressRequestListener);
|
||||
return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _callback);
|
||||
}
|
||||
|
||||
@SuppressWarnings("rawtypes")
|
||||
private okhttp3.Call createUsersWithArrayInputValidateBeforeCall(List<User> body, final ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException {
|
||||
private okhttp3.Call createUsersWithArrayInputValidateBeforeCall(List<User> body, final ApiCallback _callback) throws ApiException {
|
||||
|
||||
// verify the required parameter 'body' is set
|
||||
if (body == null) {
|
||||
@@ -228,7 +183,7 @@ public class UserApi {
|
||||
}
|
||||
|
||||
|
||||
okhttp3.Call localVarCall = createUsersWithArrayInputCall(body, _progressListener, _progressRequestListener);
|
||||
okhttp3.Call localVarCall = createUsersWithArrayInputCall(body, _callback);
|
||||
return localVarCall;
|
||||
|
||||
}
|
||||
@@ -251,7 +206,7 @@ public class UserApi {
|
||||
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
|
||||
*/
|
||||
public ApiResponse<Void> createUsersWithArrayInputWithHttpInfo(List<User> body) throws ApiException {
|
||||
okhttp3.Call localVarCall = createUsersWithArrayInputValidateBeforeCall(body, null, null);
|
||||
okhttp3.Call localVarCall = createUsersWithArrayInputValidateBeforeCall(body, null);
|
||||
return localVarApiClient.execute(localVarCall);
|
||||
}
|
||||
|
||||
@@ -265,38 +220,18 @@ public class UserApi {
|
||||
*/
|
||||
public okhttp3.Call createUsersWithArrayInputAsync(List<User> body, final ApiCallback<Void> _callback) throws ApiException {
|
||||
|
||||
ProgressResponseBody.ProgressListener _progressListener = null;
|
||||
ProgressRequestBody.ProgressRequestListener _progressRequestListener = null;
|
||||
|
||||
if (_callback != null) {
|
||||
_progressListener = new ProgressResponseBody.ProgressListener() {
|
||||
@Override
|
||||
public void update(long bytesRead, long contentLength, boolean done) {
|
||||
_callback.onDownloadProgress(bytesRead, contentLength, done);
|
||||
}
|
||||
};
|
||||
|
||||
_progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
|
||||
@Override
|
||||
public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
|
||||
_callback.onUploadProgress(bytesWritten, contentLength, done);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
okhttp3.Call localVarCall = createUsersWithArrayInputValidateBeforeCall(body, _progressListener, _progressRequestListener);
|
||||
okhttp3.Call localVarCall = createUsersWithArrayInputValidateBeforeCall(body, _callback);
|
||||
localVarApiClient.executeAsync(localVarCall, _callback);
|
||||
return localVarCall;
|
||||
}
|
||||
/**
|
||||
* Build call for createUsersWithListInput
|
||||
* @param body List of user object (required)
|
||||
* @param _progressListener Progress listener
|
||||
* @param _progressRequestListener Progress request listener
|
||||
* @param _callback Callback for upload/download progress
|
||||
* @return Call to execute
|
||||
* @throws ApiException If fail to serialize the request body object
|
||||
*/
|
||||
public okhttp3.Call createUsersWithListInputCall(List<User> body, final ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException {
|
||||
public okhttp3.Call createUsersWithListInputCall(List<User> body, final ApiCallback _callback) throws ApiException {
|
||||
Object localVarPostBody = body;
|
||||
|
||||
// create path and map variables
|
||||
@@ -320,24 +255,12 @@ public class UserApi {
|
||||
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
||||
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||
|
||||
if (_progressListener != null) {
|
||||
localVarApiClient.setHttpClient(localVarApiClient.getHttpClient().newBuilder().addNetworkInterceptor(new okhttp3.Interceptor() {
|
||||
@Override
|
||||
public okhttp3.Response intercept(okhttp3.Interceptor.Chain chain) throws IOException {
|
||||
okhttp3.Response originalResponse = chain.proceed(chain.request());
|
||||
return originalResponse.newBuilder()
|
||||
.body(new ProgressResponseBody(originalResponse.body(), _progressListener))
|
||||
.build();
|
||||
}
|
||||
}).build());
|
||||
}
|
||||
|
||||
String[] localVarAuthNames = new String[] { };
|
||||
return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _progressRequestListener);
|
||||
return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _callback);
|
||||
}
|
||||
|
||||
@SuppressWarnings("rawtypes")
|
||||
private okhttp3.Call createUsersWithListInputValidateBeforeCall(List<User> body, final ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException {
|
||||
private okhttp3.Call createUsersWithListInputValidateBeforeCall(List<User> body, final ApiCallback _callback) throws ApiException {
|
||||
|
||||
// verify the required parameter 'body' is set
|
||||
if (body == null) {
|
||||
@@ -345,7 +268,7 @@ public class UserApi {
|
||||
}
|
||||
|
||||
|
||||
okhttp3.Call localVarCall = createUsersWithListInputCall(body, _progressListener, _progressRequestListener);
|
||||
okhttp3.Call localVarCall = createUsersWithListInputCall(body, _callback);
|
||||
return localVarCall;
|
||||
|
||||
}
|
||||
@@ -368,7 +291,7 @@ public class UserApi {
|
||||
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
|
||||
*/
|
||||
public ApiResponse<Void> createUsersWithListInputWithHttpInfo(List<User> body) throws ApiException {
|
||||
okhttp3.Call localVarCall = createUsersWithListInputValidateBeforeCall(body, null, null);
|
||||
okhttp3.Call localVarCall = createUsersWithListInputValidateBeforeCall(body, null);
|
||||
return localVarApiClient.execute(localVarCall);
|
||||
}
|
||||
|
||||
@@ -382,38 +305,18 @@ public class UserApi {
|
||||
*/
|
||||
public okhttp3.Call createUsersWithListInputAsync(List<User> body, final ApiCallback<Void> _callback) throws ApiException {
|
||||
|
||||
ProgressResponseBody.ProgressListener _progressListener = null;
|
||||
ProgressRequestBody.ProgressRequestListener _progressRequestListener = null;
|
||||
|
||||
if (_callback != null) {
|
||||
_progressListener = new ProgressResponseBody.ProgressListener() {
|
||||
@Override
|
||||
public void update(long bytesRead, long contentLength, boolean done) {
|
||||
_callback.onDownloadProgress(bytesRead, contentLength, done);
|
||||
}
|
||||
};
|
||||
|
||||
_progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
|
||||
@Override
|
||||
public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
|
||||
_callback.onUploadProgress(bytesWritten, contentLength, done);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
okhttp3.Call localVarCall = createUsersWithListInputValidateBeforeCall(body, _progressListener, _progressRequestListener);
|
||||
okhttp3.Call localVarCall = createUsersWithListInputValidateBeforeCall(body, _callback);
|
||||
localVarApiClient.executeAsync(localVarCall, _callback);
|
||||
return localVarCall;
|
||||
}
|
||||
/**
|
||||
* Build call for deleteUser
|
||||
* @param username The name that needs to be deleted (required)
|
||||
* @param _progressListener Progress listener
|
||||
* @param _progressRequestListener Progress request listener
|
||||
* @param _callback Callback for upload/download progress
|
||||
* @return Call to execute
|
||||
* @throws ApiException If fail to serialize the request body object
|
||||
*/
|
||||
public okhttp3.Call deleteUserCall(String username, final ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException {
|
||||
public okhttp3.Call deleteUserCall(String username, final ApiCallback _callback) throws ApiException {
|
||||
Object localVarPostBody = new Object();
|
||||
|
||||
// create path and map variables
|
||||
@@ -438,24 +341,12 @@ public class UserApi {
|
||||
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
||||
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||
|
||||
if (_progressListener != null) {
|
||||
localVarApiClient.setHttpClient(localVarApiClient.getHttpClient().newBuilder().addNetworkInterceptor(new okhttp3.Interceptor() {
|
||||
@Override
|
||||
public okhttp3.Response intercept(okhttp3.Interceptor.Chain chain) throws IOException {
|
||||
okhttp3.Response originalResponse = chain.proceed(chain.request());
|
||||
return originalResponse.newBuilder()
|
||||
.body(new ProgressResponseBody(originalResponse.body(), _progressListener))
|
||||
.build();
|
||||
}
|
||||
}).build());
|
||||
}
|
||||
|
||||
String[] localVarAuthNames = new String[] { };
|
||||
return localVarApiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _progressRequestListener);
|
||||
return localVarApiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _callback);
|
||||
}
|
||||
|
||||
@SuppressWarnings("rawtypes")
|
||||
private okhttp3.Call deleteUserValidateBeforeCall(String username, final ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException {
|
||||
private okhttp3.Call deleteUserValidateBeforeCall(String username, final ApiCallback _callback) throws ApiException {
|
||||
|
||||
// verify the required parameter 'username' is set
|
||||
if (username == null) {
|
||||
@@ -463,7 +354,7 @@ public class UserApi {
|
||||
}
|
||||
|
||||
|
||||
okhttp3.Call localVarCall = deleteUserCall(username, _progressListener, _progressRequestListener);
|
||||
okhttp3.Call localVarCall = deleteUserCall(username, _callback);
|
||||
return localVarCall;
|
||||
|
||||
}
|
||||
@@ -486,7 +377,7 @@ public class UserApi {
|
||||
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
|
||||
*/
|
||||
public ApiResponse<Void> deleteUserWithHttpInfo(String username) throws ApiException {
|
||||
okhttp3.Call localVarCall = deleteUserValidateBeforeCall(username, null, null);
|
||||
okhttp3.Call localVarCall = deleteUserValidateBeforeCall(username, null);
|
||||
return localVarApiClient.execute(localVarCall);
|
||||
}
|
||||
|
||||
@@ -500,38 +391,18 @@ public class UserApi {
|
||||
*/
|
||||
public okhttp3.Call deleteUserAsync(String username, final ApiCallback<Void> _callback) throws ApiException {
|
||||
|
||||
ProgressResponseBody.ProgressListener _progressListener = null;
|
||||
ProgressRequestBody.ProgressRequestListener _progressRequestListener = null;
|
||||
|
||||
if (_callback != null) {
|
||||
_progressListener = new ProgressResponseBody.ProgressListener() {
|
||||
@Override
|
||||
public void update(long bytesRead, long contentLength, boolean done) {
|
||||
_callback.onDownloadProgress(bytesRead, contentLength, done);
|
||||
}
|
||||
};
|
||||
|
||||
_progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
|
||||
@Override
|
||||
public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
|
||||
_callback.onUploadProgress(bytesWritten, contentLength, done);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
okhttp3.Call localVarCall = deleteUserValidateBeforeCall(username, _progressListener, _progressRequestListener);
|
||||
okhttp3.Call localVarCall = deleteUserValidateBeforeCall(username, _callback);
|
||||
localVarApiClient.executeAsync(localVarCall, _callback);
|
||||
return localVarCall;
|
||||
}
|
||||
/**
|
||||
* Build call for getUserByName
|
||||
* @param username The name that needs to be fetched. Use user1 for testing. (required)
|
||||
* @param _progressListener Progress listener
|
||||
* @param _progressRequestListener Progress request listener
|
||||
* @param _callback Callback for upload/download progress
|
||||
* @return Call to execute
|
||||
* @throws ApiException If fail to serialize the request body object
|
||||
*/
|
||||
public okhttp3.Call getUserByNameCall(String username, final ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException {
|
||||
public okhttp3.Call getUserByNameCall(String username, final ApiCallback _callback) throws ApiException {
|
||||
Object localVarPostBody = new Object();
|
||||
|
||||
// create path and map variables
|
||||
@@ -556,24 +427,12 @@ public class UserApi {
|
||||
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
||||
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||
|
||||
if (_progressListener != null) {
|
||||
localVarApiClient.setHttpClient(localVarApiClient.getHttpClient().newBuilder().addNetworkInterceptor(new okhttp3.Interceptor() {
|
||||
@Override
|
||||
public okhttp3.Response intercept(okhttp3.Interceptor.Chain chain) throws IOException {
|
||||
okhttp3.Response originalResponse = chain.proceed(chain.request());
|
||||
return originalResponse.newBuilder()
|
||||
.body(new ProgressResponseBody(originalResponse.body(), _progressListener))
|
||||
.build();
|
||||
}
|
||||
}).build());
|
||||
}
|
||||
|
||||
String[] localVarAuthNames = new String[] { };
|
||||
return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _progressRequestListener);
|
||||
return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _callback);
|
||||
}
|
||||
|
||||
@SuppressWarnings("rawtypes")
|
||||
private okhttp3.Call getUserByNameValidateBeforeCall(String username, final ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException {
|
||||
private okhttp3.Call getUserByNameValidateBeforeCall(String username, final ApiCallback _callback) throws ApiException {
|
||||
|
||||
// verify the required parameter 'username' is set
|
||||
if (username == null) {
|
||||
@@ -581,7 +440,7 @@ public class UserApi {
|
||||
}
|
||||
|
||||
|
||||
okhttp3.Call localVarCall = getUserByNameCall(username, _progressListener, _progressRequestListener);
|
||||
okhttp3.Call localVarCall = getUserByNameCall(username, _callback);
|
||||
return localVarCall;
|
||||
|
||||
}
|
||||
@@ -606,7 +465,7 @@ public class UserApi {
|
||||
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
|
||||
*/
|
||||
public ApiResponse<User> getUserByNameWithHttpInfo(String username) throws ApiException {
|
||||
okhttp3.Call localVarCall = getUserByNameValidateBeforeCall(username, null, null);
|
||||
okhttp3.Call localVarCall = getUserByNameValidateBeforeCall(username, null);
|
||||
Type localVarReturnType = new TypeToken<User>(){}.getType();
|
||||
return localVarApiClient.execute(localVarCall, localVarReturnType);
|
||||
}
|
||||
@@ -621,26 +480,7 @@ public class UserApi {
|
||||
*/
|
||||
public okhttp3.Call getUserByNameAsync(String username, final ApiCallback<User> _callback) throws ApiException {
|
||||
|
||||
ProgressResponseBody.ProgressListener _progressListener = null;
|
||||
ProgressRequestBody.ProgressRequestListener _progressRequestListener = null;
|
||||
|
||||
if (_callback != null) {
|
||||
_progressListener = new ProgressResponseBody.ProgressListener() {
|
||||
@Override
|
||||
public void update(long bytesRead, long contentLength, boolean done) {
|
||||
_callback.onDownloadProgress(bytesRead, contentLength, done);
|
||||
}
|
||||
};
|
||||
|
||||
_progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
|
||||
@Override
|
||||
public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
|
||||
_callback.onUploadProgress(bytesWritten, contentLength, done);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
okhttp3.Call localVarCall = getUserByNameValidateBeforeCall(username, _progressListener, _progressRequestListener);
|
||||
okhttp3.Call localVarCall = getUserByNameValidateBeforeCall(username, _callback);
|
||||
Type localVarReturnType = new TypeToken<User>(){}.getType();
|
||||
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
|
||||
return localVarCall;
|
||||
@@ -649,12 +489,11 @@ public class UserApi {
|
||||
* Build call for loginUser
|
||||
* @param username The user name for login (required)
|
||||
* @param password The password for login in clear text (required)
|
||||
* @param _progressListener Progress listener
|
||||
* @param _progressRequestListener Progress request listener
|
||||
* @param _callback Callback for upload/download progress
|
||||
* @return Call to execute
|
||||
* @throws ApiException If fail to serialize the request body object
|
||||
*/
|
||||
public okhttp3.Call loginUserCall(String username, String password, final ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException {
|
||||
public okhttp3.Call loginUserCall(String username, String password, final ApiCallback _callback) throws ApiException {
|
||||
Object localVarPostBody = new Object();
|
||||
|
||||
// create path and map variables
|
||||
@@ -686,24 +525,12 @@ public class UserApi {
|
||||
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
||||
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||
|
||||
if (_progressListener != null) {
|
||||
localVarApiClient.setHttpClient(localVarApiClient.getHttpClient().newBuilder().addNetworkInterceptor(new okhttp3.Interceptor() {
|
||||
@Override
|
||||
public okhttp3.Response intercept(okhttp3.Interceptor.Chain chain) throws IOException {
|
||||
okhttp3.Response originalResponse = chain.proceed(chain.request());
|
||||
return originalResponse.newBuilder()
|
||||
.body(new ProgressResponseBody(originalResponse.body(), _progressListener))
|
||||
.build();
|
||||
}
|
||||
}).build());
|
||||
}
|
||||
|
||||
String[] localVarAuthNames = new String[] { };
|
||||
return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _progressRequestListener);
|
||||
return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _callback);
|
||||
}
|
||||
|
||||
@SuppressWarnings("rawtypes")
|
||||
private okhttp3.Call loginUserValidateBeforeCall(String username, String password, final ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException {
|
||||
private okhttp3.Call loginUserValidateBeforeCall(String username, String password, final ApiCallback _callback) throws ApiException {
|
||||
|
||||
// verify the required parameter 'username' is set
|
||||
if (username == null) {
|
||||
@@ -716,7 +543,7 @@ public class UserApi {
|
||||
}
|
||||
|
||||
|
||||
okhttp3.Call localVarCall = loginUserCall(username, password, _progressListener, _progressRequestListener);
|
||||
okhttp3.Call localVarCall = loginUserCall(username, password, _callback);
|
||||
return localVarCall;
|
||||
|
||||
}
|
||||
@@ -743,7 +570,7 @@ public class UserApi {
|
||||
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
|
||||
*/
|
||||
public ApiResponse<String> loginUserWithHttpInfo(String username, String password) throws ApiException {
|
||||
okhttp3.Call localVarCall = loginUserValidateBeforeCall(username, password, null, null);
|
||||
okhttp3.Call localVarCall = loginUserValidateBeforeCall(username, password, null);
|
||||
Type localVarReturnType = new TypeToken<String>(){}.getType();
|
||||
return localVarApiClient.execute(localVarCall, localVarReturnType);
|
||||
}
|
||||
@@ -759,38 +586,18 @@ public class UserApi {
|
||||
*/
|
||||
public okhttp3.Call loginUserAsync(String username, String password, final ApiCallback<String> _callback) throws ApiException {
|
||||
|
||||
ProgressResponseBody.ProgressListener _progressListener = null;
|
||||
ProgressRequestBody.ProgressRequestListener _progressRequestListener = null;
|
||||
|
||||
if (_callback != null) {
|
||||
_progressListener = new ProgressResponseBody.ProgressListener() {
|
||||
@Override
|
||||
public void update(long bytesRead, long contentLength, boolean done) {
|
||||
_callback.onDownloadProgress(bytesRead, contentLength, done);
|
||||
}
|
||||
};
|
||||
|
||||
_progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
|
||||
@Override
|
||||
public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
|
||||
_callback.onUploadProgress(bytesWritten, contentLength, done);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
okhttp3.Call localVarCall = loginUserValidateBeforeCall(username, password, _progressListener, _progressRequestListener);
|
||||
okhttp3.Call localVarCall = loginUserValidateBeforeCall(username, password, _callback);
|
||||
Type localVarReturnType = new TypeToken<String>(){}.getType();
|
||||
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
|
||||
return localVarCall;
|
||||
}
|
||||
/**
|
||||
* Build call for logoutUser
|
||||
* @param _progressListener Progress listener
|
||||
* @param _progressRequestListener Progress request listener
|
||||
* @param _callback Callback for upload/download progress
|
||||
* @return Call to execute
|
||||
* @throws ApiException If fail to serialize the request body object
|
||||
*/
|
||||
public okhttp3.Call logoutUserCall(final ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException {
|
||||
public okhttp3.Call logoutUserCall(final ApiCallback _callback) throws ApiException {
|
||||
Object localVarPostBody = new Object();
|
||||
|
||||
// create path and map variables
|
||||
@@ -814,27 +621,15 @@ public class UserApi {
|
||||
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
||||
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||
|
||||
if (_progressListener != null) {
|
||||
localVarApiClient.setHttpClient(localVarApiClient.getHttpClient().newBuilder().addNetworkInterceptor(new okhttp3.Interceptor() {
|
||||
@Override
|
||||
public okhttp3.Response intercept(okhttp3.Interceptor.Chain chain) throws IOException {
|
||||
okhttp3.Response originalResponse = chain.proceed(chain.request());
|
||||
return originalResponse.newBuilder()
|
||||
.body(new ProgressResponseBody(originalResponse.body(), _progressListener))
|
||||
.build();
|
||||
}
|
||||
}).build());
|
||||
}
|
||||
|
||||
String[] localVarAuthNames = new String[] { };
|
||||
return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _progressRequestListener);
|
||||
return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _callback);
|
||||
}
|
||||
|
||||
@SuppressWarnings("rawtypes")
|
||||
private okhttp3.Call logoutUserValidateBeforeCall(final ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException {
|
||||
private okhttp3.Call logoutUserValidateBeforeCall(final ApiCallback _callback) throws ApiException {
|
||||
|
||||
|
||||
okhttp3.Call localVarCall = logoutUserCall(_progressListener, _progressRequestListener);
|
||||
okhttp3.Call localVarCall = logoutUserCall(_callback);
|
||||
return localVarCall;
|
||||
|
||||
}
|
||||
@@ -855,7 +650,7 @@ public class UserApi {
|
||||
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
|
||||
*/
|
||||
public ApiResponse<Void> logoutUserWithHttpInfo() throws ApiException {
|
||||
okhttp3.Call localVarCall = logoutUserValidateBeforeCall(null, null);
|
||||
okhttp3.Call localVarCall = logoutUserValidateBeforeCall(null);
|
||||
return localVarApiClient.execute(localVarCall);
|
||||
}
|
||||
|
||||
@@ -868,26 +663,7 @@ public class UserApi {
|
||||
*/
|
||||
public okhttp3.Call logoutUserAsync(final ApiCallback<Void> _callback) throws ApiException {
|
||||
|
||||
ProgressResponseBody.ProgressListener _progressListener = null;
|
||||
ProgressRequestBody.ProgressRequestListener _progressRequestListener = null;
|
||||
|
||||
if (_callback != null) {
|
||||
_progressListener = new ProgressResponseBody.ProgressListener() {
|
||||
@Override
|
||||
public void update(long bytesRead, long contentLength, boolean done) {
|
||||
_callback.onDownloadProgress(bytesRead, contentLength, done);
|
||||
}
|
||||
};
|
||||
|
||||
_progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
|
||||
@Override
|
||||
public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
|
||||
_callback.onUploadProgress(bytesWritten, contentLength, done);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
okhttp3.Call localVarCall = logoutUserValidateBeforeCall(_progressListener, _progressRequestListener);
|
||||
okhttp3.Call localVarCall = logoutUserValidateBeforeCall(_callback);
|
||||
localVarApiClient.executeAsync(localVarCall, _callback);
|
||||
return localVarCall;
|
||||
}
|
||||
@@ -895,12 +671,11 @@ public class UserApi {
|
||||
* Build call for updateUser
|
||||
* @param username name that need to be deleted (required)
|
||||
* @param body Updated user object (required)
|
||||
* @param _progressListener Progress listener
|
||||
* @param _progressRequestListener Progress request listener
|
||||
* @param _callback Callback for upload/download progress
|
||||
* @return Call to execute
|
||||
* @throws ApiException If fail to serialize the request body object
|
||||
*/
|
||||
public okhttp3.Call updateUserCall(String username, User body, final ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException {
|
||||
public okhttp3.Call updateUserCall(String username, User body, final ApiCallback _callback) throws ApiException {
|
||||
Object localVarPostBody = body;
|
||||
|
||||
// create path and map variables
|
||||
@@ -925,24 +700,12 @@ public class UserApi {
|
||||
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
||||
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||
|
||||
if (_progressListener != null) {
|
||||
localVarApiClient.setHttpClient(localVarApiClient.getHttpClient().newBuilder().addNetworkInterceptor(new okhttp3.Interceptor() {
|
||||
@Override
|
||||
public okhttp3.Response intercept(okhttp3.Interceptor.Chain chain) throws IOException {
|
||||
okhttp3.Response originalResponse = chain.proceed(chain.request());
|
||||
return originalResponse.newBuilder()
|
||||
.body(new ProgressResponseBody(originalResponse.body(), _progressListener))
|
||||
.build();
|
||||
}
|
||||
}).build());
|
||||
}
|
||||
|
||||
String[] localVarAuthNames = new String[] { };
|
||||
return localVarApiClient.buildCall(localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _progressRequestListener);
|
||||
return localVarApiClient.buildCall(localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _callback);
|
||||
}
|
||||
|
||||
@SuppressWarnings("rawtypes")
|
||||
private okhttp3.Call updateUserValidateBeforeCall(String username, User body, final ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException {
|
||||
private okhttp3.Call updateUserValidateBeforeCall(String username, User body, final ApiCallback _callback) throws ApiException {
|
||||
|
||||
// verify the required parameter 'username' is set
|
||||
if (username == null) {
|
||||
@@ -955,7 +718,7 @@ public class UserApi {
|
||||
}
|
||||
|
||||
|
||||
okhttp3.Call localVarCall = updateUserCall(username, body, _progressListener, _progressRequestListener);
|
||||
okhttp3.Call localVarCall = updateUserCall(username, body, _callback);
|
||||
return localVarCall;
|
||||
|
||||
}
|
||||
@@ -980,7 +743,7 @@ public class UserApi {
|
||||
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
|
||||
*/
|
||||
public ApiResponse<Void> updateUserWithHttpInfo(String username, User body) throws ApiException {
|
||||
okhttp3.Call localVarCall = updateUserValidateBeforeCall(username, body, null, null);
|
||||
okhttp3.Call localVarCall = updateUserValidateBeforeCall(username, body, null);
|
||||
return localVarApiClient.execute(localVarCall);
|
||||
}
|
||||
|
||||
@@ -995,26 +758,7 @@ public class UserApi {
|
||||
*/
|
||||
public okhttp3.Call updateUserAsync(String username, User body, final ApiCallback<Void> _callback) throws ApiException {
|
||||
|
||||
ProgressResponseBody.ProgressListener _progressListener = null;
|
||||
ProgressRequestBody.ProgressRequestListener _progressRequestListener = null;
|
||||
|
||||
if (_callback != null) {
|
||||
_progressListener = new ProgressResponseBody.ProgressListener() {
|
||||
@Override
|
||||
public void update(long bytesRead, long contentLength, boolean done) {
|
||||
_callback.onDownloadProgress(bytesRead, contentLength, done);
|
||||
}
|
||||
};
|
||||
|
||||
_progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
|
||||
@Override
|
||||
public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
|
||||
_callback.onUploadProgress(bytesWritten, contentLength, done);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
okhttp3.Call localVarCall = updateUserValidateBeforeCall(username, body, _progressListener, _progressRequestListener);
|
||||
okhttp3.Call localVarCall = updateUserValidateBeforeCall(username, body, _callback);
|
||||
localVarApiClient.executeAsync(localVarCall, _callback);
|
||||
return localVarCall;
|
||||
}
|
||||
|
||||
@@ -35,15 +35,15 @@ public class AnotherFakeApiTest {
|
||||
/**
|
||||
* To test special tags
|
||||
*
|
||||
* To test special tags
|
||||
* To test special tags and operation ID starting with number
|
||||
*
|
||||
* @throws ApiException
|
||||
* if the Api call fails
|
||||
*/
|
||||
@Test
|
||||
public void testSpecialTagsTest() throws ApiException {
|
||||
Client client = null;
|
||||
Client response = api.testSpecialTags(client);
|
||||
public void call123testSpecialTagsTest() throws ApiException {
|
||||
Client body = null;
|
||||
Client response = api.call123testSpecialTags(body);
|
||||
|
||||
// TODO: test validations
|
||||
}
|
||||
|
||||
@@ -22,6 +22,7 @@ import org.threeten.bp.LocalDate;
|
||||
import org.threeten.bp.OffsetDateTime;
|
||||
import org.openapitools.client.model.OuterComposite;
|
||||
import org.openapitools.client.model.User;
|
||||
import org.openapitools.client.model.XmlItem;
|
||||
import org.junit.Test;
|
||||
import org.junit.Ignore;
|
||||
|
||||
@@ -39,6 +40,22 @@ public class FakeApiTest {
|
||||
private final FakeApi api = new FakeApi();
|
||||
|
||||
|
||||
/**
|
||||
* creates an XmlItem
|
||||
*
|
||||
* this route creates an XmlItem
|
||||
*
|
||||
* @throws ApiException
|
||||
* if the Api call fails
|
||||
*/
|
||||
@Test
|
||||
public void createXmlItemTest() throws ApiException {
|
||||
XmlItem xmlItem = null;
|
||||
api.createXmlItem(xmlItem);
|
||||
|
||||
// TODO: test validations
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
@@ -65,8 +82,8 @@ public class FakeApiTest {
|
||||
*/
|
||||
@Test
|
||||
public void fakeOuterCompositeSerializeTest() throws ApiException {
|
||||
OuterComposite outerComposite = null;
|
||||
OuterComposite response = api.fakeOuterCompositeSerialize(outerComposite);
|
||||
OuterComposite body = null;
|
||||
OuterComposite response = api.fakeOuterCompositeSerialize(body);
|
||||
|
||||
// TODO: test validations
|
||||
}
|
||||
@@ -113,8 +130,8 @@ public class FakeApiTest {
|
||||
*/
|
||||
@Test
|
||||
public void testBodyWithFileSchemaTest() throws ApiException {
|
||||
FileSchemaTestClass fileSchemaTestClass = null;
|
||||
api.testBodyWithFileSchema(fileSchemaTestClass);
|
||||
FileSchemaTestClass body = null;
|
||||
api.testBodyWithFileSchema(body);
|
||||
|
||||
// TODO: test validations
|
||||
}
|
||||
@@ -130,8 +147,8 @@ public class FakeApiTest {
|
||||
@Test
|
||||
public void testBodyWithQueryParamsTest() throws ApiException {
|
||||
String query = null;
|
||||
User user = null;
|
||||
api.testBodyWithQueryParams(query, user);
|
||||
User body = null;
|
||||
api.testBodyWithQueryParams(query, body);
|
||||
|
||||
// TODO: test validations
|
||||
}
|
||||
@@ -146,8 +163,8 @@ public class FakeApiTest {
|
||||
*/
|
||||
@Test
|
||||
public void testClientModelTest() throws ApiException {
|
||||
Client client = null;
|
||||
Client response = api.testClientModel(client);
|
||||
Client body = null;
|
||||
Client response = api.testClientModel(body);
|
||||
|
||||
// TODO: test validations
|
||||
}
|
||||
@@ -239,8 +256,8 @@ public class FakeApiTest {
|
||||
*/
|
||||
@Test
|
||||
public void testInlineAdditionalPropertiesTest() throws ApiException {
|
||||
Map<String, String> requestBody = null;
|
||||
api.testInlineAdditionalProperties(requestBody);
|
||||
Map<String, String> param = null;
|
||||
api.testInlineAdditionalProperties(param);
|
||||
|
||||
// TODO: test validations
|
||||
}
|
||||
|
||||
@@ -42,8 +42,8 @@ public class FakeClassnameTags123ApiTest {
|
||||
*/
|
||||
@Test
|
||||
public void testClassnameTest() throws ApiException {
|
||||
Client client = null;
|
||||
Client response = api.testClassname(client);
|
||||
Client body = null;
|
||||
Client response = api.testClassname(body);
|
||||
|
||||
// TODO: test validations
|
||||
}
|
||||
|
||||
@@ -44,8 +44,8 @@ public class PetApiTest {
|
||||
*/
|
||||
@Test
|
||||
public void addPetTest() throws ApiException {
|
||||
Pet pet = null;
|
||||
api.addPet(pet);
|
||||
Pet body = null;
|
||||
api.addPet(body);
|
||||
|
||||
// TODO: test validations
|
||||
}
|
||||
@@ -125,8 +125,8 @@ public class PetApiTest {
|
||||
*/
|
||||
@Test
|
||||
public void updatePetTest() throws ApiException {
|
||||
Pet pet = null;
|
||||
api.updatePet(pet);
|
||||
Pet body = null;
|
||||
api.updatePet(body);
|
||||
|
||||
// TODO: test validations
|
||||
}
|
||||
@@ -167,4 +167,22 @@ public class PetApiTest {
|
||||
// TODO: test validations
|
||||
}
|
||||
|
||||
/**
|
||||
* uploads an image (required)
|
||||
*
|
||||
*
|
||||
*
|
||||
* @throws ApiException
|
||||
* if the Api call fails
|
||||
*/
|
||||
@Test
|
||||
public void uploadFileWithRequiredFileTest() throws ApiException {
|
||||
Long petId = null;
|
||||
File requiredFile = null;
|
||||
String additionalMetadata = null;
|
||||
ModelApiResponse response = api.uploadFileWithRequiredFile(petId, requiredFile, additionalMetadata);
|
||||
|
||||
// TODO: test validations
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -89,8 +89,8 @@ public class StoreApiTest {
|
||||
*/
|
||||
@Test
|
||||
public void placeOrderTest() throws ApiException {
|
||||
Order order = null;
|
||||
Order response = api.placeOrder(order);
|
||||
Order body = null;
|
||||
Order response = api.placeOrder(body);
|
||||
|
||||
// TODO: test validations
|
||||
}
|
||||
|
||||
@@ -42,8 +42,8 @@ public class UserApiTest {
|
||||
*/
|
||||
@Test
|
||||
public void createUserTest() throws ApiException {
|
||||
User user = null;
|
||||
api.createUser(user);
|
||||
User body = null;
|
||||
api.createUser(body);
|
||||
|
||||
// TODO: test validations
|
||||
}
|
||||
@@ -58,8 +58,8 @@ public class UserApiTest {
|
||||
*/
|
||||
@Test
|
||||
public void createUsersWithArrayInputTest() throws ApiException {
|
||||
List<User> user = null;
|
||||
api.createUsersWithArrayInput(user);
|
||||
List<User> body = null;
|
||||
api.createUsersWithArrayInput(body);
|
||||
|
||||
// TODO: test validations
|
||||
}
|
||||
@@ -74,8 +74,8 @@ public class UserApiTest {
|
||||
*/
|
||||
@Test
|
||||
public void createUsersWithListInputTest() throws ApiException {
|
||||
List<User> user = null;
|
||||
api.createUsersWithListInput(user);
|
||||
List<User> body = null;
|
||||
api.createUsersWithListInput(body);
|
||||
|
||||
// TODO: test validations
|
||||
}
|
||||
@@ -155,8 +155,8 @@ public class UserApiTest {
|
||||
@Test
|
||||
public void updateUserTest() throws ApiException {
|
||||
String username = null;
|
||||
User user = null;
|
||||
api.updateUser(username, user);
|
||||
User body = null;
|
||||
api.updateUser(username, body);
|
||||
|
||||
// TODO: test validations
|
||||
}
|
||||
|
||||
@@ -124,7 +124,9 @@ public class ApiClient {
|
||||
}
|
||||
|
||||
private void init() {
|
||||
httpClient = new OkHttpClient();
|
||||
OkHttpClient.Builder builder = new OkHttpClient.Builder();
|
||||
builder.addInterceptor(getProgressInterceptor());
|
||||
httpClient = builder.build();
|
||||
|
||||
|
||||
verifyingSsl = true;
|
||||
@@ -173,7 +175,7 @@ public class ApiClient {
|
||||
* @return Api Client
|
||||
*/
|
||||
public ApiClient setHttpClient(OkHttpClient httpClient) {
|
||||
this.httpClient = httpClient;
|
||||
this.httpClient = httpClient.newBuilder().addInterceptor(getProgressInterceptor()).build();
|
||||
return this;
|
||||
}
|
||||
|
||||
@@ -1032,12 +1034,12 @@ public class ApiClient {
|
||||
* @param headerParams The header parameters
|
||||
* @param formParams The form parameters
|
||||
* @param authNames The authentications to apply
|
||||
* @param progressRequestListener Progress request listener
|
||||
* @param callback Callback for upload/download progress
|
||||
* @return The HTTP call
|
||||
* @throws ApiException If fail to serialize the request body object
|
||||
*/
|
||||
public Call buildCall(String path, String method, List<Pair> queryParams, List<Pair> collectionQueryParams, Object body, Map<String, String> headerParams, Map<String, Object> formParams, String[] authNames, ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
|
||||
Request request = buildRequest(path, method, queryParams, collectionQueryParams, body, headerParams, formParams, authNames, progressRequestListener);
|
||||
public Call buildCall(String path, String method, List<Pair> queryParams, List<Pair> collectionQueryParams, Object body, Map<String, String> headerParams, Map<String, Object> formParams, String[] authNames, ApiCallback callback) throws ApiException {
|
||||
Request request = buildRequest(path, method, queryParams, collectionQueryParams, body, headerParams, formParams, authNames, callback);
|
||||
|
||||
return httpClient.newCall(request);
|
||||
}
|
||||
@@ -1053,11 +1055,11 @@ public class ApiClient {
|
||||
* @param headerParams The header parameters
|
||||
* @param formParams The form parameters
|
||||
* @param authNames The authentications to apply
|
||||
* @param progressRequestListener Progress request listener
|
||||
* @param callback Callback for upload/download progress
|
||||
* @return The HTTP request
|
||||
* @throws ApiException If fail to serialize the request body object
|
||||
*/
|
||||
public Request buildRequest(String path, String method, List<Pair> queryParams, List<Pair> collectionQueryParams, Object body, Map<String, String> headerParams, Map<String, Object> formParams, String[] authNames, ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
|
||||
public Request buildRequest(String path, String method, List<Pair> queryParams, List<Pair> collectionQueryParams, Object body, Map<String, String> headerParams, Map<String, Object> formParams, String[] authNames, ApiCallback callback) throws ApiException {
|
||||
updateParamsForAuth(authNames, queryParams, headerParams);
|
||||
|
||||
final String url = buildUrl(path, queryParams, collectionQueryParams);
|
||||
@@ -1089,10 +1091,14 @@ public class ApiClient {
|
||||
reqBody = serialize(body, contentType);
|
||||
}
|
||||
|
||||
// Associate callback with request (if not null) so interceptor can
|
||||
// access it when creating ProgressResponseBody
|
||||
reqBuilder.tag(callback);
|
||||
|
||||
Request request = null;
|
||||
|
||||
if (progressRequestListener != null && reqBody != null) {
|
||||
ProgressRequestBody progressRequestBody = new ProgressRequestBody(reqBody, progressRequestListener);
|
||||
if (callback != null && reqBody != null) {
|
||||
ProgressRequestBody progressRequestBody = new ProgressRequestBody(reqBody, callback);
|
||||
request = reqBuilder.method(method, progressRequestBody).build();
|
||||
} else {
|
||||
request = reqBuilder.method(method, reqBody).build();
|
||||
@@ -1236,6 +1242,27 @@ public class ApiClient {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get network interceptor to add it to the httpClient to track download progress for
|
||||
* async requests.
|
||||
*/
|
||||
private Interceptor getProgressInterceptor() {
|
||||
return new Interceptor() {
|
||||
@Override
|
||||
public Response intercept(Interceptor.Chain chain) throws IOException {
|
||||
final Request request = chain.request();
|
||||
final Response originalResponse = chain.proceed(request);
|
||||
if (request.tag() instanceof ApiCallback) {
|
||||
final ApiCallback callback = (ApiCallback) request.tag();
|
||||
return originalResponse.newBuilder()
|
||||
.body(new ProgressResponseBody(originalResponse.body(), callback))
|
||||
.build();
|
||||
}
|
||||
return originalResponse;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Apply SSL related settings to httpClient according to the current values of
|
||||
* verifyingSsl and sslCaCert.
|
||||
|
||||
@@ -26,17 +26,13 @@ import okio.Sink;
|
||||
|
||||
public class ProgressRequestBody extends RequestBody {
|
||||
|
||||
public interface ProgressRequestListener {
|
||||
void onRequestProgress(long bytesWritten, long contentLength, boolean done);
|
||||
}
|
||||
|
||||
private final RequestBody requestBody;
|
||||
|
||||
private final ProgressRequestListener progressListener;
|
||||
private final ApiCallback callback;
|
||||
|
||||
public ProgressRequestBody(RequestBody requestBody, ProgressRequestListener progressListener) {
|
||||
public ProgressRequestBody(RequestBody requestBody, ApiCallback callback) {
|
||||
this.requestBody = requestBody;
|
||||
this.progressListener = progressListener;
|
||||
this.callback = callback;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -70,7 +66,7 @@ public class ProgressRequestBody extends RequestBody {
|
||||
}
|
||||
|
||||
bytesWritten += byteCount;
|
||||
progressListener.onRequestProgress(bytesWritten, contentLength, bytesWritten == contentLength);
|
||||
callback.onUploadProgress(bytesWritten, contentLength, bytesWritten == contentLength);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
@@ -26,17 +26,13 @@ import okio.Source;
|
||||
|
||||
public class ProgressResponseBody extends ResponseBody {
|
||||
|
||||
public interface ProgressListener {
|
||||
void update(long bytesRead, long contentLength, boolean done);
|
||||
}
|
||||
|
||||
private final ResponseBody responseBody;
|
||||
private final ProgressListener progressListener;
|
||||
private final ApiCallback callback;
|
||||
private BufferedSource bufferedSource;
|
||||
|
||||
public ProgressResponseBody(ResponseBody responseBody, ProgressListener progressListener) {
|
||||
public ProgressResponseBody(ResponseBody responseBody, ApiCallback callback) {
|
||||
this.responseBody = responseBody;
|
||||
this.progressListener = progressListener;
|
||||
this.callback = callback;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -66,7 +62,7 @@ public class ProgressResponseBody extends ResponseBody {
|
||||
long bytesRead = super.read(sink, byteCount);
|
||||
// read() returns the number of bytes read, or -1 if this source is exhausted.
|
||||
totalBytesRead += bytesRead != -1 ? bytesRead : 0;
|
||||
progressListener.update(totalBytesRead, responseBody.contentLength(), bytesRead == -1);
|
||||
callback.onDownloadProgress(totalBytesRead, responseBody.contentLength(), bytesRead == -1);
|
||||
return bytesRead;
|
||||
}
|
||||
};
|
||||
|
||||
@@ -57,12 +57,11 @@ public class AnotherFakeApi {
|
||||
/**
|
||||
* Build call for call123testSpecialTags
|
||||
* @param body client model (required)
|
||||
* @param _progressListener Progress listener
|
||||
* @param _progressRequestListener Progress request listener
|
||||
* @param _callback Callback for upload/download progress
|
||||
* @return Call to execute
|
||||
* @throws ApiException If fail to serialize the request body object
|
||||
*/
|
||||
public okhttp3.Call call123testSpecialTagsCall(Client body, final ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException {
|
||||
public okhttp3.Call call123testSpecialTagsCall(Client body, final ApiCallback _callback) throws ApiException {
|
||||
Object localVarPostBody = body;
|
||||
|
||||
// create path and map variables
|
||||
@@ -86,24 +85,12 @@ public class AnotherFakeApi {
|
||||
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
||||
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||
|
||||
if (_progressListener != null) {
|
||||
localVarApiClient.setHttpClient(localVarApiClient.getHttpClient().newBuilder().addNetworkInterceptor(new okhttp3.Interceptor() {
|
||||
@Override
|
||||
public okhttp3.Response intercept(okhttp3.Interceptor.Chain chain) throws IOException {
|
||||
okhttp3.Response originalResponse = chain.proceed(chain.request());
|
||||
return originalResponse.newBuilder()
|
||||
.body(new ProgressResponseBody(originalResponse.body(), _progressListener))
|
||||
.build();
|
||||
}
|
||||
}).build());
|
||||
}
|
||||
|
||||
String[] localVarAuthNames = new String[] { };
|
||||
return localVarApiClient.buildCall(localVarPath, "PATCH", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _progressRequestListener);
|
||||
return localVarApiClient.buildCall(localVarPath, "PATCH", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _callback);
|
||||
}
|
||||
|
||||
@SuppressWarnings("rawtypes")
|
||||
private okhttp3.Call call123testSpecialTagsValidateBeforeCall(Client body, final ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException {
|
||||
private okhttp3.Call call123testSpecialTagsValidateBeforeCall(Client body, final ApiCallback _callback) throws ApiException {
|
||||
|
||||
// verify the required parameter 'body' is set
|
||||
if (body == null) {
|
||||
@@ -111,7 +98,7 @@ public class AnotherFakeApi {
|
||||
}
|
||||
|
||||
|
||||
okhttp3.Call localVarCall = call123testSpecialTagsCall(body, _progressListener, _progressRequestListener);
|
||||
okhttp3.Call localVarCall = call123testSpecialTagsCall(body, _callback);
|
||||
return localVarCall;
|
||||
|
||||
}
|
||||
@@ -136,7 +123,7 @@ public class AnotherFakeApi {
|
||||
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
|
||||
*/
|
||||
public ApiResponse<Client> call123testSpecialTagsWithHttpInfo(Client body) throws ApiException {
|
||||
okhttp3.Call localVarCall = call123testSpecialTagsValidateBeforeCall(body, null, null);
|
||||
okhttp3.Call localVarCall = call123testSpecialTagsValidateBeforeCall(body, null);
|
||||
Type localVarReturnType = new TypeToken<Client>(){}.getType();
|
||||
return localVarApiClient.execute(localVarCall, localVarReturnType);
|
||||
}
|
||||
@@ -151,26 +138,7 @@ public class AnotherFakeApi {
|
||||
*/
|
||||
public okhttp3.Call call123testSpecialTagsAsync(Client body, final ApiCallback<Client> _callback) throws ApiException {
|
||||
|
||||
ProgressResponseBody.ProgressListener _progressListener = null;
|
||||
ProgressRequestBody.ProgressRequestListener _progressRequestListener = null;
|
||||
|
||||
if (_callback != null) {
|
||||
_progressListener = new ProgressResponseBody.ProgressListener() {
|
||||
@Override
|
||||
public void update(long bytesRead, long contentLength, boolean done) {
|
||||
_callback.onDownloadProgress(bytesRead, contentLength, done);
|
||||
}
|
||||
};
|
||||
|
||||
_progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
|
||||
@Override
|
||||
public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
|
||||
_callback.onUploadProgress(bytesWritten, contentLength, done);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
okhttp3.Call localVarCall = call123testSpecialTagsValidateBeforeCall(body, _progressListener, _progressRequestListener);
|
||||
okhttp3.Call localVarCall = call123testSpecialTagsValidateBeforeCall(body, _callback);
|
||||
Type localVarReturnType = new TypeToken<Client>(){}.getType();
|
||||
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
|
||||
return localVarCall;
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -57,12 +57,11 @@ public class FakeClassnameTags123Api {
|
||||
/**
|
||||
* Build call for testClassname
|
||||
* @param body client model (required)
|
||||
* @param _progressListener Progress listener
|
||||
* @param _progressRequestListener Progress request listener
|
||||
* @param _callback Callback for upload/download progress
|
||||
* @return Call to execute
|
||||
* @throws ApiException If fail to serialize the request body object
|
||||
*/
|
||||
public okhttp3.Call testClassnameCall(Client body, final ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException {
|
||||
public okhttp3.Call testClassnameCall(Client body, final ApiCallback _callback) throws ApiException {
|
||||
Object localVarPostBody = body;
|
||||
|
||||
// create path and map variables
|
||||
@@ -86,24 +85,12 @@ public class FakeClassnameTags123Api {
|
||||
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
||||
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||
|
||||
if (_progressListener != null) {
|
||||
localVarApiClient.setHttpClient(localVarApiClient.getHttpClient().newBuilder().addNetworkInterceptor(new okhttp3.Interceptor() {
|
||||
@Override
|
||||
public okhttp3.Response intercept(okhttp3.Interceptor.Chain chain) throws IOException {
|
||||
okhttp3.Response originalResponse = chain.proceed(chain.request());
|
||||
return originalResponse.newBuilder()
|
||||
.body(new ProgressResponseBody(originalResponse.body(), _progressListener))
|
||||
.build();
|
||||
}
|
||||
}).build());
|
||||
}
|
||||
|
||||
String[] localVarAuthNames = new String[] { "api_key_query" };
|
||||
return localVarApiClient.buildCall(localVarPath, "PATCH", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _progressRequestListener);
|
||||
return localVarApiClient.buildCall(localVarPath, "PATCH", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _callback);
|
||||
}
|
||||
|
||||
@SuppressWarnings("rawtypes")
|
||||
private okhttp3.Call testClassnameValidateBeforeCall(Client body, final ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException {
|
||||
private okhttp3.Call testClassnameValidateBeforeCall(Client body, final ApiCallback _callback) throws ApiException {
|
||||
|
||||
// verify the required parameter 'body' is set
|
||||
if (body == null) {
|
||||
@@ -111,7 +98,7 @@ public class FakeClassnameTags123Api {
|
||||
}
|
||||
|
||||
|
||||
okhttp3.Call localVarCall = testClassnameCall(body, _progressListener, _progressRequestListener);
|
||||
okhttp3.Call localVarCall = testClassnameCall(body, _callback);
|
||||
return localVarCall;
|
||||
|
||||
}
|
||||
@@ -136,7 +123,7 @@ public class FakeClassnameTags123Api {
|
||||
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
|
||||
*/
|
||||
public ApiResponse<Client> testClassnameWithHttpInfo(Client body) throws ApiException {
|
||||
okhttp3.Call localVarCall = testClassnameValidateBeforeCall(body, null, null);
|
||||
okhttp3.Call localVarCall = testClassnameValidateBeforeCall(body, null);
|
||||
Type localVarReturnType = new TypeToken<Client>(){}.getType();
|
||||
return localVarApiClient.execute(localVarCall, localVarReturnType);
|
||||
}
|
||||
@@ -151,26 +138,7 @@ public class FakeClassnameTags123Api {
|
||||
*/
|
||||
public okhttp3.Call testClassnameAsync(Client body, final ApiCallback<Client> _callback) throws ApiException {
|
||||
|
||||
ProgressResponseBody.ProgressListener _progressListener = null;
|
||||
ProgressRequestBody.ProgressRequestListener _progressRequestListener = null;
|
||||
|
||||
if (_callback != null) {
|
||||
_progressListener = new ProgressResponseBody.ProgressListener() {
|
||||
@Override
|
||||
public void update(long bytesRead, long contentLength, boolean done) {
|
||||
_callback.onDownloadProgress(bytesRead, contentLength, done);
|
||||
}
|
||||
};
|
||||
|
||||
_progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
|
||||
@Override
|
||||
public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
|
||||
_callback.onUploadProgress(bytesWritten, contentLength, done);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
okhttp3.Call localVarCall = testClassnameValidateBeforeCall(body, _progressListener, _progressRequestListener);
|
||||
okhttp3.Call localVarCall = testClassnameValidateBeforeCall(body, _callback);
|
||||
Type localVarReturnType = new TypeToken<Client>(){}.getType();
|
||||
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
|
||||
return localVarCall;
|
||||
|
||||
@@ -59,12 +59,11 @@ public class PetApi {
|
||||
/**
|
||||
* Build call for addPet
|
||||
* @param body Pet object that needs to be added to the store (required)
|
||||
* @param _progressListener Progress listener
|
||||
* @param _progressRequestListener Progress request listener
|
||||
* @param _callback Callback for upload/download progress
|
||||
* @return Call to execute
|
||||
* @throws ApiException If fail to serialize the request body object
|
||||
*/
|
||||
public okhttp3.Call addPetCall(Pet body, final ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException {
|
||||
public okhttp3.Call addPetCall(Pet body, final ApiCallback _callback) throws ApiException {
|
||||
Object localVarPostBody = body;
|
||||
|
||||
// create path and map variables
|
||||
@@ -88,24 +87,12 @@ public class PetApi {
|
||||
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
||||
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||
|
||||
if (_progressListener != null) {
|
||||
localVarApiClient.setHttpClient(localVarApiClient.getHttpClient().newBuilder().addNetworkInterceptor(new okhttp3.Interceptor() {
|
||||
@Override
|
||||
public okhttp3.Response intercept(okhttp3.Interceptor.Chain chain) throws IOException {
|
||||
okhttp3.Response originalResponse = chain.proceed(chain.request());
|
||||
return originalResponse.newBuilder()
|
||||
.body(new ProgressResponseBody(originalResponse.body(), _progressListener))
|
||||
.build();
|
||||
}
|
||||
}).build());
|
||||
}
|
||||
|
||||
String[] localVarAuthNames = new String[] { "petstore_auth" };
|
||||
return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _progressRequestListener);
|
||||
return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _callback);
|
||||
}
|
||||
|
||||
@SuppressWarnings("rawtypes")
|
||||
private okhttp3.Call addPetValidateBeforeCall(Pet body, final ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException {
|
||||
private okhttp3.Call addPetValidateBeforeCall(Pet body, final ApiCallback _callback) throws ApiException {
|
||||
|
||||
// verify the required parameter 'body' is set
|
||||
if (body == null) {
|
||||
@@ -113,7 +100,7 @@ public class PetApi {
|
||||
}
|
||||
|
||||
|
||||
okhttp3.Call localVarCall = addPetCall(body, _progressListener, _progressRequestListener);
|
||||
okhttp3.Call localVarCall = addPetCall(body, _callback);
|
||||
return localVarCall;
|
||||
|
||||
}
|
||||
@@ -136,7 +123,7 @@ public class PetApi {
|
||||
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
|
||||
*/
|
||||
public ApiResponse<Void> addPetWithHttpInfo(Pet body) throws ApiException {
|
||||
okhttp3.Call localVarCall = addPetValidateBeforeCall(body, null, null);
|
||||
okhttp3.Call localVarCall = addPetValidateBeforeCall(body, null);
|
||||
return localVarApiClient.execute(localVarCall);
|
||||
}
|
||||
|
||||
@@ -150,26 +137,7 @@ public class PetApi {
|
||||
*/
|
||||
public okhttp3.Call addPetAsync(Pet body, final ApiCallback<Void> _callback) throws ApiException {
|
||||
|
||||
ProgressResponseBody.ProgressListener _progressListener = null;
|
||||
ProgressRequestBody.ProgressRequestListener _progressRequestListener = null;
|
||||
|
||||
if (_callback != null) {
|
||||
_progressListener = new ProgressResponseBody.ProgressListener() {
|
||||
@Override
|
||||
public void update(long bytesRead, long contentLength, boolean done) {
|
||||
_callback.onDownloadProgress(bytesRead, contentLength, done);
|
||||
}
|
||||
};
|
||||
|
||||
_progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
|
||||
@Override
|
||||
public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
|
||||
_callback.onUploadProgress(bytesWritten, contentLength, done);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
okhttp3.Call localVarCall = addPetValidateBeforeCall(body, _progressListener, _progressRequestListener);
|
||||
okhttp3.Call localVarCall = addPetValidateBeforeCall(body, _callback);
|
||||
localVarApiClient.executeAsync(localVarCall, _callback);
|
||||
return localVarCall;
|
||||
}
|
||||
@@ -177,12 +145,11 @@ public class PetApi {
|
||||
* Build call for deletePet
|
||||
* @param petId Pet id to delete (required)
|
||||
* @param apiKey (optional)
|
||||
* @param _progressListener Progress listener
|
||||
* @param _progressRequestListener Progress request listener
|
||||
* @param _callback Callback for upload/download progress
|
||||
* @return Call to execute
|
||||
* @throws ApiException If fail to serialize the request body object
|
||||
*/
|
||||
public okhttp3.Call deletePetCall(Long petId, String apiKey, final ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException {
|
||||
public okhttp3.Call deletePetCall(Long petId, String apiKey, final ApiCallback _callback) throws ApiException {
|
||||
Object localVarPostBody = new Object();
|
||||
|
||||
// create path and map variables
|
||||
@@ -211,24 +178,12 @@ public class PetApi {
|
||||
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
||||
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||
|
||||
if (_progressListener != null) {
|
||||
localVarApiClient.setHttpClient(localVarApiClient.getHttpClient().newBuilder().addNetworkInterceptor(new okhttp3.Interceptor() {
|
||||
@Override
|
||||
public okhttp3.Response intercept(okhttp3.Interceptor.Chain chain) throws IOException {
|
||||
okhttp3.Response originalResponse = chain.proceed(chain.request());
|
||||
return originalResponse.newBuilder()
|
||||
.body(new ProgressResponseBody(originalResponse.body(), _progressListener))
|
||||
.build();
|
||||
}
|
||||
}).build());
|
||||
}
|
||||
|
||||
String[] localVarAuthNames = new String[] { "petstore_auth" };
|
||||
return localVarApiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _progressRequestListener);
|
||||
return localVarApiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _callback);
|
||||
}
|
||||
|
||||
@SuppressWarnings("rawtypes")
|
||||
private okhttp3.Call deletePetValidateBeforeCall(Long petId, String apiKey, final ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException {
|
||||
private okhttp3.Call deletePetValidateBeforeCall(Long petId, String apiKey, final ApiCallback _callback) throws ApiException {
|
||||
|
||||
// verify the required parameter 'petId' is set
|
||||
if (petId == null) {
|
||||
@@ -236,7 +191,7 @@ public class PetApi {
|
||||
}
|
||||
|
||||
|
||||
okhttp3.Call localVarCall = deletePetCall(petId, apiKey, _progressListener, _progressRequestListener);
|
||||
okhttp3.Call localVarCall = deletePetCall(petId, apiKey, _callback);
|
||||
return localVarCall;
|
||||
|
||||
}
|
||||
@@ -261,7 +216,7 @@ public class PetApi {
|
||||
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
|
||||
*/
|
||||
public ApiResponse<Void> deletePetWithHttpInfo(Long petId, String apiKey) throws ApiException {
|
||||
okhttp3.Call localVarCall = deletePetValidateBeforeCall(petId, apiKey, null, null);
|
||||
okhttp3.Call localVarCall = deletePetValidateBeforeCall(petId, apiKey, null);
|
||||
return localVarApiClient.execute(localVarCall);
|
||||
}
|
||||
|
||||
@@ -276,38 +231,18 @@ public class PetApi {
|
||||
*/
|
||||
public okhttp3.Call deletePetAsync(Long petId, String apiKey, final ApiCallback<Void> _callback) throws ApiException {
|
||||
|
||||
ProgressResponseBody.ProgressListener _progressListener = null;
|
||||
ProgressRequestBody.ProgressRequestListener _progressRequestListener = null;
|
||||
|
||||
if (_callback != null) {
|
||||
_progressListener = new ProgressResponseBody.ProgressListener() {
|
||||
@Override
|
||||
public void update(long bytesRead, long contentLength, boolean done) {
|
||||
_callback.onDownloadProgress(bytesRead, contentLength, done);
|
||||
}
|
||||
};
|
||||
|
||||
_progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
|
||||
@Override
|
||||
public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
|
||||
_callback.onUploadProgress(bytesWritten, contentLength, done);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
okhttp3.Call localVarCall = deletePetValidateBeforeCall(petId, apiKey, _progressListener, _progressRequestListener);
|
||||
okhttp3.Call localVarCall = deletePetValidateBeforeCall(petId, apiKey, _callback);
|
||||
localVarApiClient.executeAsync(localVarCall, _callback);
|
||||
return localVarCall;
|
||||
}
|
||||
/**
|
||||
* Build call for findPetsByStatus
|
||||
* @param status Status values that need to be considered for filter (required)
|
||||
* @param _progressListener Progress listener
|
||||
* @param _progressRequestListener Progress request listener
|
||||
* @param _callback Callback for upload/download progress
|
||||
* @return Call to execute
|
||||
* @throws ApiException If fail to serialize the request body object
|
||||
*/
|
||||
public okhttp3.Call findPetsByStatusCall(List<String> status, final ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException {
|
||||
public okhttp3.Call findPetsByStatusCall(List<String> status, final ApiCallback _callback) throws ApiException {
|
||||
Object localVarPostBody = new Object();
|
||||
|
||||
// create path and map variables
|
||||
@@ -335,24 +270,12 @@ public class PetApi {
|
||||
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
||||
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||
|
||||
if (_progressListener != null) {
|
||||
localVarApiClient.setHttpClient(localVarApiClient.getHttpClient().newBuilder().addNetworkInterceptor(new okhttp3.Interceptor() {
|
||||
@Override
|
||||
public okhttp3.Response intercept(okhttp3.Interceptor.Chain chain) throws IOException {
|
||||
okhttp3.Response originalResponse = chain.proceed(chain.request());
|
||||
return originalResponse.newBuilder()
|
||||
.body(new ProgressResponseBody(originalResponse.body(), _progressListener))
|
||||
.build();
|
||||
}
|
||||
}).build());
|
||||
}
|
||||
|
||||
String[] localVarAuthNames = new String[] { "petstore_auth" };
|
||||
return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _progressRequestListener);
|
||||
return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _callback);
|
||||
}
|
||||
|
||||
@SuppressWarnings("rawtypes")
|
||||
private okhttp3.Call findPetsByStatusValidateBeforeCall(List<String> status, final ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException {
|
||||
private okhttp3.Call findPetsByStatusValidateBeforeCall(List<String> status, final ApiCallback _callback) throws ApiException {
|
||||
|
||||
// verify the required parameter 'status' is set
|
||||
if (status == null) {
|
||||
@@ -360,7 +283,7 @@ public class PetApi {
|
||||
}
|
||||
|
||||
|
||||
okhttp3.Call localVarCall = findPetsByStatusCall(status, _progressListener, _progressRequestListener);
|
||||
okhttp3.Call localVarCall = findPetsByStatusCall(status, _callback);
|
||||
return localVarCall;
|
||||
|
||||
}
|
||||
@@ -385,7 +308,7 @@ public class PetApi {
|
||||
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
|
||||
*/
|
||||
public ApiResponse<List<Pet>> findPetsByStatusWithHttpInfo(List<String> status) throws ApiException {
|
||||
okhttp3.Call localVarCall = findPetsByStatusValidateBeforeCall(status, null, null);
|
||||
okhttp3.Call localVarCall = findPetsByStatusValidateBeforeCall(status, null);
|
||||
Type localVarReturnType = new TypeToken<List<Pet>>(){}.getType();
|
||||
return localVarApiClient.execute(localVarCall, localVarReturnType);
|
||||
}
|
||||
@@ -400,26 +323,7 @@ public class PetApi {
|
||||
*/
|
||||
public okhttp3.Call findPetsByStatusAsync(List<String> status, final ApiCallback<List<Pet>> _callback) throws ApiException {
|
||||
|
||||
ProgressResponseBody.ProgressListener _progressListener = null;
|
||||
ProgressRequestBody.ProgressRequestListener _progressRequestListener = null;
|
||||
|
||||
if (_callback != null) {
|
||||
_progressListener = new ProgressResponseBody.ProgressListener() {
|
||||
@Override
|
||||
public void update(long bytesRead, long contentLength, boolean done) {
|
||||
_callback.onDownloadProgress(bytesRead, contentLength, done);
|
||||
}
|
||||
};
|
||||
|
||||
_progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
|
||||
@Override
|
||||
public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
|
||||
_callback.onUploadProgress(bytesWritten, contentLength, done);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
okhttp3.Call localVarCall = findPetsByStatusValidateBeforeCall(status, _progressListener, _progressRequestListener);
|
||||
okhttp3.Call localVarCall = findPetsByStatusValidateBeforeCall(status, _callback);
|
||||
Type localVarReturnType = new TypeToken<List<Pet>>(){}.getType();
|
||||
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
|
||||
return localVarCall;
|
||||
@@ -427,14 +331,13 @@ public class PetApi {
|
||||
/**
|
||||
* Build call for findPetsByTags
|
||||
* @param tags Tags to filter by (required)
|
||||
* @param _progressListener Progress listener
|
||||
* @param _progressRequestListener Progress request listener
|
||||
* @param _callback Callback for upload/download progress
|
||||
* @return Call to execute
|
||||
* @throws ApiException If fail to serialize the request body object
|
||||
* @deprecated
|
||||
*/
|
||||
@Deprecated
|
||||
public okhttp3.Call findPetsByTagsCall(List<String> tags, final ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException {
|
||||
public okhttp3.Call findPetsByTagsCall(List<String> tags, final ApiCallback _callback) throws ApiException {
|
||||
Object localVarPostBody = new Object();
|
||||
|
||||
// create path and map variables
|
||||
@@ -462,25 +365,13 @@ public class PetApi {
|
||||
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
||||
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||
|
||||
if (_progressListener != null) {
|
||||
localVarApiClient.setHttpClient(localVarApiClient.getHttpClient().newBuilder().addNetworkInterceptor(new okhttp3.Interceptor() {
|
||||
@Override
|
||||
public okhttp3.Response intercept(okhttp3.Interceptor.Chain chain) throws IOException {
|
||||
okhttp3.Response originalResponse = chain.proceed(chain.request());
|
||||
return originalResponse.newBuilder()
|
||||
.body(new ProgressResponseBody(originalResponse.body(), _progressListener))
|
||||
.build();
|
||||
}
|
||||
}).build());
|
||||
}
|
||||
|
||||
String[] localVarAuthNames = new String[] { "petstore_auth" };
|
||||
return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _progressRequestListener);
|
||||
return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _callback);
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
@SuppressWarnings("rawtypes")
|
||||
private okhttp3.Call findPetsByTagsValidateBeforeCall(List<String> tags, final ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException {
|
||||
private okhttp3.Call findPetsByTagsValidateBeforeCall(List<String> tags, final ApiCallback _callback) throws ApiException {
|
||||
|
||||
// verify the required parameter 'tags' is set
|
||||
if (tags == null) {
|
||||
@@ -488,7 +379,7 @@ public class PetApi {
|
||||
}
|
||||
|
||||
|
||||
okhttp3.Call localVarCall = findPetsByTagsCall(tags, _progressListener, _progressRequestListener);
|
||||
okhttp3.Call localVarCall = findPetsByTagsCall(tags, _callback);
|
||||
return localVarCall;
|
||||
|
||||
}
|
||||
@@ -517,7 +408,7 @@ public class PetApi {
|
||||
*/
|
||||
@Deprecated
|
||||
public ApiResponse<List<Pet>> findPetsByTagsWithHttpInfo(List<String> tags) throws ApiException {
|
||||
okhttp3.Call localVarCall = findPetsByTagsValidateBeforeCall(tags, null, null);
|
||||
okhttp3.Call localVarCall = findPetsByTagsValidateBeforeCall(tags, null);
|
||||
Type localVarReturnType = new TypeToken<List<Pet>>(){}.getType();
|
||||
return localVarApiClient.execute(localVarCall, localVarReturnType);
|
||||
}
|
||||
@@ -534,26 +425,7 @@ public class PetApi {
|
||||
@Deprecated
|
||||
public okhttp3.Call findPetsByTagsAsync(List<String> tags, final ApiCallback<List<Pet>> _callback) throws ApiException {
|
||||
|
||||
ProgressResponseBody.ProgressListener _progressListener = null;
|
||||
ProgressRequestBody.ProgressRequestListener _progressRequestListener = null;
|
||||
|
||||
if (_callback != null) {
|
||||
_progressListener = new ProgressResponseBody.ProgressListener() {
|
||||
@Override
|
||||
public void update(long bytesRead, long contentLength, boolean done) {
|
||||
_callback.onDownloadProgress(bytesRead, contentLength, done);
|
||||
}
|
||||
};
|
||||
|
||||
_progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
|
||||
@Override
|
||||
public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
|
||||
_callback.onUploadProgress(bytesWritten, contentLength, done);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
okhttp3.Call localVarCall = findPetsByTagsValidateBeforeCall(tags, _progressListener, _progressRequestListener);
|
||||
okhttp3.Call localVarCall = findPetsByTagsValidateBeforeCall(tags, _callback);
|
||||
Type localVarReturnType = new TypeToken<List<Pet>>(){}.getType();
|
||||
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
|
||||
return localVarCall;
|
||||
@@ -561,12 +433,11 @@ public class PetApi {
|
||||
/**
|
||||
* Build call for getPetById
|
||||
* @param petId ID of pet to return (required)
|
||||
* @param _progressListener Progress listener
|
||||
* @param _progressRequestListener Progress request listener
|
||||
* @param _callback Callback for upload/download progress
|
||||
* @return Call to execute
|
||||
* @throws ApiException If fail to serialize the request body object
|
||||
*/
|
||||
public okhttp3.Call getPetByIdCall(Long petId, final ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException {
|
||||
public okhttp3.Call getPetByIdCall(Long petId, final ApiCallback _callback) throws ApiException {
|
||||
Object localVarPostBody = new Object();
|
||||
|
||||
// create path and map variables
|
||||
@@ -591,24 +462,12 @@ public class PetApi {
|
||||
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
||||
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||
|
||||
if (_progressListener != null) {
|
||||
localVarApiClient.setHttpClient(localVarApiClient.getHttpClient().newBuilder().addNetworkInterceptor(new okhttp3.Interceptor() {
|
||||
@Override
|
||||
public okhttp3.Response intercept(okhttp3.Interceptor.Chain chain) throws IOException {
|
||||
okhttp3.Response originalResponse = chain.proceed(chain.request());
|
||||
return originalResponse.newBuilder()
|
||||
.body(new ProgressResponseBody(originalResponse.body(), _progressListener))
|
||||
.build();
|
||||
}
|
||||
}).build());
|
||||
}
|
||||
|
||||
String[] localVarAuthNames = new String[] { "api_key" };
|
||||
return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _progressRequestListener);
|
||||
return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _callback);
|
||||
}
|
||||
|
||||
@SuppressWarnings("rawtypes")
|
||||
private okhttp3.Call getPetByIdValidateBeforeCall(Long petId, final ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException {
|
||||
private okhttp3.Call getPetByIdValidateBeforeCall(Long petId, final ApiCallback _callback) throws ApiException {
|
||||
|
||||
// verify the required parameter 'petId' is set
|
||||
if (petId == null) {
|
||||
@@ -616,7 +475,7 @@ public class PetApi {
|
||||
}
|
||||
|
||||
|
||||
okhttp3.Call localVarCall = getPetByIdCall(petId, _progressListener, _progressRequestListener);
|
||||
okhttp3.Call localVarCall = getPetByIdCall(petId, _callback);
|
||||
return localVarCall;
|
||||
|
||||
}
|
||||
@@ -641,7 +500,7 @@ public class PetApi {
|
||||
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
|
||||
*/
|
||||
public ApiResponse<Pet> getPetByIdWithHttpInfo(Long petId) throws ApiException {
|
||||
okhttp3.Call localVarCall = getPetByIdValidateBeforeCall(petId, null, null);
|
||||
okhttp3.Call localVarCall = getPetByIdValidateBeforeCall(petId, null);
|
||||
Type localVarReturnType = new TypeToken<Pet>(){}.getType();
|
||||
return localVarApiClient.execute(localVarCall, localVarReturnType);
|
||||
}
|
||||
@@ -656,26 +515,7 @@ public class PetApi {
|
||||
*/
|
||||
public okhttp3.Call getPetByIdAsync(Long petId, final ApiCallback<Pet> _callback) throws ApiException {
|
||||
|
||||
ProgressResponseBody.ProgressListener _progressListener = null;
|
||||
ProgressRequestBody.ProgressRequestListener _progressRequestListener = null;
|
||||
|
||||
if (_callback != null) {
|
||||
_progressListener = new ProgressResponseBody.ProgressListener() {
|
||||
@Override
|
||||
public void update(long bytesRead, long contentLength, boolean done) {
|
||||
_callback.onDownloadProgress(bytesRead, contentLength, done);
|
||||
}
|
||||
};
|
||||
|
||||
_progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
|
||||
@Override
|
||||
public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
|
||||
_callback.onUploadProgress(bytesWritten, contentLength, done);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
okhttp3.Call localVarCall = getPetByIdValidateBeforeCall(petId, _progressListener, _progressRequestListener);
|
||||
okhttp3.Call localVarCall = getPetByIdValidateBeforeCall(petId, _callback);
|
||||
Type localVarReturnType = new TypeToken<Pet>(){}.getType();
|
||||
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
|
||||
return localVarCall;
|
||||
@@ -683,12 +523,11 @@ public class PetApi {
|
||||
/**
|
||||
* Build call for updatePet
|
||||
* @param body Pet object that needs to be added to the store (required)
|
||||
* @param _progressListener Progress listener
|
||||
* @param _progressRequestListener Progress request listener
|
||||
* @param _callback Callback for upload/download progress
|
||||
* @return Call to execute
|
||||
* @throws ApiException If fail to serialize the request body object
|
||||
*/
|
||||
public okhttp3.Call updatePetCall(Pet body, final ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException {
|
||||
public okhttp3.Call updatePetCall(Pet body, final ApiCallback _callback) throws ApiException {
|
||||
Object localVarPostBody = body;
|
||||
|
||||
// create path and map variables
|
||||
@@ -712,24 +551,12 @@ public class PetApi {
|
||||
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
||||
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||
|
||||
if (_progressListener != null) {
|
||||
localVarApiClient.setHttpClient(localVarApiClient.getHttpClient().newBuilder().addNetworkInterceptor(new okhttp3.Interceptor() {
|
||||
@Override
|
||||
public okhttp3.Response intercept(okhttp3.Interceptor.Chain chain) throws IOException {
|
||||
okhttp3.Response originalResponse = chain.proceed(chain.request());
|
||||
return originalResponse.newBuilder()
|
||||
.body(new ProgressResponseBody(originalResponse.body(), _progressListener))
|
||||
.build();
|
||||
}
|
||||
}).build());
|
||||
}
|
||||
|
||||
String[] localVarAuthNames = new String[] { "petstore_auth" };
|
||||
return localVarApiClient.buildCall(localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _progressRequestListener);
|
||||
return localVarApiClient.buildCall(localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _callback);
|
||||
}
|
||||
|
||||
@SuppressWarnings("rawtypes")
|
||||
private okhttp3.Call updatePetValidateBeforeCall(Pet body, final ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException {
|
||||
private okhttp3.Call updatePetValidateBeforeCall(Pet body, final ApiCallback _callback) throws ApiException {
|
||||
|
||||
// verify the required parameter 'body' is set
|
||||
if (body == null) {
|
||||
@@ -737,7 +564,7 @@ public class PetApi {
|
||||
}
|
||||
|
||||
|
||||
okhttp3.Call localVarCall = updatePetCall(body, _progressListener, _progressRequestListener);
|
||||
okhttp3.Call localVarCall = updatePetCall(body, _callback);
|
||||
return localVarCall;
|
||||
|
||||
}
|
||||
@@ -760,7 +587,7 @@ public class PetApi {
|
||||
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
|
||||
*/
|
||||
public ApiResponse<Void> updatePetWithHttpInfo(Pet body) throws ApiException {
|
||||
okhttp3.Call localVarCall = updatePetValidateBeforeCall(body, null, null);
|
||||
okhttp3.Call localVarCall = updatePetValidateBeforeCall(body, null);
|
||||
return localVarApiClient.execute(localVarCall);
|
||||
}
|
||||
|
||||
@@ -774,26 +601,7 @@ public class PetApi {
|
||||
*/
|
||||
public okhttp3.Call updatePetAsync(Pet body, final ApiCallback<Void> _callback) throws ApiException {
|
||||
|
||||
ProgressResponseBody.ProgressListener _progressListener = null;
|
||||
ProgressRequestBody.ProgressRequestListener _progressRequestListener = null;
|
||||
|
||||
if (_callback != null) {
|
||||
_progressListener = new ProgressResponseBody.ProgressListener() {
|
||||
@Override
|
||||
public void update(long bytesRead, long contentLength, boolean done) {
|
||||
_callback.onDownloadProgress(bytesRead, contentLength, done);
|
||||
}
|
||||
};
|
||||
|
||||
_progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
|
||||
@Override
|
||||
public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
|
||||
_callback.onUploadProgress(bytesWritten, contentLength, done);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
okhttp3.Call localVarCall = updatePetValidateBeforeCall(body, _progressListener, _progressRequestListener);
|
||||
okhttp3.Call localVarCall = updatePetValidateBeforeCall(body, _callback);
|
||||
localVarApiClient.executeAsync(localVarCall, _callback);
|
||||
return localVarCall;
|
||||
}
|
||||
@@ -802,12 +610,11 @@ public class PetApi {
|
||||
* @param petId ID of pet that needs to be updated (required)
|
||||
* @param name Updated name of the pet (optional)
|
||||
* @param status Updated status of the pet (optional)
|
||||
* @param _progressListener Progress listener
|
||||
* @param _progressRequestListener Progress request listener
|
||||
* @param _callback Callback for upload/download progress
|
||||
* @return Call to execute
|
||||
* @throws ApiException If fail to serialize the request body object
|
||||
*/
|
||||
public okhttp3.Call updatePetWithFormCall(Long petId, String name, String status, final ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException {
|
||||
public okhttp3.Call updatePetWithFormCall(Long petId, String name, String status, final ApiCallback _callback) throws ApiException {
|
||||
Object localVarPostBody = new Object();
|
||||
|
||||
// create path and map variables
|
||||
@@ -840,24 +647,12 @@ public class PetApi {
|
||||
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
||||
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||
|
||||
if (_progressListener != null) {
|
||||
localVarApiClient.setHttpClient(localVarApiClient.getHttpClient().newBuilder().addNetworkInterceptor(new okhttp3.Interceptor() {
|
||||
@Override
|
||||
public okhttp3.Response intercept(okhttp3.Interceptor.Chain chain) throws IOException {
|
||||
okhttp3.Response originalResponse = chain.proceed(chain.request());
|
||||
return originalResponse.newBuilder()
|
||||
.body(new ProgressResponseBody(originalResponse.body(), _progressListener))
|
||||
.build();
|
||||
}
|
||||
}).build());
|
||||
}
|
||||
|
||||
String[] localVarAuthNames = new String[] { "petstore_auth" };
|
||||
return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _progressRequestListener);
|
||||
return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _callback);
|
||||
}
|
||||
|
||||
@SuppressWarnings("rawtypes")
|
||||
private okhttp3.Call updatePetWithFormValidateBeforeCall(Long petId, String name, String status, final ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException {
|
||||
private okhttp3.Call updatePetWithFormValidateBeforeCall(Long petId, String name, String status, final ApiCallback _callback) throws ApiException {
|
||||
|
||||
// verify the required parameter 'petId' is set
|
||||
if (petId == null) {
|
||||
@@ -865,7 +660,7 @@ public class PetApi {
|
||||
}
|
||||
|
||||
|
||||
okhttp3.Call localVarCall = updatePetWithFormCall(petId, name, status, _progressListener, _progressRequestListener);
|
||||
okhttp3.Call localVarCall = updatePetWithFormCall(petId, name, status, _callback);
|
||||
return localVarCall;
|
||||
|
||||
}
|
||||
@@ -892,7 +687,7 @@ public class PetApi {
|
||||
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
|
||||
*/
|
||||
public ApiResponse<Void> updatePetWithFormWithHttpInfo(Long petId, String name, String status) throws ApiException {
|
||||
okhttp3.Call localVarCall = updatePetWithFormValidateBeforeCall(petId, name, status, null, null);
|
||||
okhttp3.Call localVarCall = updatePetWithFormValidateBeforeCall(petId, name, status, null);
|
||||
return localVarApiClient.execute(localVarCall);
|
||||
}
|
||||
|
||||
@@ -908,26 +703,7 @@ public class PetApi {
|
||||
*/
|
||||
public okhttp3.Call updatePetWithFormAsync(Long petId, String name, String status, final ApiCallback<Void> _callback) throws ApiException {
|
||||
|
||||
ProgressResponseBody.ProgressListener _progressListener = null;
|
||||
ProgressRequestBody.ProgressRequestListener _progressRequestListener = null;
|
||||
|
||||
if (_callback != null) {
|
||||
_progressListener = new ProgressResponseBody.ProgressListener() {
|
||||
@Override
|
||||
public void update(long bytesRead, long contentLength, boolean done) {
|
||||
_callback.onDownloadProgress(bytesRead, contentLength, done);
|
||||
}
|
||||
};
|
||||
|
||||
_progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
|
||||
@Override
|
||||
public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
|
||||
_callback.onUploadProgress(bytesWritten, contentLength, done);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
okhttp3.Call localVarCall = updatePetWithFormValidateBeforeCall(petId, name, status, _progressListener, _progressRequestListener);
|
||||
okhttp3.Call localVarCall = updatePetWithFormValidateBeforeCall(petId, name, status, _callback);
|
||||
localVarApiClient.executeAsync(localVarCall, _callback);
|
||||
return localVarCall;
|
||||
}
|
||||
@@ -936,12 +712,11 @@ public class PetApi {
|
||||
* @param petId ID of pet to update (required)
|
||||
* @param additionalMetadata Additional data to pass to server (optional)
|
||||
* @param file file to upload (optional)
|
||||
* @param _progressListener Progress listener
|
||||
* @param _progressRequestListener Progress request listener
|
||||
* @param _callback Callback for upload/download progress
|
||||
* @return Call to execute
|
||||
* @throws ApiException If fail to serialize the request body object
|
||||
*/
|
||||
public okhttp3.Call uploadFileCall(Long petId, String additionalMetadata, File file, final ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException {
|
||||
public okhttp3.Call uploadFileCall(Long petId, String additionalMetadata, File file, final ApiCallback _callback) throws ApiException {
|
||||
Object localVarPostBody = new Object();
|
||||
|
||||
// create path and map variables
|
||||
@@ -974,24 +749,12 @@ public class PetApi {
|
||||
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
||||
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||
|
||||
if (_progressListener != null) {
|
||||
localVarApiClient.setHttpClient(localVarApiClient.getHttpClient().newBuilder().addNetworkInterceptor(new okhttp3.Interceptor() {
|
||||
@Override
|
||||
public okhttp3.Response intercept(okhttp3.Interceptor.Chain chain) throws IOException {
|
||||
okhttp3.Response originalResponse = chain.proceed(chain.request());
|
||||
return originalResponse.newBuilder()
|
||||
.body(new ProgressResponseBody(originalResponse.body(), _progressListener))
|
||||
.build();
|
||||
}
|
||||
}).build());
|
||||
}
|
||||
|
||||
String[] localVarAuthNames = new String[] { "petstore_auth" };
|
||||
return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _progressRequestListener);
|
||||
return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _callback);
|
||||
}
|
||||
|
||||
@SuppressWarnings("rawtypes")
|
||||
private okhttp3.Call uploadFileValidateBeforeCall(Long petId, String additionalMetadata, File file, final ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException {
|
||||
private okhttp3.Call uploadFileValidateBeforeCall(Long petId, String additionalMetadata, File file, final ApiCallback _callback) throws ApiException {
|
||||
|
||||
// verify the required parameter 'petId' is set
|
||||
if (petId == null) {
|
||||
@@ -999,7 +762,7 @@ public class PetApi {
|
||||
}
|
||||
|
||||
|
||||
okhttp3.Call localVarCall = uploadFileCall(petId, additionalMetadata, file, _progressListener, _progressRequestListener);
|
||||
okhttp3.Call localVarCall = uploadFileCall(petId, additionalMetadata, file, _callback);
|
||||
return localVarCall;
|
||||
|
||||
}
|
||||
@@ -1028,7 +791,7 @@ public class PetApi {
|
||||
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
|
||||
*/
|
||||
public ApiResponse<ModelApiResponse> uploadFileWithHttpInfo(Long petId, String additionalMetadata, File file) throws ApiException {
|
||||
okhttp3.Call localVarCall = uploadFileValidateBeforeCall(petId, additionalMetadata, file, null, null);
|
||||
okhttp3.Call localVarCall = uploadFileValidateBeforeCall(petId, additionalMetadata, file, null);
|
||||
Type localVarReturnType = new TypeToken<ModelApiResponse>(){}.getType();
|
||||
return localVarApiClient.execute(localVarCall, localVarReturnType);
|
||||
}
|
||||
@@ -1045,26 +808,7 @@ public class PetApi {
|
||||
*/
|
||||
public okhttp3.Call uploadFileAsync(Long petId, String additionalMetadata, File file, final ApiCallback<ModelApiResponse> _callback) throws ApiException {
|
||||
|
||||
ProgressResponseBody.ProgressListener _progressListener = null;
|
||||
ProgressRequestBody.ProgressRequestListener _progressRequestListener = null;
|
||||
|
||||
if (_callback != null) {
|
||||
_progressListener = new ProgressResponseBody.ProgressListener() {
|
||||
@Override
|
||||
public void update(long bytesRead, long contentLength, boolean done) {
|
||||
_callback.onDownloadProgress(bytesRead, contentLength, done);
|
||||
}
|
||||
};
|
||||
|
||||
_progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
|
||||
@Override
|
||||
public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
|
||||
_callback.onUploadProgress(bytesWritten, contentLength, done);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
okhttp3.Call localVarCall = uploadFileValidateBeforeCall(petId, additionalMetadata, file, _progressListener, _progressRequestListener);
|
||||
okhttp3.Call localVarCall = uploadFileValidateBeforeCall(petId, additionalMetadata, file, _callback);
|
||||
Type localVarReturnType = new TypeToken<ModelApiResponse>(){}.getType();
|
||||
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
|
||||
return localVarCall;
|
||||
@@ -1074,12 +818,11 @@ public class PetApi {
|
||||
* @param petId ID of pet to update (required)
|
||||
* @param requiredFile file to upload (required)
|
||||
* @param additionalMetadata Additional data to pass to server (optional)
|
||||
* @param _progressListener Progress listener
|
||||
* @param _progressRequestListener Progress request listener
|
||||
* @param _callback Callback for upload/download progress
|
||||
* @return Call to execute
|
||||
* @throws ApiException If fail to serialize the request body object
|
||||
*/
|
||||
public okhttp3.Call uploadFileWithRequiredFileCall(Long petId, File requiredFile, String additionalMetadata, final ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException {
|
||||
public okhttp3.Call uploadFileWithRequiredFileCall(Long petId, File requiredFile, String additionalMetadata, final ApiCallback _callback) throws ApiException {
|
||||
Object localVarPostBody = new Object();
|
||||
|
||||
// create path and map variables
|
||||
@@ -1112,24 +855,12 @@ public class PetApi {
|
||||
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
||||
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||
|
||||
if (_progressListener != null) {
|
||||
localVarApiClient.setHttpClient(localVarApiClient.getHttpClient().newBuilder().addNetworkInterceptor(new okhttp3.Interceptor() {
|
||||
@Override
|
||||
public okhttp3.Response intercept(okhttp3.Interceptor.Chain chain) throws IOException {
|
||||
okhttp3.Response originalResponse = chain.proceed(chain.request());
|
||||
return originalResponse.newBuilder()
|
||||
.body(new ProgressResponseBody(originalResponse.body(), _progressListener))
|
||||
.build();
|
||||
}
|
||||
}).build());
|
||||
}
|
||||
|
||||
String[] localVarAuthNames = new String[] { "petstore_auth" };
|
||||
return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _progressRequestListener);
|
||||
return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _callback);
|
||||
}
|
||||
|
||||
@SuppressWarnings("rawtypes")
|
||||
private okhttp3.Call uploadFileWithRequiredFileValidateBeforeCall(Long petId, File requiredFile, String additionalMetadata, final ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException {
|
||||
private okhttp3.Call uploadFileWithRequiredFileValidateBeforeCall(Long petId, File requiredFile, String additionalMetadata, final ApiCallback _callback) throws ApiException {
|
||||
|
||||
// verify the required parameter 'petId' is set
|
||||
if (petId == null) {
|
||||
@@ -1142,7 +873,7 @@ public class PetApi {
|
||||
}
|
||||
|
||||
|
||||
okhttp3.Call localVarCall = uploadFileWithRequiredFileCall(petId, requiredFile, additionalMetadata, _progressListener, _progressRequestListener);
|
||||
okhttp3.Call localVarCall = uploadFileWithRequiredFileCall(petId, requiredFile, additionalMetadata, _callback);
|
||||
return localVarCall;
|
||||
|
||||
}
|
||||
@@ -1171,7 +902,7 @@ public class PetApi {
|
||||
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
|
||||
*/
|
||||
public ApiResponse<ModelApiResponse> uploadFileWithRequiredFileWithHttpInfo(Long petId, File requiredFile, String additionalMetadata) throws ApiException {
|
||||
okhttp3.Call localVarCall = uploadFileWithRequiredFileValidateBeforeCall(petId, requiredFile, additionalMetadata, null, null);
|
||||
okhttp3.Call localVarCall = uploadFileWithRequiredFileValidateBeforeCall(petId, requiredFile, additionalMetadata, null);
|
||||
Type localVarReturnType = new TypeToken<ModelApiResponse>(){}.getType();
|
||||
return localVarApiClient.execute(localVarCall, localVarReturnType);
|
||||
}
|
||||
@@ -1188,26 +919,7 @@ public class PetApi {
|
||||
*/
|
||||
public okhttp3.Call uploadFileWithRequiredFileAsync(Long petId, File requiredFile, String additionalMetadata, final ApiCallback<ModelApiResponse> _callback) throws ApiException {
|
||||
|
||||
ProgressResponseBody.ProgressListener _progressListener = null;
|
||||
ProgressRequestBody.ProgressRequestListener _progressRequestListener = null;
|
||||
|
||||
if (_callback != null) {
|
||||
_progressListener = new ProgressResponseBody.ProgressListener() {
|
||||
@Override
|
||||
public void update(long bytesRead, long contentLength, boolean done) {
|
||||
_callback.onDownloadProgress(bytesRead, contentLength, done);
|
||||
}
|
||||
};
|
||||
|
||||
_progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
|
||||
@Override
|
||||
public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
|
||||
_callback.onUploadProgress(bytesWritten, contentLength, done);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
okhttp3.Call localVarCall = uploadFileWithRequiredFileValidateBeforeCall(petId, requiredFile, additionalMetadata, _progressListener, _progressRequestListener);
|
||||
okhttp3.Call localVarCall = uploadFileWithRequiredFileValidateBeforeCall(petId, requiredFile, additionalMetadata, _callback);
|
||||
Type localVarReturnType = new TypeToken<ModelApiResponse>(){}.getType();
|
||||
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
|
||||
return localVarCall;
|
||||
|
||||
@@ -57,12 +57,11 @@ public class StoreApi {
|
||||
/**
|
||||
* Build call for deleteOrder
|
||||
* @param orderId ID of the order that needs to be deleted (required)
|
||||
* @param _progressListener Progress listener
|
||||
* @param _progressRequestListener Progress request listener
|
||||
* @param _callback Callback for upload/download progress
|
||||
* @return Call to execute
|
||||
* @throws ApiException If fail to serialize the request body object
|
||||
*/
|
||||
public okhttp3.Call deleteOrderCall(String orderId, final ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException {
|
||||
public okhttp3.Call deleteOrderCall(String orderId, final ApiCallback _callback) throws ApiException {
|
||||
Object localVarPostBody = new Object();
|
||||
|
||||
// create path and map variables
|
||||
@@ -87,24 +86,12 @@ public class StoreApi {
|
||||
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
||||
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||
|
||||
if (_progressListener != null) {
|
||||
localVarApiClient.setHttpClient(localVarApiClient.getHttpClient().newBuilder().addNetworkInterceptor(new okhttp3.Interceptor() {
|
||||
@Override
|
||||
public okhttp3.Response intercept(okhttp3.Interceptor.Chain chain) throws IOException {
|
||||
okhttp3.Response originalResponse = chain.proceed(chain.request());
|
||||
return originalResponse.newBuilder()
|
||||
.body(new ProgressResponseBody(originalResponse.body(), _progressListener))
|
||||
.build();
|
||||
}
|
||||
}).build());
|
||||
}
|
||||
|
||||
String[] localVarAuthNames = new String[] { };
|
||||
return localVarApiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _progressRequestListener);
|
||||
return localVarApiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _callback);
|
||||
}
|
||||
|
||||
@SuppressWarnings("rawtypes")
|
||||
private okhttp3.Call deleteOrderValidateBeforeCall(String orderId, final ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException {
|
||||
private okhttp3.Call deleteOrderValidateBeforeCall(String orderId, final ApiCallback _callback) throws ApiException {
|
||||
|
||||
// verify the required parameter 'orderId' is set
|
||||
if (orderId == null) {
|
||||
@@ -112,7 +99,7 @@ public class StoreApi {
|
||||
}
|
||||
|
||||
|
||||
okhttp3.Call localVarCall = deleteOrderCall(orderId, _progressListener, _progressRequestListener);
|
||||
okhttp3.Call localVarCall = deleteOrderCall(orderId, _callback);
|
||||
return localVarCall;
|
||||
|
||||
}
|
||||
@@ -135,7 +122,7 @@ public class StoreApi {
|
||||
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
|
||||
*/
|
||||
public ApiResponse<Void> deleteOrderWithHttpInfo(String orderId) throws ApiException {
|
||||
okhttp3.Call localVarCall = deleteOrderValidateBeforeCall(orderId, null, null);
|
||||
okhttp3.Call localVarCall = deleteOrderValidateBeforeCall(orderId, null);
|
||||
return localVarApiClient.execute(localVarCall);
|
||||
}
|
||||
|
||||
@@ -149,37 +136,17 @@ public class StoreApi {
|
||||
*/
|
||||
public okhttp3.Call deleteOrderAsync(String orderId, final ApiCallback<Void> _callback) throws ApiException {
|
||||
|
||||
ProgressResponseBody.ProgressListener _progressListener = null;
|
||||
ProgressRequestBody.ProgressRequestListener _progressRequestListener = null;
|
||||
|
||||
if (_callback != null) {
|
||||
_progressListener = new ProgressResponseBody.ProgressListener() {
|
||||
@Override
|
||||
public void update(long bytesRead, long contentLength, boolean done) {
|
||||
_callback.onDownloadProgress(bytesRead, contentLength, done);
|
||||
}
|
||||
};
|
||||
|
||||
_progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
|
||||
@Override
|
||||
public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
|
||||
_callback.onUploadProgress(bytesWritten, contentLength, done);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
okhttp3.Call localVarCall = deleteOrderValidateBeforeCall(orderId, _progressListener, _progressRequestListener);
|
||||
okhttp3.Call localVarCall = deleteOrderValidateBeforeCall(orderId, _callback);
|
||||
localVarApiClient.executeAsync(localVarCall, _callback);
|
||||
return localVarCall;
|
||||
}
|
||||
/**
|
||||
* Build call for getInventory
|
||||
* @param _progressListener Progress listener
|
||||
* @param _progressRequestListener Progress request listener
|
||||
* @param _callback Callback for upload/download progress
|
||||
* @return Call to execute
|
||||
* @throws ApiException If fail to serialize the request body object
|
||||
*/
|
||||
public okhttp3.Call getInventoryCall(final ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException {
|
||||
public okhttp3.Call getInventoryCall(final ApiCallback _callback) throws ApiException {
|
||||
Object localVarPostBody = new Object();
|
||||
|
||||
// create path and map variables
|
||||
@@ -203,27 +170,15 @@ public class StoreApi {
|
||||
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
||||
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||
|
||||
if (_progressListener != null) {
|
||||
localVarApiClient.setHttpClient(localVarApiClient.getHttpClient().newBuilder().addNetworkInterceptor(new okhttp3.Interceptor() {
|
||||
@Override
|
||||
public okhttp3.Response intercept(okhttp3.Interceptor.Chain chain) throws IOException {
|
||||
okhttp3.Response originalResponse = chain.proceed(chain.request());
|
||||
return originalResponse.newBuilder()
|
||||
.body(new ProgressResponseBody(originalResponse.body(), _progressListener))
|
||||
.build();
|
||||
}
|
||||
}).build());
|
||||
}
|
||||
|
||||
String[] localVarAuthNames = new String[] { "api_key" };
|
||||
return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _progressRequestListener);
|
||||
return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _callback);
|
||||
}
|
||||
|
||||
@SuppressWarnings("rawtypes")
|
||||
private okhttp3.Call getInventoryValidateBeforeCall(final ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException {
|
||||
private okhttp3.Call getInventoryValidateBeforeCall(final ApiCallback _callback) throws ApiException {
|
||||
|
||||
|
||||
okhttp3.Call localVarCall = getInventoryCall(_progressListener, _progressRequestListener);
|
||||
okhttp3.Call localVarCall = getInventoryCall(_callback);
|
||||
return localVarCall;
|
||||
|
||||
}
|
||||
@@ -246,7 +201,7 @@ public class StoreApi {
|
||||
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
|
||||
*/
|
||||
public ApiResponse<Map<String, Integer>> getInventoryWithHttpInfo() throws ApiException {
|
||||
okhttp3.Call localVarCall = getInventoryValidateBeforeCall(null, null);
|
||||
okhttp3.Call localVarCall = getInventoryValidateBeforeCall(null);
|
||||
Type localVarReturnType = new TypeToken<Map<String, Integer>>(){}.getType();
|
||||
return localVarApiClient.execute(localVarCall, localVarReturnType);
|
||||
}
|
||||
@@ -260,26 +215,7 @@ public class StoreApi {
|
||||
*/
|
||||
public okhttp3.Call getInventoryAsync(final ApiCallback<Map<String, Integer>> _callback) throws ApiException {
|
||||
|
||||
ProgressResponseBody.ProgressListener _progressListener = null;
|
||||
ProgressRequestBody.ProgressRequestListener _progressRequestListener = null;
|
||||
|
||||
if (_callback != null) {
|
||||
_progressListener = new ProgressResponseBody.ProgressListener() {
|
||||
@Override
|
||||
public void update(long bytesRead, long contentLength, boolean done) {
|
||||
_callback.onDownloadProgress(bytesRead, contentLength, done);
|
||||
}
|
||||
};
|
||||
|
||||
_progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
|
||||
@Override
|
||||
public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
|
||||
_callback.onUploadProgress(bytesWritten, contentLength, done);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
okhttp3.Call localVarCall = getInventoryValidateBeforeCall(_progressListener, _progressRequestListener);
|
||||
okhttp3.Call localVarCall = getInventoryValidateBeforeCall(_callback);
|
||||
Type localVarReturnType = new TypeToken<Map<String, Integer>>(){}.getType();
|
||||
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
|
||||
return localVarCall;
|
||||
@@ -287,12 +223,11 @@ public class StoreApi {
|
||||
/**
|
||||
* Build call for getOrderById
|
||||
* @param orderId ID of pet that needs to be fetched (required)
|
||||
* @param _progressListener Progress listener
|
||||
* @param _progressRequestListener Progress request listener
|
||||
* @param _callback Callback for upload/download progress
|
||||
* @return Call to execute
|
||||
* @throws ApiException If fail to serialize the request body object
|
||||
*/
|
||||
public okhttp3.Call getOrderByIdCall(Long orderId, final ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException {
|
||||
public okhttp3.Call getOrderByIdCall(Long orderId, final ApiCallback _callback) throws ApiException {
|
||||
Object localVarPostBody = new Object();
|
||||
|
||||
// create path and map variables
|
||||
@@ -317,24 +252,12 @@ public class StoreApi {
|
||||
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
||||
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||
|
||||
if (_progressListener != null) {
|
||||
localVarApiClient.setHttpClient(localVarApiClient.getHttpClient().newBuilder().addNetworkInterceptor(new okhttp3.Interceptor() {
|
||||
@Override
|
||||
public okhttp3.Response intercept(okhttp3.Interceptor.Chain chain) throws IOException {
|
||||
okhttp3.Response originalResponse = chain.proceed(chain.request());
|
||||
return originalResponse.newBuilder()
|
||||
.body(new ProgressResponseBody(originalResponse.body(), _progressListener))
|
||||
.build();
|
||||
}
|
||||
}).build());
|
||||
}
|
||||
|
||||
String[] localVarAuthNames = new String[] { };
|
||||
return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _progressRequestListener);
|
||||
return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _callback);
|
||||
}
|
||||
|
||||
@SuppressWarnings("rawtypes")
|
||||
private okhttp3.Call getOrderByIdValidateBeforeCall(Long orderId, final ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException {
|
||||
private okhttp3.Call getOrderByIdValidateBeforeCall(Long orderId, final ApiCallback _callback) throws ApiException {
|
||||
|
||||
// verify the required parameter 'orderId' is set
|
||||
if (orderId == null) {
|
||||
@@ -342,7 +265,7 @@ public class StoreApi {
|
||||
}
|
||||
|
||||
|
||||
okhttp3.Call localVarCall = getOrderByIdCall(orderId, _progressListener, _progressRequestListener);
|
||||
okhttp3.Call localVarCall = getOrderByIdCall(orderId, _callback);
|
||||
return localVarCall;
|
||||
|
||||
}
|
||||
@@ -367,7 +290,7 @@ public class StoreApi {
|
||||
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
|
||||
*/
|
||||
public ApiResponse<Order> getOrderByIdWithHttpInfo(Long orderId) throws ApiException {
|
||||
okhttp3.Call localVarCall = getOrderByIdValidateBeforeCall(orderId, null, null);
|
||||
okhttp3.Call localVarCall = getOrderByIdValidateBeforeCall(orderId, null);
|
||||
Type localVarReturnType = new TypeToken<Order>(){}.getType();
|
||||
return localVarApiClient.execute(localVarCall, localVarReturnType);
|
||||
}
|
||||
@@ -382,26 +305,7 @@ public class StoreApi {
|
||||
*/
|
||||
public okhttp3.Call getOrderByIdAsync(Long orderId, final ApiCallback<Order> _callback) throws ApiException {
|
||||
|
||||
ProgressResponseBody.ProgressListener _progressListener = null;
|
||||
ProgressRequestBody.ProgressRequestListener _progressRequestListener = null;
|
||||
|
||||
if (_callback != null) {
|
||||
_progressListener = new ProgressResponseBody.ProgressListener() {
|
||||
@Override
|
||||
public void update(long bytesRead, long contentLength, boolean done) {
|
||||
_callback.onDownloadProgress(bytesRead, contentLength, done);
|
||||
}
|
||||
};
|
||||
|
||||
_progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
|
||||
@Override
|
||||
public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
|
||||
_callback.onUploadProgress(bytesWritten, contentLength, done);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
okhttp3.Call localVarCall = getOrderByIdValidateBeforeCall(orderId, _progressListener, _progressRequestListener);
|
||||
okhttp3.Call localVarCall = getOrderByIdValidateBeforeCall(orderId, _callback);
|
||||
Type localVarReturnType = new TypeToken<Order>(){}.getType();
|
||||
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
|
||||
return localVarCall;
|
||||
@@ -409,12 +313,11 @@ public class StoreApi {
|
||||
/**
|
||||
* Build call for placeOrder
|
||||
* @param body order placed for purchasing the pet (required)
|
||||
* @param _progressListener Progress listener
|
||||
* @param _progressRequestListener Progress request listener
|
||||
* @param _callback Callback for upload/download progress
|
||||
* @return Call to execute
|
||||
* @throws ApiException If fail to serialize the request body object
|
||||
*/
|
||||
public okhttp3.Call placeOrderCall(Order body, final ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException {
|
||||
public okhttp3.Call placeOrderCall(Order body, final ApiCallback _callback) throws ApiException {
|
||||
Object localVarPostBody = body;
|
||||
|
||||
// create path and map variables
|
||||
@@ -438,24 +341,12 @@ public class StoreApi {
|
||||
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
||||
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||
|
||||
if (_progressListener != null) {
|
||||
localVarApiClient.setHttpClient(localVarApiClient.getHttpClient().newBuilder().addNetworkInterceptor(new okhttp3.Interceptor() {
|
||||
@Override
|
||||
public okhttp3.Response intercept(okhttp3.Interceptor.Chain chain) throws IOException {
|
||||
okhttp3.Response originalResponse = chain.proceed(chain.request());
|
||||
return originalResponse.newBuilder()
|
||||
.body(new ProgressResponseBody(originalResponse.body(), _progressListener))
|
||||
.build();
|
||||
}
|
||||
}).build());
|
||||
}
|
||||
|
||||
String[] localVarAuthNames = new String[] { };
|
||||
return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _progressRequestListener);
|
||||
return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _callback);
|
||||
}
|
||||
|
||||
@SuppressWarnings("rawtypes")
|
||||
private okhttp3.Call placeOrderValidateBeforeCall(Order body, final ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException {
|
||||
private okhttp3.Call placeOrderValidateBeforeCall(Order body, final ApiCallback _callback) throws ApiException {
|
||||
|
||||
// verify the required parameter 'body' is set
|
||||
if (body == null) {
|
||||
@@ -463,7 +354,7 @@ public class StoreApi {
|
||||
}
|
||||
|
||||
|
||||
okhttp3.Call localVarCall = placeOrderCall(body, _progressListener, _progressRequestListener);
|
||||
okhttp3.Call localVarCall = placeOrderCall(body, _callback);
|
||||
return localVarCall;
|
||||
|
||||
}
|
||||
@@ -488,7 +379,7 @@ public class StoreApi {
|
||||
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
|
||||
*/
|
||||
public ApiResponse<Order> placeOrderWithHttpInfo(Order body) throws ApiException {
|
||||
okhttp3.Call localVarCall = placeOrderValidateBeforeCall(body, null, null);
|
||||
okhttp3.Call localVarCall = placeOrderValidateBeforeCall(body, null);
|
||||
Type localVarReturnType = new TypeToken<Order>(){}.getType();
|
||||
return localVarApiClient.execute(localVarCall, localVarReturnType);
|
||||
}
|
||||
@@ -503,26 +394,7 @@ public class StoreApi {
|
||||
*/
|
||||
public okhttp3.Call placeOrderAsync(Order body, final ApiCallback<Order> _callback) throws ApiException {
|
||||
|
||||
ProgressResponseBody.ProgressListener _progressListener = null;
|
||||
ProgressRequestBody.ProgressRequestListener _progressRequestListener = null;
|
||||
|
||||
if (_callback != null) {
|
||||
_progressListener = new ProgressResponseBody.ProgressListener() {
|
||||
@Override
|
||||
public void update(long bytesRead, long contentLength, boolean done) {
|
||||
_callback.onDownloadProgress(bytesRead, contentLength, done);
|
||||
}
|
||||
};
|
||||
|
||||
_progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
|
||||
@Override
|
||||
public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
|
||||
_callback.onUploadProgress(bytesWritten, contentLength, done);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
okhttp3.Call localVarCall = placeOrderValidateBeforeCall(body, _progressListener, _progressRequestListener);
|
||||
okhttp3.Call localVarCall = placeOrderValidateBeforeCall(body, _callback);
|
||||
Type localVarReturnType = new TypeToken<Order>(){}.getType();
|
||||
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
|
||||
return localVarCall;
|
||||
|
||||
@@ -57,12 +57,11 @@ public class UserApi {
|
||||
/**
|
||||
* Build call for createUser
|
||||
* @param body Created user object (required)
|
||||
* @param _progressListener Progress listener
|
||||
* @param _progressRequestListener Progress request listener
|
||||
* @param _callback Callback for upload/download progress
|
||||
* @return Call to execute
|
||||
* @throws ApiException If fail to serialize the request body object
|
||||
*/
|
||||
public okhttp3.Call createUserCall(User body, final ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException {
|
||||
public okhttp3.Call createUserCall(User body, final ApiCallback _callback) throws ApiException {
|
||||
Object localVarPostBody = body;
|
||||
|
||||
// create path and map variables
|
||||
@@ -86,24 +85,12 @@ public class UserApi {
|
||||
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
||||
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||
|
||||
if (_progressListener != null) {
|
||||
localVarApiClient.setHttpClient(localVarApiClient.getHttpClient().newBuilder().addNetworkInterceptor(new okhttp3.Interceptor() {
|
||||
@Override
|
||||
public okhttp3.Response intercept(okhttp3.Interceptor.Chain chain) throws IOException {
|
||||
okhttp3.Response originalResponse = chain.proceed(chain.request());
|
||||
return originalResponse.newBuilder()
|
||||
.body(new ProgressResponseBody(originalResponse.body(), _progressListener))
|
||||
.build();
|
||||
}
|
||||
}).build());
|
||||
}
|
||||
|
||||
String[] localVarAuthNames = new String[] { };
|
||||
return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _progressRequestListener);
|
||||
return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _callback);
|
||||
}
|
||||
|
||||
@SuppressWarnings("rawtypes")
|
||||
private okhttp3.Call createUserValidateBeforeCall(User body, final ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException {
|
||||
private okhttp3.Call createUserValidateBeforeCall(User body, final ApiCallback _callback) throws ApiException {
|
||||
|
||||
// verify the required parameter 'body' is set
|
||||
if (body == null) {
|
||||
@@ -111,7 +98,7 @@ public class UserApi {
|
||||
}
|
||||
|
||||
|
||||
okhttp3.Call localVarCall = createUserCall(body, _progressListener, _progressRequestListener);
|
||||
okhttp3.Call localVarCall = createUserCall(body, _callback);
|
||||
return localVarCall;
|
||||
|
||||
}
|
||||
@@ -134,7 +121,7 @@ public class UserApi {
|
||||
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
|
||||
*/
|
||||
public ApiResponse<Void> createUserWithHttpInfo(User body) throws ApiException {
|
||||
okhttp3.Call localVarCall = createUserValidateBeforeCall(body, null, null);
|
||||
okhttp3.Call localVarCall = createUserValidateBeforeCall(body, null);
|
||||
return localVarApiClient.execute(localVarCall);
|
||||
}
|
||||
|
||||
@@ -148,38 +135,18 @@ public class UserApi {
|
||||
*/
|
||||
public okhttp3.Call createUserAsync(User body, final ApiCallback<Void> _callback) throws ApiException {
|
||||
|
||||
ProgressResponseBody.ProgressListener _progressListener = null;
|
||||
ProgressRequestBody.ProgressRequestListener _progressRequestListener = null;
|
||||
|
||||
if (_callback != null) {
|
||||
_progressListener = new ProgressResponseBody.ProgressListener() {
|
||||
@Override
|
||||
public void update(long bytesRead, long contentLength, boolean done) {
|
||||
_callback.onDownloadProgress(bytesRead, contentLength, done);
|
||||
}
|
||||
};
|
||||
|
||||
_progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
|
||||
@Override
|
||||
public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
|
||||
_callback.onUploadProgress(bytesWritten, contentLength, done);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
okhttp3.Call localVarCall = createUserValidateBeforeCall(body, _progressListener, _progressRequestListener);
|
||||
okhttp3.Call localVarCall = createUserValidateBeforeCall(body, _callback);
|
||||
localVarApiClient.executeAsync(localVarCall, _callback);
|
||||
return localVarCall;
|
||||
}
|
||||
/**
|
||||
* Build call for createUsersWithArrayInput
|
||||
* @param body List of user object (required)
|
||||
* @param _progressListener Progress listener
|
||||
* @param _progressRequestListener Progress request listener
|
||||
* @param _callback Callback for upload/download progress
|
||||
* @return Call to execute
|
||||
* @throws ApiException If fail to serialize the request body object
|
||||
*/
|
||||
public okhttp3.Call createUsersWithArrayInputCall(List<User> body, final ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException {
|
||||
public okhttp3.Call createUsersWithArrayInputCall(List<User> body, final ApiCallback _callback) throws ApiException {
|
||||
Object localVarPostBody = body;
|
||||
|
||||
// create path and map variables
|
||||
@@ -203,24 +170,12 @@ public class UserApi {
|
||||
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
||||
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||
|
||||
if (_progressListener != null) {
|
||||
localVarApiClient.setHttpClient(localVarApiClient.getHttpClient().newBuilder().addNetworkInterceptor(new okhttp3.Interceptor() {
|
||||
@Override
|
||||
public okhttp3.Response intercept(okhttp3.Interceptor.Chain chain) throws IOException {
|
||||
okhttp3.Response originalResponse = chain.proceed(chain.request());
|
||||
return originalResponse.newBuilder()
|
||||
.body(new ProgressResponseBody(originalResponse.body(), _progressListener))
|
||||
.build();
|
||||
}
|
||||
}).build());
|
||||
}
|
||||
|
||||
String[] localVarAuthNames = new String[] { };
|
||||
return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _progressRequestListener);
|
||||
return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _callback);
|
||||
}
|
||||
|
||||
@SuppressWarnings("rawtypes")
|
||||
private okhttp3.Call createUsersWithArrayInputValidateBeforeCall(List<User> body, final ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException {
|
||||
private okhttp3.Call createUsersWithArrayInputValidateBeforeCall(List<User> body, final ApiCallback _callback) throws ApiException {
|
||||
|
||||
// verify the required parameter 'body' is set
|
||||
if (body == null) {
|
||||
@@ -228,7 +183,7 @@ public class UserApi {
|
||||
}
|
||||
|
||||
|
||||
okhttp3.Call localVarCall = createUsersWithArrayInputCall(body, _progressListener, _progressRequestListener);
|
||||
okhttp3.Call localVarCall = createUsersWithArrayInputCall(body, _callback);
|
||||
return localVarCall;
|
||||
|
||||
}
|
||||
@@ -251,7 +206,7 @@ public class UserApi {
|
||||
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
|
||||
*/
|
||||
public ApiResponse<Void> createUsersWithArrayInputWithHttpInfo(List<User> body) throws ApiException {
|
||||
okhttp3.Call localVarCall = createUsersWithArrayInputValidateBeforeCall(body, null, null);
|
||||
okhttp3.Call localVarCall = createUsersWithArrayInputValidateBeforeCall(body, null);
|
||||
return localVarApiClient.execute(localVarCall);
|
||||
}
|
||||
|
||||
@@ -265,38 +220,18 @@ public class UserApi {
|
||||
*/
|
||||
public okhttp3.Call createUsersWithArrayInputAsync(List<User> body, final ApiCallback<Void> _callback) throws ApiException {
|
||||
|
||||
ProgressResponseBody.ProgressListener _progressListener = null;
|
||||
ProgressRequestBody.ProgressRequestListener _progressRequestListener = null;
|
||||
|
||||
if (_callback != null) {
|
||||
_progressListener = new ProgressResponseBody.ProgressListener() {
|
||||
@Override
|
||||
public void update(long bytesRead, long contentLength, boolean done) {
|
||||
_callback.onDownloadProgress(bytesRead, contentLength, done);
|
||||
}
|
||||
};
|
||||
|
||||
_progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
|
||||
@Override
|
||||
public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
|
||||
_callback.onUploadProgress(bytesWritten, contentLength, done);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
okhttp3.Call localVarCall = createUsersWithArrayInputValidateBeforeCall(body, _progressListener, _progressRequestListener);
|
||||
okhttp3.Call localVarCall = createUsersWithArrayInputValidateBeforeCall(body, _callback);
|
||||
localVarApiClient.executeAsync(localVarCall, _callback);
|
||||
return localVarCall;
|
||||
}
|
||||
/**
|
||||
* Build call for createUsersWithListInput
|
||||
* @param body List of user object (required)
|
||||
* @param _progressListener Progress listener
|
||||
* @param _progressRequestListener Progress request listener
|
||||
* @param _callback Callback for upload/download progress
|
||||
* @return Call to execute
|
||||
* @throws ApiException If fail to serialize the request body object
|
||||
*/
|
||||
public okhttp3.Call createUsersWithListInputCall(List<User> body, final ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException {
|
||||
public okhttp3.Call createUsersWithListInputCall(List<User> body, final ApiCallback _callback) throws ApiException {
|
||||
Object localVarPostBody = body;
|
||||
|
||||
// create path and map variables
|
||||
@@ -320,24 +255,12 @@ public class UserApi {
|
||||
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
||||
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||
|
||||
if (_progressListener != null) {
|
||||
localVarApiClient.setHttpClient(localVarApiClient.getHttpClient().newBuilder().addNetworkInterceptor(new okhttp3.Interceptor() {
|
||||
@Override
|
||||
public okhttp3.Response intercept(okhttp3.Interceptor.Chain chain) throws IOException {
|
||||
okhttp3.Response originalResponse = chain.proceed(chain.request());
|
||||
return originalResponse.newBuilder()
|
||||
.body(new ProgressResponseBody(originalResponse.body(), _progressListener))
|
||||
.build();
|
||||
}
|
||||
}).build());
|
||||
}
|
||||
|
||||
String[] localVarAuthNames = new String[] { };
|
||||
return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _progressRequestListener);
|
||||
return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _callback);
|
||||
}
|
||||
|
||||
@SuppressWarnings("rawtypes")
|
||||
private okhttp3.Call createUsersWithListInputValidateBeforeCall(List<User> body, final ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException {
|
||||
private okhttp3.Call createUsersWithListInputValidateBeforeCall(List<User> body, final ApiCallback _callback) throws ApiException {
|
||||
|
||||
// verify the required parameter 'body' is set
|
||||
if (body == null) {
|
||||
@@ -345,7 +268,7 @@ public class UserApi {
|
||||
}
|
||||
|
||||
|
||||
okhttp3.Call localVarCall = createUsersWithListInputCall(body, _progressListener, _progressRequestListener);
|
||||
okhttp3.Call localVarCall = createUsersWithListInputCall(body, _callback);
|
||||
return localVarCall;
|
||||
|
||||
}
|
||||
@@ -368,7 +291,7 @@ public class UserApi {
|
||||
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
|
||||
*/
|
||||
public ApiResponse<Void> createUsersWithListInputWithHttpInfo(List<User> body) throws ApiException {
|
||||
okhttp3.Call localVarCall = createUsersWithListInputValidateBeforeCall(body, null, null);
|
||||
okhttp3.Call localVarCall = createUsersWithListInputValidateBeforeCall(body, null);
|
||||
return localVarApiClient.execute(localVarCall);
|
||||
}
|
||||
|
||||
@@ -382,38 +305,18 @@ public class UserApi {
|
||||
*/
|
||||
public okhttp3.Call createUsersWithListInputAsync(List<User> body, final ApiCallback<Void> _callback) throws ApiException {
|
||||
|
||||
ProgressResponseBody.ProgressListener _progressListener = null;
|
||||
ProgressRequestBody.ProgressRequestListener _progressRequestListener = null;
|
||||
|
||||
if (_callback != null) {
|
||||
_progressListener = new ProgressResponseBody.ProgressListener() {
|
||||
@Override
|
||||
public void update(long bytesRead, long contentLength, boolean done) {
|
||||
_callback.onDownloadProgress(bytesRead, contentLength, done);
|
||||
}
|
||||
};
|
||||
|
||||
_progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
|
||||
@Override
|
||||
public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
|
||||
_callback.onUploadProgress(bytesWritten, contentLength, done);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
okhttp3.Call localVarCall = createUsersWithListInputValidateBeforeCall(body, _progressListener, _progressRequestListener);
|
||||
okhttp3.Call localVarCall = createUsersWithListInputValidateBeforeCall(body, _callback);
|
||||
localVarApiClient.executeAsync(localVarCall, _callback);
|
||||
return localVarCall;
|
||||
}
|
||||
/**
|
||||
* Build call for deleteUser
|
||||
* @param username The name that needs to be deleted (required)
|
||||
* @param _progressListener Progress listener
|
||||
* @param _progressRequestListener Progress request listener
|
||||
* @param _callback Callback for upload/download progress
|
||||
* @return Call to execute
|
||||
* @throws ApiException If fail to serialize the request body object
|
||||
*/
|
||||
public okhttp3.Call deleteUserCall(String username, final ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException {
|
||||
public okhttp3.Call deleteUserCall(String username, final ApiCallback _callback) throws ApiException {
|
||||
Object localVarPostBody = new Object();
|
||||
|
||||
// create path and map variables
|
||||
@@ -438,24 +341,12 @@ public class UserApi {
|
||||
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
||||
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||
|
||||
if (_progressListener != null) {
|
||||
localVarApiClient.setHttpClient(localVarApiClient.getHttpClient().newBuilder().addNetworkInterceptor(new okhttp3.Interceptor() {
|
||||
@Override
|
||||
public okhttp3.Response intercept(okhttp3.Interceptor.Chain chain) throws IOException {
|
||||
okhttp3.Response originalResponse = chain.proceed(chain.request());
|
||||
return originalResponse.newBuilder()
|
||||
.body(new ProgressResponseBody(originalResponse.body(), _progressListener))
|
||||
.build();
|
||||
}
|
||||
}).build());
|
||||
}
|
||||
|
||||
String[] localVarAuthNames = new String[] { };
|
||||
return localVarApiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _progressRequestListener);
|
||||
return localVarApiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _callback);
|
||||
}
|
||||
|
||||
@SuppressWarnings("rawtypes")
|
||||
private okhttp3.Call deleteUserValidateBeforeCall(String username, final ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException {
|
||||
private okhttp3.Call deleteUserValidateBeforeCall(String username, final ApiCallback _callback) throws ApiException {
|
||||
|
||||
// verify the required parameter 'username' is set
|
||||
if (username == null) {
|
||||
@@ -463,7 +354,7 @@ public class UserApi {
|
||||
}
|
||||
|
||||
|
||||
okhttp3.Call localVarCall = deleteUserCall(username, _progressListener, _progressRequestListener);
|
||||
okhttp3.Call localVarCall = deleteUserCall(username, _callback);
|
||||
return localVarCall;
|
||||
|
||||
}
|
||||
@@ -486,7 +377,7 @@ public class UserApi {
|
||||
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
|
||||
*/
|
||||
public ApiResponse<Void> deleteUserWithHttpInfo(String username) throws ApiException {
|
||||
okhttp3.Call localVarCall = deleteUserValidateBeforeCall(username, null, null);
|
||||
okhttp3.Call localVarCall = deleteUserValidateBeforeCall(username, null);
|
||||
return localVarApiClient.execute(localVarCall);
|
||||
}
|
||||
|
||||
@@ -500,38 +391,18 @@ public class UserApi {
|
||||
*/
|
||||
public okhttp3.Call deleteUserAsync(String username, final ApiCallback<Void> _callback) throws ApiException {
|
||||
|
||||
ProgressResponseBody.ProgressListener _progressListener = null;
|
||||
ProgressRequestBody.ProgressRequestListener _progressRequestListener = null;
|
||||
|
||||
if (_callback != null) {
|
||||
_progressListener = new ProgressResponseBody.ProgressListener() {
|
||||
@Override
|
||||
public void update(long bytesRead, long contentLength, boolean done) {
|
||||
_callback.onDownloadProgress(bytesRead, contentLength, done);
|
||||
}
|
||||
};
|
||||
|
||||
_progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
|
||||
@Override
|
||||
public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
|
||||
_callback.onUploadProgress(bytesWritten, contentLength, done);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
okhttp3.Call localVarCall = deleteUserValidateBeforeCall(username, _progressListener, _progressRequestListener);
|
||||
okhttp3.Call localVarCall = deleteUserValidateBeforeCall(username, _callback);
|
||||
localVarApiClient.executeAsync(localVarCall, _callback);
|
||||
return localVarCall;
|
||||
}
|
||||
/**
|
||||
* Build call for getUserByName
|
||||
* @param username The name that needs to be fetched. Use user1 for testing. (required)
|
||||
* @param _progressListener Progress listener
|
||||
* @param _progressRequestListener Progress request listener
|
||||
* @param _callback Callback for upload/download progress
|
||||
* @return Call to execute
|
||||
* @throws ApiException If fail to serialize the request body object
|
||||
*/
|
||||
public okhttp3.Call getUserByNameCall(String username, final ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException {
|
||||
public okhttp3.Call getUserByNameCall(String username, final ApiCallback _callback) throws ApiException {
|
||||
Object localVarPostBody = new Object();
|
||||
|
||||
// create path and map variables
|
||||
@@ -556,24 +427,12 @@ public class UserApi {
|
||||
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
||||
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||
|
||||
if (_progressListener != null) {
|
||||
localVarApiClient.setHttpClient(localVarApiClient.getHttpClient().newBuilder().addNetworkInterceptor(new okhttp3.Interceptor() {
|
||||
@Override
|
||||
public okhttp3.Response intercept(okhttp3.Interceptor.Chain chain) throws IOException {
|
||||
okhttp3.Response originalResponse = chain.proceed(chain.request());
|
||||
return originalResponse.newBuilder()
|
||||
.body(new ProgressResponseBody(originalResponse.body(), _progressListener))
|
||||
.build();
|
||||
}
|
||||
}).build());
|
||||
}
|
||||
|
||||
String[] localVarAuthNames = new String[] { };
|
||||
return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _progressRequestListener);
|
||||
return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _callback);
|
||||
}
|
||||
|
||||
@SuppressWarnings("rawtypes")
|
||||
private okhttp3.Call getUserByNameValidateBeforeCall(String username, final ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException {
|
||||
private okhttp3.Call getUserByNameValidateBeforeCall(String username, final ApiCallback _callback) throws ApiException {
|
||||
|
||||
// verify the required parameter 'username' is set
|
||||
if (username == null) {
|
||||
@@ -581,7 +440,7 @@ public class UserApi {
|
||||
}
|
||||
|
||||
|
||||
okhttp3.Call localVarCall = getUserByNameCall(username, _progressListener, _progressRequestListener);
|
||||
okhttp3.Call localVarCall = getUserByNameCall(username, _callback);
|
||||
return localVarCall;
|
||||
|
||||
}
|
||||
@@ -606,7 +465,7 @@ public class UserApi {
|
||||
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
|
||||
*/
|
||||
public ApiResponse<User> getUserByNameWithHttpInfo(String username) throws ApiException {
|
||||
okhttp3.Call localVarCall = getUserByNameValidateBeforeCall(username, null, null);
|
||||
okhttp3.Call localVarCall = getUserByNameValidateBeforeCall(username, null);
|
||||
Type localVarReturnType = new TypeToken<User>(){}.getType();
|
||||
return localVarApiClient.execute(localVarCall, localVarReturnType);
|
||||
}
|
||||
@@ -621,26 +480,7 @@ public class UserApi {
|
||||
*/
|
||||
public okhttp3.Call getUserByNameAsync(String username, final ApiCallback<User> _callback) throws ApiException {
|
||||
|
||||
ProgressResponseBody.ProgressListener _progressListener = null;
|
||||
ProgressRequestBody.ProgressRequestListener _progressRequestListener = null;
|
||||
|
||||
if (_callback != null) {
|
||||
_progressListener = new ProgressResponseBody.ProgressListener() {
|
||||
@Override
|
||||
public void update(long bytesRead, long contentLength, boolean done) {
|
||||
_callback.onDownloadProgress(bytesRead, contentLength, done);
|
||||
}
|
||||
};
|
||||
|
||||
_progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
|
||||
@Override
|
||||
public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
|
||||
_callback.onUploadProgress(bytesWritten, contentLength, done);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
okhttp3.Call localVarCall = getUserByNameValidateBeforeCall(username, _progressListener, _progressRequestListener);
|
||||
okhttp3.Call localVarCall = getUserByNameValidateBeforeCall(username, _callback);
|
||||
Type localVarReturnType = new TypeToken<User>(){}.getType();
|
||||
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
|
||||
return localVarCall;
|
||||
@@ -649,12 +489,11 @@ public class UserApi {
|
||||
* Build call for loginUser
|
||||
* @param username The user name for login (required)
|
||||
* @param password The password for login in clear text (required)
|
||||
* @param _progressListener Progress listener
|
||||
* @param _progressRequestListener Progress request listener
|
||||
* @param _callback Callback for upload/download progress
|
||||
* @return Call to execute
|
||||
* @throws ApiException If fail to serialize the request body object
|
||||
*/
|
||||
public okhttp3.Call loginUserCall(String username, String password, final ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException {
|
||||
public okhttp3.Call loginUserCall(String username, String password, final ApiCallback _callback) throws ApiException {
|
||||
Object localVarPostBody = new Object();
|
||||
|
||||
// create path and map variables
|
||||
@@ -686,24 +525,12 @@ public class UserApi {
|
||||
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
||||
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||
|
||||
if (_progressListener != null) {
|
||||
localVarApiClient.setHttpClient(localVarApiClient.getHttpClient().newBuilder().addNetworkInterceptor(new okhttp3.Interceptor() {
|
||||
@Override
|
||||
public okhttp3.Response intercept(okhttp3.Interceptor.Chain chain) throws IOException {
|
||||
okhttp3.Response originalResponse = chain.proceed(chain.request());
|
||||
return originalResponse.newBuilder()
|
||||
.body(new ProgressResponseBody(originalResponse.body(), _progressListener))
|
||||
.build();
|
||||
}
|
||||
}).build());
|
||||
}
|
||||
|
||||
String[] localVarAuthNames = new String[] { };
|
||||
return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _progressRequestListener);
|
||||
return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _callback);
|
||||
}
|
||||
|
||||
@SuppressWarnings("rawtypes")
|
||||
private okhttp3.Call loginUserValidateBeforeCall(String username, String password, final ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException {
|
||||
private okhttp3.Call loginUserValidateBeforeCall(String username, String password, final ApiCallback _callback) throws ApiException {
|
||||
|
||||
// verify the required parameter 'username' is set
|
||||
if (username == null) {
|
||||
@@ -716,7 +543,7 @@ public class UserApi {
|
||||
}
|
||||
|
||||
|
||||
okhttp3.Call localVarCall = loginUserCall(username, password, _progressListener, _progressRequestListener);
|
||||
okhttp3.Call localVarCall = loginUserCall(username, password, _callback);
|
||||
return localVarCall;
|
||||
|
||||
}
|
||||
@@ -743,7 +570,7 @@ public class UserApi {
|
||||
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
|
||||
*/
|
||||
public ApiResponse<String> loginUserWithHttpInfo(String username, String password) throws ApiException {
|
||||
okhttp3.Call localVarCall = loginUserValidateBeforeCall(username, password, null, null);
|
||||
okhttp3.Call localVarCall = loginUserValidateBeforeCall(username, password, null);
|
||||
Type localVarReturnType = new TypeToken<String>(){}.getType();
|
||||
return localVarApiClient.execute(localVarCall, localVarReturnType);
|
||||
}
|
||||
@@ -759,38 +586,18 @@ public class UserApi {
|
||||
*/
|
||||
public okhttp3.Call loginUserAsync(String username, String password, final ApiCallback<String> _callback) throws ApiException {
|
||||
|
||||
ProgressResponseBody.ProgressListener _progressListener = null;
|
||||
ProgressRequestBody.ProgressRequestListener _progressRequestListener = null;
|
||||
|
||||
if (_callback != null) {
|
||||
_progressListener = new ProgressResponseBody.ProgressListener() {
|
||||
@Override
|
||||
public void update(long bytesRead, long contentLength, boolean done) {
|
||||
_callback.onDownloadProgress(bytesRead, contentLength, done);
|
||||
}
|
||||
};
|
||||
|
||||
_progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
|
||||
@Override
|
||||
public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
|
||||
_callback.onUploadProgress(bytesWritten, contentLength, done);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
okhttp3.Call localVarCall = loginUserValidateBeforeCall(username, password, _progressListener, _progressRequestListener);
|
||||
okhttp3.Call localVarCall = loginUserValidateBeforeCall(username, password, _callback);
|
||||
Type localVarReturnType = new TypeToken<String>(){}.getType();
|
||||
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
|
||||
return localVarCall;
|
||||
}
|
||||
/**
|
||||
* Build call for logoutUser
|
||||
* @param _progressListener Progress listener
|
||||
* @param _progressRequestListener Progress request listener
|
||||
* @param _callback Callback for upload/download progress
|
||||
* @return Call to execute
|
||||
* @throws ApiException If fail to serialize the request body object
|
||||
*/
|
||||
public okhttp3.Call logoutUserCall(final ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException {
|
||||
public okhttp3.Call logoutUserCall(final ApiCallback _callback) throws ApiException {
|
||||
Object localVarPostBody = new Object();
|
||||
|
||||
// create path and map variables
|
||||
@@ -814,27 +621,15 @@ public class UserApi {
|
||||
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
||||
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||
|
||||
if (_progressListener != null) {
|
||||
localVarApiClient.setHttpClient(localVarApiClient.getHttpClient().newBuilder().addNetworkInterceptor(new okhttp3.Interceptor() {
|
||||
@Override
|
||||
public okhttp3.Response intercept(okhttp3.Interceptor.Chain chain) throws IOException {
|
||||
okhttp3.Response originalResponse = chain.proceed(chain.request());
|
||||
return originalResponse.newBuilder()
|
||||
.body(new ProgressResponseBody(originalResponse.body(), _progressListener))
|
||||
.build();
|
||||
}
|
||||
}).build());
|
||||
}
|
||||
|
||||
String[] localVarAuthNames = new String[] { };
|
||||
return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _progressRequestListener);
|
||||
return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _callback);
|
||||
}
|
||||
|
||||
@SuppressWarnings("rawtypes")
|
||||
private okhttp3.Call logoutUserValidateBeforeCall(final ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException {
|
||||
private okhttp3.Call logoutUserValidateBeforeCall(final ApiCallback _callback) throws ApiException {
|
||||
|
||||
|
||||
okhttp3.Call localVarCall = logoutUserCall(_progressListener, _progressRequestListener);
|
||||
okhttp3.Call localVarCall = logoutUserCall(_callback);
|
||||
return localVarCall;
|
||||
|
||||
}
|
||||
@@ -855,7 +650,7 @@ public class UserApi {
|
||||
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
|
||||
*/
|
||||
public ApiResponse<Void> logoutUserWithHttpInfo() throws ApiException {
|
||||
okhttp3.Call localVarCall = logoutUserValidateBeforeCall(null, null);
|
||||
okhttp3.Call localVarCall = logoutUserValidateBeforeCall(null);
|
||||
return localVarApiClient.execute(localVarCall);
|
||||
}
|
||||
|
||||
@@ -868,26 +663,7 @@ public class UserApi {
|
||||
*/
|
||||
public okhttp3.Call logoutUserAsync(final ApiCallback<Void> _callback) throws ApiException {
|
||||
|
||||
ProgressResponseBody.ProgressListener _progressListener = null;
|
||||
ProgressRequestBody.ProgressRequestListener _progressRequestListener = null;
|
||||
|
||||
if (_callback != null) {
|
||||
_progressListener = new ProgressResponseBody.ProgressListener() {
|
||||
@Override
|
||||
public void update(long bytesRead, long contentLength, boolean done) {
|
||||
_callback.onDownloadProgress(bytesRead, contentLength, done);
|
||||
}
|
||||
};
|
||||
|
||||
_progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
|
||||
@Override
|
||||
public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
|
||||
_callback.onUploadProgress(bytesWritten, contentLength, done);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
okhttp3.Call localVarCall = logoutUserValidateBeforeCall(_progressListener, _progressRequestListener);
|
||||
okhttp3.Call localVarCall = logoutUserValidateBeforeCall(_callback);
|
||||
localVarApiClient.executeAsync(localVarCall, _callback);
|
||||
return localVarCall;
|
||||
}
|
||||
@@ -895,12 +671,11 @@ public class UserApi {
|
||||
* Build call for updateUser
|
||||
* @param username name that need to be deleted (required)
|
||||
* @param body Updated user object (required)
|
||||
* @param _progressListener Progress listener
|
||||
* @param _progressRequestListener Progress request listener
|
||||
* @param _callback Callback for upload/download progress
|
||||
* @return Call to execute
|
||||
* @throws ApiException If fail to serialize the request body object
|
||||
*/
|
||||
public okhttp3.Call updateUserCall(String username, User body, final ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException {
|
||||
public okhttp3.Call updateUserCall(String username, User body, final ApiCallback _callback) throws ApiException {
|
||||
Object localVarPostBody = body;
|
||||
|
||||
// create path and map variables
|
||||
@@ -925,24 +700,12 @@ public class UserApi {
|
||||
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
||||
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||
|
||||
if (_progressListener != null) {
|
||||
localVarApiClient.setHttpClient(localVarApiClient.getHttpClient().newBuilder().addNetworkInterceptor(new okhttp3.Interceptor() {
|
||||
@Override
|
||||
public okhttp3.Response intercept(okhttp3.Interceptor.Chain chain) throws IOException {
|
||||
okhttp3.Response originalResponse = chain.proceed(chain.request());
|
||||
return originalResponse.newBuilder()
|
||||
.body(new ProgressResponseBody(originalResponse.body(), _progressListener))
|
||||
.build();
|
||||
}
|
||||
}).build());
|
||||
}
|
||||
|
||||
String[] localVarAuthNames = new String[] { };
|
||||
return localVarApiClient.buildCall(localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _progressRequestListener);
|
||||
return localVarApiClient.buildCall(localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _callback);
|
||||
}
|
||||
|
||||
@SuppressWarnings("rawtypes")
|
||||
private okhttp3.Call updateUserValidateBeforeCall(String username, User body, final ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException {
|
||||
private okhttp3.Call updateUserValidateBeforeCall(String username, User body, final ApiCallback _callback) throws ApiException {
|
||||
|
||||
// verify the required parameter 'username' is set
|
||||
if (username == null) {
|
||||
@@ -955,7 +718,7 @@ public class UserApi {
|
||||
}
|
||||
|
||||
|
||||
okhttp3.Call localVarCall = updateUserCall(username, body, _progressListener, _progressRequestListener);
|
||||
okhttp3.Call localVarCall = updateUserCall(username, body, _callback);
|
||||
return localVarCall;
|
||||
|
||||
}
|
||||
@@ -980,7 +743,7 @@ public class UserApi {
|
||||
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
|
||||
*/
|
||||
public ApiResponse<Void> updateUserWithHttpInfo(String username, User body) throws ApiException {
|
||||
okhttp3.Call localVarCall = updateUserValidateBeforeCall(username, body, null, null);
|
||||
okhttp3.Call localVarCall = updateUserValidateBeforeCall(username, body, null);
|
||||
return localVarApiClient.execute(localVarCall);
|
||||
}
|
||||
|
||||
@@ -995,26 +758,7 @@ public class UserApi {
|
||||
*/
|
||||
public okhttp3.Call updateUserAsync(String username, User body, final ApiCallback<Void> _callback) throws ApiException {
|
||||
|
||||
ProgressResponseBody.ProgressListener _progressListener = null;
|
||||
ProgressRequestBody.ProgressRequestListener _progressRequestListener = null;
|
||||
|
||||
if (_callback != null) {
|
||||
_progressListener = new ProgressResponseBody.ProgressListener() {
|
||||
@Override
|
||||
public void update(long bytesRead, long contentLength, boolean done) {
|
||||
_callback.onDownloadProgress(bytesRead, contentLength, done);
|
||||
}
|
||||
};
|
||||
|
||||
_progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
|
||||
@Override
|
||||
public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
|
||||
_callback.onUploadProgress(bytesWritten, contentLength, done);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
okhttp3.Call localVarCall = updateUserValidateBeforeCall(username, body, _progressListener, _progressRequestListener);
|
||||
okhttp3.Call localVarCall = updateUserValidateBeforeCall(username, body, _callback);
|
||||
localVarApiClient.executeAsync(localVarCall, _callback);
|
||||
return localVarCall;
|
||||
}
|
||||
|
||||
@@ -42,8 +42,8 @@ public class AnotherFakeApiTest {
|
||||
*/
|
||||
@Test
|
||||
public void call123testSpecialTagsTest() throws ApiException {
|
||||
Client client = null;
|
||||
Client response = api.call123testSpecialTags(client);
|
||||
Client body = null;
|
||||
Client response = api.call123testSpecialTags(body);
|
||||
|
||||
// TODO: test validations
|
||||
}
|
||||
|
||||
@@ -22,6 +22,7 @@ import org.threeten.bp.LocalDate;
|
||||
import org.threeten.bp.OffsetDateTime;
|
||||
import org.openapitools.client.model.OuterComposite;
|
||||
import org.openapitools.client.model.User;
|
||||
import org.openapitools.client.model.XmlItem;
|
||||
import org.junit.Test;
|
||||
import org.junit.Ignore;
|
||||
|
||||
@@ -39,6 +40,22 @@ public class FakeApiTest {
|
||||
private final FakeApi api = new FakeApi();
|
||||
|
||||
|
||||
/**
|
||||
* creates an XmlItem
|
||||
*
|
||||
* this route creates an XmlItem
|
||||
*
|
||||
* @throws ApiException
|
||||
* if the Api call fails
|
||||
*/
|
||||
@Test
|
||||
public void createXmlItemTest() throws ApiException {
|
||||
XmlItem xmlItem = null;
|
||||
api.createXmlItem(xmlItem);
|
||||
|
||||
// TODO: test validations
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
@@ -65,8 +82,8 @@ public class FakeApiTest {
|
||||
*/
|
||||
@Test
|
||||
public void fakeOuterCompositeSerializeTest() throws ApiException {
|
||||
OuterComposite outerComposite = null;
|
||||
OuterComposite response = api.fakeOuterCompositeSerialize(outerComposite);
|
||||
OuterComposite body = null;
|
||||
OuterComposite response = api.fakeOuterCompositeSerialize(body);
|
||||
|
||||
// TODO: test validations
|
||||
}
|
||||
@@ -113,8 +130,8 @@ public class FakeApiTest {
|
||||
*/
|
||||
@Test
|
||||
public void testBodyWithFileSchemaTest() throws ApiException {
|
||||
FileSchemaTestClass fileSchemaTestClass = null;
|
||||
api.testBodyWithFileSchema(fileSchemaTestClass);
|
||||
FileSchemaTestClass body = null;
|
||||
api.testBodyWithFileSchema(body);
|
||||
|
||||
// TODO: test validations
|
||||
}
|
||||
@@ -130,8 +147,8 @@ public class FakeApiTest {
|
||||
@Test
|
||||
public void testBodyWithQueryParamsTest() throws ApiException {
|
||||
String query = null;
|
||||
User user = null;
|
||||
api.testBodyWithQueryParams(query, user);
|
||||
User body = null;
|
||||
api.testBodyWithQueryParams(query, body);
|
||||
|
||||
// TODO: test validations
|
||||
}
|
||||
@@ -146,8 +163,8 @@ public class FakeApiTest {
|
||||
*/
|
||||
@Test
|
||||
public void testClientModelTest() throws ApiException {
|
||||
Client client = null;
|
||||
Client response = api.testClientModel(client);
|
||||
Client body = null;
|
||||
Client response = api.testClientModel(body);
|
||||
|
||||
// TODO: test validations
|
||||
}
|
||||
@@ -239,8 +256,8 @@ public class FakeApiTest {
|
||||
*/
|
||||
@Test
|
||||
public void testInlineAdditionalPropertiesTest() throws ApiException {
|
||||
Map<String, String> requestBody = null;
|
||||
api.testInlineAdditionalProperties(requestBody);
|
||||
Map<String, String> param = null;
|
||||
api.testInlineAdditionalProperties(param);
|
||||
|
||||
// TODO: test validations
|
||||
}
|
||||
|
||||
@@ -42,8 +42,8 @@ public class FakeClassnameTags123ApiTest {
|
||||
*/
|
||||
@Test
|
||||
public void testClassnameTest() throws ApiException {
|
||||
Client client = null;
|
||||
Client response = api.testClassname(client);
|
||||
Client body = null;
|
||||
Client response = api.testClassname(body);
|
||||
|
||||
// TODO: test validations
|
||||
}
|
||||
|
||||
@@ -89,8 +89,8 @@ public class StoreApiTest {
|
||||
*/
|
||||
@Test
|
||||
public void placeOrderTest() throws ApiException {
|
||||
Order order = null;
|
||||
Order response = api.placeOrder(order);
|
||||
Order body = null;
|
||||
Order response = api.placeOrder(body);
|
||||
|
||||
// TODO: test validations
|
||||
}
|
||||
|
||||
@@ -42,8 +42,8 @@ public class UserApiTest {
|
||||
*/
|
||||
@Test
|
||||
public void createUserTest() throws ApiException {
|
||||
User user = null;
|
||||
api.createUser(user);
|
||||
User body = null;
|
||||
api.createUser(body);
|
||||
|
||||
// TODO: test validations
|
||||
}
|
||||
@@ -58,8 +58,8 @@ public class UserApiTest {
|
||||
*/
|
||||
@Test
|
||||
public void createUsersWithArrayInputTest() throws ApiException {
|
||||
List<User> user = null;
|
||||
api.createUsersWithArrayInput(user);
|
||||
List<User> body = null;
|
||||
api.createUsersWithArrayInput(body);
|
||||
|
||||
// TODO: test validations
|
||||
}
|
||||
@@ -74,8 +74,8 @@ public class UserApiTest {
|
||||
*/
|
||||
@Test
|
||||
public void createUsersWithListInputTest() throws ApiException {
|
||||
List<User> user = null;
|
||||
api.createUsersWithListInput(user);
|
||||
List<User> body = null;
|
||||
api.createUsersWithListInput(body);
|
||||
|
||||
// TODO: test validations
|
||||
}
|
||||
@@ -155,8 +155,8 @@ public class UserApiTest {
|
||||
@Test
|
||||
public void updateUserTest() throws ApiException {
|
||||
String username = null;
|
||||
User user = null;
|
||||
api.updateUser(username, user);
|
||||
User body = null;
|
||||
api.updateUser(username, body);
|
||||
|
||||
// TODO: test validations
|
||||
}
|
||||
|
||||
@@ -228,51 +228,51 @@ public class XmlItemTest {
|
||||
}
|
||||
|
||||
/**
|
||||
* Test the property 'prefixNamespaceString'
|
||||
* Test the property 'prefixNsString'
|
||||
*/
|
||||
@Test
|
||||
public void prefixNamespaceStringTest() {
|
||||
// TODO: test prefixNamespaceString
|
||||
public void prefixNsStringTest() {
|
||||
// TODO: test prefixNsString
|
||||
}
|
||||
|
||||
/**
|
||||
* Test the property 'prefixNamespaceNumber'
|
||||
* Test the property 'prefixNsNumber'
|
||||
*/
|
||||
@Test
|
||||
public void prefixNamespaceNumberTest() {
|
||||
// TODO: test prefixNamespaceNumber
|
||||
public void prefixNsNumberTest() {
|
||||
// TODO: test prefixNsNumber
|
||||
}
|
||||
|
||||
/**
|
||||
* Test the property 'prefixNamespaceInteger'
|
||||
* Test the property 'prefixNsInteger'
|
||||
*/
|
||||
@Test
|
||||
public void prefixNamespaceIntegerTest() {
|
||||
// TODO: test prefixNamespaceInteger
|
||||
public void prefixNsIntegerTest() {
|
||||
// TODO: test prefixNsInteger
|
||||
}
|
||||
|
||||
/**
|
||||
* Test the property 'prefixNamespaceBoolean'
|
||||
* Test the property 'prefixNsBoolean'
|
||||
*/
|
||||
@Test
|
||||
public void prefixNamespaceBooleanTest() {
|
||||
// TODO: test prefixNamespaceBoolean
|
||||
public void prefixNsBooleanTest() {
|
||||
// TODO: test prefixNsBoolean
|
||||
}
|
||||
|
||||
/**
|
||||
* Test the property 'prefixNamespaceArray'
|
||||
* Test the property 'prefixNsArray'
|
||||
*/
|
||||
@Test
|
||||
public void prefixNamespaceArrayTest() {
|
||||
// TODO: test prefixNamespaceArray
|
||||
public void prefixNsArrayTest() {
|
||||
// TODO: test prefixNsArray
|
||||
}
|
||||
|
||||
/**
|
||||
* Test the property 'prefixNamespaceWrappedArray'
|
||||
* Test the property 'prefixNsWrappedArray'
|
||||
*/
|
||||
@Test
|
||||
public void prefixNamespaceWrappedArrayTest() {
|
||||
// TODO: test prefixNamespaceWrappedArray
|
||||
public void prefixNsWrappedArrayTest() {
|
||||
// TODO: test prefixNsWrappedArray
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user